I'm trying to customize the toolbar so that in addition to the basic set of functionality appearing on top, I can add some toolbar buttons on both side (right and left) of the editor. Currently it doesn't seem to be possible with just writing a customized config file.
What I've learned so far -
It currently supports only one toolbar location as indicated by this line -
Am I going in the right direction? Will I need to edit any other files to accomplish this? Any suggestions would be greatly appreciated.
Thanks in advance!
-Sanny
What I've learned so far -
- 1. I'll probably need to create a new theme with 2 additional themeSpaces - left and right.
2. I'll need to add the html of left and right themeSpaces on the table with class 'cke_editor'. Currently, top, content and bottom are the 3 rows in the table. I'll add left and right as a column with rowspan = 3.
3. I'll need to edit the 'toolbar' plugin (or write a new one) to change the behaviour of this event -
editor.on('themeSpace', function (event) {
It currently supports only one toolbar location as indicated by this line -
if (event.data.space == editor.config.toolbarLocation) {
Am I going in the right direction? Will I need to edit any other files to accomplish this? Any suggestions would be greatly appreciated.
Thanks in advance!
-Sanny
Re: Toolbars on both sides of the editor
Re: Toolbars on both sides of the editor
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
Re: Toolbars on both sides of the editor
Here's what I did (in short)-
1. Created a new theme based on default theme's source.
2. Created a new skin based on the skin 'kama'.
3. Edited the toolbar plugin
4. Added configuration settings like 'toolbars' and 'toolbarLocations' on config file.
Now some details -
1. The editor is placed in a table with 3 rows on the default theme. The theme space 'top' constitute the first row and contains the toolbar. The theme space 'contents' constitute the second row and contains the editing are and the third row (theme space 'bottom') is the 'Elements Path'.
2. Now I've modified the table so that it looks like this -
'topLeft', 'topRight' etc. are the names of the newly created theme spaces.
3. I've added several lines like -
on the theme.js. And obviously, I modified the code that generated the table.
4. Now, on the toolbar plugin, I've modified this function -
so that it can support multiple toolbar locations (that I can add from the config).
5. Finally I've worked on the skin to set the proper styling. I've mainly modified 'toolbar.css'.
Re: Toolbars on both sides of the editor
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!