ckeditor에서 ACF를 비활성화하려면 다음과 같이 많은 내용의 게시물과 설명서에서 제안 된대로 allowcontent를 true로 설정하고 내 HTML을 필터링합니다.CkEditor - allowedContent를 true로 설정하면 ACF가 비활성화되지 않습니다.
CKEDITOR.config.allowedContent = true;
CKEDITOR.editorConfig = function(config) {
config.allowedContent = true;
// also tried CKEDITOR.allowedContent = true; and CKEDITOR.config.allowedContent = true;
};
다음과 같이 내 맞춤 태그를 플러그인 코드에 삽입하려고합니다.
CKEDITOR.plugins.add('MakeCPBold', {
init: function (editor) {
editor.addCommand('MakeCPBoldCommand', {
exec: function (editor) {
editor.insertHtml('<CP:CP_B>Sample Content</CP:CP_B>');
}
});
editor.ui.addButton('MakeCPBold', {
label: 'Make CP Bold',
command: 'MakeCPBoldCommand',
icon: this.path + 'images/makeabbr.gif',
toolbar: 'Basic'
});
}
});
insertHtml은 "Sample Content"를 삽입하고 맞춤 태그 CP : CP_B를 필터링합니다. 태그 CP : CP_B를 알려진 태그 (강함과 같이)로 교체하면 정상적으로 작동합니다.
제대로 구성합니까?
최신 버전의 ckeditor 4.4.1을 사용하고 있습니다. 또한 시도 버전 4.4.0 및 4.2
감사
ACF가 도입되기 전에 버전에서 허용됩니다. 또한 FCKeditor에서도 허용되었습니다. 이전에 맞춤 태그를 삽입 할 수있었습니다. ACF 버전 만 허용되지 않습니다. –