mroffice-assets
v0.2.0
Published
The files the MR Office editors fetch on demand (fonts, the PDF worker and its data, spelling dictionaries, code runners, interface text): served from a CDN, or copied to a site that hosts them itself. Not a dependency to import.
Readme
mroffice-assets
The files the MR Office editors (mroffice-core, mroffice-docs, mroffice-sheets, mroffice-slides, mroffice-pdf, mroffice-code) fetch as they need them: the open fonts that stand in for Office's (with their licenses), the PDF.js worker, CMaps, standard fonts and decoders, the spelling dictionaries, the code runners (Lua, SQL, shell, Go WebAssembly; the Python sandbox page), and the interface text in languages other than English.
Not a dependency to import. The editors fetch these files from jsDelivr's copy of this package of the same version (https://cdn.jsdelivr.net/npm/[email protected]/). To host them yourself:
npm i -D [email protected]
cp -R node_modules/mroffice-assets public/mroffice-assetsimport { configureEditors } from "mroffice-core";
configureEditors({ assetsBaseUrl: "/mroffice-assets/" });and use style.self-hosted.css of the editor package with <link rel="stylesheet" href="/mroffice-assets/fonts.css"> in the page.
Running Python needs python-sandbox.html served from another origin than the page (configureEditors({ sandboxOrigin })); running code in the other languages needs the files served by your site or the CDN.
License
The editors' own files: AGPL-3.0-only with the additional terms in NOTICE.md. Each font is under its own license, in the folder beside it (licenses/ and fonts/**); PDF.js data: Apache-2.0; the dictionaries: their licenses in proofing/. Third-party notices: THIRD_PARTY_NOTICES.md. Source: https://github.com/XinaTian/MROffice.
