TrackedChange Object

A TrackedChange object represents a single tracked change that was previously recorded in the document (ie: when the “Track Changes” feature is turned on).

Existing TrackedChange objects can be obtained through commands like Document.allTrackedChanges and Text.trackedChangesAtIndex.

TrackedChange Object Properties

.authorName v2.0

Returns a string holding the name of the author that made the change. Read-only.

.authorColor v2.0

Returns the Color object used to highlight the change markings and change text area, based on the user’s appearance preferences. Read-only.

.dateCreated v2.0

Returns a Date object that specifies when the change was first made. Read-only.

.dateModified v2.0

Returns a Date object that specifies when the change was last updated (for example, if an author deletes neighboring text). Read-only.

.markedText v2.0

Returns the main document body Text object to which the change is applied. The @undefined value can be returned if the change is not in a document, or the change is not applied to any text (eg: if the change was made to some other document part, like the stylesheet). Read-only.

Note: the returned text object follows reference semantics, eg: changes to it will change the contents of the document itself.

.markedTextRange v2.0

Returns a Range object that specifies where in the document text object the change was made. If the change does not affect the document text directly, this returns the @undefined value. Read-only.

.isTextContentChanged v2.0

Returns @true if the change tracks some kind of direct text content change. This includes deletions, replacements, and additions. Other kinds of changes, including text formatting changes, return @false. Read-only.

.originalTextContent v2.0

For changes that deleted or replaced text in the document, this returns the Text object that holds the original document text, before the change was made. Changes that did not remove any textual content from the document (eg: an addition) will return the @undefined value. Read-only.

Note: the returned text object follows reference semantics, eg: changes to it will change the contents of the change itself.

.isTextAttributesChanged v2.0

Returns @true if this change tracks a change in formatting to some piece of text (but not attribute changes to other types of content, like the stylesheet). Read-only.

.originalTextAttributes v2.0

For changes that formatted text in the document, this returns the Attributes object that describes the original formatting of that text, before the change was made. Changes that did not alter the formatting of text in the document will return the @undefined value. Read-only.

TrackedChange Object Commands

.reject v2.0

Rejects this change, restoring the original document content, and removing the tracked change from the document.

.accept v2.0

Accepts this change, leaving the current document content unchanged, but removing the tracked change from the document.


Previous Chapter
Style Object
<<  index  >>
 
Next Chapter
Table Objects