DOCX
Direct OOXML → DocumentModel. No HTML intermediate. Full table support, nested lists, images, hyperlinks, paragraph styles, bold/italic/colour/code spans.
DOCX adapter docs
A framework-agnostic TypeScript library that normalizes every common file format into a unified model, then renders it with a single engine.
Adapters know nothing about the DOM. The renderer knows nothing about file formats. The engine coordinates. Errors are values — no exceptions cross module boundaries.
import { registerAdapter, engine } from 'viewthemall'
import { docxAdapter } from 'viewthemall/adapters/docx'
import { xlsxAdapter } from 'viewthemall/adapters/xlsx'
import { pdfAdapter } from 'viewthemall/adapters/pdf'
import { csvAdapter } from 'viewthemall/adapters/csv'
import { textCodeAdapter } from 'viewthemall/adapters/text-code'
import { mdAdapter } from 'viewthemall/adapters/md'
import { imageAdapter } from 'viewthemall/adapters/image'
// Register the formats you want to support
registerAdapter(docxAdapter)
registerAdapter(xlsxAdapter)
registerAdapter(pdfAdapter)
registerAdapter(csvAdapter)
registerAdapter(textCodeAdapter)
registerAdapter(mdAdapter) // after text-code — overrides .md/.mdx
registerAdapter(imageAdapter)
// One call to preview any file
const container = document.getElementById('preview')!
await engine.preview(file, container)| Library | Problem |
|---|---|
| Mammoth.js | HTML output only — no structured model, no table data, fragile output |
| SheetJS | Raw data, no type detection, no header awareness, no render layer |
| pdf.js | Canvas-only, completely different API from every other format |
| Prism.js | Code only — different API, no integration with document formats |
ViewThemAll normalises ALL formats into one DocumentModel and renders with one engine.