CKEditor从<;中删除数据目标;a>;内联编辑器

CKEditor从<;中删除数据目标;a>;内联编辑器,ckeditor,editor,inline,Ckeditor,Editor,Inline,我正在使用CKEditor的内联编辑器。我想要一个打开自定义模式的链接。比如说: <a data-toggle="modal" data-target="#myModal" href="#" style="background: #c21313; color: white; text-decoration: none">DESCARGAR LOS VIDEOS AHORA</a> <a data-cke-saved-href="#" href="#" style=

我正在使用CKEditor的内联编辑器。我想要一个打开自定义模式的链接。比如说:

<a data-toggle="modal" data-target="#myModal" href="#" style="background: #c21313; color: white; text-decoration: none">DESCARGAR LOS VIDEOS AHORA</a>
<a data-cke-saved-href="#" href="#" style="background: #c21313; color: white; text-decoration: none">DESCARGAR LOS VIDEOS AHORA</a>

问题是,当我在内联编辑器中加载它时,它显示如下:

<a data-toggle="modal" data-target="#myModal" href="#" style="background: #c21313; color: white; text-decoration: none">DESCARGAR LOS VIDEOS AHORA</a>
<a data-cke-saved-href="#" href="#" style="background: #c21313; color: white; text-decoration: none">DESCARGAR LOS VIDEOS AHORA</a>


我使用内联保存插件将我编辑的页面保存到一个新文件中。在该文件中,“数据切换”和“数据目标”部分消失。所以我的链接不会打开任何内容。

默认情况下,放置在编辑器中的内容是。这就是将从最终输出中删除
数据
属性的原因。您可以通过ACF设置控制允许在编辑器中放置哪种标记(链接,提供更多信息,您可以在前面找到如何配置标记)

您有一些简单的示例,说明如何配置ACF以通过所有
数据
属性:

CKEDITOR.inline( 'editor', {
  extraAllowedContent: 'a[data-*]'
} );