@mce/openxml 0.29.9 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { base64ToBytes, definePlugin, matchSource,
|
|
1
|
+
import { base64ToBytes, definePlugin, matchSource, materializeImagePipelines } from "mce";
|
|
2
2
|
//#region src/plugin.ts
|
|
3
3
|
var PPTX_MIME = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
4
4
|
var XLSX_MIME = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
5
5
|
var DOCX_MIME = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
6
6
|
function plugin() {
|
|
7
7
|
return definePlugin((editor) => {
|
|
8
|
-
const { log, upload, to, fonts,
|
|
8
|
+
const { log, upload, to, fonts, resolveImagePipelines } = editor;
|
|
9
9
|
function makeExporter(name, mime, reverse, withFonts, run) {
|
|
10
10
|
return {
|
|
11
11
|
name,
|
|
@@ -13,7 +13,7 @@ function plugin() {
|
|
|
13
13
|
handle: async (options) => {
|
|
14
14
|
const { [name]: specificOptions, ...jsonOptions } = options;
|
|
15
15
|
const doc = await to("json", jsonOptions);
|
|
16
|
-
await
|
|
16
|
+
await materializeImagePipelines(doc, resolveImagePipelines);
|
|
17
17
|
if (reverse) doc.children?.reverse();
|
|
18
18
|
const bytes = await run({
|
|
19
19
|
...doc,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/openxml",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.30.0",
|
|
5
5
|
"description": "Openxml plugin for mce",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"modern-openxml": "^1.12.5"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"mce": "0.
|
|
52
|
+
"mce": "0.30.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"mce": "^0"
|