Skip to main content

PasteHandler

Type Alias PasteHandler 

Source
pub type PasteHandler = fn(item: &ClipboardItem, editor: &Entity<Editor>, destination: PasteContext<'_>, cx: &mut App) -> Option<PasteContent>;
Expand description

Called once before default clipboard handling. None keeps that behavior. The entity identifies the editor; do not read or update it during the call. Use the snapshot and cx.image_store() when calling ImageStore::keep.