delta2word
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

运行在浏览器环境下的 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);
});

Readme

Keywords

Package Sidebar

Install

npm i delta2word

Weekly Downloads

6

Version

1.0.6

License

UNLICENSED

Unpacked Size

85.4 kB

Total Files

21

Last publish

Collaborators

  • elmeet