Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a problem that I have been struggling with.
If I want to embed iframes in TinyMCE it look okej in the editor, but on save, publish or html-preview everything is gone. I have tried updateing valid elements - both in the config and in tinymce js-file. But nothing works.
Any help or input would make me happy.
This is what I have tried
And this I try to embed
<iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/rYgQnKdrh2A?rel=0" frameborder="0" allowFullScreen></iframe>
The above looks like it should have worked...did you touch the web.config to apply the changes after you updated the tinyMceConfig.config ?
On a side note, it might be a better idea to use a macro instead. You could create a macro called "Insert IFrame", allow it in the editor, and give it parameters like SRC URL, Width, Height, etc. Or if this is only to be used for YouTube you could call the macro "Insert Youtube Embedded Video" and tailor the parameters to make it easier for the editor. Let us know if you need any guidance on that..
Thanxs for reply, yes i touched web.config and it is generally an iframe, not just youtube - I have been thinking about making macro instead. But I realy would like it to work the "right" way.I have tried before in othter projects but never got it to work - someone must have been able to do it.
It seems that somewhere (not in tinymce) it gets cleaned away - because it is woking in the editor.
Have you tried setting the TidyEditorCotent to false in the umbracoSettings.config file:
<!-- clean editor content with use of tidy -->
I believe that is the only way that we got it to work.
Sean is right that setting TidyEditorcontent to false will allow you to add an iframe in the RTE field. However I don't think it's the best solution. I think you should aim for what Tom is suggesting even though it's a bit cumbersome.
But disabling tidy has it downsides, which can make it hard to maintain and control what editors are able to add on the page. But it's of course dependent on the scale of the project etc.
Have you had a look at the uTube package? Maybe that could be an option?
In case anyone else has this same problem (like I did just now) the correct TinyMCE rules are:
pipes instead of commas, simple mistake but makes all the difference :)
And yes you need to turn off Tidy in the settings too (as this cleans it server side).
Hope that helps.
Turning off Tidy is not an option, especially when we have users copying nasty formatted Word text. There must be a way to stop TinyMCE or Tidy from stripping the iFrame.
We created and are using the Widget Dropper package to work around the multitude of problems with TinyMCE and markup it so eagerly wants to strip, mangle, or incorrectly render. Yes it has a silly name but the problem it solves is also very silly, hence why it seems to fit so well. I think you can probably also find other similar packages to work around this problem, though none come to mind off the top of my head.
Best of luck!
TinyMCE can clean up Word content. Take a look at this plug in (http://www.tinymce.com/wiki.php/Plugin%3apaste) which auto cleans Word. You'll never find a 100% bullet proof solution but then once we hand over a site to a client it out of your hands anyway, you can only do so much.
Another route is to remove the need for a iframe at all (have whatever needs pasting as separate fields on a custom doctype) but this gets messy if a document starts out as a vanilla doctype but then they want to add a youtube video in the future, you can't change the doctype easily.
Finaly route is to maybe us a macro instead which the users can insert into the RTE which would render out when needed.
Bottom line, the version of TinyMCE/Tidy that ships with Umbraco 4.7 is broken by not allowing iframes even though they are allowed in the TinyMCE config. Tidy should not be stripping out the empty iframe tag. And, TinyMCE should not be removing content inside the iframe tag, which is your no frames content.
In that case I suggest you raise a ticket in the issue tracker so they can take a look (http://umbraco.codeplex.com/workitem/list/basic)
Remember to include a link to this thread and some sample code/steps to recreate the problem quickly.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted