amis-rpc-design/libs/amis/packages/office-viewer/__tests__/EmptyWord.ts

17 lines
399 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/**
* 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());
}