PasteHTML() works on firefox, not on IE, for some content.

Last post 08-23-2010, 1:52 PM by Eric. 2 replies.
Sort Posts: Previous Next
  •  08-20-2010, 7:06 AM 63539

    PasteHTML() works on firefox, not on IE, for some content.

    There is no problem for PasteHTML('This is a test!')"

    But if the content of pastehtml is as following:

    <a href='http://localhost/d.aspx' target='_blank'>http://www.google.com</a>


    after PasteHTML, it was changed to following automatically by the cuteeditor behind the scene

    <a href='http://localhost/d.aspx' target='_blank'>http://localhost/d.aspx</a>";



    works in firefox, but not in IE
  •  08-23-2010, 1:37 PM 63567 in reply to 63539

    Re: PasteHTML() works on firefox, not on IE, for some content.

    nctrainingschool,
     
    The above html code works ok for.
     
    I am using Cute Editor version 6.6.
     
    Can you download the latest Cute Editor then try again?

    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

  •  08-23-2010, 1:52 PM 63569 in reply to 63539

    Re: PasteHTML() works on firefox, not on IE, for some content.

    I have tried the following code, it will not change your html code, please follow adam's advice, download latest version and try it:
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head>
      <title>JavaScript API</title>
      <link rel="stylesheet" href="../example.css" type="text/css" />
       <script language="JavaScript" type="text/javascript" >   
       function PasteHTML(html)
       {
           html = "<a href='http://localhost/d.aspx' target='_blank'>http://www.google.com</a>"
        // get the cute editor instance
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');    
        editor1.PasteHTML(html);
       }
      </script> 
     <body>
            <form id="Form1" runat="server">   
       <table cellpadding="15">
        <tr>     
         <td>
          <h1>JavaScript API</h1>
          This example shows you how to use CuteEditor JavaScript API to customize the application.
          <br /><br />
          <CE:Editor id="Editor1" Width="560" TemplateItemList="[Save,Bold,Italic,Underline,InsertChars,InsertEmotion]" ThemeType="OfficeXP" Height="250" EditorWysiwygModeCss="../example.css" runat="server"></CE:Editor><br />
          <TEXTAREA cols=60 rows=5 id=myTextArea style="width:550px" NAME="myTextArea">Try click the "get HTML" button</TEXTAREA>
          <br/><br/>         
          <p style="width:600">
          <INPUT type=button value="insert HTML" onclick="PasteHTML('This is a test!')">      
          </P>     
        </td>
       </table> 
      </form>
     </body>
    </html>
    Regards,
    Eric
View as RSS news feed in XML