到fckconfig.js內
找到FCKConfig.ToolbarSets
這個就是設定值
可以設定新的
例如這樣
FCKConfig.ToolbarSets["kiminets"] = [
['Cut','Copy','Paste'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
'/',
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink'],
['Rule','Smiley','SpecialChar'],['TextColor'],
'/',
['Style','FontFormat','FontName','FontSize']
// No comma for the last row.
] ;
存檔即可
使用的時候記得也要呼叫
在php內
include("fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('contents') ;
$oFCKeditor->BasePath = 'fckeditor/' ;
$oFCKeditor->Height = "300" ;
$oFCKeditor->ToolbarSet = "kiminets" ;
$t_contents=$ary_edpgs[0]['contents'];
$oFCKeditor->Value = $t_contents ;
那個toolbarset就是呼應js的設定
經驗法則1.
設定Height就好 不要設定width否則會被切掉
他會自動到最適合的狀況調整
經驗法則2.
$oFCKeditor->Create() ;
這個是顯示的 顯示整個區塊
如果php出現這個 就會顯示區塊模組
如果是模板的話
$var_tpl=$oFCKeditor->Create() ;
tpl_assign('fck', $var_tpl);
tpl_display('index.tpl');