Skip to main content

ApiInlineLvlSdt

Represents the ApiInlineLvlSdt class.

Methods

MethodReturnsDescription
AddCommentApiCommentAdds a comment to the current inline content control. 💡 Please note that this inline content control must be in the document.
AddElementbooleanAdds an element to the inline text content control.
AddListItembooleanAdds an item to a combo box list or drop-down list.
AddTextbooleanAdds text to the current content control.
CopyApiInlineLvlSdtCreates a copy of an inline content control. Ignores comments, footnote references, complex fields.
DeletebooleanRemoves a content control and its content. If keepContent is true, the content is not deleted.
GetAliasstringReturns the alias attribute for the current container.
GetAppearance"boundingBox" | "hidden"Returns the visualization type of the content control.
GetBackgroundColornull | ObjectReturns the background color of the current content control.
GetBorderColornull | ObjectReturns the border color of the current content control.
GetClassType"inlineLvlSdt"Returns a type of the ApiInlineLvlSdt class.
GetDataBindingXmlMappingRetrieves the data binding of the content control.
GetDataForXmlMappingstringReturns the content control data for the XML mapping.
GetDateDateRetrieves 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.
GetDropdownListApiContentControlListReturns a list of values of the combo box / drop-down list content control.
GetElementParagraphContentReturns an element of the current inline text content control using the position specified.
GetElementsCountnumberReturns 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'.
GetIdstringReturns a unique ID for the current content control.
GetInternalIdstringReturns an internal ID of the current content control.
GetLabelstringReturns the label attribute for the current container.
GetLockSdtLockReturns the lock type of the current container.
GetParentContentControlApiBlockLvlSdt | ApiInlineLvlSdt | nullReturns a content control that contains the current content control.
GetParentParagraphApiParagraph | nullReturns a paragraph that contains the current content control.
GetParentTableApiTable | nullReturns a table that contains the current content control.
GetParentTableCellApiTableCell | nullReturns a table cell that contains the current content control.
GetPlaceholderTextstringReturns the placeholder text from the current inline content control.
GetRangeApiRangeReturns a Range object that represents the part of the document contained in the specified content control.
GetTagstringReturns the tag attribute for the current container.
IsCheckBoxbooleanChecks if the content control is a checkbox.
IsCheckBoxCheckedbooleanDetermines whether a checkbox content control is currently checked or unchecked. Throws: Error if the content control is not a checkbox.
IsComboBoxbooleanChecks whether the content control is a combo box list.
IsDatePickerbooleanChecks whether the content control is a datepicker.
IsDropDownListbooleanChecks whether the content control is a drop-down list.
IsFormbooleanChecks if the content control is a form.
IsPicturebooleanChecks whether the content control is a picture control. This method verifies if the content control is specifically a picture control.
MoveCursorOutsidebooleanPlaces a cursor before/after the current content control.
PushbooleanAdds an element to the end of inline text content control.
RemoveAllElementsbooleanRemoves all the elements from the current inline text content control.
RemoveElementbooleanRemoves an element using the position specified from the current inline text content control.
RemoveListItembooleanRemoves an item from a combo box list or drop-down list.
SelectbooleanSelects the current content control.
SelectListItembooleanSets the selected item for a combo box list or drop-down list.
SetAliasbooleanSets the alias attribute to the current container.
SetAppearanceNoneSets the visualization type of the content control.
SetBackgroundColorbooleanSets the background color to the current content control.
SetBorderColorbooleanSets the border color to the current content control.
SetCheckBoxCheckedbooleanSets the checkbox value for the content control. This method updates the checkbox state of the content control to either checked or unchecked.
SetDataBindingbooleanSets the data binding for the current content control.
SetDatebooleanSets the value for the datepicker content control.
SetDateFormatbooleanSets 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").
SetIdbooleanSpecifies a unique ID for the current content control.
SetLabelbooleanAdds a string label to the current inline text content control.
SetLockbooleanSets 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.
SetPicturebooleanSets 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.
SetPictureSizebooleanSets 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.
SetPlaceholderTextbooleanSets the placeholder text to the current inline content control. Can't be set to checkbox or radio button*
SetTagbooleanAdds a string tag to the current inline text content control.
SetTextPrApiInlineLvlSdtApplies text settings to the content of the content control.
ToJSONJSONConverts the ApiInlineLvlSdt object into the JSON object.
UpdateFromXmlMappingbooleanUpdates the content control using the value from the XML mapping.