Class CmsTinyMCEHelper
java.lang.Object
org.opencms.gwt.client.ui.input.tinymce.CmsTinyMCEHelper
Helper class for dealing wth TinyMCE widgets.
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
createContextMenu
(com.google.gwt.core.client.JavaScriptObject jso) Creates the TinyMCE toolbar config string from a Javascript config object.protected static String
createToolbar
(com.google.gwt.core.client.JavaScriptObject jso) Creates the TinyMCE toolbar config string from a Javascript config object.static com.google.gwt.core.client.JavaScriptObject
generateOptionsForTiny
(String configuration) Generate options for TinyMCE.static com.google.gwt.core.client.JavaScriptObject
generateOptionsForTiny
(String configuration, String codeMirrorPath) Generates the tinyMCE editor options according to the configuration.static String
Returns the code mirror path.
-
Method Details
-
generateOptionsForTiny
public static com.google.gwt.core.client.JavaScriptObject generateOptionsForTiny(String configuration) Generate options for TinyMCE.- Parameters:
configuration
- the widget configuration generated by the server- Returns:
- the TinyMCE configuration
-
generateOptionsForTiny
public static com.google.gwt.core.client.JavaScriptObject generateOptionsForTiny(String configuration, String codeMirrorPath) Generates the tinyMCE editor options according to the configuration.- Parameters:
configuration
- the widget configurationcodeMirrorPath
- the path to the CodeMirror editor- Returns:
- the tinyMCE options
-
getCodeMirrorPath
Returns the code mirror path.- Returns:
- the code mirror resource path
-
createContextMenu
Creates the TinyMCE toolbar config string from a Javascript config object.- Parameters:
jso
- a Javascript array of toolbar items- Returns:
- the TinyMCE toolbar config string
-
createToolbar
Creates the TinyMCE toolbar config string from a Javascript config object.- Parameters:
jso
- a Javascript array of toolbar items- Returns:
- the TinyMCE toolbar config string
-