FCKeditor отключить с помощью JavaScript не работает - PullRequest
0 голосов
/ 14 мая 2009
<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 голосов
/ 06 апреля 2012

Вы пробовали это:

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

Я также рекомендую обновить редактор до нового CKEDITOR (без F): http://ckeditor.com/

0 голосов
/ 14 мая 2009

В качестве альтернативы я бы предложил TinyMCE:

http://tinymce.moxiecode.com/

Извините, я слишком долго не пользовался FCKeditor. Моя интуиция говорит мне, что ты пытаешься получить свойство body.

...