ClipboardManager
Unofficial
Manager for clipboard operations in the markdown editor, handling paste, drag, and drop.
Import:
import type { ClipboardManager } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ClipboardManagerProperties
| Property | Type | Description | |
|---|---|---|---|
| app | App | Reference to the app. | |
| info | MarkdownView | Reference to the Editor View. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getPath() | string | Get current path of editor view for determining storage location embed. | |
| handleDataTransfer(data) | null | Promise<void> | Process incoming data (image, text, url, html). | |
| handleDragOver(event) | void | Handle an incoming drag-over event. | |
| handleDrop(event) | boolean | Handle an incoming drag-drop event. | |
| handleDropIntoEditor(event) | null | string | Process a drop event into the editor. | |
| handlePaste(event) | boolean | Handle an incoming paste event. | |
| insertAttachmentEmbed(file, replace) | Promise<void> | Insert single file as embed into the editor. | |
| insertFiles(importedAttachments) | Promise<void> | Insert files from drop-event into the editor. | |
| saveAttachment(name, extension, data, replace) | Promise<void> | Save an attachment of specified name and extension to the vault. |
Links to this page: