31 lines
1.3 KiB
JavaScript
31 lines
1.3 KiB
JavaScript
|
|
// Build-time entry. Everything the docx-editor add-on needs from npm gets
|
||
|
|
// pulled in here and re-exported on one global, so the shipped add-on can
|
||
|
|
// stay plain classic scripts (file:// pages can't load ES modules — Chromium
|
||
|
|
// blocks module fetches from the null origin).
|
||
|
|
import mammoth from "mammoth";
|
||
|
|
import * as docx from "docx";
|
||
|
|
import JSZip from "jszip";
|
||
|
|
|
||
|
|
import * as pmState from "prosemirror-state";
|
||
|
|
import * as pmView from "prosemirror-view";
|
||
|
|
import * as pmModel from "prosemirror-model";
|
||
|
|
import * as pmSchemaBasic from "prosemirror-schema-basic";
|
||
|
|
import * as pmSchemaList from "prosemirror-schema-list";
|
||
|
|
import * as pmTables from "prosemirror-tables";
|
||
|
|
import * as pmHistory from "prosemirror-history";
|
||
|
|
import * as pmCommands from "prosemirror-commands";
|
||
|
|
import * as pmKeymap from "prosemirror-keymap";
|
||
|
|
import * as pmInputRules from "prosemirror-inputrules";
|
||
|
|
import * as pmDropCursor from "prosemirror-dropcursor";
|
||
|
|
import * as pmGapCursor from "prosemirror-gapcursor";
|
||
|
|
|
||
|
|
window.DOCXV = {
|
||
|
|
mammoth, docx, JSZip,
|
||
|
|
pm: {
|
||
|
|
state: pmState, view: pmView, model: pmModel,
|
||
|
|
schemaBasic: pmSchemaBasic, schemaList: pmSchemaList, tables: pmTables,
|
||
|
|
history: pmHistory, commands: pmCommands, keymap: pmKeymap,
|
||
|
|
inputrules: pmInputRules, dropcursor: pmDropCursor, gapcursor: pmGapCursor,
|
||
|
|
},
|
||
|
|
};
|