Is it possible to replace links dialog

Last post 10-19-2005, 11:01 AM by rpj. 3 replies.
Sort Posts: Previous Next
  •  10-18-2005, 10:10 AM 11795

    Is it possible to replace links dialog

    Hi there,
     
    i want to make my own link dialog box, and i have made a new button which activates the new link dialog. My problem now is that i don´t know how to find out what text i have selected in the cute editor (.NET 5). Is there a functin in the cuteeditor class or something that i can use?
     
     
    /René (denmark)
  •  10-18-2005, 1:11 PM 11807 in reply to 11795

    Re: Is it possible to replace links dialog

    René, 
     
    You can use the following code to get the editor:
     
    var editor1=document.getElementById('<%=Editor1.ClientID%>');

    var editor1doc = editor1.GetDocument();

    Now you can get the selection and write your JavaScript code:
     
    For example:

    var sel =  editor1.GetSelection();
     
    if(sel.type=='Control')
    {
        // put your code here...
           ......... 
    }
    else
    {
        // put your code here...
           ......... 
    }
     
     

    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

  •  10-19-2005, 6:06 AM 11830 in reply to 11807

    Re: Is it possible to replace links dialog

    Thanks alot Adam, that really help me a lot of the way. My only problem now is that when i am returning ex. "<a href="linkurl" target="_blank">link name</a>" to the editor, it converts it to HTML entities ex. "&lt;a href=&quot;linkurl&quot;&qt;link name...". Is there a way to avoid that?
     
    /René
  •  10-19-2005, 11:01 AM 11837 in reply to 11830

    Re: Is it possible to replace links dialog

    Never mind Adam, i found out my self. But here is a nother one:
     
    If i want to edit an existing link, is there a way to "automark" the existing link if your cursor is on it and you click on the link button (that i have made)?
     
     
    /René
View as RSS news feed in XML