BlockSuite API Documentation / @blocksuite/block-std / RangeBinding
Class: RangeBinding
Two-way binding between native range and text selection
Constructors
new RangeBinding()
new RangeBinding(
manager):RangeBinding
Parameters
• manager: RangeManager
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:24
Properties
_compositionStartCallback
private_compositionStartCallback:null| (event) =>Promise<void> =null
Source
packages/framework/block-std/src/view/utils/range-binding.ts:214
_prevTextSelection
private_prevTextSelection:null|object=null
Source
packages/framework/block-std/src/view/utils/range-binding.ts:56
isComposing
isComposing:
boolean=false
Source
packages/framework/block-std/src/view/utils/range-binding.ts:55
manager
manager:
RangeManager
Source
packages/framework/block-std/src/view/utils/range-binding.ts:24
Accessors
host
gethost():EditorHost
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:20
rangeManager
getrangeManager():RangeManager
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:15
selectionManager
getselectionManager():SelectionManager
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:11
Methods
_onBeforeInput()
private_onBeforeInput(event):void
Parameters
• event: InputEvent
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:158
_onCompositionEnd()
private_onCompositionEnd(event):void
Parameters
• event: CompositionEvent
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:299
_onCompositionStart()
private_onCompositionStart():void
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:218
_onNativeSelectionChanged()
private_onNativeSelectionChanged():Promise<void>
Returns
Promise<void>
Source
packages/framework/block-std/src/view/utils/range-binding.ts:97
_onStdSelectionChanged()
private_onStdSelectionChanged(selections):void
Parameters
• selections: BaseSelection[]
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:60