编辑 fckeditor 目录下的 fckconfig.js ,加一个toolbar:
FCKConfig.ToolbarSets[“Readonly”] = [ [‘Preview’,’Print’] ] ; |
在使用fckeditor的页面中,加入如下js代码
<script language=”javas window.on { var oFCKeditor = new FCKeditor(‘{=i_name}’) ; oFCKeditor.BasePath = ‘{=dirFCK}FCKeditor/’; oFCKeditor.ToolbarSet = ‘Readonly’; oFCKeditor.Height = 500; oFCKeditor.ReplaceTextarea(); }; function FCKeditor_On { editor.EditorDocument.body.contentEditable = false; editor.EditMode=FCK_EDITMODE_SOURCE; editor.ToolbarSet.RefreshModeState(); editor.EditMode=FCK_EDITMODE_WYSIWYG; editor.ToolbarSet.RefreshModeState(); } </script> |