added break
This commit is contained in:
8
ts/docx/run/break.ts
Normal file
8
ts/docx/run/break.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import {XmlComponent} from "../xml-components";
|
||||||
|
|
||||||
|
export class Break extends XmlComponent {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super("w:br");
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ import {XmlComponent, Attributes} from "../xml-components";
|
|||||||
import {RunProperties} from "./properties";
|
import {RunProperties} from "./properties";
|
||||||
import {Bold, Italics, Underline} from "./formatting";
|
import {Bold, Italics, Underline} from "./formatting";
|
||||||
import {Tab} from "./tab";
|
import {Tab} from "./tab";
|
||||||
|
import {Break} from "./break";
|
||||||
|
|
||||||
export class Run extends XmlComponent {
|
export class Run extends XmlComponent {
|
||||||
private properties: RunProperties;
|
private properties: RunProperties;
|
||||||
@ -29,7 +30,7 @@ export class Run extends XmlComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break(): Run {
|
break(): Run {
|
||||||
// TODO
|
this.root.splice(1, 0, new Break());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user