ApiDocumentContent

class ApiDocumentContent

Description

Class representing a container for paragraphs and tables.

Instance Methods

GetClassType(): documentContent

Returns a type of the ApiDocumentContent class.

GetElementsCount(): number

Returns a number of elements in the current document.

GetElement(nPos): DocumentElement

Returns an element by its position in the document.

AddElement(nPos, oElement)

Adds a paragraph or a table or a blockLvl content control using its position in the document content.

Push(oElement): boolean

Pushes a paragraph or a table to actually add it to the document.

RemoveAllElements()

Removes all the elements from the current document or from the current document element.

RemoveElement(nPos)

Removes an element using the position specified.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).