Add work for custom level id

This commit is contained in:
Dolan
2019-11-06 20:54:39 +00:00
parent a622c210ef
commit 9b40b5e55e
7 changed files with 77 additions and 95 deletions

View File

@ -1,6 +1,5 @@
// http://officeopenxml.com/WPparagraph.php
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { ConcreteNumbering } from "file/numbering/num";
import { XmlComponent } from "file/xml-components";
import { Alignment, AlignmentType } from "./formatting/alignment";
@ -41,7 +40,7 @@ export interface IParagraphOptions {
readonly level: number;
};
readonly numbering?: {
readonly num: ConcreteNumbering;
readonly reference: string;
readonly level: number;
readonly custom?: boolean;
};
@ -141,7 +140,7 @@ export class Paragraph extends XmlComponent {
if (!options.numbering.custom) {
this.properties.push(new Style("ListParagraph"));
}
this.properties.push(new NumberProperties(options.numbering.num.id, options.numbering.level));
this.properties.push(new NumberProperties(options.numbering.reference, options.numbering.level));
}
if (options.children) {