Character style example for underline and strike

This commit is contained in:
Dolan
2022-10-25 21:29:22 +01:00
parent b9d93c9d33
commit 712450d717

View File

@ -95,6 +95,20 @@ const doc = new Document({
},
},
],
characterStyles: [
{
id: "strikeUnderlineCharacter",
name: "Strike Underline",
basedOn: "Normal",
quickFormat: true,
run: {
strike: true,
underline: {
type: UnderlineType.SINGLE,
},
},
},
],
},
numbering: {
config: [
@ -202,6 +216,20 @@ const doc = new Document({
}),
],
}),
new Paragraph({
children: [
new TextRun({
text: "Hello World ",
}),
new TextRun({
style: "strikeUnderlineCharacter",
text: "Underline and Strike",
}),
new TextRun({
text: " Another Hello World",
}),
],
}),
],
},
],