ApiInlineLvlSdt
Represents the ApiInlineLvlSdt class.
Methods
Method | Returns | Description |
---|---|---|
AddComment | ApiComment | Adds a comment to the current inline content control. 💡 Please note that this inline content control must be in the document. |
AddElement | boolean | Adds an element to the inline text content control. |
AddText | boolean | Adds text to the current content control. |
Copy | ApiInlineLvlSdt | Creates a copy of an inline content control. Ignores comments, footnote references, complex fields. |
Delete | boolean | Removes a content control and its content. If keepContent is true, the content is not deleted. |
GetAlias | string | Returns the alias attribute for the current container. |
GetBackgroundColor | null | Object | Gets the background color of the current content control. |
GetBorderColor | null | Object | Gets the border color of the current content control. |
GetClassType | "inlineLvlSdt" | Returns a type of the ApiInlineLvlSdt class. |
GetDropdownList | ApiContentControlList | Returns a list of values of the combo box / dropdown list content control. |
GetElement | ParagraphContent | Returns an element of the current inline text content control using the position specified. |
GetElementsCount | number | Returns a number of elements in the current inline text content control. The text content control is created with one text run present in it by default, so even without any element added this method will return the value of '1'. |
GetId | string | Gets a unique ID for the current content control. |
GetInternalId | string | Returns an internal id of the current content control. |
GetLabel | string | Returns the label attribute for the current container. |
GetLock | SdtLock | Returns the lock type of the current container. |
GetParentContentControl | ApiBlockLvlSdt | ApiInlineLvlSdt | null | Returns a content control that contains the current content control. |
GetParentParagraph | ApiParagraph | null | Returns a paragraph 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. |
GetPlaceholderText | string | Returns the placeholder text from the current inline content control. |
GetRange | ApiRange | Returns a Range object that represents the part of the document contained in the specified content control. |
GetTag | string | Returns the tag attribute for the current container. |
IsForm | boolean | Checks if the content control is a form. |
MoveCursorOutside | None | Places a cursor before/after the current content control. |
Push | boolean | Adds an element to the end of inline text content control. |
RemoveAllElements | boolean | Removes all the elements from the current inline text content control. |
RemoveElement | boolean | Removes an element using the position specified from the current inline text content control. |
SetAlias | None | Sets the alias attribute to the current container. |
SetBackgroundColor | boolean | Sets the background color to the current content control. |
SetBorderColor | boolean | Sets the border color to the current content control. |
SetId | boolean | Specifies a unique ID for the current content control. |
SetLabel | None | Adds a string label to the current inline text content control. |
SetLock | None | Sets the lock to the current inline text content control: -"contentLocked" - content cannot be edited. -"sdtContentLocked" - content cannot be edited and the container cannot be deleted. -"sdtLocked" - the container cannot be deleted. |
SetPlaceholderText | boolean | Sets the placeholder text to the current inline content control. Can't be set to checkbox or radio button* |
SetTag | None | Adds a string tag to the current inline text content control. |
SetTextPr | ApiInlineLvlSdt | Applies text settings to the content of the content control. |
ToJSON | JSON | Converts the ApiInlineLvlSdt object into the JSON object. |