add #font method to Run
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import {XmlComponent, Attributes} from "../xml-components";
|
||||
import { RunFonts } from "./run-fonts";
|
||||
import {RunProperties} from "./properties";
|
||||
import {Bold, Italics} from "./formatting";
|
||||
import {Tab} from "./tab";
|
||||
@ -11,7 +12,6 @@ import {Underline} from "./underline"
|
||||
export class Run extends XmlComponent {
|
||||
private properties: RunProperties;
|
||||
|
||||
|
||||
constructor() {
|
||||
super("w:r");
|
||||
this.properties = new RunProperties();
|
||||
@ -72,4 +72,9 @@ export class Run extends XmlComponent {
|
||||
this.properties.push(new SuperScript());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
font(fontName: string): Run {
|
||||
this.properties.push(new RunFonts(fontName));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user