DraftEditingSession

Summary

DraftEditingSession is a small class that makes it easy to implement components that display Draft objects or allow for interactive editing of Drafts.

  1. It synchronously provides an instance of a draft via draft(), and triggers whenever that draft instance has changed.
  2. It provides an interface for modifying the draft that transparently batches changes, and ensures that the draft provided via draft() always has pending changes applied.

Instance Methods

draft()

Returns

Return Values
Returns the draft object with the latest changes applied.

draftPristineBody()

Returns
Return Values
Returns the initial body of the draft when it was pristine, or null if the draft was never pristine in this editing session. Useful for determining if the body is still in an unchanged / empty state.

results matching ""

    No results matching ""