Get Selected Text

  •  04-03-2014, 4:54 AM

    Get Selected Text

    In client-side script I need to get the selected text. Here is what I have tried.

     

    1. var selectionType = editor.GetSelectionType()

    2. if (selectionType == 'Range') {

    3.     var selectedRangeText = editor.SelectContent(editor.GetPointNode());

    4.   }

     

    Line 3 fails with selectedRangeText is 'undefined';

     

    What do I need to get the text, and only the text , that is selected?

     

    Thanks. 

     

View Complete Thread