FCKeitor 提供了兩種方式 Default, Basic
fckconfig.js裡的代碼
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'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
從代碼中不難看出若要手動修改的內容。
單引號與單引號之類,就是一個功能
比方說
'Bold' = 粗體
'/' = 分隔線(功能列若沒加上則會依序排列,若加上'/'會產生斷行的效果)
'-' = 空格
以下是自己新建一個類別的方法來說
FCKConfig.ToolbarSets["My"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','Image','Flash','Table','Rule','Smiley']
] ;
若自行新增的類別就需要在 fckeditor 的屬性 toolbarset 設成My 就可以使用了。
留言列表