ColdFusion でリッチ テキスト エディタを読み取り専用にする方法はありますか? disabled 属性が機能していないようです...
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 に答える