# Clipboard data from Safari

**URL:** <https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215>\
**Category:** Uncategorized\
**Created:** [October 15, 2020, 1:44am UTC](https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215 "2020-10-15T01:44:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ye-elvis](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/y/ba8739/32.png) [@ye-elvis](https://discuss.prosemirror.net/u/ye-elvis)\
**Post date:** [October 15, 2020, 1:44am UTC](https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215/1 "2020-10-15T01:44:22Z")

</div>

Hello,

I am experience some weirdness with copy and pasting links within the context of Safari. When copying a link(title) within Safari via **Right Click** \> **Copy** the clipboardData does not contain any data with key “text/html” but instead just plaintext of the url. As a result, we lose information about the title when pasting

This only occurs when performing the **Right Click** \> **Copy** interaction in Safari. If copying the link with the combination of selection and cmd/ctrl + C keyboard shortcut, the clipboardData produce the expected outcome

Chrome and Firefox does not seem to have this issue.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [October 15, 2020, 8:12am UTC](https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215/2 "2020-10-15T08:12:07Z")

</div>

At a glance, this sounds like more of a Safari issue than a ProseMirror issue. Does it behave the same when copying from non-ProseMirror content? Have you checked whether a copy event is fired at all when copying a link like this?

---

<div class="post-metadata">

**Author:** ![ye-elvis](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/y/ba8739/32.png) [@ye-elvis](https://discuss.prosemirror.net/u/ye-elvis)\
**Post date:** [October 15, 2020, 7:27pm UTC](https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215/3 "2020-10-15T19:27:47Z")

</div>

As an example, I created an a sample app with just a contenteditable div and copy a link (with a title) and pasted it in the div. The div was able to preserved both title and url format when pasted.

This led me to assume that the event object being passed thru the onPaste handler does not match up.

Answering your early questions:

- Yes, I copied a link from a random webpage and it is the same behavior

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [October 26, 2020, 2:06pm UTC](https://discuss.prosemirror.net/t/clipboard-data-from-safari/3215/4 "2020-10-26T14:06:48Z")

</div>

When I right-click a link in Safari, I get a ‘Copy’ item in the menu, which copies the entire link as HTML, and a ‘Copy Link’ item, which copies the destination URL as text. I could not reproduce the issue with ‘Copy’ only copying the URL (in Safari 12).
