# gpui: Support image paste and async clipboard reads on web \(\#62871\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d70c45e5bb1d8b7b3926fba5a6d1c69c23bbc405)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d70c45e5bb1d8b7b3926fba5a6d1c69c23bbc405

Requested commit: d70c45e5bb1d8b7b3926fba5a6d1c69c23bbc405

Commit: d70c45e5bb1d8b7b3926fba5a6d1c69c23bbc405

Tree: 3bf3e1bf19c6681138cf492a23cc7c99d405c1b9

Author: Gaauwe Rombouts

Committer: GitHub

## Message

```
gpui: Support image paste and async clipboard reads on web (#62871)

Deliver the DOM paste event as a full ClipboardItem (text and image
files) through a new InputHandler::paste hook instead of inserting only
plain text, and add Platform::read_from_clipboard_async so app-initiated
paste (e.g. a custom context menu) can use the browser's asynchronous,
permission-gated clipboard API. Desktop platforms are unaffected: the
async read defaults to a ready task wrapping the synchronous read, and
the paste hook defaults to plain-text insertion.

Release Notes:
- N/A
```

## Parents

- [45ae0572c422e5e8dcf73157730d747152d0be52](https://git.cafe/gitcafe/zed/commit/45ae0572c422e5e8dcf73157730d747152d0be52?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d70c45e5bb1d8b7b3926fba5a6d1c69c23bbc405?format=markdown)
