How to create a cutom button that include "insert hyper link" feature

Last post 09-28-2009, 7:17 PM by [email protected]. 0 replies.
Sort Posts: Previous Next
  •  09-28-2009, 7:17 PM 55921

    How to create a cutom button that include "insert hyper link" feature

    Hi, I am using CuteEditor 6.4 .net 1.1.
     
    Here is what I want to do:
     create a custom button which does the follow: insert a hyperlink that links to another article
     
    1) user selects a text by highlight ingit in Cute Editor
    2) user clicks the button, a dialog is open
    3) user types in article ID, anchor name
    4) click ok button on the dialog
    5) the text is replaced with hyperlink with url that points to the articleID.
     
    For example: if user select "myArticle" text, the when select the hyperlink, the "myArticle" is turned into hyperlink which is <A href="http://mymachine/articleredirect.aspx?aid=1001|myLink">myArticle" </A>
     
    url =" <A href="http://mymachine/articleredirect.aspx?aid=1001|myLink">myArticle" </A>"
    I use editor.ExecCommand("pasteHTML", false, url)
     
    But the selected text is always disappeared instead of turning into hyperlink
     
    Thanks so much for your help.
     
    Qian
     
     
     
     


    Qian
View as RSS news feed in XML