This project is read-only.

<object> tags getting mangled

Feb 10, 2011 at 2:00 AM

Using the built-in HTML Source Editor, I cannot seem to add <object> tags to embed a Silverlight media player without the editor stripping out the attributes of the <object> tag, rendering it non-functional.

Is this a known issue with the TinyMCE editor? Any suggested workarounds?


Feb 10, 2011 at 3:29 AM


I created couple of days ago a Silverlight Module for handling embedding Silverlight content. Source and NuGet package are available on Codeplex, and in the Orchard Gallery, of course.

For now it provides the ability to add single SilverlightPart to your content items, or create a Silverlight Page item, for full-page Silverlight apps. Usage is rather straightforward, nevertheless I plan to write a tutorial in couple of days.

Hope you find it useful! I'd be also glad for any feedback and new feature proposals to add in the next release:)


Feb 10, 2011 at 3:37 AM


Thanks. I tried the module earlier today. Looks potentially useful, but it's a bit too inflexible for my needs at the moment. Not having control over where the Silverlight content appears is a deal-breaker...and I also found that the SL content area appeared to be much larger than it should have been vertically.

I ended up "solving" the problem by disabling TinyMCE for the moment, and hand-editing the HTML. Not an ideal solution long-term, but it at least allowed me to embed the <object> tags the way I want them.

I also tried the CKEditor module, but that did not seem to work for me at all.

Feb 10, 2011 at 3:56 AM

Thanks for the info.

Content parts and content fields can give control only over vertical placement, but that is hardcoded in the file. I'm thinking about the module adding a GUI to modify this file and, by this, adding placement customization options. Do you think that this, plus a possibility to add more than one Silverlight element to the page would suit your need? I would add those in the future release so there wouldn't be a necessity to do HTML hand-editing.


Feb 10, 2011 at 4:03 AM

Possibly. Truth be told, what I'd like is for TinyMCE to stop mangling my markup. :-)

I tried modifying the tinyMCE.init call to allow the data and type attributes on the object tag, and that stopped tinyMCE from nuking those, but then it ends up doing some weird base64 encoding on the data attribute.

I want a "just leave my markup the heck alone" setting.

Feb 10, 2011 at 4:06 AM

Can you please file a bug so that we can track the issue? Thanks!

Feb 10, 2011 at 4:22 AM
Edited Feb 10, 2011 at 4:35 AM

Sure will...

...and done!

Apr 3, 2011 at 8:42 PM

@seeker can you please provide a link to the issue you posted so that i can keep track when this is updated?

Apr 3, 2011 at 9:14 PM

Actually here is a fix, Open [OrchardSite]\Modules\TinyMce\Views\Body-Html.Editor.cshtml look for the parameter extended_valid_elements:  and update the object tag to allow the "type" attribue object[classid|codebase|width|height|align|name|id|type]

Apr 4, 2011 at 10:31 PM

Orchard 1.1 removes all constraints on usable tags by default, FYI.

Apr 22, 2011 at 5:26 PM

I appear to be having this issue and have upgraded to 1.1, I opened a post here: any ideas: