Hi, I'm having a weird issue with the TinyMCE plugin in modx. I'm trying to add a video from youtube, so I use the "embedded media" button, and then i choose "iframe" in the type list. The trouble is that instead of including an iframe on the page, the output is an 'embed' tag...
And when I look in the HTML source, the tag is an `<iframe>`. So I guess it's some kind of filter on save that replace the iframe with an embed
Anyone have any clue about this ?
[ed. note: sboudrias last edited this post 14 years, 1 month ago.]
-
☆ A M B ☆
- 24,524 Posts
TinyMCE replaces iframe with embed as a security precaution. You can add the iframe and its attributes using
http://www.tinymce.com/wiki.php/Configuration:extended_valid_elements
iframe[src|title|width|height|allowfullscreen|frameborder]
-
☆ A M B ☆
- 24,524 Posts
Looks like your quotes are wrong. Try fixing it so that it's all just in single quotes, without that extra set of double-quotes.
Others line in the configuration file are setup like this too. And, this is javascript, and the above code is valid JS. But, I tested it anyway, and it isn't working.
Can the manager tinymce config file not be the one I edited ?
To confirm - is the file that needs the amend the 'xconfig.js' file ? The tinymce site is unclear.
I'm also struggling to embed a youtube video. If I turn tinymce off it will work, but when I edit the page again the embed code is lost.
-
☆ A M B ☆
- 24,524 Posts
TinyMCE is a big problem in some circumstances; the only options you have are to either not use it on that resource, or put the sensitive part in a chunk and have the chunk tags in the content edited by TinyMCE. If you enclose the chunk tags in HTML div tags, TinyMCE won't add the extraneous p tags.