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