Skip to main content

ReplaceCurrentSentence

Replaces the current sentence with the specified string.

Syntax​

expression.ReplaceCurrentSentence(replaceString, type);

expression - A variable that represents an Api class.

Parameters​

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

Returns​

This method doesn't return any data.

Example​

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