the scripting API works almost completely on the data models and not on the GUI components built on top of them. That's why there are not many scripts dealing with GUI components.
But I think that this should be enough to get you started:
importorg.freeplane.features.note.NoteControllerdefpane=NoteController.controller?.noteViewerComponent?.editorPaneif(pane&&pane.isVisible()){if(pane.document.length>3){pane.setCaretPosition(3)}else{c.statusInfo="a nice note, but to short to place the cursor at this position"}}else{c.statusInfo="note editor not visible"}
Hi everyone,
I would like to know which API function can be used to move the cursor / caret to a specific position inside the note panel?
(I have searched this forum, the Freeplane API website, and other resources... for 2 days but I haven't found the answer yet).
Thank you very much.
Roberto.
Hi Roberto,
the scripting API works almost completely on the data models and not on the GUI components built on top of them. That's why there are not many scripts dealing with GUI components.
But I think that this should be enough to get you started:
pane
has type JEditorPane.html.Volker
Hi Volker,
I think I can proceed from this code snippet :)
Thank you very much for your valuable help.
Roberto.