The default button actions all add text where the cursor is (or at the beginning of the line). I was wondering if there was a way to achieve that with this component.
For a custom button, I can handle the CustomButtonClicked event, but I can't find a way to get the cursor position or anything to insert text, meaning I can only really append or prepend to the entire markdown text.
Alternately, is there a way I can add a JavaScript function as an action for my custom button? If I could do that, I could just do something like
The default button actions all add text where the cursor is (or at the beginning of the line). I was wondering if there was a way to achieve that with this component.
For a custom button, I can handle the CustomButtonClicked event, but I can't find a way to get the cursor position or anything to insert text, meaning I can only really append or prepend to the entire markdown text.
Alternately, is there a way I can add a JavaScript function as an action for my custom button? If I could do that, I could just do something like
(as per https://github.com/Ionaru/easy-markdown-editor/issues/273#issuecomment-745909535)