我想将 oembed 标签放入 TYPO3 的 ckeditor RTE 中。这样我想将像 Instagram、Facebook 或 Twitter 这样的社交帖子放入一些新闻文章中(在一些文本的中间)。
为此,我激活了 ckeditor 的嵌入插件并将oembed
标签下processing
in allowedTags
。我还在常量中定义了 oembed 标签styles.content.allowTags
.
这是我的 yaml:
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" }
editor:
config:
contentsCss: "EXT:mysitepackage/Resources/Public/Css/rte.css"
stylesSet:
- { name: "Lead", element: "p", attributes: { 'class': 'lead' } }
toolbarGroups:
- { name: styles, groups: [ format, styles ] }
- { name: basicstyles, groups: [ basicstyles ] }
- { name: paragraph, groups: [ list, indent, blocks, align ] }
- "/"
- { name: links, groups: [ links ] }
- { name: clipboard, groups: [ clipboard, cleanup, undo ] }
- { name: editing, groups: [ spellchecker ] }
- { name: insert, groups: [ insert ] }
- { name: tools, groups: [ table, specialchar ] }
- { name: document, groups: [ mode ] }
format_tags: "p;h1;h2;h3;h4;h5;pre"
justifyClasses:
- text-left
- text-center
- text-right
- text-justify
extraPlugins:
- justify
- embedsemantic
- autoembed
removePlugins:
- image
removeButtons:
- Anchor
- Underline
- Strike
autoEmbedWidget: "embedsemantic"
embed_provider: "https://my.iframely.instance/oembed?url={url}&callback={callback}"
extraAllowedContent: '*(*)[data-*]; oembed'
processing:
allowTags:
- oembed
常量中的这一行:
styles.content.allowTags := addToList(oembed)
我现在可以将 oembed 放入 RTE 中并显示社交帖子的预告片。保存内容后oembed
标签被替换为p
tag
我缺少什么?