首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

设立fckeditor为只读

2012-10-24 
设置fckeditor为只读//设置fckeditor为只读function FCKeditor_OnComplete(editorInstance)??? {??????? e

设置fckeditor为只读

//设置fckeditor为只读
function FCKeditor_OnComplete(editorInstance)
??? {
??????? editorInstance.EditorDocument.body.disabled = true;
??????? editorInstance.EditorWindow.parent.document.getElementById('xExpanded').style.display = 'none';
??????? editorInstance.EditorWindow.parent.document.getElementById('xCollapsed').style.display = 'none';
??????? editorInstance.EditorWindow.blur();
??? }

?

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hailang43/archive/2009/06/20/4285847.aspx

?

?

/*设置function setFCKeditorReadOnly( editor ){ try{ editor.EditorDocument.body.contentEditable = false; editor.EditMode=FCK_EDITMODE_SOURCE; editor.ToolbarSet.RefreshModeState(); editor.EditMode=FCK_EDITMODE_WYSIWYG; editor.ToolbarSet.RefreshModeState(); editor.EditorWindow.parent.document.getElementById('xExpanded').style.display = 'none'; editor.EditorWindow.parent.document.getElementById('xCollapsed').style.display = 'none'; editor.EditorWindow.blur(); } catch(e){ } }

?

1 楼 天打五雷轰 2010-12-10       设置只读的这些代码放在$(document).ready(function(){})中有些代码不能执行,同样的问题也出现在获取和设置fckeditor内容中,GetXGTML和SetGTMHL无法执行,但是如果设置一个按钮,点击执行这段代码是可以完成这些功能的,我第一次接触fckeditor,不知道这是哪的问题?情指点指点

热点排行