Anyone know how to change the toolbar at runtime?
I even tried using editor.destroy() and then recreating the editor with the a new config, but there is an error when CKEDITOR tries to kill an instance and it is not working.
My goal is to create the editor with a basic toolbar and have a button that will toggle the advanced toolbar set when pressed.
Any ideas?
Thanks,
Adam
I even tried using editor.destroy() and then recreating the editor with the a new config, but there is an error when CKEDITOR tries to kill an instance and it is not working.
My goal is to create the editor with a basic toolbar and have a button that will toggle the advanced toolbar set when pressed.
Any ideas?
Thanks,
Adam
Re: Change Toolbar at Runtime
Re: Change Toolbar at Runtime
Unfortunately I found only one way how to resolve this issue: using editor.destroy(). And it works for me. You can try my plugin switchbar attached below.
How to use it:
1) unzip it into ckeditor/plugins/
2) add the code about toolbars into ckeditor/config.js file You can change how different toolbars should be looked, but it's better to leave 'Switchbar' on the first position so that the user wouldn't move the mouse switching between toolbars.
3) during the creation CKEditor add 'switchbar' into extraPlugins option:
Attachments:
Re: Change Toolbar at Runtime
Re: Change Toolbar at Runtime
It seems under FCKEditor 2.5, there was method like this.
<EditorInstance>.ToolbarSet.Load( '<ToolbarName>' )
There must be alternative way of this....
Re: Change Toolbar at Runtime
I would be nice if there where such function.
Re: Change Toolbar at Runtime
Thanks diter98 your solution worked for me
For some reason my code is not in a plug-in was getting errors. So I moved all my stuff to a plug-in and it is working great, and I am also using your SwitchBar plug-in!
Although I do agree that should be a way to do this at run time without using .destroy().
Thanks,
Adam
Re: Change Toolbar at Runtime
I've been waiting someone answers my question.
Because since there was such method in 2.5, I thought there must be in 3.0.
I'll post request later.
So I don't need to destroy instance each time.
That would be nice.
Re: Change Toolbar at Runtime
hello,

There is a BUG in this plugin!
when you click on Maximize (to FULL SCREEN), and then click on SwitchBar the editor will disappear !
check on IE7, IE8, CHROME 10+, FF 4, Safari 5+, Opera 11
Re: Change Toolbar at Runtime