Hi AndyFel,
Please try the example below, it shows you how to get the link code.
- <%@ Page Language="c#" %>
-
- <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>
-
- <!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>
- <title></title>
- <script runat="server">
- protected override void OnLoad(EventArgs e)
- {
- Editor1.Text = "<a href='http://www.google.com'>test</a>";
- base.OnLoad(e);
- }
- </script>
- </head>
- <body>
- <form id="Form1" method="post" runat="server">
-
- <RTE:Editor runat="server" ID="Editor1"/>
- <input type="button" value="Get Link Code" onclick="getPointCode()" />
- </form>
- </body>
- </html>
- <script type="text/javascript">
- function getPointCode()
- {
- var editor1 = document.getElementById('<%= Editor1.ClientID%>').editor;
- alert(editor1.GetPointNode().GetParent().GetHtmlCode());
- }
- </script>
Regards,
Ken