1. ← Home
Login
A simple web component for file previews
~dev~sourceweb
www.raymondcamden.com last week

Summary

From the article:

The [<file-preview>] component takes one attribute, file-id, which points to the ID value of the field to monitor. As for preview support, I figured I could cover these:

  • Images (of course)

  • HTML, .txt

  • Markdown (after converting to HTML)

  • Office docs (Using the excellent officeParser library)

  • PDF (ditto)

  • Audio and Video (using the browser's built-in support)