PropertySelection
Class defined in model/PropertySelection.js#20 inherits from

A selection which is bound to a property. Implements model/Selection.

Example
var propSel = doc.createSelection({
  type: 'property',
  path: ['p1', 'content'],
  startOffset: 3,
  endOffset: 6
});

Convert container selection to JSON.

Returns
Object

Collapse a selection to chosen direction.

Parameters
directionString

either left of right

Returns
PropertySelection

Get path of a selection, e.g. target property where selected data is stored.

Returns
String[]

path

Get start character position.

Returns
Number

offset

Get end character position.

Returns
Number

offset

Checks if this selection is inside another one.

Parameters
otherSelection
[strict]Boolean

true if should check that it is strictly inside the other

Returns
Boolean

Checks if this selection contains another one.

Parameters
otherSelection
[strict]Boolean

true if should check that it is strictly contains the other

Returns
Boolean

Checks if this selection overlaps another one.

Parameters
otherSelection
[strict]Boolean

true if should check that it is strictly overlaps the other

Returns
Boolean

Checks if this selection has the right boundary in common with another one.

Parameters
otherSelection
Returns
Boolean

Checks if this selection has the left boundary in common with another one.

Parameters
otherSelection
Returns
Boolean

Expands selection to include another selection.

Parameters
otherSelection
Returns
Selection

a new selection

Creates a new selection by truncating this one by another selection.

Parameters
otherSelection
Returns
Selection

a new selection

Creates a new selection with given range and same path.

Parameters
startOffsetNumber
endOffsetNumber
Returns
Selection

a new selection

Return fragments for a given selection.

Returns
Selection.Fragment[]