Javascript CKEditor 4.6.2中的fillEmptyBlocks配置无助于操作<;br>;空div中的标记

Javascript CKEditor 4.6.2中的fillEmptyBlocks配置无助于操作<;br>;空div中的标记,javascript,ckeditor,ckeditor4.x,Javascript,Ckeditor,Ckeditor4.x,问题1:我使用以下插件作为基本版本CKEditor 4.6.2自定义构建的一部分-基本样式、对话框UI、对话框、剪贴板、按钮、工具栏、输入键、浮动空间、撤消、分区。空的DIV容器块包含由CKEditor添加的元素,我正试图阻止这些元素 配置文件如下所示- CKEDITOR.editorConfig=函数(配置){ config.title=false; config.allowedContent=true; config.fillEmptyBlocks=false; //工具栏组配置。 con

问题1:我使用以下插件作为基本版本CKEditor 4.6.2自定义构建的一部分-基本样式、对话框UI、对话框、剪贴板、按钮、工具栏、输入键、浮动空间、撤消、分区。空的DIV容器块包含由CKEditor添加的

元素,我正试图阻止这些元素

配置文件如下所示-

CKEDITOR.editorConfig=函数(配置){
config.title=false;
config.allowedContent=true;
config.fillEmptyBlocks=false;
//工具栏组配置。
config.toolbar=。。。

};我使用CKEDITOR 4开发了类似的所见即所得编辑器,尽管我使用了
CKEDITOR.replace

但是,我把它上传到了github。因此,如果需要,您可以在这里引用并比较和修复代码


如果你面临任何问题,请问我

请尝试此代码,它对我有效:

用于卸下装载的br

$('your_id').ckeditor();    
        CKEDITOR.on('instanceReady', function() { 
            $('div.application').find('br').remove();   // remove br tag added on empty divs
        });
要删除,请在销毁功能中使用此选项:

for(CKname in CKEDITOR.instances) // delete multiple instances of ckeditor
        {
            CKEDITOR.instances[CKname].destroy(function(){
                $("your_id").html(function (i, html) {
                    return html.replace(/&nbsp;/g, ''); // remove &nbsp;
                });
            })
        }