Toolbar switch on Maximize

This plugin allows you to change the themed ui editor instance toolbar when switching between maximized mode and normal.

Requires:

  • Maximize plugin. But not the button that goes with it. All toolbars used in the ckeditor instance have to use the 'Toolbarswitch' button instead.
  • A custom config to define the small and big toolbars.
  • function CKeditor_OnComplete(ckEditorInstance){ ... your own custom code or leave empty... } This was added to the plugin for those that wrap the ckeditor in other java script to shield the rest of their code from ckeditor version particularities.
  • Turn off advanced content filtering with: "config.allowedContent = true;" otherwise content will be filtered away when switching from a big to a small toolbar.

  • jQuery

Example replace:

CKEDITOR.replace('sometextcomponentname', {
    customConfig: '/...custom_ckeditor_config.js',
    toolbar: 'yoursmalltoolbarname',
    smallToolbar: 'yoursmalltoolbarname',
    maximizedToolbar: 'yourbigtoolbarname'
});

In case you want to use the same config everywhere and do

CKEDITOR.replace('sometextcomponentname');

everywhere instead. Simply add the following to the "config.js":

config.toolbar_minToolbar = [...]; // Custom minimized toolbar config
config.toolbar_maxToolbar = [...]; // Custom maximized toolbar config
config.toolbar = 'minToolbar';
config.smallToolbar = 'minToolbar';
config.maximizedToolbar = 'maxToolbar';
config.allowedContent = true;

 

toolbarswitch

35,972 downloads (view stats)

Releases

Plugin versions CKEditor versions
4.10 4.9 4.8

Version: 4.1.2

DownloadRelease notes

Requires:

Patch on panelbutton plugin.js from ticket 7280 to Store/Restore a copy of the panel definition. Versions like ckeditor 4.1.1 and 4.1.2 do not have the patch yet and are therefore to be patched by hand.

What does not work yet (after use of the maximize button):

  • the 4 text alignment buttons (center, left, right, fill)
  • the smiley button
  • 3 of the text style buttons (strike, superscript, subscript)
  • the quote block button
  • the link and unlink buttons
  • the horizontal line button
  • the table button
  • the image button
  • with IE10 when also using the resizewithwindow plugin then right after using the maximize/minimize button the heights are incorrect. With Chrome and firefox this problem does not exist.

Version: 4.2.3

DownloadRelease notes

Minor update: give the toolbarswitch button the same order nr as the maximize button.

Version: 4.3

DownloadRelease notes

The plugin removed the old toolbar with the wrong java script function.
Now the destroy() function is used which resolves several bugs.

Version: 4.3.2

DownloadRelease notes

Typo fix in javascript: https://github.com/paulveldema/ckeditor-plugins/issues/4

Twitter Facebook Facebook Instagram Medium Google+ GitHub Arrow down Phone Menu Close icon Check