Class StaticRichTextConfiguration.StaticRichTextConfigurationTag
java.lang.Object
org.ametys.core.ui.widgets.richtext.StaticRichTextConfiguration.StaticRichTextConfigurationTag
- All Implemented Interfaces:
RichTextConfigurationTag
- Enclosing class:
- StaticRichTextConfiguration
public static class StaticRichTextConfiguration.StaticRichTextConfigurationTag
extends Object
implements RichTextConfigurationTag
A configured implementation of the
RichTextConfigurationTag
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.widgets.richtext.RichTextConfigurationTag
RichTextConfigurationTag.EMPTY_TAG
-
Field Summary
Modifier and TypeFieldDescriptionprotected Set<RichTextConfigurationAttribute>
The handled attributesprotected RichTextConfigurationTag.EMPTY_TAG
The empty behaviorThe synonymsprotected String
The handled tag name -
Constructor Summary
ModifierConstructorDescriptionStaticRichTextConfigurationTag
(String tagName, RichTextConfigurationTag.EMPTY_TAG emptyTag, Set<String> synonyms, Set<RichTextConfigurationAttribute> attributes) Create by valuesprotected
StaticRichTextConfigurationTag
(Configuration configuration) Create by configuration -
Method Summary
Modifier and TypeMethodDescriptionGet the attributes handled on this tagThe tags that should be replaced by this one.getTag()
Get the tag name.Determine the action to do when this tag is empty.
-
Field Details
-
_tagName
The handled tag name -
_emptyTag
The empty behavior -
_synonyms
The synonyms -
_attributes
The handled attributes
-
-
Constructor Details
-
StaticRichTextConfigurationTag
public StaticRichTextConfigurationTag(String tagName, RichTextConfigurationTag.EMPTY_TAG emptyTag, Set<String> synonyms, Set<RichTextConfigurationAttribute> attributes) Create by values- Parameters:
tagName
- The tag name. Cannot be null.emptyTag
- The behavior when empty. Can be null to use CLOSEsynonyms
- A set of synonymsattributes
- A set of authorized attributes
-
StaticRichTextConfigurationTag
Create by configuration- Parameters:
configuration
- The tag configuration- Throws:
ConfigurationException
- If an error occurred
-
-
Method Details
-
getTag
Description copied from interface:RichTextConfigurationTag
Get the tag name. Such as 'span'.- Specified by:
getTag
in interfaceRichTextConfigurationTag
- Returns:
- The tag name. Cannot be empty or null.
-
onEmptyTag
Description copied from interface:RichTextConfigurationTag
Determine the action to do when this tag is empty.- Specified by:
onEmptyTag
in interfaceRichTextConfigurationTag
- Returns:
- The behavior. Cannot be null.
-
getSynonyms
Description copied from interface:RichTextConfigurationTag
The tags that should be replaced by this one. For example, "b" should be replaced by "strong". Note that if "b" is handled otherwise, it will not be replaced.- Specified by:
getSynonyms
in interfaceRichTextConfigurationTag
- Returns:
- A non null set of tags.
-
getAttributes
Description copied from interface:RichTextConfigurationTag
Get the attributes handled on this tag- Specified by:
getAttributes
in interfaceRichTextConfigurationTag
- Returns:
- A non null set of attributes.
-