Caret
Module provides with methods to work with Caret built-in class
setToFirstBlock — sets caret to the first Block
setToLastBlock — sets caret to the last Block
setToPreviousBlock — sets caret to the previous Block
setToNextBlock — sets caret to the next Block
setToBlock — sets caret to the Block
focus — focus Editor
By default, caret will be set at the start with zero offset. You can choose position passing start
or end
and pass offset parameter
Method sets caret to the first Block (with index = 0)
String
|
Caret position at the Block (can be only start or end
|
Number
|
Caret offset at the node |
Boolean |
Returns true if caret was set
|
Method sets caret to the last Block (with index = length - 1)
String
|
Caret position at the Block (can be only start or end
|
Number
|
Caret offset at the node |
Boolean
|
Returns true if caret was set
|
Method sets caret to the previous Block
String
|
Caret position at the Block (can be only start or end
|
Number
|
Caret offset at the node |
Boolean
|
Returns true if caret was set
|
Method sets caret to the next Block
String
|
Caret position at the Block (can be only start or end
|
Number
|
Caret offset at the node |
Boolean
|
Returns true if caret was set
|
Method sets caret to the Block with passed index
Number
|
index of Block |
String
|
Caret position at the Block (can be only start or end
|
Boolean
|
Returns true if caret was set
|
Method set caret always to the first Block by default
Boolean
|
set caret at the end or not. By default it is false |
Method does not return anything