Add run properties to paragraph

This commit is contained in:
Dolan
2020-12-19 20:06:23 +00:00
parent 19fc900045
commit 5e87e4fb0b
2 changed files with 37 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import { HeadingLevel, Style } from "./formatting/style";
import { LeaderType, TabStop, TabStopPosition, TabStopType } from "./formatting/tab-stop";
import { NumberProperties } from "./formatting/unordered-list";
import { OutlineLevel } from "./links";
import { IRunPropertiesOptions, RunProperties } from "./run";
import { Shading } from "./run/formatting";
export interface IParagraphStylePropertiesOptions {
@ -51,6 +52,7 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp
readonly fill: string;
readonly color: string;
};
readonly runStyle?: IRunPropertiesOptions;
}
export class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
@ -142,6 +144,10 @@ export class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
if (options.shading) {
this.push(new Shading(options.shading.type, options.shading.fill, options.shading.color));
}
if (options.runStyle) {
this.push(new RunProperties(options.runStyle));
}
}
public push(item: XmlComponent): void {