Class CmsTinyMCEHelper

java.lang.Object
org.opencms.gwt.client.ui.input.tinymce.CmsTinyMCEHelper

public final class CmsTinyMCEHelper extends Object
Helper class for dealing wth TinyMCE widgets.

  • 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 configuration
      codeMirrorPath - the path to the CodeMirror editor
      Returns:
      the tinyMCE options
    • getCodeMirrorPath

      public static String getCodeMirrorPath()
      Returns the code mirror path.

      Returns:
      the code mirror resource path
    • createContextMenu

      protected static String createContextMenu(com.google.gwt.core.client.JavaScriptObject jso)
      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

      protected static String createToolbar(com.google.gwt.core.client.JavaScriptObject jso)
      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