Name: selection

Type: keyword

Syntax: the selection

Syntax: selection()

Summary:
The <selection> is a reference to the currently <selected> text.

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
put empty into the selection -- deletes the selection

Description:
Use the <selection> <keyword> to get the currently <selected> text or to
replace the <selection>.

Certain <command|commands>--in particular, the <cut> and <copy>
<command|commands>--operate on the <selected> text.

>*Note:* The <selection> <keyword> is implemented internally as a
> <function(control structure)> and appears in the <functionNames>.
> However, unlike most <function(glossary)|functions>, the <selection>
> lets you put things into it, and behaves like a <container> rather
> than a <function(control structure)>.

References: cut (command), copy (command), function (control structure),
selectedLoc (function), mouseColor (function), functionNames (function),
keyword (glossary), command (glossary), function (glossary),
container (glossary), intersect (keyword),
openField (message), selectionChanged (message),
selectGroupedControls (property), selected (property)

Tags: ui

