Page 1 of 1

Prevent Mouse Focus jumping into Oxygen Editor

Posted: Wed Jan 04, 2023 5:57 pm
by duy_Nguyen12
Hello everyone !

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();
        }
    }
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