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:35
Properties
_compositionStartCallback
private
_compositionStartCallback:null
| (event
) =>Promise
<void
> =null
Source
packages/framework/block-std/src/view/utils/range-binding.ts:29
_prevTextSelection
private
_prevTextSelection:null
|object
=null
Source
packages/framework/block-std/src/view/utils/range-binding.ts:24
isComposing
isComposing:
boolean
=false
Source
packages/framework/block-std/src/view/utils/range-binding.ts:33
manager
manager:
RangeManager
Source
packages/framework/block-std/src/view/utils/range-binding.ts:35
Accessors
host
get
host():EditorHost
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:20
rangeManager
get
rangeManager():RangeManager
Returns
Source
packages/framework/block-std/src/view/utils/range-binding.ts:15
selectionManager
get
selectionManager():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:169
_onCompositionEnd()
private
_onCompositionEnd(event
):void
Parameters
• event: CompositionEvent
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:306
_onCompositionStart()
private
_onCompositionStart():void
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:225
_onNativeSelectionChanged()
private
_onNativeSelectionChanged():Promise
<void
>
Returns
Promise
<void
>
Source
packages/framework/block-std/src/view/utils/range-binding.ts:108
_onStdSelectionChanged()
private
_onStdSelectionChanged(selections
):void
Parameters
• selections: BaseSelection
[]
Returns
void
Source
packages/framework/block-std/src/view/utils/range-binding.ts:66