Problem/Motivation
Iframe element is getting wiped out in WYSIWYG editor after toggling to source code view. This can be observed where embedded content in an iframe has been placed within an accordion.
Steps to reproduce
- Also install the ckeditor_iframe module.
- Edit a page and place an iframe embedded within a details (accordion).
- In the WYSIWYG editor, click on the details summary to open the details accordion.
- Switch view to source code. The iframe element will have been changed to an img element with type=iframe
Proposed resolution
In /js/plugins/detail/plugin.js, add another line to the allowedContent beginning at line 39:
+ 'iframe[longdesc,name,scrolling,src,title,align,height,frameborder,width];'
So that it looks something like this (the sequence of the lines doesn't matter, as far as I know):
allowedContent: 'abbr br strong em small span strong sub sup time;'
+ 'drupal-media[data-entity-type,data-entity-uuid,data-align];'
+ 'img[!src,alt,width,height,data-entity-type,data-entity-uuid,data-align,data-caption];'
+ 'iframe[longdesc,name,scrolling,src,title,align,height,frameborder,width];'
+ 'picture svg video'
We are working on creating a patch file to do this, but it should be a simple change to incorporate to a minor version update.
Comments
Comment #2
ryan-l-robinson commentedFirst attempt at patch (I don't have much experience with these).
Comment #3
ryan-l-robinson commentedAnother try at the patch, generated from within a Docker Linux this time instead of Windows.
Unfortunately this one also still won't apply with composer for me but not clear why.
Comment #4
ryan-l-robinson commentedAnother attempt at the patch.
Comment #5
ryan-l-robinson commentedComment #6
ryan-l-robinson commentedComment #7
ryan-l-robinson commentedComment #8
ryan-l-robinson commentedAnother patch effort. Sorry for spamming, but I think it might be that it needs to be patch level -p1 instead of -p2? That looks like it will apply that way.
Comment #9
ryan-l-robinson commentedComment #10
ryan-l-robinson commentedComment #11
liam morlandComment #13
ryan-l-robinson commentedComment #16
liam morlandThanks!