I'm looking for a way to dynamically change the ToolbarSets from the javascript that calls the FCKeditor.
I tried to write to the oEditor.Config object and it works well for simple configuration options, but it does not seem to work for the toolbar. Following Code does set the startupFocus, but I get an error that says that the ToolbarSet "Default" is not defined:
Is there a way to change the toolbar configuration without using the static config files?
Thanks for your help,
Simon
I tried to write to the oEditor.Config object and it works well for simple configuration options, but it does not seem to work for the toolbar. Following Code does set the startupFocus, but I get an error that says that the ToolbarSet "Default" is not defined:
var editor = new FCKeditor( 'textfield' ) ; editor.BasePath = urlBase+"fckeditor/"; editor.Config = { StartupFocus: true, ToolbarSets : { Default: [ ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'] ] }; var html = editor.CreateHtml();
Is there a way to change the toolbar configuration without using the static config files?
Thanks for your help,
Simon
Re: Changing ToolbarSet Config from javascript
The API allows you to do this! E.g.
Re: Changing ToolbarSet Config from javascript
Thank you, I used this solution as a workaround. Still, it does not exactly do what I am trying to achieve: Using your solution, the editor loads with the unmodified toolbars and then, after a short moment, the toolbars change. A solution, that changes the toolbars before the editor loads would be more beautiful.
Re: Changing ToolbarSet Config from javascript
Setting the toolbar on creation can be easily done, see http://docs.fckeditor.net/FCKeditor_2.x ... on/Toolbar