Jump to content

Recommended Posts

Posted

I have a page with a text field that is displayed as wysiwyg editor (tinyMCE). When I add some source code like <iframe src="//www.youtube.com/embed/EdNWOlnGtrk" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>. Save the code then save the page the iframe is removed. If I do it again (add the iframe to the source code) then save the page. The iframe is there on the frontend. If I then save it again it is removed again. It looks like not being a setting of tinyMCE, but I'm not sure.

 

Using PW 3.0.277

Posted

It seems silly, because I do the following

- Open page

- Add iframe

- Save page

- Iframe gone on the rendered page

- Add iframe (the edit page was still open)

- Save the page

- Iframe is visible on the rendered page

- Change something on the page in the CMS (kept it open)

- Save the page

- iframe gone

 

So this keeps on repeating. Hanna Code is not a solution for this problem at the moment as I have a lot of content already with iFrames.

Posted

If you disable the Purifier feature, the iframe should not get removed.
I have tested this by manually adding an iframe in the source code view.

Posted

I would recommend you keep your iframe seperate from your other content. Make two fields. Check the Settings for each.

  1. For the iframe, use a Textarea without any Text Formatters. You can echo this on the frontend and get the exact HTML code you put in that field.
  2. For content with HTML markup, use a Textarea with the HTML Entity Encoder Text Formatter.

I use this approach all the time for any kind of embed codes. You can treat iFrames in a similar manner.

  • Like 1
Posted

Yes tried it myself. Works by disabling the purifier. In that regard something is still going wrong. If I enable purifier the iframe is stripped only sometimes and not always. So something is happening there. @Inxentas keeping iframes separate from the content, as I do agree, is not an option at the moment.

Posted

Oke.. yes it is an option, but I don't want it to be an option at this point in time as it is more work. I'm migrating from an old CMS. I just copy the content from an old wysiwyg editor. 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...