Selection
Class defined in model/Selection.js#7

A document selection. Refers to a Substance document model, not to the DOM.

Returns
Document

The attached document instance

Attach document to the selection.

Parameters
docDocument

document to attach

Returns
this
Returns
Boolean

true when selection is null.

Returns
Boolean

true for property selections

Returns
Boolean

true if selection is a {@link model/ContainerSelection}

Returns
Boolean

true if selection is a {@link model/NodeSelection}

Returns
Boolean

true when selection is collapsed

Returns
Boolean

true if startOffset < endOffset

Returns
Boolean

true if selection equals other selection

Returns
String

This selection as human readable string.

Convert container selection to JSON.

Returns
Object

Get selection fragments for this selection.

A selection fragment is bound to a single property.

Returns
Selection.Fragment[]
nullSelection
Property defined in model/Selection.js#171

We use a singleton to represent NullSelections.