Class StaticRichTextConfiguration.StaticRichTextConfigurationStyle
java.lang.Object
org.ametys.core.ui.widgets.richtext.StaticRichTextConfiguration.StaticRichTextConfigurationStyle
- All Implemented Interfaces:
RichTextConfigurationStyle
- Enclosing class:
- StaticRichTextConfiguration
public static class StaticRichTextConfiguration.StaticRichTextConfigurationStyle
extends Object
implements RichTextConfigurationStyle
A configured implementation of
RichTextConfigurationStyle
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The backoffice css classprotected String
The icon for the button in smallprotected String
The icon for the button in smallprotected String
The icon for the button in smallprotected String
The editor css class nameprotected I18nizableText
The descriptionprotected I18nizableText
The labelprotected String
The tag name -
Constructor Summary
ModifierConstructorDescriptionStaticRichTextConfigurationStyle
(String tagNameAndClassName, I18nizableText label, I18nizableText description, String buttonCSSClass, String buttonSmallIcon, String buttonMediumIcon, String buttonLargeIcon, boolean isRenderingOnlyAClass) Creates by valuesprotected
StaticRichTextConfigurationStyle
(Configuration configuration, boolean isRenderingOnlyAClass, String pluginName, Logger logger) Create by configuration -
Method Summary
Modifier and TypeMethodDescriptionGet the optional css to apply to the button.
The CSS file declaring this class has to be loaded separately.Get the style description.Get the style label.Get the optional image to set on the button.Get the optional image to set on the button.Get the optional image to set on the button.Optionally a style can specify a CSS class name to use.
The 'class' attribute has to be separately authorized and this particular value also.Optionally a style can specify a tag name to use.
-
Field Details
-
_tagName
The tag name -
_className
The editor css class name -
_label
The label -
_description
The description -
_buttonCSSClass
The backoffice css class -
_buttonSmallIcon
The icon for the button in small -
_buttonMediumIcon
The icon for the button in small -
_buttonLargeIcon
The icon for the button in small
-
-
Constructor Details
-
StaticRichTextConfigurationStyle
protected StaticRichTextConfigurationStyle(Configuration configuration, boolean isRenderingOnlyAClass, String pluginName, Logger logger) throws ConfigurationException Create by configuration- Parameters:
configuration
- The tag configurationisRenderingOnlyAClass
- In configuration rendering attribute can be only a class or a tag with an option ".class"pluginName
- The name of the plugin where it was declaredlogger
- The logger- Throws:
ConfigurationException
- If an error occurred
-
StaticRichTextConfigurationStyle
public StaticRichTextConfigurationStyle(String tagNameAndClassName, I18nizableText label, I18nizableText description, String buttonCSSClass, String buttonSmallIcon, String buttonMediumIcon, String buttonLargeIcon, boolean isRenderingOnlyAClass) Creates by values- Parameters:
tagNameAndClassName
- The rendering for inline editor such as h1.biglabel
- The label for the buttondescription
- The description for the buttonbuttonCSSClass
- The css for the buttonbuttonSmallIcon
- The small icon for the buttonbuttonMediumIcon
- The medium icon for the buttonbuttonLargeIcon
- The large icon for the buttonisRenderingOnlyAClass
- In configuration rendering attribute can be only a class or a tag with an option ".class"
-
-
Method Details
-
getTagName
Description copied from interface:RichTextConfigurationStyle
Optionally a style can specify a tag name to use. For example, some 'paragraph' styles may use 'p' while another can use 'h1'.
Tag has to be authorized separately- Specified by:
getTagName
in interfaceRichTextConfigurationStyle
- Returns:
- The tag name. Can be null.
-
getClassName
Description copied from interface:RichTextConfigurationStyle
Optionally a style can specify a CSS class name to use.
The 'class' attribute has to be separately authorized and this particular value also.- Specified by:
getClassName
in interfaceRichTextConfigurationStyle
- Returns:
- The class name. Can be null.
-
getButtonLabel
Description copied from interface:RichTextConfigurationStyle
Get the style label. A short name for button text.- Specified by:
getButtonLabel
in interfaceRichTextConfigurationStyle
- Returns:
- A non-null value
-
getButtonDescription
Description copied from interface:RichTextConfigurationStyle
Get the style description. A long description for tips.- Specified by:
getButtonDescription
in interfaceRichTextConfigurationStyle
- Returns:
- A non-null value
-
getButtonCSSClass
Description copied from interface:RichTextConfigurationStyle
Get the optional css to apply to the button.
The CSS file declaring this class has to be loaded separately.- Specified by:
getButtonCSSClass
in interfaceRichTextConfigurationStyle
- Returns:
- A class name. Can be null.
-
getButtonSmallIcon
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Small is 16x16.- Specified by:
getButtonSmallIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-
getButtonMediumIcon
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Medium is 32x32.- Specified by:
getButtonMediumIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-
getButtonLargeIcon
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Large is 48x48.- Specified by:
getButtonLargeIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-