Class CmsTinyMceToolbarHelper

java.lang.Object
org.opencms.workplace.editors.CmsTinyMceToolbarHelper

public final class CmsTinyMceToolbarHelper extends Object
This class is used to help constructing the TinyMCE toolbar configuration, both for client-side and server-side code.

  • Field Details

  • 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

      public static String getContextMenuEntries(List<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 String translateButton(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)