ReplaceNextCommand.execute(text, replaceText, matchCase) Method
Executes the ReplaceNextCommand 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,
replaceText: string,
matchCase: boolean
): boolean
Parameters
Name | Type | Description |
---|---|---|
text | string | A string value specifying a text to replace. |
replaceText | string | A string value specifying the inserted text. |
matchCase | boolean | true, to perform a case-sensitive search; otherwise, false. |
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:
richEdit.commands.replaceNext.execute("matching text", "new text", true);
See Also