mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
0f97e378d9
* chore: 换一下 office-viewer 包名 * 恢复误改的文件
17 lines
399 B
TypeScript
17 lines
399 B
TypeScript
/**
|
||
* 构建一个空 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());
|
||
}
|