How to insert javascript widget code in Cute Editor ?

Last post 03-10-2009, 2:23 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  03-09-2009, 9:48 AM 49628

    How to insert javascript widget code in Cute Editor ?

    Hello,
     
    I want users to copy/paste any widget code in my custom dialogue and after clicking on submit button it should paste to editor. Here is the code I am using :
     
    var editor=top.dialogArguments;    
                editor.PasteHTML("<%=strHtml%>");
                top.close();   
     
    This code works fine for flash/HTML widgets but not worked in case of javascript widgets. Here is one example widget code:
     
    <script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script>if (WIDGETBOX) WIDGETBOX.renderWidget('84243936-82be-4451-8766-01e952643b4f');</script><noscript>Get the <a href="http://www.widgetbox.com/widget/shogun-clock">Shogun Clock</a> widget and many other <a href="http://www.widgetbox.com/">great free widgets</a> at <a href="http://www.widgetbox.com">Widgetbox</a>!</noscript>


    My custom dialogue box failed to insert this widget code in editor. I have tried  editor.EnableStripScriptTags property but still not working. 

    Please help me regarding this issue.

    Regards,
    Freak
     
     
  •  03-10-2009, 2:23 PM 49699 in reply to 49628

    Re: How to insert javascript widget code in Cute Editor ?

    Freak,
     
    You need to set the following propery to false:
     

    Editor.EnableStripScriptTags Property

    Specifies whether to remove inject script before write the string into the db.

     
    Demo:
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML