How to select a tag in javascript ?

  •  02-28-2006, 12:57 PM

    How to select a tag in javascript ?

    Hello,
    I have a custom button to add a link, and i want the user to be able to edit his link with my custom button also.
     
    I managed to get the element he wants to edit (editor.SearchSelectionElement('A')), when he simply has the cursor on the link, without selecting the whole link.
    But after modifying the link, i use the PasteHTML method but it only replaces the selected text, and then insert a new link.
     
    How can i select the entire element, to replace it ?
    Or should i remove it, but how ?
     
     thanks
View Complete Thread