Prevent Mouse Focus jumping into Oxygen Editor
Posted: Wed Jan 04, 2023 5:57 pm
Hello everyone !
We want to update text-content of elements in Oxygen from our own View.
The problem is that, when we use insert-methods (insertXMLFragment, insertFragment, insertMultipleFragments, insertText..), the mouse focus always jumps into the Oxygen-Editor where the content was inserted.
But what we need is, that the mouse-focus stays in our own view.
Is there any way to prevent the mouse-focus from jumping into Oxygen Editor ?
EDIT: Edited mouse-cursor to mouse focus
Best Regards and happy new year,
Khoi
We want to update text-content of elements in Oxygen from our own View.
Code: Select all
private void insertNewTextContent(AuthorElement authorElement, AuthorDocumentController documentController,
String content) {
try {
documentController.delete(authorElement.getStartOffset() + 1, authorElement.getEndOffset());
documentController.insertXMLFragment(content, authorElement.getStartOffset() + 1);
} catch (AuthorOperationException e) {
e.printStackTrace();
}
}
But what we need is, that the mouse-focus stays in our own view.
Is there any way to prevent the mouse-focus from jumping into Oxygen Editor ?
EDIT: Edited mouse-cursor to mouse focus
Best Regards and happy new year,
Khoi