Merge branch 'master' of https://github.com/h4buli/docx into feat/h4-update

# Conflicts:
#	package.json
#	src/file/document/body/body.ts
#	src/file/document/body/section-properties/section-properties.ts
#	src/file/file.ts
#	src/file/media/media.ts
#	src/file/styles/external-styles-factory.ts
#	src/file/table/table-cell.ts
This commit is contained in:
Dolan
2018-08-09 23:21:24 +01:00
19 changed files with 366 additions and 37 deletions

View File

@ -1,2 +1,3 @@
export * from "./numbering";
export * from "./abstract-numbering";
export * from "./level";

View File

@ -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 {
private readonly paragraphProperties: ParagraphProperties;
private readonly runProperties: RunProperties;
@ -93,6 +110,11 @@ export class LevelBase extends XmlComponent {
this.root.push(this.runProperties);
}
public setSuffix(value: LevelSuffix) {
this.root.push(new Suffix(value));
return this;
}
public addParagraphProperty(property: XmlComponent): Level {
this.paragraphProperties.push(property);
return this;