A selection which is bound to a property. Implements model/Selection.
var propSel = doc.createSelection({
type: 'property',
path: ['p1', 'content'],
startOffset: 3,
endOffset: 6
})
Convert container selection to JSON.
Object |
Collapse a selection to chosen direction.
direction | String | either left of right |
PropertySelection |
Get path of a selection, e.g. target property where selected data is stored.
String[] | path |
Checks if this selection is inside another one.
other | Selection | |
[strict] | Boolean | true if should check that it is strictly inside the other |
Boolean |
Checks if this selection contains another one.
other | Selection | |
[strict] | Boolean | true if should check that it is strictly contains the other |
Boolean |
Checks if this selection overlaps another one.
other | Selection | |
[strict] | Boolean | true if should check that it is strictly overlaps the other |
Boolean |
Checks if this selection has the right boundary in common with another one.
other | Selection |
Boolean |
Checks if this selection has the left boundary in common with another one.
other | Selection |
Boolean |
Expands selection to include another selection.
other | Selection |
Selection | a new selection |
Creates a new selection by truncating this one by another selection.
other | Selection |
Selection | a new selection |
Creates a new selection with given range and same path.
startOffset | Number | |
endOffset | Number |
Selection | a new selection |
Return fragments for a given selection.
Selection.Fragment[] |