move file options.defaultStyles to options.styles.default

This commit is contained in:
Tom Hunkapiller
2020-11-30 10:25:58 -06:00
parent f3ba62fd88
commit 30ab92652c
5 changed files with 84 additions and 85 deletions

View File

@ -7,43 +7,43 @@ const doc = new Document({
creator: "Clippy",
title: "Sample Document",
description: "A brief example of using docx",
defaultStyles: {
heading1: {
run: {
size: 28,
bold: true,
italics: true,
color: "red",
},
paragraph: {
spacing: {
after: 120,
},
},
},
heading2: {
run: {
size: 26,
bold: true,
underline: {
type: UnderlineType.DOUBLE,
color: "FF0000",
},
},
paragraph: {
spacing: {
before: 240,
after: 120,
},
},
},
listParagraph: {
run: {
color: '#FF0000'
}
}
},
styles: {
default: {
heading1: {
run: {
size: 28,
bold: true,
italics: true,
color: "red",
},
paragraph: {
spacing: {
after: 120,
},
},
},
heading2: {
run: {
size: 26,
bold: true,
underline: {
type: UnderlineType.DOUBLE,
color: "FF0000",
},
},
paragraph: {
spacing: {
before: 240,
after: 120,
},
},
},
listParagraph: {
run: {
color: '#FF0000'
}
}
},
paragraphStyles: [
{
id: "aside",