guardian / scribe

DEPRECATED: A rich text editor framework for the web platform

Home Page:http://guardian.github.io/scribe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UndoManager and transaction documentation

mindplay-dk opened this issue · comments

Inline documentation for UndoManager transactions is more or less non-existent.

What exactly are the transaction objects?

It appears to be an overloaded version of DOMTransaction, e.g. with several custom properties, including scribe, content and previousItem.

And it doesn't look like the scribe property is being used? (the advanced undo plugin doesn't seem to use them either.)

Under some conditions, _lastItem gets initialized as a full instance of one of these overloaded DOMTransaction objects, and at other times, it's as simple as { content: '' }, which does appear to be valid, as all properties of DOMTransaction are optional, but with no doc-blocks and no comments, it's all very difficult to reason about.

Can you provide some pointers in this area?