Update documentation

This commit is contained in:
Dolan Miu
2023-03-26 04:05:41 +01:00
parent 2d17954104
commit ec379f2e4d
2 changed files with 15 additions and 1 deletions

View File

@ -305,4 +305,12 @@ Example: https://github.com/dolanmiu/docx/blob/master/demo/15-page-break-before.
## Page break control
Paragraphs have `.keepLines()` and `.keepNext()` methods that allow restricting page breaks within and between paragraphs. See [this Microsoft article](https://support.office.com/en-us/article/Keep-lines-and-paragraphs-together-d72af534-926f-4c4b-830a-abfc2daa3bfa) for more details)
Paragraphs have `keepLines` and `keepNext` properties that allow restricting page breaks within and between paragraphs. See [this Microsoft article](https://support.office.com/en-us/article/Keep-lines-and-paragraphs-together-d72af534-926f-4c4b-830a-abfc2daa3bfa) for more details.
```ts
const paragraph = new Paragraph({
text: "Stay on the same page",
keepLines: true,
keepNext: true,
});
```