numbering: add support to define suffix for numbering level
This commit is contained in:
@ -1,2 +1,3 @@
|
|||||||
export * from "./numbering";
|
export * from "./numbering";
|
||||||
export * from "./abstract-numbering";
|
export * from "./abstract-numbering";
|
||||||
|
export * from "./level";
|
||||||
|
@ -60,6 +60,23 @@ class LevelJc extends XmlComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum LevelSuffix {
|
||||||
|
NOTHING = "nothing",
|
||||||
|
SPACE = "space",
|
||||||
|
TAB = "tab",
|
||||||
|
}
|
||||||
|
|
||||||
|
class Suffix extends XmlComponent {
|
||||||
|
constructor(value: LevelSuffix) {
|
||||||
|
super("w:suff");
|
||||||
|
this.root.push(
|
||||||
|
new Attributes({
|
||||||
|
val: value,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class LevelBase extends XmlComponent {
|
export class LevelBase extends XmlComponent {
|
||||||
private readonly paragraphProperties: ParagraphProperties;
|
private readonly paragraphProperties: ParagraphProperties;
|
||||||
private readonly runProperties: RunProperties;
|
private readonly runProperties: RunProperties;
|
||||||
@ -93,6 +110,11 @@ export class LevelBase extends XmlComponent {
|
|||||||
this.root.push(this.runProperties);
|
this.root.push(this.runProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setSuffix(value: LevelSuffix) {
|
||||||
|
this.root.push(new Suffix(value));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public addParagraphProperty(property: XmlComponent): Level {
|
public addParagraphProperty(property: XmlComponent): Level {
|
||||||
this.paragraphProperties.push(property);
|
this.paragraphProperties.push(property);
|
||||||
return this;
|
return this;
|
||||||
|
Reference in New Issue
Block a user