HTML DOM
GitHub 0★
Get the selected text
const
selectedText
=
window
.
getSelection
(
)
.
toString
(
)
;
See also
Copy highlighted code to the clipboard
Get the direction of the text selection
Paste as plain text
Save and restore the text selection
Select the text content of an element
Get the position of an element relative to the document
Get the size of an image