Skip to content

Releases: superdoc-dev/superdoc

v1.27.0

17 Apr 18:54

Choose a tag to compare

What's New

CDN Bundle Distribution

  • Distribute IIFE bundle as superdoc.min.js with window.SuperDoc global (replaces UMD format)
  • Bundle size reduced 44%: 8.8 MB unminified → 4.9 MB minified (1.46 MB gzipped)
  • Named exports attach as static properties on SuperDoc constructor (Quill pattern)
  • Yjs and Hocuspocus inlined in IIFE; pdfjs-dist stays external for ESM-only use

Math Equation Converters

  • Implement OMML-to-MathML converters for radical/sqrt, group character, phantom, n-ary operators, equation arrays, accents, pre-subscripts, and limit operators
  • Word mathematical expressions now render as web-standard MathML
  • Support all ST_OnOff value variants and spec-compliant defaults per ECMA-376 §22.1.2

Document API Enhancements

  • doc.extract() returns all document content with stable IDs for RAG workflows — blocks with text, comments with anchored references, tracked changes with excerpts
  • contentControls.create() now accepts at field to wrap arbitrary text ranges without dropping to editor internals
  • Every extracted ID works with scrollToElement() for citation navigation

Toolbar State and Execute

  • Unified toolbar API with state() and execute() methods for headless toolbar
  • Toolbar automatically synchronizes with document-mode changes

Improvements

Text Layout and Selection

  • Fix overlapping text in justified paragraphs with first-line/hanging indents; availableWidth now calculated consistently across resolver, painter, selection, and hit-testing
  • Fix centered and right-aligned inline images (wpg groups) in indented paragraphs — centering math now accounts for paragraph indents
  • Fix hit-testing for multi-block table cells spanning pages with block-local first-line computation
  • Fix list marker width adjustments to use consistent measured text width signal

CSS Isolation

  • Wrap all bundled SuperDoc CSS in @layer superdoc cascade layer for consistent override behavior
  • Consumer CSS (unlayered) always wins over SuperDoc styles regardless of import order

Track Changes

  • Add word-level diffing for granular text change representation during editing
  • Add pairReplacements config option (default: true) to group insertion+deletion as single paired change

Editing Experience

  • Fix table cell redraw when typing inside table in SDT
  • Improve table cell block cache invalidation alignment with renderer versioning
  • Fix redline bubbles to resync on collaboration undo/redo

Type Safety

  • Narrow exportDocx() default return type — browser consumers get Promise<Blob>, Node headless consumers opt in with exportDocx<Buffer>()
  • Define ContextMenuItem, ContextMenuSection, ContextMenuConfig types for context menu API
  • Allow context menu menuProvider callback to return null/undefined

Fixes

Collaboration

  • Fix documents opened in collaboration becoming corrupted after export
  • Fix settings.xml and custom XML parts not persisting after export on collab sessions
  • Sync tracked change comments on peer undo/redo replay

Document Rendering

  • Fix endnotes handling in round-trip exports
  • Fix watermark layout and imported comment metadata handling
  • Fix comment bubble text replacement display in tracked changes
  • Fix selection rectangles rendering in headers/footers

Test Coverage

  • Add unit tests for cdn-entry namespace attachment with Function intrinsic collision handling
  • Extend package coverage to 90%+ with new tests for PDF adapter, comments, AI writer, composables, and Whiteboard canvas interactions
  • Add Codecov integration for automated coverage reporting

template-builder-v1.5.0

17 Apr 18:38

Choose a tag to compare

What's New

  • CDN bundle with vanilla JavaScript — Ship SuperDoc via script tag (IIFE format, minified, 1.46 MB gzipped). Includes working vanilla example and jsdelivr/unpkg integration guides.

  • Math equation rendering — Render OMML math with MathML, including fractions, subscripts, superscripts, limits, accents, radicals, delimiters, equation arrays, and n-ary operators. Group character stacking and phantom elements also supported.

  • doc.extract() — Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments with anchored references, and tracked changes with excerpts. Every ID works directly with scrollToElement().

  • scrollToElement(id) — Navigate to any element by its ID (paragraphs, comments, tracked changes). Single unified API for cross-session citation navigation.

  • Headless toolbar API — Control formatting programmatically. New useHeadlessToolbar() hook for React and Vue, plus 5 framework examples (React shadcn, React MUI, Vue Vuetify, Svelte, vanilla). Type-safe execute() and snapshot.

  • contentControls.create with text wrapping — Wrap arbitrary text ranges in content controls via the optional at field. No need to drop into editor internals.

Improvements

  • Math rendering precision — Underbars on compound expressions stretch correctly (U+203E overline vs combining marks). Display style and Cambria Math font match Word's rendering exactly.

  • Justified paragraphs with indents — Fixed overlapping text when paragraphs have first-line or hanging indents and justify alignment. Text-indent offset now applied consistently across measurer, painter, selection, and hit-testing.

  • Track changes on collaboration undo/redo — Bubbles resync correctly when peers undo/redo. Tracked change comments no longer misalign during replay.

  • Document export in collaboration — settings.xml, custom XML parts, and endnotes now persist on export from a live collaboration session. Multi-author documents export cleanly without data loss.

  • Form fields in tables — Presentation updates correctly when typing inside table cells with structured content (SDT) fields.

  • Comment and tracked-change rendering — Fixed layout to allow bubbles and balloons to render in the right margin without clipping. Floating comment remeasure logic simplified.

  • Table cell content on paste — Preserve background color, margins, borders, vertical alignment, and header styling when pasting tables from Google Docs via inline HTML styles.

  • Centered images in indented paragraphs — Centering math now accounts for paragraph indents (w:ind). Inline shapeGroups no longer offset from Word's placement.

  • Table of contents rendering — Apply useAppliedOutlineLevel without requiring \o range switch. TOC with \u-only instructions now works.

  • Inline structured content formatting — Inherit run formatting (bold, color, font) when inserting inline SDT elements. Respect pending toolbar formatting.

  • AI agent tooling — MCP server, benchmark suite, and system prompts optimized for multi-turn agent workflows. Markdown insert patterns and mutations batch format documented.

  • TypeScript type safety — exportDocx overloads narrow return type per flag. Command chain returns properly typed. Comment type expanded with full runtime shape. Fixed type regressions from prosemirror and vue package overrides.

Fixes

  • Image resize handles in view mode — No longer appear when document is in viewing mode. Properly cleared when switching modes.

  • Centered inline drawingML — ShapeGroups in indented paragraphs now centered relative to text column, not full page width.

  • Selection rectangles in headers/footers — Fixed position mapping in header/footer editing.

  • Watermark and comment bubble layout — Word art watermarks and comment metadata handling corrected.

  • Tracked change bubble text after undo — Partial undo now renders correct change text in bubble.

  • Replacement text in tracked changes — Tracked-change delete + insert (replacement) now shows correct replacement text. Distinction between deletion-then-insertion and true replacement clarified.

  • Comment activation on click — Clicking inside commented text now activates the comment bubble. elementFromPoint fallback works with pointer capture.

  • RTL text click-to-position — Clicks on right-to-left text map to correct document position. Fixed hidden span handling in line bounds.

  • Document part objects with inline content — Non-TOC gallery types (page numbers, bibliographies, cover pages) normalize inline nodes (bookmarks, comments, permissions) instead of failing.

  • Table cell newlines — Newline characters in structured content now split into separate paragraphs instead of losing content after first newline.

  • SDT hover in view mode — Block and inline structured content no longer highlight on hover in viewing mode.

  • Comment export — Resolved comments export with correct w15:done attribute. commentsExtended.xml included even with threaded comments only.

  • Multi-block text.rewrite — Text replacements spanning multiple paragraphs now split correctly on newlines. Paragraph attributes preserved.

  • Per-script fonts in round-trip — eastAsiaFontFamily and csFontFamily now survive mark encoding/decoding. Zero-edit export stops injecting rFonts into runs.

  • Accept/reject formatting — Rejecting multi-property format suggestions now reverts all properties, not just the last one. Inline keys preserved for imported docs.

  • Run plugin inline keys — Specific keys removed in accept/reject transaction no longer stripped from unrelated inline properties on same run.

  • Collaboration document corruption — Yjs fragment properly cleared during document rebuild. Custom XML parts, settings.xml, and endnotes persist on collab export.

  • Form field visibility in SDT — Fields update correctly when typing inside table cells within structured content.

  • Math cursor positioning — Clicks in overflow areas around inline equations resolve to correct positions.

  • Math paragraph spacing — Display math paragraphs inherit before/after spacing from containing paragraph.

  • SVG image hyperlinks — DrawingML images (a:hlinkClick) now support hyperlinks correctly in edit and view modes.

  • Floating-only documents — Layout handles documents with only floating objects. Paginator state stays in sync when pruning empty pages.

  • Image resizing in web layout — Table cell width constraint applied even in web layout mode. getMaxContentSize check moved before early return.

  • List marker guard consistency — Hit-testing, painter, and mapPmToX use same rendered-marker check based on measured text width.

  • Paragraph split formatting inheritance — Pressing Enter no longer inherits parent paragraph formatting. Clearing with empty storedMarks respected on split.

  • Style equivalence inline keys — Imported docs with explicit w:rPr that become style-equivalent no longer drop keys on export.

  • Negative word-spacing whitespace — Justified lines with manual tabs no longer apply negative word-spacing, preserving whitespace.

  • Document mode changes in template-builder — Mode switches no longer destroy/recreate editor. Queued during init if changed before ready.

  • Field type styling — fieldColors prop now respects partial color maps. Non-hex colors supported via color-mix(). DOM selector fixed to match actual structure.

  • Lock mode in template-builder — Lock mode now threaded through all field insertion and discovery paths. Delete respects lock state feedback from editor.

  • Comment scrolling regression — Fixed scroll behavior after painter refactor.

  • Type augmentation at package boundary — Command type augmentations (comment, formatting, track changes) now reach consumers via /// directives in dist.

  • Ambient type shims — Removed prosemirror, vue, yjs type overrides that broke consumers using those packages directly (e.g., Tiptap users). Added prosemirror as optional peer for re-exported types.

cli-v0.7.0

17 Apr 18:45

Choose a tag to compare

What's New

  • superdoc.min.js CDN bundle — Shipped as minified IIFE (1.46 MB gzipped); window.SuperDoc constructor exposed directly for script-tag loading.
  • 10 math equation converters — Added m:m, m:groupChr, m:phant, m:nary, m:acc, m:sPre, m:limLow, m:limUpp, m:rad, m:eqArr per ECMA-376 spec.
  • Word-level diffing — Granular text change tracking for collaborative editing.
  • doc.extract() — RAG extraction API returns blocks with text, comments with anchored refs, tracked changes with excerpts; all IDs work with scrollToElement() for citation navigation.
  • contentControls.create with text range wrapping — Optional at field wraps arbitrary ranges without dropping to editor internals.
  • Toolbar headless API — State and execute methods for programmatic toolbar control.
  • CLI collaboration custom params — New params field forwarded to y-websocket and Hocuspocus provider.

Improvements

  • Centered images in indented paragraphs — Fixed centering math to account for w:ind; shapes now position correctly regardless of indentation.
  • Selection rectangles in headers/footers — Fixed selection overlay rendering for header/footer shapes.
  • Live collaborative table updates — Table cell block cache invalidates correctly during active editing.
  • Browser-first export types — exportDocx() defaults to Promise (browser); Node consumers opt in with exportDocx().
  • Tracked-change replacement text — Fixed text rendering in change bubbles.
  • Justified paragraph first-line indent — Fixed character overlap and selection drift with hanging indent + justify.
  • Tracked change undo/redo sync — Comments resync correctly on peer undo/redo replay.
  • MCP tool definitions for efficient workflows — Optimized guidance on markdown inserts, mutations batching, and multi-item operations.
  • Test coverage: 64% → 90% — Added suites for PDF, comments, composables, canvas; integrated Codecov.

Fixes

  • Collaborative export data loss — Fixed endnotes, settings.xml, custom XML not persisting after export in collab sessions.
  • Watermark and comment rendering — Fixed watermark layout, comment metadata, bubble placement, header anchor shapes.
  • Run key stale state — Narrowed lost-keys preservation; unrelated inline keys no longer inherit state from accept/reject.
  • Context menu types — Typed customItems as ContextMenuSection[]; widened callbacks to include full ContextMenuContext.
  • Schema validation for additionalProperties — Fixed CLI crash on object schemas missing explicit properties map.

v1.26.0-next.24

16 Apr 23:28
76a7876

Choose a tag to compare

v1.26.0-next.24 Pre-release
Pre-release

1.26.0-next.24 (2026-04-16)

Features

  • superdoc: ship IIFE CDN bundle with working vanilla example (#2835) (76a7876)

v1.26.0-next.23

16 Apr 22:41
84b450c

Choose a tag to compare

v1.26.0-next.23 Pre-release
Pre-release

1.26.0-next.23 (2026-04-16)

Bug Fixes

v1.26.0-next.22

16 Apr 22:25
f866ee0

Choose a tag to compare

v1.26.0-next.22 Pre-release
Pre-release

1.26.0-next.22 (2026-04-16)

Bug Fixes

v1.26.0-next.21

16 Apr 16:32
5229852

Choose a tag to compare

v1.26.0-next.21 Pre-release
Pre-release

1.26.0-next.21 (2026-04-16)

Bug Fixes

v1.26.0-next.20

16 Apr 15:06
3817ba6

Choose a tag to compare

v1.26.0-next.20 Pre-release
Pre-release

1.26.0-next.20 (2026-04-16)

Bug Fixes

  • super-editor: narrow exportDocx default return type for browser consumers (#2844) (3817ba6)

v1.26.0-next.19

16 Apr 01:45
29c1a7a

Choose a tag to compare

v1.26.0-next.19 Pre-release
Pre-release

1.26.0-next.19 (2026-04-16)

Bug Fixes

  • test: add textBetween/nodesBetween to remap-length tr.doc mock (#2834) (29c1a7a)

vscode-v2.3.0-next.24

16 Apr 23:27
76a7876

Choose a tag to compare

vscode-v2.3.0-next.24 Pre-release
Pre-release

2.3.0-next.24 (2026-04-16)

Features

  • superdoc: ship IIFE CDN bundle with working vanilla example (#2835) (76a7876)