Get selected html RTE

Last post 11-19-2013, 8:21 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  11-19-2013, 6:02 AM 78384

    Get selected html RTE

     Hi,

     

    I would like to get the selected (html) text.

    Same as over here: http://cutesoft.net/forums/post/55366.aspx but then for the Rich Text Editor. 

     

    How to do this? I can't find it in the documentation.

  •  11-19-2013, 8:21 AM 78389 in reply to 78384

    Re: Get selected html RTE

    Hi Floris246,

     

    Retrieves the HTML contained within the selection range

    In order to get the HTML contained within the selection range, you would type:

    // get the HTML contained within the selection
    var editor1 = document.getElementById('<%= Editor1.ClientID%>').editor; 

    var selhtml = editor1.ExtractRangeHTML(); 

     

    Regards,

     

    Ken 

View as RSS news feed in XML