amis2/packages/ooxml-viewer/__tests__/EmptyWord.ts
吴多益 ef9ada9783
feat: office-viewer 支持 sdt、footnote、endnote,包名换成 ooxml-viewer (#6509)
* 支持嵌套 sdt

* 初步支持 footnote 和 endnote

* 修复默认展示问题

* 初步支持 footnote 和 endnote

* 换包名
2023-04-03 12:53:44 +08:00

17 lines
399 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 构建一个空 word主要是很多传参依赖
*/
import Word from '../src/Word';
import fs from 'fs';
import path from 'path';
import XMLPackageParser from '../src/package/XMLPackageParser';
export function createWord() {
const xmlContent = fs.readFileSync(
path.join(__dirname, './docx/empty.xml'),
'utf-8'
);
return new Word(xmlContent, {}, new XMLPackageParser());
}