Please try the following code:
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
- <%@ Page Language="C#"%>
- <HTML>
- <body>
- <form runat="server">
- <input name="docFld" type="text" id="docFld" style="width:300px;" />
- <input name="Change" id="Change" type="button" value="File Manager" onclick="PickFile()" />
-
- <div>
- <CE:Editor id="Editor1" runat="server" Width="1" Height="1" AutoConfigure="None" ShowHtmlMode="False" ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False" ShowBottomBar="False" BackColor="White" BorderColor="White"></CE:Editor><br>
- </div>
-
- </form>
-
- <Script Language="javascript">
- function PickFile()
- {
- var editor1 = document.getElementById('<%=Editor1.ClientID%>');
- editor1.FocusDocument();
- var editdoc = editor1.GetDocument();
- editor1.ExecCommand('new');
- editor1.ExecCommand('insertdocument');
- InputURL();
- document.getElementById("docFld").focus();
- }
-
- function InputURL()
- {
- var editor1 = document.getElementById('<%=Editor1.ClientID%>');
- var editdoc = editor1.GetDocument();
- var links = editdoc.getElementsByTagName("a");
- if(links.length>0&&links[links.length-1].href!="")
- { document.getElementById("docFld").value = links[links.length-1].href;
- }
- else
- {
- setTimeout(InputURL,500);
- }
- }
- </script>
-
- </body>
- </HTML>
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