【问题标题】:FCKeditor disable using javascript not working使用 javascript 禁用 FCKeditor 不起作用
【发布时间】:2009-05-14 06:14:18
【问题描述】:
<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

提前致谢

【问题讨论】:

  • 什么时候执行 fnenable()?
  • 为什么不用新版本:CKEDITOR ckeditor.com?

标签: javascript fckeditor


【解决方案1】:

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

http://tinymce.moxiecode.com/

抱歉,太久没用FCKeditor了。我的直觉告诉我,这取决于您如何尝试获取“body”属性。

【讨论】:

  • 如何用 TinyMCE 替换 textarea
【解决方案2】:

你试过了吗:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-16
    • 2017-06-12
    • 1970-01-01
    • 2010-12-25
    • 1970-01-01
    • 1970-01-01
    • 2016-09-19
    相关资源
    最近更新 更多