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 就可以使用了。

創作者介紹

歡迎~ 程式設計 學生 作業 專題製作 程式外包 家教...

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()