Custom Button Problem

  •  08-18-2005, 6:18 AM

    Custom Button Problem

    Hi,
    I am using version 4 of CuteEditor for Asp.
     
    I am trying to make a custom button that takes the highlighted text and adds tags before and after..
    For example.
     
    If user highlight "Anchor me" and clicks on button the result should be:
    <a name="Anchor me">Anchor me</a>
     
    I have problems with getting the highlighted text..for example this takes everything:
    editor.CustomAddons = "<img title=""Underline"" class=""CuteEditorButton"" onclick=""_Format(obj_editor1,'insertHTML','<a name=1>' + obj_editor1.getHTML() + '</a>')"" type=""btn"" src='/CuteEditor/CuteEditor_Files/Themes/officexp/Images/anchor.gif' border=0 />"
     
    What do I replace obj_editor1.getHTML()  with to just paste cut/paste the selected text?
     
    Urgent...
     
    Best regards..
     
    Sjur
View Complete Thread