Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20562

CKEditor wrong toolbar is displayed after trying to remove plugin or button

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 14.10.3
    • CKEditor
    • None
    • Windows 10, XWiki Standard Flavor Pre-installed
    • Unknown

    Description

      I'm trying to customize the layout of the toolbar.

      Step to reproduce:

      1. Open any page via editing in CKEditor. By default you'll see this toolbar
      2. Navigate to xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=WYSIWYG CKEditor config page
      3. Add this code as custom advanced configuration
      config.removePlugins = 'source,maximize'
      
      1. Force refresh the open page for editing, and you'll see the entire toolbar and not the default one or updated without buttons

      About removePlugins is here
      I've checked the documentation and the parameters that remove [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removeButtons) from the toolbar, and it's worked for me, however, the entire toolbar is displayed.
      '

      config.removeButtons = 'Source,Maximize'
      

      Alternative workaround for me, as I did last week. But it requires to list all elements that I'd like to have

      config.toolbar_Custom = [
          [ {there list names of elements} ]
      ];
      config.toolbar = 'Custom';
      

      Actual result
      The buttons still exist and the entire toolbar is displayed, even plugins and features that are disabled.

      Expected result
      The buttons are removed. And the toolbar is displaying only enabled elements.

      Attachments

        1. default_layout.png
          17 kB
          Nikita Petrenko
        2. new_layout_remove_buttons.png
          29 kB
          Nikita Petrenko
        3. new_layout.png
          24 kB
          Nikita Petrenko

        Activity

          People

            Unassigned Unassigned
            npetrenko Nikita Petrenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: