Package org.opencms.workplace.editors
Class CmsTinyMceToolbarHelper
- java.lang.Object
-
- org.opencms.workplace.editors.CmsTinyMceToolbarHelper
-
public final class CmsTinyMceToolbarHelper extends java.lang.Object
This class is used to help constructing the TinyMCE toolbar configuration, both for client-side and server-side code.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BUTTON_TRANSLATION
The translation of the generic widget button names to TinyMCE specific button names.static java.util.Map<java.lang.String,java.lang.String>
BUTTON_TRANSLATION_MAP
The map containing the translation of the generic widget button names to TinyMCE specific button names.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
createTinyMceToolbarStringFromGenericToolbarItems(java.util.List<java.lang.String> barItems)
Helper method to generate a TinyMCE-specific toolbar configuration string from a list of generic toolbar button names.static java.lang.String
getContextMenuEntries(java.util.List<java.lang.String> barItems)
Returns the context menu entries according to the configured tool-bar items.static java.lang.String
translateButton(java.lang.String cmsButtonName)
Translates a generic button name to a TinyMCE-specific button name (or a comma-separated list of button names).
-
-
-
Field Detail
-
BUTTON_TRANSLATION
public static final java.lang.String BUTTON_TRANSLATION
The translation of the generic widget button names to TinyMCE specific button names.- See Also:
- Constant Field Values
-
BUTTON_TRANSLATION_MAP
public static final java.util.Map<java.lang.String,java.lang.String> BUTTON_TRANSLATION_MAP
The map containing the translation of the generic widget button names to TinyMCE specific button names.
-
-
Method Detail
-
createTinyMceToolbarStringFromGenericToolbarItems
public static java.lang.String createTinyMceToolbarStringFromGenericToolbarItems(java.util.List<java.lang.String> barItems)
Helper method to generate a TinyMCE-specific toolbar configuration string from a list of generic toolbar button names.- Parameters:
barItems
- the generic toolbar items- Returns:
- the TinyMCE toolbar configuration string
-
getContextMenuEntries
public static java.lang.String getContextMenuEntries(java.util.List<java.lang.String> barItems)
Returns the context menu entries according to the configured tool-bar items.- Parameters:
barItems
- the tool-bar items- Returns:
- the context menu entries
-
translateButton
public static java.lang.String translateButton(java.lang.String cmsButtonName)
Translates a generic button name to a TinyMCE-specific button name (or a comma-separated list of button names).- Parameters:
cmsButtonName
- the generic button name- Returns:
- the TinyMCE button name(s)
-
-