Skip to main content
A newer version of this page is available. .

FindAllCommand.execute(text, matchCase, highlightResults) Method

Executes the FindAllCommand command by applying the specified settings.

May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.

Declaration

execute(
    text: string,
    matchCase: boolean,
    highlightResults: boolean,
    results?: Interval[]
): boolean

Parameters

Name Type Description
text string

A string value specifying text to find.

matchCase boolean

true, to perform a case-sensitive search; otherwise, false.

highlightResults boolean

true, to highlight the search results; otherwise, false.

results Interval[]

An array of Interval objects containing the search results.

Returns

Type Description
boolean

A Boolean value identifying whether method execution was successful or failed.

Remarks

The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.

Usage example:


var results = [];
richEdit.commands.findAll.execute("matching text", true, true, results);

Use the RichEditCommands.hideFindResults command to hide the search results.

See Also