首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TYPO3: CKEditor:删除前端属性;后端OK

TYPO3: CKEditor:删除前端属性;后端OK
EN

Stack Overflow用户
提问于 2021-09-17 06:10:56
回答 1查看 64关注 0票数 1

TYPO3 10.4.20

我设置了一个有序列表的样式,并且我想使用一个start-number。

在我的YAML中,我添加了:

代码语言:javascript
复制
editor:
  config:
    extraAllowedContent:
      - ol[*]

# Allow s and u tag
processing:
  allowAttributes: [ data-count, start ]
  HTMLparser_db:
    tags:
      ol:
        allowedAttribs: "start"

在编辑器中一切都很好:

代码语言:javascript
复制
<ol start="5">
    <li><strong>Text</strong><br />
    More Text</li>
    <li><strong>Text</strong><br />
    More Text</li>
</ol>

将保存属性start="5"

但在前端,start="5"已不复存在。

我需要什么?

EN

回答 1

Stack Overflow用户

发布于 2021-09-17 06:45:30

尝试一下,在你的预设配置中添加一些额外的配置。请看下面的内容:

代码语言:javascript
复制
# Load default processing options
imports:
    - { resource: "EXT:web_conf/Configuration/YAML/Processing.yaml" }

# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
  config:
    allowedContent: true
    extraAllowedContent: "*(*);*{*}"
    fillEmptyBlocks: false
    tabSpaces: 0
    forcePasteAsPlainText: true
    entities_additional: ''
    removePlugins: null

您的处理配置似乎是正确的。所以,顺其自然吧。

代码语言:javascript
复制
# Allow s and u tag
processing:
  allowAttributes: [ data-count, start ]
  HTMLparser_db:
    tags:
      ol:
        allowedAttribs: "start"

这对我很有效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69218523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档