Use the sharedSpaces
configuration value to define the page element that will contain the shared toolbar (top
) and the elements path (bottom
) for the editor instances.
// Place the toolbar inside the element with an ID of "myToolbar" and the elements path // in the element with an ID of "myElementsPath". config.sharedSpaces = { top : 'myToolbar', bottom : 'myElementsPath' };
Remember that you can share either both the toolbar and the elements path or just one of these elements. You can also combine editor instances with different configurations (with shared elements and without them) on one page.
If multiple editor instances are to share some parts of the interface, the sharedSpaces
setting has to be defined for each of them separately.
For a full working example of sharing the editor interface refer to the Shared Toolbars (sharedspaces.html
) sample located in the _samples
folder of the CKEditor installation package.