selection to node

  •  01-07-2014, 9:59 AM

    selection to node

    Is it possible to get the first node from editor.GetRangePreviewHTML(); or get the selected node from the editor.
    I have made a custom element so to speak and I want to check the selection so that when you select this element you still get the same dialog but you edit the node instead of wrap it with the same node.

     

    For example I have a button wich changes selected text into:

    1. <footnote data-somevar="dialog value">selected text</footnote>  

    If you press the button again if you select the footnode or focus inside it you will get something like :&

    1. <footnote data-somevar="dialog value">
    2.     <footnote data-somevar="dialog value">selected text</footnote>
    3. </footnote>   
     And I don't want that.

View Complete Thread