Skip to main content

RichEditSelection.setSelection(arg) Method

Selects the specified interval(s).

Declaration

setSelection(
    arg: number | Interval | Interval[]
): void

Parameters

Name Type Description
arg number | Interval | Interval[]

The interval(s) or position to select.

Remarks

Use the setSelection method to select document content. The intervals property stores the selected interval(s).

//Removes a field
var selection = richEdit.selection.intervals;
richEdit.selection.setSelection(richEdit.document.mainSubDocument.fieldsInfo[0].interval);
richEdit.commands.delete.execute();
richEdit.selection.intervals = selection;

Refer to the following section for more information: Client Selection.

See Also