BlockSuite API Documentation / @blocksuite/block-std / TextSelection
Class: TextSelection
Defined in: packages/framework/block-std/src/selection/variants/text.ts:34
Extends
Constructors
new TextSelection()
new TextSelection(
__namedParameters
):TextSelection
Defined in: packages/framework/block-std/src/selection/variants/text.ts:53
Parameters
__namedParameters
Returns
TextSelection
Overrides
Properties
blockId
readonly
blockId:string
Defined in: packages/framework/store/dist/extension/selection/base.d.ts:8
Inherited from
from
from:
TextRangePoint
Defined in: packages/framework/block-std/src/selection/variants/text.ts:39
reverse
reverse:
boolean
Defined in: packages/framework/block-std/src/selection/variants/text.ts:41
to
to:
null
|TextRangePoint
Defined in: packages/framework/block-std/src/selection/variants/text.ts:43
group
static
group:string
='note'
Defined in: packages/framework/block-std/src/selection/variants/text.ts:35
Overrides
type
static
type:string
='text'
Defined in: packages/framework/block-std/src/selection/variants/text.ts:37
Overrides
Accessors
end
Get Signature
get end():
TextRangePoint
Defined in: packages/framework/block-std/src/selection/variants/text.ts:45
Returns
group
Get Signature
get group():
string
Defined in: packages/framework/store/dist/extension/selection/base.d.ts:9
Returns
string
Inherited from
start
Get Signature
get start():
TextRangePoint
Defined in: packages/framework/block-std/src/selection/variants/text.ts:49
Returns
type
Get Signature
get type():
string
Defined in: packages/framework/store/dist/extension/selection/base.d.ts:10
Returns
string
Inherited from
Methods
empty()
empty():
boolean
Defined in: packages/framework/block-std/src/selection/variants/text.ts:82
Returns
boolean
equals()
equals(
other
):boolean
Defined in: packages/framework/block-std/src/selection/variants/text.ts:86
Parameters
other
Returns
boolean
Overrides
is()
is<
T
>(type
):this is T extends SelectionConstructor<U> ? U : never
Defined in: packages/framework/store/dist/extension/selection/base.d.ts:14
Type Parameters
T
T
extends SelectionConstructor
<BaseSelection
>
Parameters
type
T
Returns
this is T extends SelectionConstructor<U> ? U : never
Inherited from
isCollapsed()
isCollapsed():
boolean
Defined in: packages/framework/block-std/src/selection/variants/text.ts:97
Returns
boolean
isInSameBlock()
isInSameBlock():
boolean
Defined in: packages/framework/block-std/src/selection/variants/text.ts:101
Returns
boolean
toJSON()
toJSON():
Record
<string
,unknown
>
Defined in: packages/framework/block-std/src/selection/variants/text.ts:105
Returns
Record
<string
, unknown
>
Overrides
fromJSON()
static
fromJSON(json
):TextSelection
Defined in: packages/framework/block-std/src/selection/variants/text.ts:64
Parameters
json
Record
<string
, unknown
>
Returns
TextSelection