Moving Cursor on Page change
Posted: Tue Feb 27, 2024 11:31 pm
Hi,
I'm working on a plugin method that reads a Processing Instruction which is created when the user saves in the editor. The next time they open the document, I would like to have the cursor move to the start offset of the node where I find the PI. So far I can save the instruction just fine, but I cannot seem to find a way to move the cursor. I did see that there is a deprecated method using AuthorAccess and a MoveCaretOperation Interface, but I have not found a way to implement this behavior.
Is there a way to do this in a WorkspaceAccess plugin?
Thank you!
I'm working on a plugin method that reads a Processing Instruction which is created when the user saves in the editor. The next time they open the document, I would like to have the cursor move to the start offset of the node where I find the PI. So far I can save the instruction just fine, but I cannot seem to find a way to move the cursor. I did see that there is a deprecated method using AuthorAccess and a MoveCaretOperation Interface, but I have not found a way to implement this behavior.
Is there a way to do this in a WorkspaceAccess plugin?
Thank you!