Preserve QWord quote style in DOCX
This commit is contained in:
@@ -22,6 +22,22 @@ describe("wordOffice DOCX import", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("imports DOCX Quote style as blockquote", async () => {
|
||||
const blob = await exportDocxBlob("Quote.docx", "<blockquote>Quoted fragment</blockquote>");
|
||||
const file = new File([blob], "Quote.docx", { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" });
|
||||
const imported = await importDocxFile(file);
|
||||
|
||||
expect(imported.html).toContain("<blockquote>Quoted fragment</blockquote>");
|
||||
expect(htmlToWordBlocks(imported.html)).toEqual([
|
||||
{
|
||||
type: "paragraph",
|
||||
text: "Quoted fragment",
|
||||
runs: [{ text: "Quoted fragment" }],
|
||||
quote: true
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
it("imports DOCX text color and highlight from OOXML", async () => {
|
||||
const blob = await exportDocxBlob(
|
||||
"Color.docx",
|
||||
|
||||
Reference in New Issue
Block a user