编辑 /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