I tried the old embed code for adding YouTube videos into TinyMCE and it works fine. Some of the users may not realise they have to click on the old embed code option in YouTube embed code link to add it in.
I want to make it easy for users and allow them to just copy the new embed code directly and paste it on TinyMCE and away they go.
The new embed code looks like the following example:
<iframe title="YouTube video player" width="640" height="390"
src="http://www.youtube.com/embed/VvJ037b_kLs"
frameborder="0" allowfullscreen></iframe>
How do I get TinyMCE to accept the new version of the YouTube embed code with iframe?
I'm working on a CakePHP site build.
Click the "Share" link under your YouTube video to expose the available sharing options. Click the "Embed" button and you will see a box just below it fill with code.
Go to the YouTube page, select a video, and click on the 'Share' option that is displayed below. Here you'll find the; 'Embed' option, click on that option. Now you'll get the Embed Code; you can copy the code from here.
I think that the use of "extended_valid_elements" is better than edit the original settings.
See that: TinyMCS - extended_valid_elements
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With