allow NumberProperties to specify custom id/level
This change allows callers to create custom numbering styles and attach them to paragraphs
This commit is contained in:
@ -106,7 +106,7 @@ export class Paragraph extends XmlComponent {
|
||||
|
||||
bullet(): Paragraph {
|
||||
this.properties.push(new Style("ListParagraph"));
|
||||
this.properties.push(new NumberProperties());
|
||||
this.properties.push(new NumberProperties(1, 0));
|
||||
return this;
|
||||
}
|
||||
}
|
@ -3,10 +3,10 @@ import {Style} from "./style";
|
||||
|
||||
export class NumberProperties extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
constructor(numberId: number, indentLevel: number) {
|
||||
super("w:numPr");
|
||||
this.root.push(new IndentLevel(0));
|
||||
this.root.push(new NumberId(1));
|
||||
this.root.push(new IndentLevel(indentLevel));
|
||||
this.root.push(new NumberId(numberId));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user