mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 15:31:37 +02:00
🐛 Fix copy/paste images in Safari
This commit is contained in:
parent
f5f255e2d5
commit
ebaf30727c
3 changed files with 45 additions and 10 deletions
|
@ -103,6 +103,14 @@
|
|||
(let [cboard (unchecked-get js/navigator "clipboard")]
|
||||
(.writeText ^js cboard data)))
|
||||
|
||||
(defn write-to-clipboard-promise
|
||||
[mimetype promise]
|
||||
(let [cboard (unchecked-get js/navigator "clipboard")
|
||||
data (js/ClipboardItem.
|
||||
(-> (obj/create)
|
||||
(obj/set! mimetype promise)))]
|
||||
(.write ^js cboard #js [data])))
|
||||
|
||||
(defn read-from-clipboard
|
||||
[]
|
||||
(try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue