From b9d93c9d3347f4d27ef8b06c48cae3a0ebd96fda Mon Sep 17 00:00:00 2001 From: Dolan Date: Tue, 25 Oct 2022 21:03:59 +0100 Subject: [PATCH] Fix declarative styles example --- demo/2-declaritive-styles.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index 88596bf1a3..f57251c7e6 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -82,6 +82,18 @@ const doc = new Document({ spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 }, }, }, + { + id: "strikeUnderline", + name: "Strike Underline", + basedOn: "Normal", + quickFormat: true, + run: { + strike: true, + underline: { + type: UnderlineType.SINGLE, + }, + }, + }, ], }, numbering: { @@ -183,12 +195,9 @@ const doc = new Document({ ], }), new Paragraph({ + style: "strikeUnderline", children: [ new TextRun({ - strike: true, - underline: { - type: UnderlineType.SINGLE, - }, text: "Underline and Strike", }), ],