BlockSuite API Documentation / @blocksuite/block-std / SurfaceSelection
Class: SurfaceSelection ​
Contents ​
Extends ​
Constructors ​
new SurfaceSelection(elements, editing) ​
new SurfaceSelection(
elements
,editing
):SurfaceSelection
Parameters ​
• elements: string
[]
• editing: boolean
Returns ​
Overrides ​
@blocksuite/block-std.BaseSelection.constructor
Source ​
block-std/src/selection/variants/surface.ts:17
Properties ​
editing ​
readonly
editing:boolean
Source ​
block-std/src/selection/variants/surface.ts:15
elements ​
readonly
elements:string
[]
Source ​
block-std/src/selection/variants/surface.ts:14
path ​
readonly
path:string
[]
Inherited from ​
@blocksuite/block-std.BaseSelection.path
Source ​
block-std/src/selection/base.ts:16
group ​
static
group:string
='edgeless'
Overrides ​
@blocksuite/block-std.BaseSelection.group
Source ​
block-std/src/selection/variants/surface.ts:12
type ​
static
type:string
='surface'
Overrides ​
@blocksuite/block-std.BaseSelection.type
Source ​
block-std/src/selection/variants/surface.ts:11
Accessors ​
blockId ​
get
blockId():string
Returns ​
string
Source ​
block-std/src/selection/base.ts:22
group ​
get
group():string
Returns ​
string
Source ​
block-std/src/selection/base.ts:37
type ​
get
type(): keyofSelection
Returns ​
keyof Selection
Source ​
block-std/src/selection/base.ts:32
Methods ​
equals() ​
equals(
other
):boolean
Parameters ​
• other: BaseSelection
Returns ​
boolean
Overrides ​
@blocksuite/block-std.BaseSelection.equals
Source ​
block-std/src/selection/variants/surface.ts:27
is() ​
is<
T
>(type
):this is SelectionInstance[T]
Type parameters ​
• T extends keyof Selection
Parameters ​
• type: T
Returns ​
this is SelectionInstance[T]
Inherited from ​
@blocksuite/block-std.BaseSelection.is
Source ​
block-std/src/selection/base.ts:26
isEmpty() ​
isEmpty():
boolean
Returns ​
boolean
Source ​
block-std/src/selection/variants/surface.ts:23
toJSON() ​
toJSON():
Record
<string
,unknown
>
Returns ​
Record
<string
, unknown
>
Overrides ​
@blocksuite/block-std.BaseSelection.toJSON
Source ​
block-std/src/selection/variants/surface.ts:40
fromJSON() ​
static
fromJSON(json
):SurfaceSelection
Parameters ​
• json: Record
<string
, unknown
> | Object
Returns ​
Overrides ​
@blocksuite/block-std.BaseSelection.fromJSON
Source ​
block-std/src/selection/variants/surface.ts:49
Generated using typedoc-plugin-markdown and TypeDoc