BlockSuite API Documentation / @blocksuite/lit / RangeSynchronizer
Class: RangeSynchronizer ​
Two-way binding between native range and text selection
Contents ​
Constructors ​
new RangeSynchronizer(manager) ​
new RangeSynchronizer(
manager
):RangeSynchronizer
Parameters ​
• manager: RangeManager
Returns ​
Source ​
packages/lit/src/utils/range-synchronizer.ts:48
Properties ​
_filter ​
private
_filter:RangeSyncFilter
={}
Source ​
packages/lit/src/utils/range-synchronizer.ts:25
_isComposing ​
private
_isComposing:boolean
=false
Source ​
packages/lit/src/utils/range-synchronizer.ts:42
_prevSelection ​
private
_prevSelection:null
|BaseSelection
=null
Source ​
packages/lit/src/utils/range-synchronizer.ts:23
manager ​
manager:
RangeManager
Source ​
packages/lit/src/utils/range-synchronizer.ts:48
Accessors ​
_rangeManager ​
get
private
_rangeManager():RangeManager
Returns ​
Source ​
packages/lit/src/utils/range-synchronizer.ts:37
_selectionManager ​
get
private
_selectionManager():SelectionManager
Returns ​
Source ​
packages/lit/src/utils/range-synchronizer.ts:33
filter ​
get
filter():RangeSyncFilter
Returns ​
Source ​
packages/lit/src/utils/range-synchronizer.ts:26
root ​
get
root():BlockSuiteRoot
Returns ​
Source ​
packages/lit/src/utils/range-synchronizer.ts:44
Methods ​
_beforeTextInput() ​
private
_beforeTextInput(selection
,event
):void
Parameters ​
• selection: TextSelection
• event: InputEvent
Returns ​
void
Source ​
packages/lit/src/utils/range-synchronizer.ts:145
_onSelectionModelChanged() ​
private
_onSelectionModelChanged(selections
):void
Parameters ​
• selections: BaseSelection
[]
Returns ​
void
Source ​
packages/lit/src/utils/range-synchronizer.ts:114
_shamefullyResetIMERangeBeforeInput() ​
private
_shamefullyResetIMERangeBeforeInput(startText
,startElement
,from
):void
Parameters ​
• startText: Text
• startElement: BlockElement
<BaseBlockModel
<object
>, BlockService
<BaseBlockModel
<object
>>, string
>
• from: TextRangePoint
Returns ​
void
Source ​
packages/lit/src/utils/range-synchronizer.ts:208
setFilter() ​
setFilter(
filter
):void
Parameters ​
• filter: RangeSyncFilter
Returns ​
void
Source ​
packages/lit/src/utils/range-synchronizer.ts:29
Generated using typedoc-plugin-markdown and TypeDoc