Undo

Oxygen general issues.
dylan
Posts: 15
Joined: Thu Feb 26, 2009 12:12 am

Undo

Post by dylan »

Is there any way for developers to bind to the undo (ctrl^z) event?

Ragards,

Dylan
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Undo

Post by sorin_ristache »

Hello,

It is possible in Author mode but not in Text mode. In Author mode you can set any shortcut for an extension action specified in a document type.

Do you want to change the Undo action in Text mode? What action would you like to run instead of the built-in action for Ctrl-Z?


Regards,
Sorin
dylan
Posts: 15
Joined: Thu Feb 26, 2009 12:12 am

Re: Undo

Post by dylan »

Hi Sorin,

As you may know, I am working on 'track changes' functionality. The issue I am having is that (for example, with track changes ON) when a user is inserting a change, and then hits ctrl^z, the inserted text is removed, but is now being tagged as deleted!

Normally, I can just stop listening for contentInserted() and contentDeleted() events, but with ctrl^z, I don't get the opportunity to remove my AuthorListener from the AuthorAccess object.

I will try today to handle the ctrl^z event and work around this issue, and i'll keep you posted on the outcome.

Thanks,

Dylan

======================================================
UPDATE:
======================================================
I can handle the ctrl^z event as you suggested, but in doing so, I have completely overridden the original purpose of undo...

What I am *trying* to do is:

1. handle ctrl^z
2. remove the AuthorListener from AuthorAccess
3. turn OFF change tracking
4. let the system perform the undo operation, and
5. turn track changes back ON

Is there a call I can make from within AuthorOperation.doOperation(...) that will perform the undo?
Last edited by dylan on Wed Mar 04, 2009 11:39 pm, edited 1 time in total.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Undo

Post by george »

Hi Dylan,

Track changes is work in progress right now... My suggestion would be to wait for that to be available as a standard oXygen feature. The expected time for that to be generally available is the end of April and I hope we will have something that can be tested in a couple of weeks.

Best Regards,
George
George Cristian Bina
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Undo

Post by sorin_ristache »

Hello Dylan,
dylan wrote:Is there a call I can make from within AuthorOperation.doOperation(...) that will perform the undo?
In version 10.2 the Author API will allow a custom extension action to call the methods of the undo manager that stores the Author actions for which undo and redo is available.


Regards,
Sorin
Post Reply