Try our conversational search powered by Generative AI!

Embed-tags and Flash in TinyMCE

Vote:
 

My goal is to insert flash with nested object- and embed-tags in the markup, following this: http://www.brucelawson.co.uk/2009/html-5-flash-embedding-and-other-validation-erors/

However TinyMCE is stripping/converting any embed-tags to object-tags only. I've tried configuring the editor to accept embed-tags by this:

 

[TinyMCEPluginNonVisual(AlwaysEnabled = true,
    PlugInName = "CustomEditorSettings",
    DisplayName = "Init options",
    Description = "Custom editor init options.",
    EditorInitConfigurationOptions = @"{ extended_valid_elements : ""embed[type|width|height|src|*]"" }")]  
    public class FlashTinyMCEPlugin
    {
    }

 

But no luck. Any other suggestions?

 

#45179
Nov 02, 2010 11:57
Vote:
 

Are you on CMS6?  The TinyMCE editor has buttons for inserting media -- would any of these work?

Otherwise, Frederik Vig post this the other day:

http://www.frederikvig.com/2010/10/how-to-add-support-for-iframes-and-other-elements-to-tinymce-in-episerver-cms/

It looks like he had to write a class AND make a change to episerver.config.

#45202
Nov 02, 2010 14:12
Vote:
 

Thanx for your answer Deane! The problem was however that TinyMCE has a special cleanup for media-elements like embed and object. And you can set in what way the editor will handle object and embed-tags with the "media_strict" configuration (read more here: http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/media_strict)

So what i did was:

    [TinyMCEPluginNonVisual(AlwaysEnabled = true,
    PlugInName = "CustomEditorSettings",
    DisplayName = "Init options",
    Description = "Custom editor init options.",
    EditorInitConfigurationOptions = @"{  
        extended_valid_elements : ""embed[width|height|name|flashvars|src|bgcolor|align|play|loop|quality|allowscriptaccess|type|pluginspage]"",   
        media_strict : false }")]
    public class EditorSettings { }

#45215
Edited, Nov 02, 2010 16:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.