Reputation: 145
Is there anyway to embed an iFrame in the RTE in typo3 backend? I want to embed google maps and not have to use an extension, so is there any way to do this?
I tried using
RTE.default {
proc {
allowTags := addToList(iframe,embed,script)
allowTagsOutside := addToList(iframe,embed,script)
entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
}
}
in my Page.typoscript but unfortunately it didn't work.
Does anyone have an idea on how to do this?
Upvotes: 1
Views: 2169
Reputation: 2148
Apart from the first answer, it is possible to use the iframe
CKEditor plugin which is shipped with TYPO3, in this way:
In your .yaml config (Just relevant parts):
editor:
config:
# add the toolbargroup if needed (e.g. default.yaml and full.yaml configurations already have it.)
toolbarGroups:
- { name: insert }
extraPlugins:
- iframe
processing:
allowTags:
- iframe
Then in your TypoScript Setup:
lib.parseFunc_RTE.allowTags :=addToList(iframe)
There is a downsize in this method that I was not able to circumvent so far: the <iframe>
gets surrounded by a <p>
tag in the CKEditor;
If you also add
lib.parseFunc_RTE.externalBlocks:=addToList(iframe)
The <iframe>
if no more surrounded by paragraphs, but a couple of empty paragraphs appear before the iframe
Upvotes: 2
Reputation: 6164
I always use the HTML content element to add iframes. It works like expected and you don't need to arrange the RTE (which is not designed for putting iframes into it).
Upvotes: 1