Workspaceon(‘editor-paste’)

Workspace.on(‘editor-paste’) method

Triggered when the editor receives a paste event. Check for evt.defaultPrevented before attempting to handle this event, and return if it has been already handled. Use evt.preventDefault() to indicate that you’ve handled the event.

Signature:

on(name: 'editor-paste', callback: (evt: ClipboardEvent, editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef;

Parameters

ParameterTypeDescription
name’editor-paste’
callback(evt: ClipboardEvent, editor: Editor, info: MarkdownView | MarkdownFileInfo) any
ctxany(Optional)

Returns:

EventRef