TYPO3:CKEditor:删除前端中的属性;后端正常 [英] TYPO3: CKEditor: Removes attribute in frontend; backend OK

查看:22
本文介绍了TYPO3:CKEditor:删除前端中的属性;后端正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TYPO3 10.4.20

我已经设置了有序列表的样式,我想使用起始编号。

我在我的YAML中添加了:

editor:
  config:
    extraAllowedContent:
      - ol[*]

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

在编辑器中一切正常:

<ol start="5">
    <li><strong>Text</strong><br />
    More Text</li>
    <li><strong>Text</strong><br />
    More Text</li>
</ol>

属性start="5"已保存。

但在前端start="5"不见了。

我需要什么?

推荐答案

尝试此操作,在您的预设配置中添加一些其他配置。请查看以下内容:

# 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

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

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

这对我有效。

这篇关于TYPO3:CKEditor:删除前端中的属性;后端正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆