Release notes · April 24, 2026

RichTextEditor npm 2.0.5

npm 2.0.5

Revision history: named versions + diff API New

Three new methods on editor.revisionHistory:

  • promptAndSnapshot(defaultLabel?) — native prompt + snapshot. Returns entry or null if cancelled.
  • rename(id, label) — rename an existing snapshot; flips its isNamed flag to true.
  • listNamed() — return only named snapshots (handy for a “milestones only” filter).
  • diff(idA, idB){ oldEntry, newEntry, oldText, newText, lines[] } for building side-by-side diff UI.

Each entry now carries an isNamed boolean. Snapshots with an auto: true metadata flag always stay unnamed.

DOCX export client helper New

New editor.aiToolkit.exportDocx({ url?, fileName?, title?, html?, onError? }) builds a POST to a server DOCX endpoint and triggers a browser download via Blob + anchor. Falls back to navigator.msSaveOrOpenBlob on legacy IE/Edge. Pairs with the new DocxExporter server in RichTextBox.AspNetCore 1.0.0-preview.11.

Live demo

Yjs text sync preview (opt-in concurrent typing) Preview

editor.collab.attach({ doc, provider, textSync: true }) binds the editor’s full HTML to a shared Y.Text on the given Y.Doc. CRDT merges concurrent inserts / deletes at character level; two users typing at the same time both see each other’s edits survive.

Known tradeoffs: remote updates re-set the body (caret snaps to start), HTML character offsets don’t align with rendered caret offsets. Per-node binding (y-xml-fragment) is on the roadmap.

New config keys: collabTextSync (bool, default false) and collabTextName (string, default richtextbox.body).

Install or upgrade

Grab the latest via npm:

npm install @richscripts/richtexteditor@latest

Feedback & issues: support@richtexteditor.com