Skip to content

ClipBoardManager

Properties

app

app: App

Reference to the app


info

info: MarkdownView

Reference to the Editor View

Methods

getPath()

getPath(): string

Get current path of editor view for determining storage location embed

Returns

string


handleDataTransfer()

handleDataTransfer(data): null | Promise<void>

Process incoming data (image, text, url, html)

Parameters

data: DataTransfer

Returns

null | Promise<void>


handleDragOver()

handleDragOver(event): void

Handle an incoming drag-over event

Parameters

event: DragEvent

Returns

void


handleDrop()

handleDrop(event): boolean

Handle an incoming drag-drop event

Parameters

event: DragEvent

Returns

boolean


handleDropIntoEditor()

handleDropIntoEditor(event): null | string

Process a drop event into the editor

Parameters

event: DragEvent

Returns

null | string


handlePaste()

handlePaste(event): boolean

Handle an incoming paste event

Parameters

event: ClipboardEvent

Returns

boolean


insertAttachmentEmbed()

insertAttachmentEmbed(file, replace): Promise<void>

Insert single file as embed into the editor

Parameters

file: TAbstractFile

replace: boolean

Returns

Promise<void>


insertFiles()

insertFiles(files): Promise<void>

Insert files from drop-event into the editor

Parameters

files: ImportedAttachments[]

Returns

Promise<void>


saveAttachment()

saveAttachment(name, extension, data, replace): Promise<void>

Save an attachment of specified name and extension to the vault

Parameters

name: string

extension: string

data: ArrayBuffer

replace: boolean

Returns

Promise<void>