docs: https://javascript.info/selection-range
This video shows to get the selected text in textarea by using the selection API using the range method and substr to slice it.
The substr() method extracts a part of a string.
On this page of the site you can watch the video online JavaScript get selected text in TextArea | JavaScript selection API | substr() with a duration of hours minute second in good quality, which was uploaded by the user b3nsh4 23 March 2022, share the link with friends and acquaintances, this video has already been watched 1,857 times on youtube and it was liked by 14 viewers. Enjoy your viewing!