ApiBlockLvlSdt
class ApiBlockLvlSdt
Description
Class representing a container for the document content.
Instance Methods
- GetClassType
(): blockLvlSdt
Returns a type of the ApiBlockLvlSdt class.
- SetLock
(sLockType)
Sets the lock to the current block text content control: "contentLocked" - content cannot be edited.
- GetLock
(): SdtLock
Returns the lock type of the current container.
- SetTag
(sTag)
Sets the tag attribute to the current container.
- GetTag
(): string
Returns the tag attribute for the current container.
- SetLabel
(sLabel)
Sets the label attribute to the current container.
- GetLabel
(): string
Returns the label attribute for the current container.
- SetAlias
(sAlias)
Sets the alias attribute to the current container.
- GetAlias
(): string
Returns the alias attribute for the current container.
- GetContent
(): ApiDocumentContent
Returns the content of the current container.
- GetAllContentControls
(): ApiBlockLvlSdt[] | ApiInlineLvlSdt[]
Returns a collection of content control objects in the current content control.
- GetAllParagraphs
(): ApiParagraph[]
Returns a collection of paragraph objects in the current content control.
- GetAllTablesOnPage
(nPage): ApiTable[]
Returns a collection of tables on a given absolute page.
- RemoveAllElements
(): boolean
Clears the contents from the current content control.
- Delete
(keepContent): boolean
Removes a content control and its content.
- SetTextPr
(oTextPr)
Applies text settings to the content of the content control.
- GetAllDrawingObjects
(): ApiDrawing[]
Returns a collection of drawing objects in the current content control.
- GetParentContentControl
(): ApiBlockLvlSdt | "null"
Returns a content control that contains the current content control.
- GetParentTable
(): ApiTable | "null"
Returns a table that contains the current content control.
- GetParentTableCell
(): ApiTableCell | "null"
Returns a table cell that contains the current content control.
- Push
(oElement): boolean
Pushes a paragraph or a table or a block content control to actually add it to the current container.
- AddElement
(oElement, nPos): boolean
Adds a paragraph or a table or a block content control to the current container.
- AddText
(sText): boolean
Adds a text to the current content control.
- GetRange
(Start, End): ApiRange
Returns a Range object that represents the part of the document contained in the specified content control.
- Search
(sText, isMatchCase): ApiRange[]
Searches for a scope of a content control object.
- Select
()
Selects the current content control.
- GetPlaceholderText
(): string
Returns the placeholder text from the current content control.
- SetPlaceholderText
(sText): boolean
Sets the placeholder text to the current content control.
- GetPosInParent
(): Number
Returns the content control position within its parent element.
- ReplaceByElement
(oElement): boolean
Replaces the current content control with a new element.
- AddComment
(sText, sAuthor, sUserId): ApiComment
Adds a comment to the current block content control.
- AddCaption
(sAdditional, sLabel, bExludeLabel, sNumberingFormat, bBefore, nHeadingLvl, sCaptionSep): boolean
Adds a caption paragraph after (or before) the current content control.
- GetDropdownList
(): ApiContentControlList
Returns a list of values of the combo box / dropdown list content control.
- MoveCursorOutside
(isAfter)
Places a cursor before/after the current content control.
- ToJSON
(bWriteNumberings, bWriteStyles): JSON
Converts the ApiBlockLvlSdt object into the JSON object.