【发布时间】:2011-06-29 13:12:28
【问题描述】:
有没有办法让 ColdFusion 中的富文本编辑器只读? disabled 属性似乎不起作用...
【问题讨论】:
标签: rtf coldfusion-8 disabled-input
有没有办法让 ColdFusion 中的富文本编辑器只读? disabled 属性似乎不起作用...
【问题讨论】:
标签: rtf coldfusion-8 disabled-input
由于 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 了解更多方法。
【讨论】: