跳到主要内容

SetPlaceholderText

Sets the placeholder text to the current content control.

Syntax

expression.SetPlaceholderText(text);

expression - A variable that represents a ApiBlockLvlSdt class.

Parameters

NameRequired/OptionalData typeDefaultDescription
textRequiredstringThe text that will be set to the current content control.

Returns

boolean

Example

This example shows how to set the placeholder text for the content control.

let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
doc.AddElement(0, blockLvlSdt);
blockLvlSdt.SetPlaceholderText("Enter your name here");