TinyMCE editor and <object> tags



I am working on a CMS 6 site, where the editor needs to be able to enter some code to play a video on particular pages. I have created an XHTML string property where I want the editor to enter the javascript etc for the video.

The issue I have is that when the page is viewed, the video's don't appear (the code works fine in an html page) so can only assume the editor is removing some of the javascript somewhere, even though it looks ok when I go back into the code through the editor?

I have read various articles online where people suggest this editor removes any <object> tags from the editor? Has anyone had this problem before that can help with a solution.

An example of the code I am using is below;

<div style="display:none">
<p>Sorry - to view this video. Please install Adobe Flash Player</p>
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="xxxxx" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="wmode" value="transparent" />
<param name="width" value="530" />
<param name="height" value="310" />
<param name="playerID" value="xxxxx" />
<param name="publisherID" value="xxxxx"/>
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="allowScriptAccess" value="always"/>
<param name="@videoPlayer" value="xxxxx" />
<script type="text/javascript">brightcove.createExperiences();</script>-->







Jun 28, 2010 17:20

Hi Chris,
I tested it out a bit and have some sort of feedback. 
Unfortunately I think the TinyMCE media plugin is part of the problem. If I disable the media plugin things works partly better (I only used HTML Source View to insert your content and didn't test with real param values). When media plugin is enabled the class attribute on the object tag is removed and I guess the BrightCoveExperiences script relies on that class to do it's magic. 
I searched the tinymce forum for similar problems and found this thread which confirms the media plugin problem in another scenario and obviously a new media plugin is in the pipe. I however have no idea if this plugin will work with the TinyMCE version used in EPiServer CMS6 (3.2.7).

Another problem is that multiple CDATA sections is added around brightcove.createExperiences(); when I return to edit the code again. I will investigate it further and possibly file a bug. I don't know if it's TinyMCE, EPiServer or both causing this. A solution and a recommendation to this would be to add both script tags in the master page and possibly add some logic before calling the brightcove.createExperiences(), in other words on document ready if you have any object elements with the CSS class BrightcoveExperience... or something.

Hope it somewhat helps but at least explains what is going on.
/Best regards

Jun 29, 2010 16:57
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.