Selection
Last updated
Last updated
The user's current selection in a Slate . Selections implement the interface, but also expose data about the current "focus" and the cursor current marks.
isFocused
Boolean
Whether the range currently has focus.
marks
Set
A set of marks associated with the range.
object
String
A string with a value of 'selection'
.
isBlurred
Boolean
The opposite of isFocused
, for convenience.
Selection.create
Selection.create(properties: Object) => Selection
Create a new Selection
instance with properties
.
Selection.createProperties
Selection.createProperties(object: Object|Selection) => Object
Create a new dictionary of range properties from an object
.
Selection.fromJSON
Selection.fromJSON(object: Object) => Selection
Create a range from a JSON object
.
Selection.isSelection
Selection.isSelection(value: Any) => Boolean
Check whether a value
is a Selection
.
toJSON
toJSON() => Object
Return a JSON representation of the range.
setIsFocused
setIsFocused(isFocused: Boolean) => Selection
Return a new range with a new isFocused
value.
setMarks
setMarks(marks: Set|Null) => Selection
Return a new range with a new set of marks
.