This has to be easier than this. All I want to do is REMOVE Font, FontSize, Text Color and Background Color from the toolbar. I tried commenting out and then removing the following lines from fck_toolbaritems.js
TBI.prototype.Font
TBI.prototype.FontSize
TBI.prototype.TextColor
TBI.prototype.BGColor
but this disabled FCK altogether.
Then I looked at editing fck_config.js as well, changing:
['FontStyle','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']
to
['FontStyle','-','FontFormat','-']
but I got the same result: FCK just disappeared.
What am I missing here? I wanted to allow the user to access the Font Style drop down but NO fonts, sizes or colors. I've searched this forum up and down, as well as the PHPList forum which is the script Iam using FCK with. How do I do this?
thanks!
JF
Mon, 01/31/2005 - 19:47
#1
RE: remove Font, FontSize, etc. from Toolbar
TBI.prototype.Font
TBI.prototype.FontSize
TBI.prototype.TextColor
TBI.prototype.BGColor
I mean the complete lines... they are just too long to post here.
TBI.prototype.Font... ;
RE: remove Font, FontSize, etc. from Toolbar
Just make sure you don't change the bracketing of the statement, and that there are no stray commas or anything.
If that's not working, the old copy is probably being cached (this happens especially in Firefox). Just clear your cache and try again.
RE: remove Font, FontSize, etc. from Toolbar
Thank you for your response!!
Hmm, I still can't get this to work. I just tried again... in fck_config.js I changed:
['FontStyle','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']
to
['FontStyle','-','FontFormat','-']
I cleared IE's cache and loaded the page and the Font, FontSize Text Color and BG Color items were still in the toolbar.
Since that didn't work on it's own, I made my edit (as decribed above) to fck_toolbaritems.js. Refresh the page, and all of FCKEditor has disappared.
Since I can see changes on the page after loading my edits I don't think this is a cache issue. If I'm doing this as I am supposed to, then perhaps this is a PHPList issue.
Any other ideas?
JF
RE: remove Font, FontSize, etc. from Toolbar
I think your problem can be one of this :
*****in the fckconfig.js file*****
the first is that you don't look at the coma at the end of the line, the last index of the array ain't got one
[...]
['TextColor','BGColor'],
['About'] <== no coma here, very important
] ;
***** with your browser***************
the second one, I had this porblem for a moment, is a cache problem, I have to close my browser or copy, paste the adress in a new tab, to have the last render
*************in the fckeditor.js file**************
the third one, could be that you call the bad toolbar, so what you've done is good, but you don't call it, so it do not work
Approximatively on line 32 in the fckeditor.js file you can see :
this.ToolbarSet = toolbarSet || 'Default' ;
Do you work on the config "Default" in the config file ?
wich you can recognize with something like this (line +/- 70) in my editor in the fckconfig.js file :
FCKConfig.ToolbarSets["Default"] = [...]
Hope it could help you
@+
RE: remove Font, FontSize, etc. from Toolbar
Hello and thank you for your response!
1) I don't think I have any extra or missing commas here:
config.ToolbarSets["Default"] = [
['EditSource','-','Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','Find','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley','-','About'] ,
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Zoom'] ,
['FontStyle','-','FontFormat','-']
] ;
config.ToolbarSets["Source"] = [
['EditSource']
] ;
config.ToolbarSets["Accessibility"] = [
['EditSource','-','Cut','Copy','Paste','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Rule','-','About'] ,
['FontStyle','-','Bold','Italic','Underline','-','InsertOrderedList','InsertUnorderedList','-','Undo','Redo']
] ;
config.ToolbarSets["Basic"] = [
['Bold','Italic','-','InsertOrderedList','InsertUnorderedList','-','Link','RemoveLink','-','About']
] ;
2) Cache doesn't appear to be an issue. I assume that if it were, I wouldn't see the negative changes that my edits are making. To be certain, I am closing IE then re-opening, and refreshing too, but not getting the altered toolbar. I have also manually cleared the cache and still had the toolbar disappear when I make this edit.
3) In fckeditor.js (not fck_editor.js), I found this:
this.ToolbarSet = toolbarSet;
and then edited it to this:
this.ToolbarSet = toolbarSet || 'Default' ;
but this has no effect.
In fck_config.js, I can confirm that 'Default' is the toolbar that I have edited:
config.ToolbarSets["Default"] = [
My problem remains. I make these changes to only remove the font, fontsize, textcolor and bgcolor options from teh toolbar, but the result is always the same: FCKEditor completely disappears from the page.
I've received no responses over at the PHPList forum. This really has to be easier than this. I can't possibly be the first person wanting to remove these items from the toolbar. All comments appreciated!
thanks
JF
RE: remove Font, FontSize, etc. from Toolbar
config.ToolbarSets["Default"] = [
['EditSource','-','Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','Find','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley','-','About'] ,
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Zoom'] ,
['FontStyle','-','FontFormat']
] ;
RE: remove Font, FontSize, etc. from Toolbar
Hello Mike--
Thank you for your response. This must be a PHPList issue because I copied your change to my fck_config.js file and had no change: the unwanted items still appeared in the toolbar. Then I went ahead and edited fck_toolbaritems.js, removing the items I don't want, but this change is what causes FCKEditor to disappear completely.
I'll just have to make the newsletter editor SWEAR that she won't touch those font items in the toolbar!
All other ideas are welcome.
thanks again,
JF