add keepLines and keepNext support for paragraph formatting
This commit adds it to the three places where paragraph formatting can be applied right now (directly on the paragraph, paragraph styles, and bullets/numbering styles). I'm separately adding an entry to the wiki regarding what these methods do (widow/orphan control)
This commit is contained in:
@ -8,6 +8,7 @@ import { XmlComponent } from "../xml-components";
|
||||
import { Alignment } from "./alignment";
|
||||
import { ThematicBreak } from "./border";
|
||||
import { Indent } from "./indent";
|
||||
import { KeepLines, KeepNext } from "./keep";
|
||||
import { PageBreak } from "./page-break";
|
||||
import { ParagraphProperties } from "./properties";
|
||||
import { ISpacingProperties, Spacing } from "./spacing";
|
||||
@ -140,4 +141,14 @@ export class Paragraph extends XmlComponent {
|
||||
this.properties.push(new Spacing(params));
|
||||
return this;
|
||||
};
|
||||
|
||||
public keepNext(): Paragraph {
|
||||
this.properties.push(new KeepNext());
|
||||
return this;
|
||||
}
|
||||
|
||||
public keepLines(): Paragraph {
|
||||
this.properties.push(new KeepLines());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user