编辑 /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>
FCKEDITOR如何实现只读功能啊
最新推荐文章于 2018-08-13 17:28:11 发布