DOCX viewer

Renders a DOCX file as sanitized semantic HTML via the mammoth converter.

PDF, spreadsheet, document, and archive viewers with compare and highlight support.

lr-docx-viewer

import '@aceshooting/lyra-ui/components/lr-docx-viewer.js';

Optional dependency: mammoth, dompurify

Read guide (English)

Related components

  • Ebook viewer — Renders an EPUB with chapter navigation using the optional epub.js peer.
  • Email viewer — Parses and renders an .eml message with headers, sanitized body, and attachments.
  • GeoJSON viewer — Fetches, validates, and renders a GeoJSON file's features on a map.
  • Highlight layer — Overlay that paints activatable highlight rectangles over positioned document content.
  • HTML viewer — Fetches a URL and safely renders its HTML after sanitizing it.
  • Include — Fetches an HTML fragment and transcludes it as sanitized light-DOM page content.