Skip to main content

ReplaceCurrentWord

Replaces the current word with the specified string.

Syntax

expression.ReplaceCurrentWord(replaceString, type);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
replaceStringRequiredstringReplacement string.
typeOptionalTextPartType"entirely"Specifies if the whole word or only its part will be replaced.

Returns

This method doesn't return any data.

Example

window.Asc.plugin.executeMethod ("ReplaceCurrentWord", ["ONLYOFFICE", "entirely"]);