This is a migrated thread and some comments may be shown as answers.

Object/Embed tag in Editor

22 Answers 685 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Travis Schoening
Top achievements
Rank 2
Travis Schoening asked on 27 Oct 2007, 05:05 PM
I'm trying to use RadEditor to have the ability to display object/embed code, such as an "embed link" from youtube.  But having a few issues with it.  If I were to add the embed code in HTML view, and then go to Design View, the video will show up fine... however if I were to switch back to HTML view, all of the code disappears.

That is issue #1, Issue #2 seems to be have the same result, however happens when I go to save the content of the Editor to the DB.  The code disappears and the video embed is not displayed.

Does this happen for anyone else?  Is there a fix?

Thanks,
Travis

22 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Nov 2007, 03:17 PM
Hi Travis,

The problem is due to that the OBJECT tag is missing some important PARAM inner tags. Thus the Rich Text Editing engine of the browser thinks that this tag is not valid and strips it. This behavior can be reproduced in a standard editable  DIV / IFRAME elements as well as in the other DHTML editors. The problem does not exist in Firefox too.

Here is an OBJECT tag containing all needed PARAM inner tags that will be not stripped by Internet Explorer and will be render properly in RadEditor "Prometheus":

<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" type="application/x-shockwave-flash" height="350" width="425"><param NAME="src" VALUE="http://www.youtube.com/v/GVC4Jxh6CZo"><param NAME="movie" VALUE="http://www.youtube.com/v/GVC4Jxh6CZo"><param NAME="width" VALUE="425"><param NAME="height" VALUE="350"><param NAME="quality" VALUE="high"><param NAME="play" VALUE="true"><param NAME="type" VALUE="application/x-shockwave-flash"><param NAME="pluginspage" VALUE="http://www.macromedia.com/go/getflashplayer">
<embed src="http://www.youtube.com/v/GVC4Jxh6CZo" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>
</object>


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
damien jorgensen
Top achievements
Rank 1
answered on 04 Nov 2007, 06:04 PM
If you post a tag which opens < and closes /> then the editor should be able to just accept that is accurate.

You've forced us to return to using a plain text box inplace of the radeditor.
0
Rumen
Telerik team
answered on 05 Nov 2007, 09:32 AM
Hello Damien,

As I wrote in my earlier reply, this is a browser behavior which appears when the OBJECT tag is missing the important classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" attributes and when it is passed through the Rich Text Editing engine of the browser, the browser does not recognize that this is a flash file and strips its param inner tags. To solve the issue you should set the classid attribute and the browser will not strip the tag any more:

<object width="425" height="355" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://www.youtube.com/v/D2kJZOfq7zk&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/D2kJZOfq7zk&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
damien jorgensen
Top achievements
Rank 1
answered on 05 Nov 2007, 09:38 AM
So then what you are suggesting is the source button at the bottom of the editor infact is only a partial editor in that it can decided to modify the code pasted?

I can see that the classid is missing, however the rest of it is formated correctly.

So could you explain what removes the object? I.e. you mentioned the Rich Text Editing in the browser.

What confuses me is, if I post a YouTube video in the source, and save the content it works.
If I click back onto the designview, it renders the flash correctly in the editor, but when you then switch back to the source view the flash is replaced with embed.

How come when you switch to Design view from Source it renders correctly and then bascially eats itself when you click back on source?

What is being fired when you click source which isnt being fired when you click design?
0
Rumen
Telerik team
answered on 05 Nov 2007, 12:37 PM
Basically, each DHTML editor uses the Rich Text Editing (RTF) engine of the browser (under which it operates) to render and produce HTML content. The RTF engines of the different browsers differ in the production of HTML and behave differently with the HTML content.

For example if you set an OBJECT tag taken from YouTube that does not have a classid attribute, then Internet Explorer will strip this tag, but Firefox will not, because Firefox does not modify the entered by the user content.
So if you put your OBJECT tag in RadEditor in Firefox, it will be not modified. Unfortunately the video will be not rendered in Design mode, because the Mozilla based browsers do not provide support for playing Flash and Media objects in Design mode.

This behavior can be reproduced in our competitors' DHTML editors.

Here is information how the editor uses and renders the provided content:

When the user enters some content in Html mode (which is a standard textarea) and switches to Design mode (an editable IFRAME element), then the editor obtains the content from the textarea and supplies it to the Rich Text Editing engine of the browser which renders the HTML markup in Design mode.

When the user just enters the content in Html mode and directly submits the content, then the editor does not use the Rich Text Editing engine of the browser and therefore the content is saved without modifications. That's why when you save the YouTube tag directly from Html mode it is not changes.

We have two options to dial with OBJECT tags in the editor:

Option 1 (the default behavior): We can render the OBJECT tag in Design mode by supplying the tag to the browser's RTF engine and it will be rendered. This is how the editor works currently and this scenario is much user-friendly.

Option 2: We can display an image over the non rendered OBJECT tag in Design mode and display the flash movie only in Preview mode or when displaying the produced content outside the editor. Actually this is how the editor works in Firefox, because the browser does not render the Flash and Media videos in the editable HTML elements (DIVs, SPANs and IFRAMEs).

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
shaun
Top achievements
Rank 1
answered on 17 Oct 2008, 01:37 AM

Hi,
We have swf loaded on two pages:
1. http://www.nswrugby.com.au/MediaExtranet/News/2008/September/TahTVisBack.aspx
2. http://www.nswrugby.com.au/HSBCWaratahs/DevelopmentTours/Fiji-2008/Fiji.aspx

We are ok with Safari, IE, Chrome and Opera. IE - all videos are loading on each page.

However with Firefox we have a problem.The swf videos on page 1 load fine, however on page 2 the video does not load at all.

We are using a very old version of Rad Editor - I am sorry I don't know which version.

Can you inform me:

1. Is this a version problem.

2. Is there something we can do for now which will get the video to display on page 1 in Firefox.

Many thanks for your time.

Cheers

shaun l

0
Rumen
Telerik team
answered on 20 Oct 2008, 03:44 PM
Hello Shaun,

My suggestion is to upgrade to the latest classic 7.3.4 version of RadEditor or to RadEditor for ASP.NET AJAX which offers better flash object / embed support. By default, IE strips all param tags inside the object tags and this is the most likely reason for the problem on your side.

Please, also note that the YouTube's OBJECT tag is missing some important PARAM inner tags. Thus the Rich Text Editing engine of the browser thinks that this tag is not valid and strips the param tags.

This behavior can be reproduced in a standard editable  DIV / IFRAME elements as well as in the other DHTML editors. The problem does not exist in Firefox.

Here is an OBJECT tag containing all needed PARAM inner tags that will be not stripped by Internet Explorer and which will render properly:

<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" type="application/x-shockwave-flash" width="425" height="344">
<param NAME="src" VALUE="http://www.youtube.com/v/GVC4Jxh6CZo">
<param name="movie" value="http://www.youtube.com/v/aUczKPXWLAM&amp;hl=en&amp;fs=1">
<param NAME="width" VALUE="425">
<param NAME="height" VALUE="350">
<param NAME="quality" VALUE="high">
<param NAME="play" VALUE="true">
<param name="allowFullScreen" value="true">
<param NAME="type" VALUE="application/x-shockwave-flash">
<param NAME="pluginspage" VALUE="http://www.macromedia.com/go/getflashplayer">
<embed src="http://www.youtube.com/v/aUczKPXWLAM&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" height="344" width="425"></embed>
</object>

You can use the Flash manager to construct your youtube videos.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Veluswamy Muniswamy
Top achievements
Rank 1
answered on 16 Feb 2009, 01:46 PM
Hello,

We are currently evaluating the RadEditor for MOSS(using RadHtmlField Publishing content) and in furthur discussions with the OBJECT TAG issue, I have 3 questions in regards to this.
  1. Why does the PARAM tags duplicate when the content saved and retrieved.
  2. One of the requirements for the project is that is user is requested a valid video url when he clicks on the custom button.When the User enters the value and clicks ok,the Param Values are missing.Would you please let me know how do we fix this.
  3. When i copy this Object Tag from the Flash Manager Demo Site nd paste it in My radeditor it does not show show the Vedio as it does on the Demo Site.

I would greatly appreciate your reply on this,as this would help us in making the right decision.

Thanks
Velu

0
Lini
Telerik team
answered on 20 Feb 2009, 04:12 PM
Hello Velu,

Are you using some custom client code to get the editor content with the .get_html() method? If yes, then please use .get_html(true) instead. It will return the content as if it is returned to the server and the object tag should have its param elements.

Sometimes the browser will automatically strip the param elements while you are using the editor content area. This can happen if the object tag does not have the correct classid attribute.

If you use the Flash Manager in the RadEditor control, it will insert an object tag and an embed tag inside it. This will make sure that the flash is visible in all browsers. When you copy and paste the object tag created from the flash manager dialog, make sure that you update the URL for the flash movie in both the <param name="Movie" value="..."> element and the <embed src="..." element.

Kind regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dan
Top achievements
Rank 1
answered on 05 Mar 2009, 06:57 PM
Hi, I have the same problem but the solutions so far have not resolved my problem.

The object is tagged as follows:

<OBJECT ID="shwmp" WIDTH="640" HEIGHT="480" CLASSID="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" TYPE="application/x-oleobject" VIEWASTEXT><PARAM NAME="URL" VALUE="http://mfile.akamai.com/13313/wmv/pennsylvan1.download.akamai.com/13313/MDJSPersSafe.asx" WIDTH="480" HEIGHT="640" AutoStart="1" EnableContextMenu="1" ShowStatusBar="1" StretchToFit="1" Mute="0" ShowControls="1" ShowAudioControls="1" AutoHideControls="0" ShowPositionControls="1"> </EMBED></OBJECT>



It will work as previous people have explained in the controls preview but not on preview of the page nor after being saved.  Your help would be greatly appreciated.

Dan
0
Rumen
Telerik team
answered on 10 Mar 2009, 08:45 AM
Hi Dan,

I am not sure whether you use RadEditor for ASP.NET AJAX or RadEditor for MOSS, but I made a test with the latest beta build of RadEditor for ASP.NET AJAX and I was not able to reproduce the problem.

Could you please, test the attached project and let me know if you still experience the problem? Please, also see the attached video that demonstrates my test.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Antipod
Top achievements
Rank 1
answered on 10 Mar 2009, 11:20 AM

Hello Rumen,
T
hank you for the example and video. Your example works on my local computer when AJAX ASP.Net extension is installed.

But in the provided example you are using standard Windows Media Player and not a Flash player: you are specifying type=”application/x-oleobject” (I think for flash player the correct value is “application/x-shockwave-flash”) and providing classid=”clsid:6bf52a52-394a-11d3-b153-00c04f79faa6” (for the Flash player it is "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000").

Using standard Windows Player it is not possible to see Youtube controls , end users want to see standard Youtube controls to choose volume of the video, click that youtube rectangle to start watching, click link to share with friends and so on.

I have tried to put a youtube link (for instance http://www.youtube.com/v/eAhfZUZiwSE) instead of provided in the example (http://mfile.akamai.com/13313/wmv/pennsylvan1.download.akamai.com/13313/MDJSPersSafe.asx), obviously, it does not work, because standard Windows player does not recognize my link.


Please provide an example which will use Youtube video.

0
Antipod
Top achievements
Rank 1
answered on 10 Mar 2009, 12:51 PM

Hello Rumen,

 

I have improved your example, it works well.  

I have continued to investigate my issue, unfortunately, without success.

 

Here is advanced info from my side: I am using Sitecore 6, I do not exactly know which version of RadEditor it uses, but I have found RadEditor.Net2.dll, assembly version is 7.2.0.0. Now the issue looks like my RadEditor is not up to date. Am I right?.

The questions are:

a. How can I know which version of RadEditor is used by Sitecore 6?

b. How can I update my RadEditor for Sitecore 6?

 

Thank you.

0
Rumen
Telerik team
answered on 13 Mar 2009, 09:56 AM
Hi Anton,

In order to update the RadEditor.dll or RadEditor.Net2.dll in SiteCore you should replace the old RadEditor.dll with the new one v7.3.5  from the latest RadEditor Classic installation as well as update the RadControls/Editor folder. The latest classic version features the content filters of RadEditor for ASP.NET AJAX and the flash problem should be fixed.

If the old RadEditor.dll is reference by another SiteCore assembly you should configure assembly binding redirect in the web.config file:

<dependentAssembly>
  <assemblyIdentity name="RadEditor" publicKeyToken="852c9eb6525c1b53" culture="neutral" />
  <bindingRedirect oldVersion="1.0.0.0-7.2.0.0" newVersion="7.3.5.0" />
</dependentAssembly>

You can find more information in the following MSDN article: Assembly Binding Redirection.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Michelle Spear
Top achievements
Rank 1
answered on 08 Jun 2009, 08:49 PM

I'm ok to paste object tag in the HTML mode, but I'm looking an easy way for non-technical user, something like, using Media Manager.

 

The Media Manager is great if the media file is in the MOSS server, but for external media file, the Media Manager has no place to type in a url.  Is there some way we can modify the MediaManager.ascx file to allow type in (or paste) a url?

 

Thanks

Gary

0
Rumen
Telerik team
answered on 11 Jun 2009, 12:58 PM
Hi Michelle,

The Media Manager of RadEditor does not offer out-of-the box the requested feature to insert external media files.

If you would like you can try to implement this feature yourself by modifying the built-in Media manager dialog using the instructions provided in this article as a base: Modifying RadEditor's built-in dialogs.

Another approach is create your own custom dialog that will insert the desired content in the editor. You can see the following example for more information: Adding Custom Dialogs.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tran Quang Dao
Top achievements
Rank 1
answered on 05 Jan 2011, 07:57 PM
Hi,
I want to modify RadEditor Media Manager to play mp3 files like this:
  Change the embedded default player (windows media player) to my embbed flash player
How can i do?
0
Rumen
Telerik team
answered on 06 Jan 2011, 12:10 PM
Hi Travis,

You can modify the pasted HTML content from the Media Manager using the OnClientPasteHtml property event and args.set_value method.

If you need to modify the methods of the Media Manager you can register the external dialogs files of RadEditor and customize the MediaManager.ascx file.


Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Matthew
Top achievements
Rank 1
answered on 25 Oct 2011, 06:13 PM
In my editor (SharePoint editor replacement) your example gets removed:

<OBJECT ID="shwmp" WIDTH="640" HEIGHT="480" CLASSID="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" TYPE="application/x-oleobject" VIEWASTEXT>
                    <PARAM NAME="URL" VALUE="http://mfile.akamai.com/13313/wmv/pennsylvan1.download.akamai.com/13313/MDJSPersSafe.asx" WIDTH="480" HEIGHT="640" AutoStart="1" EnableContextMenu="1"
                    ShowStatusBar="1" StretchToFit="1" Mute="0" ShowControls="1" ShowAudioControls="1" AutoHideControls="0" ShowPositionControls="1"> </EMBED></OBJECT>

Is there any way to embed an object tag in the newest version 2011.2.712.35?
0
Rumen
Telerik team
answered on 26 Oct 2011, 01:10 PM
Hello Matthew,

Please see the following articles for:
RadEditor for MOSS: Inserting Flash and Media files in RadEditor.
RadEditor for SharePoint 2010: Inserting Flash and Media files in RadEditor.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Rashmi
Top achievements
Rank 1
answered on 20 Mar 2014, 05:40 AM
Hi,

I am having trouble saving HTML code using Telerik editor. It strips the closing 'embed' tag from the code and that results in faulty code.

The code I am trying to use for MP3 is as follows:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="300" height="55" id="niftyPlayer1" align="">
<param name=movie value="http://media.eteacher.pro/SD/niftyplayer.swf?file=myaudio.mp3&as=1">
<param name=quality value=high>
<embed src="http://media.eteacher.pro/SD/niftyplayer.swf?file=myaudio.mp3&as=1" quality=high width="300" height="55" name="niftyPlayer1" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>

____________________________________

And the code I am trying to use for .MOV is as follows:

<div id="vidd"><object width="510" height="304" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="SRC" value="myvideo.mov"/>
<param name="AUTOPLAY" value="false"/>
<param name="CONTROLLER" value="true"/><embed height="304" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="510" src="myvideo.mov" controller="true" cache="true" autoplay="false"></object></div>

Would you please let me know what could be wrong? or is there any settings to the editor to prevent the code stripping for these tags?

Many thanks,
Rashmi
0
Ianko
Telerik team
answered on 24 Mar 2014, 03:35 PM
Hi  Rashmi,

In the first provided code, I can see that the closing object tag is missing. Also the embed is stripped by the browser, using t he same code in directly without the RadEditor control the result is the same on my end.

The second case - again some tags are transformed from closed to not-closed by the browser.  I suggest you to further examine how the browser controls these tags and what is the proper way to use them. Note that the editor is depended on the browser and anything rendered in it should be properly supported by the browser.

Regards,
Ianko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Editor
Asked by
Travis Schoening
Top achievements
Rank 2
Answers by
Rumen
Telerik team
damien jorgensen
Top achievements
Rank 1
shaun
Top achievements
Rank 1
Veluswamy Muniswamy
Top achievements
Rank 1
Lini
Telerik team
Dan
Top achievements
Rank 1
Antipod
Top achievements
Rank 1
Michelle Spear
Top achievements
Rank 1
Tran Quang Dao
Top achievements
Rank 1
Matthew
Top achievements
Rank 1
Rashmi
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or