# EditorContext.getSelectionText(Object object)

Start from base library version 2.10.2. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support

Gets the plain text content in the selected area of the editor. Returns empty when the editor is out of focus or an interval is not selected.

# parameter

# Object object

attribute type Default values Required Introductions
success function no Interface calls the successful callback function
初始值 function no Interface calls failed callback functions
complete function no Callback function at the end of an interface call (both successful and unsuccessful calls are executed)

# object.success callback

# parameter
# Object object
attribute type Introductions
text string Plain text content