wes Posted October 7, 2014 Share Posted October 7, 2014 Having some issue with getting an iframe to save on a CKeditor text field (2.5.3). Things I've done to explicity allow it: - added "iframe[*]" to extraAllowedContent - added "IFrame" to the CKEditor toolbar - turned off CKEditor ACF - switched the field's "Content Type" from "Markup/HTML" to "Unknown" When pasting in my iframe code (it's a Vimeo embed code), CKEditor shows the iframe placeholder, but after saving the page, it's stripped out. For testing, I tried adding a simpler iframe using CKEditor's iframe toolbar button, but that also gets stripped out after saving. Anyone experiencing this, or have iframes working with their field? Link to comment Share on other sites More sharing options...
adrian Posted October 7, 2014 Share Posted October 7, 2014 Quick answer - if your only need for iframes is video embedding, then use this instead: http://modules.processwire.com/modules/textformatter-video-embed/ Link to comment Share on other sites More sharing options...
wes Posted October 7, 2014 Author Share Posted October 7, 2014 Thanks, Adrian. I'll be sure to try that out. I'm assuming it'll work with 2.5 even though it's not listed in supported versions. Link to comment Share on other sites More sharing options...
adrian Posted October 7, 2014 Share Posted October 7, 2014 Yeah - it definitely works fine it 2.5 - hopefully Ryan will get around to updating the supported versions for it shortly. Link to comment Share on other sites More sharing options...
alp9000 Posted October 14, 2014 Share Posted October 14, 2014 I'm having this problem as well, and I need iframes for other kinds of content (not just video), so the Video Embed module isn't a solution for me. 1 Link to comment Share on other sites More sharing options...
adrian Posted October 14, 2014 Share Posted October 14, 2014 It is definitely possible to allow iframes through CKEditor with the right settings, but I would suggest that the easiest option might be to set up a Hanna Code (http://modules.processwire.com/modules/process-hanna-code/) tag for inserting iframes. I have to head out, but hopefully someone else can give you an example if you can't figure it out. Link to comment Share on other sites More sharing options...
kongondo Posted October 14, 2014 Share Posted October 14, 2014 Here's how it worked for me in CKEditor (in case you persist on this route - but I would go for Hanna Code as Adrian suggested. As usual, the "culprit" is our friend HTML Purifier (read from here up to and including Ryan's comment here about its pros and cons before deciding whether to implement #5 below!) For iframes, the Extra allowed content seems to have no effect - btw, the correct syntax here is for example, div(*) not div[*] Add 'Iframe' (note the spelling) to your CKEditor Toolbar Leave ACF on No need to switch the field's "Content Type" from "Markup/HTML" to "Unknown" Turn HTML Purifier off (gasp! ) Enjoy your embedded video 12 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now