Object/Embed tag in Editor

23 posts, 0 answers
  1. Travis Schoening
    Travis Schoening avatar
    14 posts
    Member since:
    Dec 2005

    Posted 27 Oct 2007 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 01 Nov 2007 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. damien jorgensen
    damien jorgensen avatar
    10 posts
    Member since:
    Oct 2005

    Posted 04 Nov 2007 Link to this post

    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.
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 05 Nov 2007 Link to this post

    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
  6. damien jorgensen
    damien jorgensen avatar
    10 posts
    Member since:
    Oct 2005

    Posted 05 Nov 2007 Link to this post

    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?
  7. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 05 Nov 2007 Link to this post

    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
  8. shaun
    shaun  avatar
    1 posts
    Member since:
    Oct 2008

    Posted 16 Oct 2008 Link to this post

    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

  9. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 20 Oct 2008 Link to this post

    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.
  10. Veluswamy Muniswamy
    Veluswamy Muniswamy avatar
    1 posts
    Member since:
    Nov 2004

    Posted 16 Feb 2009 Link to this post

    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

  11. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 20 Feb 2009 Link to this post

    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.
  12. Dan
    Dan avatar
    1 posts
    Member since:
    Mar 2009

    Posted 05 Mar 2009 Link to this post

    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
  13. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 10 Mar 2009 Link to this post

    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.
  14. Antipod
    Antipod avatar
    2 posts
    Member since:
    Mar 2009

    Posted 10 Mar 2009 Link to this post

    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.
    Thank you.

  15. Antipod
    Antipod avatar
    2 posts
    Member since:
    Mar 2009

    Posted 10 Mar 2009 Link to this post

    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.

  16. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 13 Mar 2009 Link to this post

    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.
  17. Michelle Spear
    Michelle Spear avatar
    2 posts
    Member since:
    Mar 2008

    Posted 08 Jun 2009 Link to this post

    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

  18. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 11 Jun 2009 Link to this post

    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.
  19. Tran Quang Dao
    Tran Quang Dao avatar
    2 posts
    Member since:
    Mar 2005

    Posted 05 Jan 2011 Link to this post

    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?
  20. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 06 Jan 2011 Link to this post

    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.
  21. Matthew
    Matthew avatar
    2 posts
    Member since:
    Nov 2010

    Posted 25 Oct 2011 Link to this post

    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?
  22. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 26 Oct 2011 Link to this post

    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
  23. Rashmi
    Rashmi avatar
    1 posts
    Member since:
    Mar 2014

    Posted 20 Mar 2014 Link to this post

    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
  24. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 24 Mar 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017