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

@ -79,8 +79,8 @@ export enum LevelSuffix {
export interface ILevelsOptions {
readonly level: number;
readonly format: string;
readonly text: string;
readonly format?: string;
readonly text?: string;
readonly alignment?: AlignmentType;
readonly start?: number;
readonly suffix?: LevelSuffix;
@ -115,10 +115,16 @@ export class LevelBase extends XmlComponent {
);
this.root.push(new Start(start));
this.root.push(new NumberFormat(format));
this.root.push(new LevelText(text));
this.root.push(new LevelJc(alignment));
if (format) {
this.root.push(new NumberFormat(format));
}
if (text) {
this.root.push(new LevelText(text));
}
this.paragraphProperties = new ParagraphProperties({});
this.runProperties = new RunProperties();