Some text in my summernote editor contains HTML. I want to get the user selected text, exactly as it is in the editor.
All the answers I've seen so far tell me to use this
$('#summernote').summernote('createRange').toString()
But it strips all the existing HTML from the selection. This:
$('#summernote').summernote('code')
Returns all the text, with HTML, but not regarding the user selected text.
Is there a way to get the user selected text with all HTML and formatting in summernote?