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. |
AddListItem | boolean | Adds an item to a combo box list or drop-down list. |
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. |
GetAppearance | "boundingBox" | "hidden" | Returns the visualization type of the content control. |
GetBackgroundColor | null | Object | Returns the background color of the current content control. |
GetBorderColor | null | Object | Returns the border color of the current content control. |
GetClassType | "inlineLvlSdt" | Returns a type of the ApiInlineLvlSdt class. |
GetDataBinding | XmlMapping | Retrieves the data binding of the content control. |
GetDataForXmlMapping | string | Returns the content control data for the XML mapping. |
GetDate | Date | Retrieves the selected date value from a date picker content control and returns it as a Date object. Throws: Error if the content control is not a date picker. |
GetDropdownList | ApiContentControlList | Returns a list of values of the combo box / drop-down 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 | Returns 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. |
IsCheckBox | boolean | Checks if the content control is a checkbox. |
IsCheckBoxChecked | boolean | Determines whether a checkbox content control is currently checked or unchecked. Throws: Error if the content control is not a checkbox. |
IsComboBox | boolean | Checks whether the content control is a combo box list. |
IsDatePicker | boolean | Checks whether the content control is a datepicker. |
IsDropDownList | boolean | Checks whether the content control is a drop-down list. |
IsForm | boolean | Checks if the content control is a form. |
IsPicture | boolean | Checks whether the content control is a picture control. This method verifies if the content control is specifically a picture control. |
MoveCursorOutside | boolean | 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. |
RemoveListItem | boolean | Removes an item from a combo box list or drop-down list. |
Select | boolean | Selects the current content control. |
SelectListItem | boolean | Sets the selected item for a combo box list or drop-down list. |
SetAlias | boolean | Sets the alias attribute to the current container. |
SetAppearance | None | Sets the visualization type of the content control. |
SetBackgroundColor | boolean | Sets the background color to the current content control. |
SetBorderColor | boolean | Sets the border color to the current content control. |
SetCheckBoxChecked | boolean | Sets the checkbox value for the content control. This method updates the checkbox state of the content control to either checked or unchecked. |
SetDataBinding | boolean | Sets the data binding for the current content control. |
SetDate | boolean | Sets the value for the datepicker content control. |
SetDateFormat | boolean | Sets the date format for the datepicker content control. This method allows setting the format in which the date should be displayed in the datepicker content control. The format string should be specified using common date format patterns (e.g., "mm.dd.yyyy"). |
SetId | boolean | Specifies a unique ID for the current content control. |
SetLabel | boolean | Adds a string label to the current inline text content control. |
SetLock | boolean | 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. |
SetPicture | boolean | Sets the content (image) for the picture content control. This method updates the picture inside a content control by setting an image from a provided URL. The URL should be an internet link to the image. |
SetPictureSize | boolean | Sets the size for the picture in a content control. This method adjusts the width and height of the image if the content control is a picture. |
SetPlaceholderText | boolean | Sets the placeholder text to the current inline content control. Can't be set to checkbox or radio button* |
SetTag | boolean | 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. |
UpdateFromXmlMapping | boolean | Updates the content control using the value from the XML mapping. |