Hi,
I hope somebody could help me here...i am really stuck.
I am trying to disable all the toolbar buttons in the FCKEditor. I've been reading the Forum thoroughly and i tired almost all the solutions but never worked.
here is the case: i am using fckeditor inside asp.net solution. according to the recommendations, the best way to disable a button is thru:
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems[itemName].Disable();
Item in this case is any button i wish to disable in my toolbarSet. What's failing is editorInstance.EditorWindow is not defined, tried editorInstance.EditorDocument, it is not defined as well.
Any ideas will be greatly appreciated!
Thanks,
I hope somebody could help me here...i am really stuck.
I am trying to disable all the toolbar buttons in the FCKEditor. I've been reading the Forum thoroughly and i tired almost all the solutions but never worked.
here is the case: i am using fckeditor inside asp.net solution. according to the recommendations, the best way to disable a button is thru:
editorInstance.EditorWindow.parent.FCKToolbarItems.LoadedItems[itemName].Disable();
Item in this case is any button i wish to disable in my toolbarSet. What's failing is editorInstance.EditorWindow is not defined, tried editorInstance.EditorDocument, it is not defined as well.
Any ideas will be greatly appreciated!
Thanks,
Re: Disable Toolbar Buttons
Re: Disable Toolbar Buttons
I am trying temparirly disable them.
Re: Disable Toolbar Buttons
so you could do something like
or you set a global var on the main page
let me know how that works or post some code thats failing
Steve
Re: Disable Toolbar Buttons
var oEditor = FCKeditorAPI.GetInstance('fckeditor1');
oEditor.EditorWindow.parent.FCKToolbarItems.LoadedItems[itemName].Disable();
Failing part: FCKeditorAPI is null. not defined. therefore, it didn't go any further.
Thanks for your rapid resonponse.
Re: Disable Toolbar Buttons
Re: Disable Toolbar Buttons
Microsoft JScript runtime error: 'FCKeditorAPI' is null or not an object
I could get a hold of the editorInstance without using the FCKeditorAPI. However, the EditorWindow is null.
Re: Disable Toolbar Buttons
open the fckeditor.html and look for the onload function mine is on line 124 and right after the InitializeAPI(); put this in
FCKeditor1 is the name of your editor
now if you call oEditor from the main window its simply oEditor, if you call it from a dialog its parentWIndow.oEditor
this should work
Re: Disable Toolbar Buttons
Besides, i might have two instances on the same page. By approacing it this way, i would lack the dynamic aspect of it by hardcoding the names.
Thanks,
Re: Disable Toolbar Buttons
now you can call oEditor and not mess with the original code
Re: Disable Toolbar Buttons
Thank you so much. That did it
Once again, i am really thankful.
Re: Disable Toolbar Buttons
I knew we would get it sooner or later
Re: Disable Toolbar Buttons
i am not sure. I didnt' see my earlier response. Your last submit did it.

I appreciate your help.
Thanks
Re: Disable Toolbar Buttons
hi look this you can create diff two toolset and Use It
http://docs.fckeditor.net/FCKeditor_2.x ... on/Toolbar
Re: Disable Toolbar Buttons
Hi guys,
I've tried to disable a button created by me using the code posted previously but when I try to execute "FCKToolbarItems.LoadedItems['minfo'].Disable();" (located in fckplugin.js under plugin's folder) y get an error like this: "this._UIButton is undefined http://localhost/fckeditor/editor/js/fc ... e_gecko.js Line 88".
Can anybody help me with this?
Thanks!
Re: Disable Toolbar Buttons
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-'] // No comma for the last row. //I
] ;
Here I deleted the About button (for example), in the last row, last column