使FCKeditor只能读取,不能修改 50
例如文本框有一个属性:disabledVS里有个属性:readonlyFCKeditor有没有这么个属性??...
例如文本框有一个属性:disabled
VS里有个属性:readonly
FCKeditor有没有这么个属性?? 展开
VS里有个属性:readonly
FCKeditor有没有这么个属性?? 展开
1个回答
展开全部
编辑 \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>
嗯,在config文件里面设置.嘎嘎!
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>
嗯,在config文件里面设置.嘎嘎!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询