ApiDocumentContent
Represents the ApiDocumentContent class.
Methods
| Method | Returns | Description |
|---|---|---|
| AddElement | boolean | Adds a paragraph or a table or a blockLvl content control using its position in the document content. |
| GetAllCharts | ApiChart[] | Returns a collection of chart objects from the document content. |
| GetAllDrawingObjects | Drawing[] | Returns a collection of drawing objects from the document content. |
| GetAllImages | ApiImage[] | Returns a collection of image objects from the document content. |
| GetAllOleObjects | ApiOleObject[] | Returns a collection of OLE objects from the document content. |
| GetAllParagraphs | ApiParagraph[] | Returns an array of all paragraphs from the current document content. |
| GetAllShapes | ApiShape[] | Returns a collection of shape objects from the document content. |
| GetAllTables | ApiTable[] | Returns an array of all tables from the current document content. |
| GetClassType | "documentContent" | Returns a type of the ApiDocumentContent class. |
| GetContent | DocumentElement[] | Returns an array of document elements from the current ApiDocumentContent object. |
| GetCurrentContentControl | ApiBlockLvlSdt | ApiInlineLvlSdt | null | Returns the currently selected content control. |
| GetCurrentParagraph | ApiParagraph | Returns the current paragraph where the cursor is located. |
| GetCurrentRun | ApiRun | Returns the current run where the cursor is located. |
| GetDocumentVisitor | ApiDocumentVisitor | Returns a visitor object for traversing the elements of the current document. |
| GetElement | DocumentElement | Returns an element by its position in the document. |
| GetElementsCount | number | Returns a number of elements in the current document. |
| GetInternalId | string | Returns an internal ID of the current document content. |
| GetRange | ApiRange | Returns a Range object that represents the part of the document contained in the document content. |
| GetText | string | Returns the inner text of the current document content object. |
| Push | boolean | Pushes a paragraph or a table to actually add it to the document. |
| RemoveAllElements | boolean | Removes all the elements from the current document or from the current document element. 💡 When all elements are removed, a new empty paragraph is automatically created. If you want to add content to this paragraph, use the ApiDocumentContent#GetElement method. |
| RemoveElement | boolean | Removes an element using the position specified. |
| ToJSON | JSON | Converts the ApiDocumentContent object into the JSON object. |