Skip to Content

Deprecated

selectText()

Select (and optionally copy) text.

JavaScript December 22, 2018

Deprecated

Usage

JavaScript
selectText(element, copy, callback)

Parameters

element
(Required) (String/Selector) The element whose text to highlight
Default: None

copy
(Optional) (Boolean) Copy the selected text to the clipboard
Default: None

callback
(Optional) (Function) A function to run after select/copy.
Default: None

Parameter Notes

The callback function passes a boolean parameter if the copy was successful.

Request or provide clarification »

Additional Notes

This function has been deprecated in favor of the Async Clipboard API.