Hi gspagel,
It works fine for me both firefox and ie. Can you try the example below?
- <%@ Page Language="C#" %>
-
- <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Untitled Page</title>
- </head>
-
- <script runat="server">
- protected override void OnLoad(EventArgs e)
- {
- editor1.Text = "<p>This is the first sentence.</p><p>This is the second sentence.</p>";
-
- base.OnLoad(e);
- }
-
- </script>
-
- <body>
- <form id="form1" runat="server">
- <CE:Editor ID="editor1" runat="server">
- </CE:Editor>
- <input type="button" onclick="setEditorHtml()" value="Set A link" />
- <script type="text/javascript">
- var editor = document.getElementById('<%= editor1.ClientID %>');
- var selectedhtml="test";
- function setEditorHtml()
- {
- var html = '<a href="~/link.aspx?_id=&_z=z">' + selectedhtml + '</a>';
- editor.PasteHTML(html);
- }
- </script>
- </form>
- </body>
- </html>
Regards,
Ken