added a method for clear the page breaks of a paragraph

This commit is contained in:
Sergio Mendonça
2018-09-18 13:53:30 -03:00
parent 8e911698a5
commit baf0f17bd6
3 changed files with 17 additions and 3 deletions

View File

@ -240,4 +240,10 @@ export class Paragraph extends XmlComponent {
this.root.splice(1, 0, run);
return this;
}
public clearPageBreaks(): Paragraph {
this.root = this.root.filter((child) => !(child instanceof PageBreak));
this.properties.clearPageBreaks();
return this;
}
}