mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
1.9 KiB
1.9 KiB
BlockSuite API Documentation / @blocksuite/block-std / index / RangeManager
Class: RangeManager
CRUD for Range and TextSelection
Extends
Methods
created()
created():
void
Called when std is created.
Returns
void
Inherited from
getSelectedBlockComponentsByRange()
getSelectedBlockComponentsByRange(
range,options):BlockComponent<BlockModel<object>,BlockService,string>[]
Parameters
range
Range
options
match?
(el) => boolean
mode?
"flat" | "all" | "highest"
Returns
BlockComponent<BlockModel<object>, BlockService, string>[]
Example
aaa
b[bb
ccc
ddd
ee]e
all mode: [aaa, bbb, ccc, ddd, eee]
flat mode: [bbb, ccc, ddd, eee]
highest mode: [bbb, ddd]
match function will be evaluated before filtering using mode
mounted()
mounted():
void
Called when editor host is mounted.
Which means the editor host emit the connectedCallback lifecycle event.
Returns
void
Overrides
rendered()
rendered():
void
Called when std.render is called.
Returns
void
Inherited from
unmounted()
unmounted():
void
Called when editor host is unmounted.
Which means the editor host emit the disconnectedCallback lifecycle event.
Returns
void