有没有办法让 ColdFusion 中的富文本编辑器只读?disabled 属性似乎不起作用...
问问题
332 次
1 回答
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';
}
您可以在此处找到链接以了解更多方法。
于 2011-08-29T19:15:01.453 回答