Releases: superdoc-dev/superdoc
v1.26.0-next.25
1.26.0-next.25 (2026-04-18)
Features
vscode-v2.3.0-next.25
2.3.0-next.25 (2026-04-18)
Features
template-builder-v1.5.0-next.25
1.5.0-next.25 (2026-04-18)
Features
sdk-v1.6.0-next.23
1.6.0-next.23 (2026-04-18)
Features
react-v1.2.0-next.22
1.2.0-next.22 (2026-04-18)
Features
esign-v2.3.0-next.25
2.3.0-next.25 (2026-04-18)
Features
cli-v0.7.0-next.26
0.7.0-next.26 (2026-04-18)
Features
v1.27.0
What's New
CDN Bundle Distribution
- Distribute IIFE bundle as
superdoc.min.jswithwindow.SuperDocglobal (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 excerptscontentControls.create()now acceptsatfield 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()andexecute()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 superdoccascade 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
pairReplacementsconfig 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 getPromise<Blob>, Node headless consumers opt in withexportDocx<Buffer>() - Define
ContextMenuItem,ContextMenuSection,ContextMenuConfigtypes for context menu API - Allow context menu
menuProvidercallback to return null/undefined
Fixes
Collaboration
- Fix documents opened in collaboration becoming corrupted after export
- Fix
settings.xmland 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
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
atfield. 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
What's New
- superdoc.min.js CDN bundle β Shipped as minified IIFE (1.46 MB gzipped);
window.SuperDocconstructor 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
atfield wraps arbitrary ranges without dropping to editor internals. - Toolbar headless API β State and execute methods for programmatic toolbar control.
- CLI collaboration custom params β New
paramsfield 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.