如果我输入以下 html 并将其保存到 CKEditor,则所有 span 标签都会被删除。
<p class="animate" data-animate="fadeIn"><span>Maschinenlager</span> <span>Schwergutlager</span> <span>Frei- vs. Festplatzprinzip</span></p>
我在stackoverflow上找到了以下解决方案,使其适应我的需要,但它不起作用。
editor:
config:
extraAllowedContent: "*(*)[data-*];span;p span"
我使用了 EXT 的默认配置,并将其包含在我自己的中。
imports:
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
默认配置中允许使用标签。
processing:
allowTags:
- a
- abbr
- acronym
- address
- article
- big
- blockquote
- br
- caption
- cite
- code
- col
- colgroup
- dd
- del
- dfn
- dl
- div
- dt
- em
- footer
- header
- h1
- h2
- h3
- h4
- h5
- h6
- hr
- i
- img
- ins
- kbd
- label
- li
- nav
- ol
- p
- pre
- q
- samp
- section
- small
- span
- strong
- style
- sub
- sup
- table
- thead
- tbody
- tfoot
- td
- th
- tr
- tt
- ul
- var
我该如何存档?