編輯 /fckeditor/ 目錄下的 fckconfig.js ,加一個toolbar:
FCKConfig.ToolbarSets["Readonly"] = [
['Preview','Print']
] ;
在使用fckeditor的頁面中,加入如下js代碼
<script language="javascript" type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('{=i_name}') ;
oFCKeditor.BasePath = '{=dirFCK}FCKeditor/';
oFCKeditor.ToolbarSet = 'Readonly';
oFCKeditor.Height = 500;
oFCKeditor.ReplaceTextarea();
};
function FCKeditor_OnComplete( editor )
{
editor.EditorDocument.body.contentEditable = false;
editor.EditMode=FCK_EDITMODE_SOURCE;
editor.ToolbarSet.RefreshModeState();
editor.EditMode=FCK_EDITMODE_WYSIWYG;
editor.ToolbarSet.RefreshModeState();
}
</script>
本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/gao512008/archive/2009/11/09/4789389.aspx