Hi,
We are upgrading FCKEditor to CKEditor in our project. There were two issues we are facing and we couldn't find solution yet. Any help is appreciated.
We have a requirement to change the CKEditor toolbar dynamically (after the CKEditor is loaded) based on certain conditions.
Also, under certain conditions, we show the CKEditor toolbar but we have to disable the toolbar buttons.
I tried a lot googling for a solution but couldn't find anything.
In FCKEditor we achieved this using the following code after the FCKEditor is loaded and we typically call it in FCKeditor_OnComplete(editorInstance) method.
For changing the toolbar dynamically
editorInstance.EditorWindow.parent.FCK.ToolbarSet.Load('CustomToolbar');
For disabling the toolbar buttons
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems['Bold'].Disable();
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems['Italic'].Disable();
...etc
Thanks in advance for the help.
We are upgrading FCKEditor to CKEditor in our project. There were two issues we are facing and we couldn't find solution yet. Any help is appreciated.
We have a requirement to change the CKEditor toolbar dynamically (after the CKEditor is loaded) based on certain conditions.
Also, under certain conditions, we show the CKEditor toolbar but we have to disable the toolbar buttons.
I tried a lot googling for a solution but couldn't find anything.
In FCKEditor we achieved this using the following code after the FCKEditor is loaded and we typically call it in FCKeditor_OnComplete(editorInstance) method.
For changing the toolbar dynamically
editorInstance.EditorWindow.parent.FCK.ToolbarSet.Load('CustomToolbar');
For disabling the toolbar buttons
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems['Bold'].Disable();
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems['Italic'].Disable();
...etc
Thanks in advance for the help.