Track textual changes

This add-on causes textual changes to be tracked as additions or deletions. It causes the review panel to be added, in which annotations may also be present. See add-on/fontoxml-annotations or more information on annotations.

It saves these changes by adding three kinds of Processing Instructions in the document: one marking the start of an addition, one marking the end and one marking a deletion. These processing instructions are regarded private API and should not be processed or changed by external applications.

Intended use

This add-on provides light-weight change tracking of text edits. It is intended to be used in a scenario where you have one or two authors and/or reviewers where the tracked changes serve as an indication of where changes are made. It is not intended to capture all changes or reliably store them. If you need reliable change tracking, consider using {@link add-on/fontoxml-document-history Document History}.

Known issues

  • This add-on only tracks textual changes. It will ignore any structural changes, as well as changes to attributes. Use add-on/fontoxml-document-history to observe all changes to a document

  • This add-on may lose changes when structural changes do occur. For example, when a start marker is placed after its corresponding end marker, the change will be unmarked.

  • Likewise, moving text inside a marked addition may make it look like someone added text they did not add.

  • Rejecting all changes may not always place all deletions back into the XML. For example, when a whole list is removed, all of the deletions in that list will be marked at the old place of the list. Rejecting this deletion will not bring back the list. It will instead unmark the change.

  • This add-on only tracks changes in text editing operations: inserting text, replacing text, pasting text, cutting text and using backspace or delete to remove text. Text inserted or removed by custom operations may not be tracked.

  • Having many tracked changes impacts the performance of the Editor. Because the changes are tracked in the document, the document will grow.

  • Pasting something or deleting text when having a selection over the border of elements may cause an unexpected order of changes: the deletion of the selection may be placed at the end of the resulting paragraph.

  • Deleting content that was inserted by the same author may be marked as a deletion when the full element that was inserted by the author is deleted. This may make it look like that author removed text that was originally inserted by someone else.

  • Textual changes made in an other editor are not tracked.

All of these issues and more are addressed in add-on/fontoxml-document-history because that add-on compares different versions of a document.