Anchor Layout v1
`wp:anchor` with relative references, overlap policy, z-layer, and wrap distance markers.
✅ donedocsjs is a render-first Word pipeline for frontend teams. Import clipboard or .docx into clean HTML snapshots with advanced semantics: lists, merged tables, anchored media, notes, revisions, formulas, charts, and SmartArt fallback.
npm i @coding01/docsjs
import { WordFidelityEditorReact } from "@coding01/docsjs/react";
<WordFidelityEditorReact
lang="en"
onChange={(payload) => console.log(payload.htmlSnapshot)}
onError={(payload) => console.error(payload.message)}
/>
`wp:anchor` with relative references, overlap policy, z-layer, and wrap distance markers.
✅ done`tblGrid/tcW`, merge spans, `tblBorders/tcBorders`, `tblCellSpacing`, and layout mode mapping.
✅ doneSemantic fallback output for formulas, charts, and diagram nodes to keep downstream processing stable.
✅ doneCorpus-driven fidelity score and trend artifacts in CI for release confidence.
✅ donePixel-level text wrapping collision parity with desktop Word.
⏳ nextOMML to MathML/KaTeX pipeline for production rendering quality.
⏳ nextDelivered capabilities and currently planned gaps.
Directory-style view from import to rendered snapshot.
All changes must pass lint, typecheck, tests, build, and size budget.
npm run lintnpm run typechecknpm run testnpm run build + npm run sizecheckNext targets aligned with desktop Word parity goals.
docsjs-change: { htmlSnapshot, source, fileName? }docsjs-error: { message }docsjs-ready: { version }loadHtml(rawHtml: string): voidloadDocx(file: File): Promise<void>loadClipboard(): Promise<void>getSnapshot(): stringclear(): void<sup data-word-comment-ref="5">[c5]</sup> <ins data-word-revision="ins" data-word-revision-author="Alice">...</ins> <del data-word-revision="del" data-word-revision-author="Bob">...</del> <span data-word-page-break="1"></span>
<table style="table-layout:auto;border-collapse:separate;...">...</table> <img data-word-anchor="1" data-word-wrap="square" data-word-anchor-relh="page" /> <span data-word-omml="1">x^(2)</span> <figure data-word-chart="1" data-word-chart-type="bar">...</figure> <figure data-word-smartart="1">...</figure>