package quill
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8e277ed56615d388bc69c4333e43d1acd112b5f2d5d352e2453aef223ff59867
sha512=369eda6df6b84b08f92c8957954d107058fb8d3d8374082e074b56f3a139351b3ae6e3a99f2d4a4a2930dd950fd609593467e502368a13ad6217b571382da28c
doc/quill.editor/Quill_editor/Brr_ext/Selection/index.html
Module Brr_ext.Selection
Selection
The type for Selection objects. Represents the currently selected text or the caret position.
to_jv sel
converts the selection object sel
to its underlying JavaScript value.
anchor_node sel
is the anchor node of the selection sel
(if any). This is the node where the user began the selection. Returns the raw JavaScript value (Jv.t
) for the node.
focus_node sel
is the focus node of the selection sel
(if any). This is the node where the user ended the selection. Returns the raw JavaScript value (Jv.t
) for the node.
anchor_offset sel
is the anchor offset of the selection sel
. This is the offset within the anchor_node
where the selection begins.
focus_offset sel
is the focus offset of the selection sel
. This is the offset within the focus_node
where the selection ends.
is_collapsed sel
gets the isCollapsed property of the selection sel
. Returns true
if the selection's start and end points are at the same position (i.e., it's a caret).
range_count sel
is the range count of the selection sel
. Typically, this is 1, even for a collapsed selection (caret).
get_range_at sel index
gets the Range object at the specified index
within the selection sel
. Most selections only have one range (at index 0).
add_range sel range
adds the given range
to the selection sel
.
remove_all_ranges sel
removes all ranges from the selection sel
, effectively deselecting any selected text.