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 fileYou 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:
var config = { ... //your parameters //plugin parameters switchBarSimple : 'Basic', switchBarReach : 'Full', switchBarDefault : 'Basic', toolbar : 'Basic', // Loads toolbar_Name where Name = Basic extraPlugins: 'switchbar' }; CKEDITOR.replace( 'YOUR_TEXTAREA_ID', config );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
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
Re: Change Toolbar at Runtime