【问题标题】:TYPO3: CKEditor strips data-attributes in <span>-TagsTYPO3:CKEditor 去除 <span>-Tags 中的数据属性
【发布时间】:2019-03-07 10:15:56
【问题描述】:

我想在跨度标记中使用数据属性。 CKEditor 删除了这个属性。

如果我将它添加到 p-Tag 中,它不会被删除,这没关系。

processing:
 allowAttributes: [data-count]

添加到 YAML 文件中。

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

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

我该怎么做才能将数据属性保存在跨度标记中?

【问题讨论】:

  • 您找到解决方案了吗?遇到了同样的问题。 My question
  • 抱歉,还是没有解决办法。

标签: ckeditor typo3 typo3-8.x


【解决方案1】:

我已经为带有属性的 iframe 标记做了这个,没有使用 allowAttributes:

processing:
  allowTags:
    - iframe

editor:
  config:    
    extraAllowedContent:
      - iframe[*]

对你来说,这应该可以解决问题:

editor:
  config:    
    extraAllowedContent:
      - span[*]

【讨论】:

    猜你喜欢
    • 2013-08-23
    • 2013-03-23
    • 2019-09-08
    • 1970-01-01
    • 1970-01-01
    • 2018-05-23
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多