TYPO3:CKEditor在-Tags中删除数据属性

问题描述 投票:3回答:1

我想在span-Tag中使用data-attribute。 CKEditor删除此属性。

如果我将它添加到p-Tag中,它将不会被删除,这是可以的。

processing:
 allowAttributes: [data-count]

添加在YAML文件中。

我试过这个和其他组合,没有任何作用。

config
  extraAllowedContent: '*(*)[data-*]'

我需要做什么,将数据属性保存在span-Tag中?

ckeditor typo3 typo3-8.x
1个回答
0
投票

我已经为带有属性的iframe标签做了这个,不允许使用的属性:

processing:
  allowTags:
    - iframe

editor:
  config:    
    extraAllowedContent:
      - iframe[*]

为了你,这应该做的伎俩:

editor:
  config:    
    extraAllowedContent:
      - span[*]
© www.soinside.com 2019 - 2024. All rights reserved.