Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-15877

Support appending and overlaying tinymce config props

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • High
    • Resolution: Fixed
    • None
    • None
    • None
    • 8
    • Orion
    • BrXM Backlog, Orion.Cycle3.Sprint
    • Undetermined

    Description

      TinyMCE json config is different than CKEditor in the formats it uses for some of the attributes values. This means the code that appends and overlays json config needs to change (org.hippoecm.frontend.plugins.richtext.config.Json).

      Since we're keeping both editors for the time being, a new json util class is needed.

      Some discovered cases so far:

      • the plugins, toolbar and menubar attributes don’t expect a comma separated list, but a space separated one
      • the toolbar supports a custom format to allow for specifying groups:  toolbar: 'undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent'});

      From tinymce docs:
      Use a space-separated list to specify the toolbar buttons for TinyMCE. Create toolbar groups by using the “|” pipe character between button names.

       

      The CKEditor specific Json class is also used in Visual editor:

      •  In HtmlField.readJson(), where we use Json (I fixed that) but we also always use CKEditorConfig.setDefaults(..), that should change.
      • In RichTextFieldTypeTest, we use ck's Json again:
        final ObjectNode finalConfig = Json.object(TinyMCEConfig.DEFAULT_RICH_TEXT_TINYMCE_CONFIG);
         

      Last, it would be nice to include a utility method that allows us to position buttons in the toolbar, it is needed for positioning the link pickers.

      Attachments

        Activity

          People

            ekarakus Erdem Karakus
            mchatzidakis Minos Chatzidakis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: