Document preview

Previews a document or attachment inline based on MIME type, with a download fallback.

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

lr-document-preview

import '@aceshooting/lyra-ui/components/lr-document-preview.js';

Read guide (English)

Related components

  • Document viewer — Displays a document in a dialog with a pluggable MIME-type renderer registry.
  • DOCX viewer — Renders a DOCX file as sanitised semantic HTML via the mammoth converter.
  • Ebook viewer — Renders an EPUB with chapter navigation using the optional epub.js peer.
  • Email viewer — Parses and renders an .eml message with headers, sanitised 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.