Skip to main content
Side models on EditorModel (model.review, model.find, model.nav, model.spell, model.ui.contextMenu, model.ui.palette) and the observable they share.

ReviewModel

Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.

ReviewModel properties

ReviewModel.accept()

ReviewModel.addComment()

ReviewModel.cancelComment()

ReviewModel.closePeek()

ReviewModel.closeReply()

ReviewModel.edit()

ReviewModel.measureCard()

A balloon’s rendered height; the stack moves to fit it.

ReviewModel.observes()

ReviewModel.openPin()

A click on a gutter icon: its card closes when open, else its first thread shows.

ReviewModel.paint()

ReviewModel.pick()

Same as a click on the balloon: the record is picked, so it pins and shows.

ReviewModel.placePages()

Where each page card sits in the scroller; the margin positions balloons off this.

ReviewModel.rectsOf()

The text a balloon marks, in page hmm: a comment’s range, a change with the insertion that replaced it, the composer’s selection. A header change gives rects on every page that repeats it.

ReviewModel.refresh()

Pull the fresh snapshot after open and after every applied command.

ReviewModel.reject()

ReviewModel.remove()

ReviewModel.reply()

ReviewModel.reset()

ReviewModel.resolve()

ReviewModel.reveal()

Clicking a record moves the caret only: no command, no history entry. A header range opens its story on the page the balloon was clicked on.

ReviewModel.setItems()

A host’s records of one kind; they replace that kind’s last ones, [] clears it. They anchor, stack and mark as comments do; draw them with the balloon slot.

ReviewModel.setReviewerShown()

Show Markup > Reviewers: one author on or off; undefined turns All Reviewers on or off.

ReviewModel.setShown()

Show Markup > Comments, Insertions and Deletions, Formatting.

ReviewModel.setViewport()

Coarse on purpose: a scroll only rebuilds balloons when it crosses a band edge.

ReviewModel.showThread()

Opens a thread where it fits: the margin when there is room, else a card over the page.

ReviewModel.stampOf()

ReviewModel.startComment()

ReviewModel.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted.

ReviewModel.threadAtCaret()

Thread under the caret, hidden resolved ones too, so the context menu can reopen it.

ReviewModel.toggle()

ReviewModel.toggleResolved()

FindModel

What the results view reads and calls; both editors’ find models satisfy it. Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.

FindModel properties

FindModel.claims()

The current hit is the selection: its wash stands in for the blue one.

FindModel.go()

A click on one result row.

FindModel.hide()

FindModel.observes()

FindModel.paint()

Word’s yellow wash on every hit; the current one sits under the selection.

FindModel.refresh()

After an edit: hits move but the caret stays where the user put it.

FindModel.replace()

FindModel.replaceAll()

One Undo step, as Word’s Replace All.

FindModel.reset()

FindModel.show()

FindModel.stampOf()

FindModel.step()

FindModel.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted. Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.
A click on a heading: the caret goes to its first character, as in Word.
Listen to one key, or to every change (including adopted children) when key is omitted.
The shared query box: it filters headings, and drives the search on the results tab.

Observable

Import from @reductoai/docx-editor, @reductoai/docx-editor/model.

Observable properties

Observable.observes()

Observable.stampOf()

Observable.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted.

Unsubscribe

Import from @reductoai/docx-editor, @reductoai/docx-editor/model.

ContextMenuStore

Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.

ContextMenuStore properties

ContextMenuStore.close()

ContextMenuStore.closeSub()

ContextMenuStore.move()

ContextMenuStore.observes()

ContextMenuStore.openSub()

ContextMenuStore.runActive()

ContextMenuStore.show()

ContextMenuStore.stampOf()

ContextMenuStore.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted. Import from @reductoai/docx-editor, @reductoai/docx-editor/model.

PaletteStore

Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.

PaletteStore properties

PaletteStore.exitStep()

Back out one step without closing the palette.

PaletteStore.hide()

PaletteStore.observes()

PaletteStore.register()

PaletteStore.run()

PaletteStore.show()

PaletteStore.stampOf()

PaletteStore.submitPrompt()

PaletteStore.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted.

PaletteStore.toggle()

PaletteItem

Import from @reductoai/docx-editor, @reductoai/docx-editor/model.

SpellModel

Import from @reductoai/docx-editor, @reductoai/docx-editor/model. Extends Observable.

SpellModel properties

SpellModel.add()

SpellModel.at()

The flagged word under a collapsed caret.

SpellModel.ignore()

SpellModel.misses()

Misspellings on the pages around the one in view.

SpellModel.observes()

SpellModel.paint()

SpellModel.replace()

Types text over the word: an ordinary edit and one undo step.

SpellModel.reset()

A new document: this session’s ignores end with the old one.

SpellModel.stampOf()

SpellModel.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted.

SpellModel.suggest()

SpellModel.toggle()

localDictionary()

The user’s words in localStorage: shared by every document this browser opens. Import from @reductoai/docx-editor, @reductoai/docx-editor/model.

workerSpeller()

nspell with en_US in a worker, spawned on the first question. A worker that cannot load (a dev server that pre-bundles this package moves its URL) hands the dictionary to the page instead. Import from @reductoai/docx-editor, @reductoai/docx-editor/model.