ApiParagraph
ApiParagraph is a subclass of ApiParaPr.
Methods
| Method | Returns | Description |
|---|---|---|
| AddElement | boolean | Adds an element to the current paragraph. |
| AddLineBreak | ApiRun | Adds a line break to the current position and starts the next element from a new line. |
| AddTabStop | ApiRun | Adds a tab stop to the current paragraph. |
| AddText | ApiRun | Adds some text to the current paragraph. |
| Copy | ApiParagraph | Creates a paragraph copy. Ingnore comments, footnote references, complex fields. |
| Delete | boolean | Deletes the current paragraph. |
| GetClassType | "paragraph" | Returns a type of the ApiParagraph class. |
| GetElement | ParagraphContent | Returns a paragraph element using the position specified. |
| GetElementsCount | number | Returns a number of elements in the current paragraph. |
| GetFontNames | string[] | Returns all font names from all elements inside the current paragraph. |
| GetIndFirstLine | twips | undefined | Returns the paragraph first line indentation. |
| GetIndLeft | twips | undefined | Returns the paragraph left side indentation. |
| GetIndRight | twips | undefined | Returns the paragraph right side indentation. |
| GetInternalId | string | Returns an internal ID of the current content paragraph. |
| GetJc | "left" | "right" | "both" | "center" | undefined | Returns the paragraph contents justification. |
| GetLastRunWithText | ApiRun | Returns the last Run with text in the current paragraph. |
| GetNext | ApiParagraph | null | Returns the next paragraph. |
| GetOutlineLvl | Number | undefined | Returns the outline level of the specified properties. |
| GetParaPr | ApiParaPr | Returns the paragraph properties. |
| GetPrevious | ApiParagraph | Returns the previous paragraph. |
| GetSpacingAfter | twips | Returns the spacing after value of the current paragraph. |
| GetSpacingBefore | twips | Returns the spacing before value of the current paragraph. |
| GetSpacingLineRule | "auto" | "atLeast" | "exact" | undefined | Returns the paragraph line spacing rule. |
| GetSpacingLineValue | twips | line240 | undefined | Returns the paragraph line spacing value. |
| GetTabs | TabStop[] | Returns the custom tab stops of the current paragraph. |
| GetText | string | Returns the paragraph text. |
| InsertParagraph | ApiParagraph | null | Inserts a paragraph at the specified position. |
| Last | ParagraphContent | Returns the last element of the paragraph. |
| MoveCursorToEnd | boolean | Moves the cursor to the end of the paragraph. |
| MoveCursorToStart | boolean | Moves the cursor to the start of the paragraph. |
| Push | boolean | Adds an element to the current paragraph. |
| RemoveAllElements | boolean | Removes all the elements from the current paragraph. |
| RemoveElement | boolean | Removes an element using the position specified. |
| Select | boolean | Selects the current paragraph. |
| SetBold | ApiParagraph | Sets the bold property to the text character. |
| SetBullet | None | Sets the bullet or numbering to the current paragraph. |
| SetCaps | ApiParagraph | Specifies that any lowercase characters in this paragraph are formatted for display only as their capital letter character equivalents. |
| SetDoubleStrikeout | ApiParagraph | Specifies that the contents of this paragraph are displayed with two horizontal lines through each character displayed on the line. |
| SetFontFamily | ApiParagraph | Sets all 4 font slots with the specified font family. |
| SetFontSize | ApiParagraph | Sets the font size to the characters of the current paragraph. |
| SetHighlight | ApiParagraph | Specifies a highlighting color which is applied as a background to the contents of the current paragraph. |
| SetIndFirstLine | boolean | Sets the paragraph first line indentation. |
| SetIndLeft | boolean | Sets the paragraph left side indentation. |
| SetIndRight | boolean | Sets the paragraph right side indentation. |
| SetItalic | ApiParagraph | Sets the italic property to the text character. |
| SetJc | boolean | Sets the paragraph contents justification. |
| SetOutlineLvl | boolean | Sets the outline level for the specified properties. |
| SetSmallCaps | ApiParagraph | Specifies that all the small letter characters in this paragraph are formatted for display only as their capital |
| SetSpacing | ApiParagraph | Sets the text spacing measured in twentieths of a point. |
| SetSpacingAfter | boolean | Sets the spacing after the current paragraph. If the value of the isAfterAuto parameter is true, then |
| SetSpacingBefore | boolean | Sets the spacing before the current paragraph. If the value of the isBeforeAuto parameter is true, then |
| SetSpacingLine | boolean | Sets the paragraph line spacing. If the value of the sLineRule parameter is either |
| SetStrikeout | ApiParagraph | Specifies that the contents of this paragraph are displayed with a single horizontal line through the center of the line. |
| SetTabs | boolean | Specifies a sequence of custom tab stops which will be used for any tab characters in the current paragraph. |
| SetText | ApiRun | Replaces the paragraph content with the specified text. |
| SetTextPr | boolean | Sets the paragraph text properties. |
| SetUnderline | ApiParagraph | Specifies that the contents of this paragraph are displayed along with a line appearing directly below the character |
| ToJSON | JSON | Converts the ApiParagraph object into the JSON object. |