ColdFusion 8:禁用富文本编辑器中的编辑
答
由于ColdFusion文本编辑器基于FCKEditor工具,因此将此JavaScript包含在您的页面中,这将禁用编辑并隐藏控件。 这取决于您的需要,您只能禁用编辑。
function FCKeditor_OnComplete(editorInstance)
{
// Just hiding the toolbar:
editorInstance.EditorWindow.parent.document.getElementById("xExpanded").style.display = "none";
// And hiding the small bar showing when the toolbar is collapsed is this:
editorInstance.EditorWindow.parent.document.getElementById("xCollapsed").style.display = "none";
// when you want to hide the collapse handle do:
editorInstance.EditorWindow.parent.document.getElementById("xCollapseHandle").style.display = "none";
// or hiding the expand handle. This seems to be the same as hiding the object with id 'xCollapsed' mentioned above:
editorInstance.EditorWindow.parent.document.getElementById("xExpandHandle").style.display = "none";
editorInstance.EditorDocument.body.contentEditable='false';
editorInstance.EditorDocument.designMode='off';
}
你可以找到 link here更多的方法来做到这一点。