Undo Redo issues

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 168
Joined: Fri Jan 20, 2017 1:11 pm

Undo Redo issues

Post by Isabelle »

Hi Everyone,

We use the version 25.0.0.0 of oxygen sdk.
We use your actions for undo and redo management thanks to :

Code: Select all

((WSAuthorEditorPage) wsEditorAccess.getCurrentPage()).getActionsProvider().getAuthorCommonActions();
and

Code: Select all

((WSTextEditorPage) wsEditorAccess.getCurrentPage()).getActionsProvider().getTextActions();
But we faces issues when we change from Author view to Text view.
Here the use case :
- On the Author view, make some changes in the document
- Switch to Text view
- Undo with Ctrl + Z keys or menu action
- All the changes are deleted, not only the last one.

Moreover if you switch again to Author view you can not anymore make undo / redo.
You have to go back to Text view to make a Redo (with Ctrl + Y keys or menu action) to retrieve all your previous changes.
But even then, you can not make undo / redo on Author view.

Were you aware of this issue ?
Have you a workaround for this ?

Thanks,
Regrads,
Isabelle
Radu
Posts: 9431
Joined: Fri Jul 09, 2004 5:18 pm

Re: Undo Redo issues

Post by Radu »

Hi Isabelle,
The desktop version of Oxygen works in the same way, it's not a but, it's a limitation of the architecture we have.
Each editor page has its own undo manager as the internal model of the Text page is totally different the internal nodes model of the Author page. So when you switch from Author to Text, the entire content of the Text page is replaced with a serialized XML content from the Author page, it's like pouring water (the serialized XML) from one glass (editing mode) to another. So the Text page gets a large undoable edit which can be undone to revert the entire Text page to its initial content before it was entirely replaced with the content from the Author mode.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply