Class CmsTinyMCEHelper


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

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String createContextMenu​(com.google.gwt.core.client.JavaScriptObject jso)
      Creates the TinyMCE toolbar config string from a Javascript config object.
      protected static java.lang.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​(java.lang.String configuration)
      Generate options for TinyMCE.
      static com.google.gwt.core.client.JavaScriptObject generateOptionsForTiny​(java.lang.String configuration, java.lang.String codeMirrorPath)
      Generates the tinyMCE editor options according to the configuration.
      static java.lang.String getCodeMirrorPath()
      Returns the code mirror path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generateOptionsForTiny

        public static com.google.gwt.core.client.JavaScriptObject generateOptionsForTiny​(java.lang.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​(java.lang.String configuration,
                                                                                         java.lang.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 java.lang.String getCodeMirrorPath()
        Returns the code mirror path.

        Returns:
        the code mirror resource path
      • createContextMenu

        protected static java.lang.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 java.lang.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