Paragraph documentation

This commit is contained in:
Dolan
2019-08-05 23:24:43 +01:00
parent c2c05b0140
commit cb699e17b3

View File

@ -57,12 +57,12 @@ doc.addSection({
This is the list of options for a paragraph. A detailed explanation is below:
| Property | Type | Mandatory? | Possible Values |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- |
| [text](#text) | `string` | Optional | |
| [heading](#heading) | `HeadingLevel` | Optional | `HEADING_1`, `HEADING_2`, `HEADING_3`, `HEADING_4`, `HEADING_5`, `HEADING_6`, `TITLE` |
| [border](#border) | `IBorderOptions` | Optional | `top`, `bottom`, `left`, `right`. Each of these are of type IBorderPropertyOptions. Click here for Example |
| [spacing](#spacing) | `ISpacingProperties` | Optional | See below for ISpacingProperties |
| outlineLevel | `number` | Optional | |
| [outlineLevel](#outline-level) | `number` | Optional | |
| alignment | `AlignmentType` | Optional | |
| heading | `HeadingLevel` | Optional | |
| bidirectional | `boolean` | Optional | |
@ -161,13 +161,17 @@ Add spacing before the paragraph:
```ts
const paragraph = new Paragraph({
text: "line with contextual spacing",
text: "Paragraph with spacing before",
spacing: {
before: 200,
},
});
```
## Outline Level
**Example:**
## Styles
To create styles, please refer to the styling Wiki: https://github.com/dolanmiu/docx/wiki/Styling