Package org.opencms.workplace.editors
Class CmsTinyMceToolbarHelper
java.lang.Object
org.opencms.workplace.editors.CmsTinyMceToolbarHelper
This class is used to help constructing the TinyMCE toolbar configuration, both for client-side and server-side code.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The translation of the generic widget button names to TinyMCE specific button names.The map containing the translation of the generic widget button names to TinyMCE specific button names. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Helper method to generate a TinyMCE-specific toolbar configuration string from a list of generic toolbar button names.static String
getContextMenuEntries
(List<String> barItems) Returns the context menu entries according to the configured tool-bar items.static String
translateButton
(String cmsButtonName) Translates a generic button name to a TinyMCE-specific button name (or a comma-separated list of button names).
-
Field Details
-
BUTTON_TRANSLATION
The translation of the generic widget button names to TinyMCE specific button names.- See Also:
-
BUTTON_TRANSLATION_MAP
The map containing the translation of the generic widget button names to TinyMCE specific button names.
-
-
Method Details
-
createTinyMceToolbarStringFromGenericToolbarItems
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
Returns the context menu entries according to the configured tool-bar items.- Parameters:
barItems
- the tool-bar items- Returns:
- the context menu entries
-
translateButton
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)
-