Files
docx-js/ts/docx/paragraph/unordered-list.ts
felipe 52c4e3cabd allow NumberProperties to specify custom id/level
This change allows callers to create custom numbering styles and
attach them to paragraphs
2017-03-08 16:20:44 +01:00

30 lines
699 B
TypeScript

import {XmlComponent, Attributes} from "../xml-components";
import {Style} from "./style";
export class NumberProperties extends XmlComponent {
constructor(numberId: number, indentLevel: number) {
super("w:numPr");
this.root.push(new IndentLevel(indentLevel));
this.root.push(new NumberId(numberId));
}
}
class IndentLevel extends XmlComponent {
constructor(level: number) {
super("w:ilvl");
this.root.push(new Attributes({
val: level
}));
}
}
class NumberId extends XmlComponent {
constructor(id: number) {
super("w:numId");
this.root.push(new Attributes({
val: id
}));
}
}