Activate TrackChanges in WebApp
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 32
- Joined: Tue May 26, 2015 10:28 am
Activate TrackChanges in WebApp
Post by aleh.haidash »
I use Webapp 18.0.6. And I need activate trackchanges depending on my condition. How can I do it?
I tried like this way, but it not work. Button "TrackChanges" pressed but Track Changes doesn't work.
I tried like this way, but it not work. Button "TrackChanges" pressed but Track Changes doesn't work.
Code: Select all
goog.events.listen(window.editor, sync.api.Editor.EventTypes.ACTIONS_LOADED, function(e) {
if(<my condition>){
var trackChangesAction = editor.getActionsManager().getActionById("Author/TrackChanges");
if(trackChangesAction!=null){
trackChangesAction.actionPerformed();
}
}
});
Best Regards,
Aleh
Aleh
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Activate TrackChanges in WebApp
Post by cristi_talau »
Hello,
The "Track changes" state in oXygen can be controlled in several ways:
1. By the user, when pressing the "Toggle change tracking" button.
2. It may be saved in the document (check for a <?oxy_options track_changes="on"?> processing instruction at the end of the document)
3. It is configured as an option (available in the Administration Page in Web Author 18.1).
I tried your code and it seems that:
- it changes the track changes state. It actually changes it three times. Maybe the initial state of the "Track changes" is not the one you expected.
- the toggled state of the button is not updated. Unfortunately there is currently no simple way to update the toggled state of a button. I will register an issue about that.
What you can do instead, if you want also the button state to be updated is to trigger synthetic mouse events on the button. I found this answer to work http://stackoverflow.com/a/24026594 .
Best,
Cristian
The "Track changes" state in oXygen can be controlled in several ways:
1. By the user, when pressing the "Toggle change tracking" button.
2. It may be saved in the document (check for a <?oxy_options track_changes="on"?> processing instruction at the end of the document)
3. It is configured as an option (available in the Administration Page in Web Author 18.1).
I tried your code and it seems that:
- it changes the track changes state. It actually changes it three times. Maybe the initial state of the "Track changes" is not the one you expected.
- the toggled state of the button is not updated. Unfortunately there is currently no simple way to update the toggled state of a button. I will register an issue about that.
What you can do instead, if you want also the button state to be updated is to trigger synthetic mouse events on the button. I found this answer to work http://stackoverflow.com/a/24026594 .
Best,
Cristian
-
- Posts: 32
- Joined: Tue May 26, 2015 10:28 am
Re: Activate TrackChanges in WebApp
Post by aleh.haidash »
Hello.
Thanks for the answer.
Thanks for the answer.
Best Regards,
Aleh
Aleh
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service