added numbering
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import {XmlComponent} from "../docx/xml-components";
|
||||
import {XmlAttributeComponent} from "../docx/xml-components";
|
||||
import {Level} from "./level";
|
||||
import {MultiLevelType} from "./multi-level-type";
|
||||
|
||||
interface AbstractNumberingAttributesProperties {
|
||||
abstractNumId?: Number,
|
||||
@ -18,11 +20,16 @@ class AbstractNumberingAttributes extends XmlAttributeComponent {
|
||||
|
||||
export class AbstractNumbering extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
constructor(id: number) {
|
||||
super("w:abstractNum");
|
||||
this.root.push(new AbstractNumberingAttributes({
|
||||
abstractNumId: 0,
|
||||
abstractNumId: id,
|
||||
restartNumberingAfterBreak: 0
|
||||
}));
|
||||
this.root.push(new MultiLevelType("hybridMultilevel"));
|
||||
}
|
||||
|
||||
addLevel(level: Level): void {
|
||||
this.root.push(level);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user