応答が遅くなってすみません...この投稿をほとんど忘れてしまいました。その時点での私の回避は、 DropEditor によって編集されていないブラウザに表示されたページからコードをコピー/貼り付けることでした(それ以外の場合は、編集者で記事が開かれたときにHTMLが削除されていました) <em>。</em>
しかし、これは退屈です。だから私は解決策を探しに来て、ここで自分の投稿を見つけました。愚かな私。指定されたパス(config.jsonおよびconfig_p1.js)内の2つのconfigファイルのうちに応答してくれてありがとう、javascriptファイルはコードを入力する有効な場所のように見えましたが、関数{}または以下の外部のいずれかで、どちらの位置も機能しませんでした。編集用に開かれた記事またはHTMLモジュールには、空の<em>タグが削除されました。</em>
CKEDITOR.editorConfig = function( config ){
config.toolbar_1 = [
['Droppics'],['Dropfiles' ],['Droptables'],
'/',
{name: '00', items: ['Maximize','Undo','Redo','PasteFromWord']},
{name: '01', items: ['JustifyLeft','JustifyRight','JustifyCenter','JustifyBlock','Indent','Outdent','BulletedDropList','NumberedList','Blockquote']},
{name: '02', items: ['Bold','Italic','Underline','Subscript','Superscript']},
{name: '03', items: ['SpecialChar','Buttons','Templates','Image','Table','HorizontalRule']},
'/',
{name: '10', items: ['Source','Preview']},
{name: '11', items: ['TextColor','BGColor','Font','FontSize','GgFonts']},
{name: '12', items: ['JLink','Anchor','Unlink']},
{name: '13', items: ['Styles','Format']},
{name: '14', items: ['Find','Replace']},
];
config.removeButtons = 'About,Anchor';
config.format_tags = 'p;h1;h2;h3;pre';
config.removeDialogTabs = 'image:advanced;link:advanced'
config.allowedContent = true;
config.entities = false;
config.skin = 'material';
};
// OUTSIDE OF FUNCTION
CKEDITOR.dtd.$removeEmpty["em"] = false;
CKEDITOR.dtd.$removeEmpty["i"] = false;
CKEDITOR.editorConfig = function( config ){
config.toolbar_1 = [
['Droppics'],['Dropfiles' ],['Droptables'],
'/',
{name: '00', items: ['Maximize','Undo','Redo','PasteFromWord']},
{name: '01', items: ['JustifyLeft','JustifyRight','JustifyCenter','JustifyBlock','Indent','Outdent','BulletedDropList','NumberedList','Blockquote']},
{name: '02', items: ['Bold','Italic','Underline','Subscript','Superscript']},
{name: '03', items: ['SpecialChar','Buttons','Templates','Image','Table','HorizontalRule']},
'/',
{name: '10', items: ['Source','Preview']},
{name: '11', items: ['TextColor','BGColor','Font','FontSize','GgFonts']},
{name: '12', items: ['JLink','Anchor','Unlink']},
{name: '13', items: ['Styles','Format']},
{name: '14', items: ['Find','Replace']},
];
config.removeButtons = 'About,Anchor';
config.format_tags = 'p;h1;h2;h3;pre';
config.removeDialogTabs = 'image:advanced;link:advanced'
config.allowedContent = true;
config.entities = false;
config.skin = 'material';
// INSIDE FUNCTION
CKEDITOR.dtd.$removeEmpty["em"] = false;
CKEDITOR.dtd.$removeEmpty["i"] = false;
};
それで、私はそれを正しくやっていますか?もしそうなら、なぜ編集者がこれらの空のタグを取り除いているのか、なぜ考えていますか?