Ren*_*amm 10 typo3 ckeditor typo3-8.x
我想将oembed标签放入TYPO3的ckeditor RTE中.这样我想把Instagram,facebook或twitter等社交帖子放到一些新闻文章中(在某些文本的中间).
为此,我已经激活了ckeditor的嵌入插件并将oembed标签processing放入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
Run Code Online (Sandbox Code Playgroud)
常量中的这一行:
styles.content.allowTags := addToList(oembed)
Run Code Online (Sandbox Code Playgroud)
我现在能够将oembed放入RTE并显示社交帖子的预告片.保存内容后,oembed标记将被替换通的p标签
我错过了什么?怎么能达到这个目的?
小智 3
根据我的经验,如果某些内容被替换为其他内容(尤其是 p 标签),则很可能与高级内容过滤器有关。
我无法查明您的配置中的错误,但您是否尝试过完全禁用 ACF?(参见允许的内容)
allowedContent = true;
(and remove the extraAllowedContent)
Run Code Online (Sandbox Code Playgroud)
如果有效,请不要保留它(请参阅安全最佳实践),而是努力找到正确的设置。
也许在 extraAllowedContent 中显式添加通配符属性:
extraAllowedContent: '*(*)[data-*]; oembed(*){*}[*];'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
838 次 |
| 最近记录: |