@simple-office-previewer/core
v0.1.0
Published
Framework-agnostic WASM/worker engine that renders .docx/.xlsx/.pptx to HTML in the browser. Shared by @simple-office-previewer/angular and (future) @simple-office-previewer/react — most consumers want one of those, not this package directly.
Maintainers
Readme
@simple-office-previewer/core
Framework-agnostic WASM/worker engine that renders .docx / .xlsx /
.pptx to a self-contained HTML string, entirely in the browser via a
.NET WebAssembly build of OfficeCLI.
Most people want @simple-office-previewer/angular
(or, in future, @simple-office-previewer/react) instead of this package
directly — this is the shared engine those wrappers are built on: worker
lifecycle, WASM asset loading, and request/response correlation, with no
framework-specific idioms (components, hooks, DI) attached.
import { OfficePreviewEngine } from '@simple-office-previewer/core';
const engine = new OfficePreviewEngine({ assetsBaseUrl: 'office-preview-assets/' });
const html = await engine.render(file); // file: FileThe package ships its own WASM/worker assets under assets/ — a
consuming framework wrapper is responsible for getting those into the
final build output and pointing assetsBaseUrl at the resulting public
path.
Source lives at github.com/IoannisMaras/simple-office-previewer.
