delta2word
v1.0.6
Published
运行在浏览器环境下的delta转换为word的包
Downloads
5
Readme
运行在浏览器环境下的 delta 转换为 word 的包
支持生成的数据
blob
,buffer
,base64
浏览器用法如下:
import delta2word, { ExportType } from 'delta2word';
import { saveAs } from 'file-saver';
const blob = await delta2word({
delta: deltaData,
title: '',
exportType: ExportType.Blob,
});
saveAs(blob as Blob, 'a.docx');
electron 环境 渲染进程使用
import delta2word, { ExportType } from 'delta2word';
const fs = require("fs)
delta2word({
title: '1',
delta: testDelta,
exportType: 'buffer',
}).then((buffer) => {
fs.writeFileSync('./test.docx', buffer);
});