0

我有一个在模式对话框中打开的编辑器实例(在 jquery.dialog("open") 上)。

问题是有时在 Chrome 浏览器中,可编辑区域默认禁用(并且用户无法编写任何文本)。我可以做两件事来启用它:

  1. 单击“源”按钮两次
  2. 调整编辑器大小

这是一个已知问题吗?我找不到任何来源/解决方案。

请注意,Firefox 浏览器从未产生过此问题。

这个问题也解决了这个问题CKeditor textarea 在我单击源按钮之前被禁用?但没有给出答案。

谢谢

更新

我的html

<textarea name="problem" id="problem" class="ckeditor" ></textarea>

我的初始化代码:

var editor = CKEDITOR.instances.problem;
editor.setData(''); 
editor.resize( '100%', '80', true );

我的 config.js :

CKEDITOR.editorConfig = function( config ) {

    config.toolbar = 'MyToolbar';

    config.toolbar_MyToolbar =
    [
        { name: 'document', items : [ 'Preview','Print','-','Templates' ] },
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
        { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
        { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
        '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
        { name: 'links', items : [ 'Link','Unlink', ] },
        { name: 'insert', items : [ 'Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
        { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
        { name: 'colors', items : [ 'TextColor','BGColor' ] },
        { name: 'tools', items : [ 'Maximize', 'ShowBlocks','Source'] }
    ];
    config.format_tags = 'p;h1;h2;h3;pre';
    config.removeDialogTabs = 'image:advanced;link:advanced';
    config.scayt_autoStartup = true;
    config.skin = '/kama';
    config.entities_processNumerical = 'force';
};

更新 2

这也是 Firefox 21.0 这次发生的事情的屏幕截图:

在此处输入图像描述

Chrome错误之间的区别在于上面列出的启用编辑器的2个步骤不起作用。我必须刷新页面才能使其正常工作。

这是发生这种情况时的实际html代码。

另请注意,那里没有控制台错误。

4

0 回答 0