I want to retrieve currently selected text after clicking a button
ct1735x opened this issue · 0 comments
ct1735x commented
Description
I want to retrieve currently selected text after clicking a button.
Example when I click on the "bold" button, I want to get the text that has been bolded
I don't know which object or which accessor use
I tried MediumEditor.getFocusedElement() , editor.getFocusedElement() , both of them return like my whole html code which is not what I want to do. After clicking, the MouseEvent object has a lot of attributes and I cant seem to find the right one
Any help?