Thanks for Joplin and thanks for providing APIs to work with it!
I'm writing a plugin to summarize highlights from a note and insert a summary at the top of the page. I can generate the summary section, I can identify the range of lines of an existing summary that need to be removed and I can insert the new section at the current cursor position with joplin.commands.execute('insertText', new_text)...
I haven't figured out how to control the insertion point for insertText or how to delete lines.
- Is there a way to get and set the cursor position?
- Is there a way to delete lines?
- Is there an existing example of how to do this sort of thing?
- Or, is the intent to always go through the data API?
Thanks in advance!