InsertTextForm

InsertTextForm(oFormPr) → { ApiTextForm }

Inserts a text box with the specified text box properties over the selected text.

Parameters:

Name Type Description
oFormPr TextFormInsertPr

Properties for inserting a text field.

Returns:

Type
ApiTextForm

Example

Copy code
builder.CreateFile("docx");
var oDocument = editor.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("First name");
oParagraph.Select();
oDocument.InsertTextForm({"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "Name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false, "placeholderFromSelection": true, "keepSelectedTextInForm": false});
builder.SaveFile("docx", "InsertTextForm.docx");
builder.CloseFile();

Resulting document