How do I get situation of cursor's node?
<span role="presentation" style="padding-right: 0.1px;">
<span class="cm-strong">**dfgdf fghh trth**</span>
</span>
I am writing a markdown toolbar.
I try to find out text at current cursor postion is bold or not.
pseudocode:
if cursorNode is bold
remove bold
else
add bold
I expect something like getCurrorNode
API exist, but just can't find this API.
let cursorPos = editor.getCursor();
editor.getTokenAt(cursorPos); //only get a word
token only get a word, not a sentence.