Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("GetSelectedText", [args], callback)

Description

Defines the method that allows getting the selected text from the document.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetSelectedText", [numbering]);
Parameters
Parameter Description Type Example
numbering Defines the resulting string display properties:
  • NewLine - defines if the resulting string will include line boundaries or not,
    type: boolean,
    example: true;
  • NewLineParagraph - defines if the resulting string will include paragraph line boundaries or not,
    type: boolean,
    example: true;
  • Numbering - defines if the resulting string will include numbering or not,
    type: boolean,
    example: true.
array of objects
Returns

The method returns the selected text in the string format.

Example
window.Asc.plugin.executeMethod("GetSelectedText", [{"NewLine": true, "NewLineParagraph": true, "Numbering": true}], function(sText) {
    CorrectText(sText);
})