BlockSuite API Documentation / @blocksuite/block-std / Clipboard
Class: Clipboard
Constructors
new Clipboard()
new Clipboard(
std
):Clipboard
Parameters
• std: BlockStdScope
Returns
Source
packages/framework/block-std/src/clipboard/index.ts:31
Properties
_adapterMap
private
_adapterMap:AdapterMap
Source
packages/framework/block-std/src/clipboard/index.ts:29
_jobMiddlewares
private
_jobMiddlewares:JobMiddleware
[] =[]
Source
packages/framework/block-std/src/clipboard/index.ts:27
std
std:
BlockStdScope
Source
packages/framework/block-std/src/clipboard/index.ts:31
Accessors
configs
get
configs():Map
<string
,string
>
Returns
Map
<string
, string
>
Source
packages/framework/block-std/src/clipboard/index.ts:23
Methods
_getClipboardItem()
private
_getClipboardItem(slice
,type
):Promise
<unknown
>
Parameters
• slice: Slice
• type: string
Returns
Promise
<unknown
>
Source
packages/framework/block-std/src/clipboard/index.ts:64
_getDataByType()
private
_getDataByType(clipboardData
): (type
) =>string
|File
[]
Parameters
• clipboardData: DataTransfer
Returns
Function
Parameters
• type: string
Returns
string
| File
[]
Source
packages/framework/block-std/src/clipboard/index.ts:42
_getJob()
private
_getJob():Job
Returns
Source
packages/framework/block-std/src/clipboard/index.ts:33
_getSnapshotByPriority()
private
_getSnapshotByPriority(getItem
,doc
,parent
?,index
?):Promise
<null
|Slice
>
Parameters
• getItem
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<null
| Slice
>
Source
packages/framework/block-std/src/clipboard/index.ts:74
copy()
copy(
slice
):Promise
<void
>
Parameters
• slice: Slice
Returns
Promise
<void
>
Source
packages/framework/block-std/src/clipboard/index.ts:144
copySlice()
copySlice(
slice
):Promise
<void
>
Parameters
• slice: Slice
Returns
Promise
<void
>
Source
packages/framework/block-std/src/clipboard/index.ts:251
paste()
paste(
event
,doc
,parent
?,index
?):Promise
<undefined
|null
|Slice
>
Parameters
• event: ClipboardEvent
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<undefined
| null
| Slice
>
Source
packages/framework/block-std/src/clipboard/index.ts:148
pasteBlockSnapshot()
pasteBlockSnapshot(
snapshot
,doc
,parent
?,index
?):Promise
<BlockModel
<object
>>
Parameters
• snapshot: BlockSnapshot
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<BlockModel
<object
>>
Source
packages/framework/block-std/src/clipboard/index.ts:241
readFromClipboard()
readFromClipboard(
clipboardData
):any
Parameters
• clipboardData: DataTransfer
Returns
any
Source
packages/framework/block-std/src/clipboard/index.ts:227
registerAdapter()
registerAdapter<
T
>(mimeType
,adapter
,priority
):void
Type parameters
• T extends BaseAdapter
<unknown
>
Parameters
• mimeType: string
• adapter: AdapterConstructor
<T
>
• priority: number
= 0
Returns
void
Source
packages/framework/block-std/src/clipboard/index.ts:132
unregisterAdapter()
unregisterAdapter(
mimeType
):void
Parameters
• mimeType: string
Returns
void
Source
packages/framework/block-std/src/clipboard/index.ts:140
unuse()
unuse(
middleware
):void
Parameters
• middleware: JobMiddleware
Returns
void
Source
packages/framework/block-std/src/clipboard/index.ts:128
use()
use(
middleware
):void
Parameters
• middleware: JobMiddleware
Returns
void
Source
packages/framework/block-std/src/clipboard/index.ts:124
writeToClipboard()
writeToClipboard(
updateItems
):Promise
<void
>
Parameters
• updateItems
Returns
Promise
<void
>
Source
packages/framework/block-std/src/clipboard/index.ts:180