Preserve QWord strikethrough formatting
This commit is contained in:
@@ -74,4 +74,21 @@ describe("wordOffice DOCX import", () => {
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
it("imports DOCX strikethrough from OOXML", async () => {
|
||||
const blob = await exportDocxBlob("Strike.docx", "<p><s>Deleted text</s></p>");
|
||||
const file = new File([blob], "Strike.docx", {
|
||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
});
|
||||
const imported = await importDocxFile(file);
|
||||
|
||||
expect(imported.html).toContain("<s>Deleted text</s>");
|
||||
expect(htmlToWordBlocks(imported.html)).toEqual([
|
||||
{
|
||||
type: "paragraph",
|
||||
text: "Deleted text",
|
||||
runs: [{ text: "Deleted text", strike: true }]
|
||||
}
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user