在fckconfig.js或者類似名字的js配置文件中,有類似代碼:config.ToolbarSets["Default"] = [ ['EditSource','Save','NewPage','Preview','-','Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck','Find','Replace','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','Anchor','-','Image','Table','Rule','SpecialChar','UniversalKey','Smiley','-','About']
, ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Form','Checkbox','Radio','Input','Textarea','Select','Button','ImageButton','Hidden','-','Zoom']
, ['FontStyleAdv','-','FontStyle','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']] ;這是default效果的工具欄,包含了大部分的功能,你可以自己寫一個:config.ToolbarSets["Sheneyan"] = [ ['Cut','Copy','Paste','PasteText','SelectAll','-','Link','RemoveLink','-','Image','SpecialChar','Smiley','Bold','Italic','Underline','-','JustifyLeft','JustifyCenter','JustifyRight','-','InsertOrderedList','InsertUnorderedList','-','FontStyleAdv','TextColor']] ;這是我自己要的最小範圍的菜單。然後在你的fckeditor的引用處調用就行了,比如我是php,我是這麼選擇的:$oFCKeditor->ToolbarSet ='Sheneyan' ; 如果你希望增加一些特定功能的按鈕,比如單擊按鈕插入一些特殊字符之類的,就需要自行修改代碼了,可以隨便找一個先有的插入swf(有這個嗎?)的按鈕,參考其代碼自己寫一個。 |