@simple-office-viewer/core
v0.1.0
Published
Framework-agnostic WASM/worker engine that renders .docx/.xlsx/.pptx to HTML in the browser. Shared by @simple-office-viewer/angular and @simple-office-viewer/react — most consumers want one of those, not this package directly.
Downloads
34
Maintainers
Readme
@simple-office-viewer/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-viewer/angular
(or @simple-office-viewer/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 { OfficeViewerEngine } from '@simple-office-viewer/core';
const engine = new OfficeViewerEngine({ assetsBaseUrl: 'office-viewer-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-viewer.
