MoveCursorOutside
Places a cursor before/after the current content control.
Syntax
expression.MoveCursorOutside(isAfter);
expression
- A variable that represents a ApiInlineLvlSdt class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
isAfter | Optional | boolean | true | Specifies whether a cursor will be placed before (false) or after (true) the current content control. |
Returns
boolean
Example
This example shows how to move the cursor outside of the inline content control.
- Code
- Result
// How to move the cursor out of the form.
// Move the cursor out of the inline text control.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let inlineLvlSdt = Api.CreateInlineLvlSdt();
inlineLvlSdt.AddText("The cursor will be placed after the current content control.");
paragraph.AddInlineLvlSdt(inlineLvlSdt);
inlineLvlSdt.MoveCursorOutside(true);