ColdFusion 8:在Rich Text Editor中禁用编辑

时间:2011-06-29 13:12:28

标签: rtf coldfusion-8 disabled-input

有没有办法让ColdFusion中的富文本编辑器只读?禁用的属性似乎不起作用......

1 个答案:

答案 0 :(得分:0)

由于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了解更多方法。