FCKeditor禁用使用javascript无法正常工作

时间:2009-05-14 06:14:18

标签: javascript fckeditor

<script type="text/javascript">
window.onload = function()
{
    var oFCKeditor = new FCKeditor( 'content' ) ;
    oFCKeditor.BasePath = "js/Javascript/fckeditor/" ;
    oFCKeditor.Height = 300;
    oFCKeditor.Width = 600;
    oFCKeditor.ReplaceTextarea() ;
}
function fnenable(){
    var myValue=document.getElementById("checkbox1").checked;
    var oEditor = FCKeditorAPI.GetInstance('content');
    if(myValue==true) { 
        oEditor.EditorDocument.body.disabled=false;
    } else {
        oEditor.EditorDocument.body.disabled=true;
    }
}
</script>

我关注了网站http://www.fckeditor.net/forums/viewtopic.php?f=5&t=69

提前致谢

2 个答案:

答案 0 :(得分:0)

作为替代方案,我建议使用TinyMCE:

http://tinymce.moxiecode.com/

抱歉,自从我使用FCKeditor以来已经太久了。我的直觉告诉我,你正在试图获得“身体”财产。

答案 1 :(得分:0)

你试过这个:

editorInstance.EditorDocument.body.contentEditable='false'; 
editorInstance.EditorDocument.designMode='off';

我还建议将编辑器升级到新的CKEDITOR(不含F):http://ckeditor.com/