TransactionDocument
Class defined in model/TransactionDocument.js#28 inherits from

A Document instance that is used during transaction.

During editing a TransactionDocument is kept up-to-date with the real one. Whenever a transaction is started on the document, a TransactionDocument is used to record changes, which are applied en-bloc when the transaction is saved.

The transaction document is the common way to manipulate the document. It provides a 'turtle-graphics' style API, i.e., it has a state

Example

To start a transaction run

doc.transaction(function(tx) {
  // use tx to record changes
})