Extract runs and text

This commit is contained in:
Dolan
2023-02-17 10:38:03 +00:00
parent c206d23480
commit 86de252a52
6 changed files with 144 additions and 12 deletions

View File

@ -1,8 +1,8 @@
import { Paragraph, TextRun } from "@file/paragraph";
import { ElementCompact } from "xml-js";
import { PatchDocumentOptions } from "./from-docx";
import { IPatch } from "./from-docx";
export const replacer = (json: ElementCompact, options: PatchDocumentOptions): ElementCompact => {
export const replacer = (json: ElementCompact, options: IPatch): ElementCompact => {
for (const child of options.children) {
if (child instanceof Paragraph) {
console.log("is para");