SnippetMaster Support Forums
Return to main website
 
September 12, 2011, 10:30:09 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 12, 2011, 10:30:09 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO « previous next »
Pages: [1] Print
Author Topic: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO  (Read 4685 times)
jjkweb

Posts: 8


WWW
[-] TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO
« on: March 12, 2009, 12:50:32 PM »

As mentioned in this post, SnippetMaster breaks flash coding from video sites like youtube and myspace.  This also applies to SnippetMaster PRO!!  The problem appears to be that TinyMCE strips the <embed> tags even if "allow all elements" is selected or if you put "embed" in as an extended element.  In doing some research, you can correct this issue by setting the TinyMCE init option "media_strict" to "false."  See this link for more details.

Henri, perhaps you can tell us how to modify the tinyMCE.init command for a quick fix... or if it's even possible with your code restrictions.  If not, I think a lot of people would really appreciate a version 2.2.4 to fix this issue ASAP!
Report to moderator   Logged

JJK Web Design
Design. Hosting. eSolutions.
jjkweb

Posts: 8


WWW
[-] Re: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO
« Reply #1 on: March 14, 2009, 07:40:51 PM »

I'm not sure why Henri hasn't responded to this question, but I've come up with a hack that should work.  Basically, we need to get the TinyMCE init script to also include the flash plugin.  This will not only stop stripping the <embed> tags, but will also clean up the myspace or youtube code.  It works like a charm.

To make this work, do the following:
In SnippetMaster, go to "Admin" -> "General"
Under "HTML Code Validation & Cleanup Rule Sets" make sure you have selected either "Use full XHTML rule set" or "Use limited XHTML rule set"
In the "Extended Valid Elements" box, include the following text (exactly):
Code:
",
plugins : "flash",
extended_valid_elements : "
If you have any of your own extended elements, add them directly after the last quote mark.
Save and you're all set.  Let me know if this works for you until Henri fixes the software.
Report to moderator   Logged

JJK Web Design
Design. Hosting. eSolutions.
testsetup

Posts: 8


[-] Re: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO
« Reply #2 on: April 27, 2009, 07:48:21 AM »

Thats very interesting and good of you to offer a fix.
Would you know if it works for javascript and what the code would be for the extension?

Thanks
« Last Edit: April 27, 2009, 07:49:57 AM by testsetup » Report to moderator   Logged
jjkweb

Posts: 8


WWW
[-] Re: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO
« Reply #3 on: April 28, 2009, 02:10:43 PM »

Enabling Javascript is easy!  Just add "script[language|type|src]" to the Extended Valid Elements box.  If you are not using my "flash hack," that should be the only thing in the box.  If you want both, it should look like this:
Code:
",
plugins : "flash",
extended_valid_elements : "script[language|type|src]

Also, if anyone is wondering, this should work for any plugin bundled with TinyMCE.  You can see a list of bundled plugins here:
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins

Just replace the word "flash" in the example above with the name of the plugin to enable.  If you want to enable more than one, add it using a comma separated list, like the following:
Code:
",
plugins : "flash, bbcode, layer",
extended_valid_elements : "

However, you may need to add buttons to the button bar to get some plugins to work properly.  I have not worked out the injection for that code (simply because it's not something I'll be using).
Report to moderator   Logged

JJK Web Design
Design. Hosting. eSolutions.
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: TinyMCE strips <embed> tags from flash (youtube) code SnippetMaster PRO « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!