Extract runs and text
This commit is contained in:
@ -4,7 +4,12 @@ import * as fs from "fs";
|
||||
import { Paragraph, patchDocument, TextRun } from "../build";
|
||||
|
||||
patchDocument(fs.readFileSync("demo/assets/simple-template.docx"), {
|
||||
children: [new Paragraph("ff"), new TextRun("fgf")],
|
||||
patches: [
|
||||
{
|
||||
children: [new Paragraph("ff"), new TextRun("fgf")],
|
||||
text: "{{ name }}",
|
||||
},
|
||||
],
|
||||
}).then((doc) => {
|
||||
fs.writeFileSync("My Document.docx", doc);
|
||||
});
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user