#1773 Add exact for spacing

This commit is contained in:
Dolan Miu
2022-11-19 15:51:41 +00:00
parent 64b604c9ac
commit 251eafe103
2 changed files with 10 additions and 7 deletions

View File

@ -181,11 +181,13 @@ Adding spacing between paragraphs
### ISpacingProperties
| Property | Type | Notes | Possible Values |
| -------- | -------------- | -------- | ----------------------------- |
| -------- | -------------- | -------- | -------------------------------------- |
| after | `number` | Optional | |
| before | `number` | Optional | |
| line | `number` | Optional | |
| lineRule | `LineRuleType` | Optional | `AT_LEAST`, `EXACTLY`, `AUTO` |
| lineRule | `LineRuleType` | Optional | `AT_LEAST`, `EXACTLY`, `EXACT`, `AUTO` |
Note: The `lineRule` property has different values depending on the version of Word you are using. The `EXACTLY` value is only available in Word 2016 and above. Use `EXACT` for greater support, including LibreOffice etc. Read this issue for more information: https://github.com/dolanmiu/docx/issues/1773.
**Example:**

View File

@ -4,6 +4,7 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
export enum LineRuleType {
AT_LEAST = "atLeast",
EXACTLY = "exactly",
EXACT = "exact",
AUTO = "auto",
}
export interface ISpacingProperties {