Forum
Youtube/Iframe being stripped
Hi,
I'm using the CKeditor and the latest version of perch and if I paste an iframe (for example a youtube one) in the source on perch, it instantly gets stripped from the code when I click save. I know theres a Youtube addon but I need the ability to be able to add youtube videos and other iframes within the body of a content block.
My textblock html looks like this: <perch:content id="text" type="textarea" label="Text" markdown="true" html="true" editor="ckeditor" imagewidth="640" imageheight="480" imagecrop="true" />
I've not had this problem in the past...
Any suggestions
You have markdown="true" and html="true". Why is that? CKEditor enters HTML and not Markdown.
Hi Rachel,
Woops. I've removed the markdown element to leave me with the below but the problem still persists...
Its changing a pasted iframe to:
<p> </p>
Does it happen when not using the editor? If it is an issue with ckeditor then you would need to ask them how to get round it (we just package the plugin for convenience, otherwise it is as standard).
PROBLEM SOLVED!
I'll post my solution incase anyone else has this problem as I assume other must have.
On the latest version of CKeditor iframes are stripped when you past the in the source code. To solve this problem go to the CKeditor folder and locate config.js.
Then before the last }; include this function
This then allows things like youtube embeds with no problem.
Michael, you are an absolute legend for this. Thank you very much