Track textual changes

This add-on causes textual changes to be tracked as additions or deletions. When changes are visible, any additions to the content are highlighted with a green underline while removals are greyed out and striked through.

Integrating this add-on causes a sidebar to be added that may be shared between this add-on and the add-on/fontoxml-annotations add-on. If fontoxml-annotations is integrated, the sidebar tab will be labeled "Review" and show both changes and comments in the same list. If only this add-on is present, it will be labeled "Changes" and only show the changes. See add-on/fontoxml-annotations for more information on annotations.

This add-on saves tracked changes by adding three kinds of XML 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}.

Change tracking can be disabled, but only by accepting all changes. This will remove the current change tracking processing instructions from the document, essentially marking it as unchanged.

Known limitations.

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

  • This add-on only stores changes between the current document state and the state in which changes were last accepted or rejected. If you need change tracking across multiple revisions, consider using Document History.

  • 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 be able to restore all deleted content back into the XML. For example, when a list is removed, all of the deletions in that list will be marked at the old location of the list. Rejecting this deletion will not bring back the list, and in most cases will not restore the text content either. It will instead only remove the marked 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. Change tracking behavior for other operations that insert text, including custom mutations and mutation hooks, may not be reliable.

  • 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 another editor, or by automated processes outside of Fonto Editor, are not tracked.

  • The Review / Changes sidebar can only show changes (and annotations) for loaded documents. This means that the sidebar may not provide a complete overview in editors using JIT loading.

  • This add-on can only show tracked changes for documents for which the lock is available and/or acquired. Tracked changes (and annotations) in read-only documents are not shown in the editor, nor listed in the sidebar.

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