mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 23:06:50 +02:00
🐛 Fix problem copy/paste svg text
This commit is contained in:
parent
fa00fed694
commit
e636bdd0b0
1 changed files with 8 additions and 3 deletions
|
@ -1711,8 +1711,14 @@
|
||||||
(process-entry [[type data]]
|
(process-entry [[type data]]
|
||||||
(case type
|
(case type
|
||||||
:text
|
:text
|
||||||
(if (str/empty? data)
|
(cond
|
||||||
|
(str/empty? data)
|
||||||
(rx/empty)
|
(rx/empty)
|
||||||
|
|
||||||
|
(re-find #"<svg\s" data)
|
||||||
|
(rx/of (paste-svg-text data))
|
||||||
|
|
||||||
|
:else
|
||||||
(rx/of (paste-text data)))
|
(rx/of (paste-text data)))
|
||||||
|
|
||||||
:transit
|
:transit
|
||||||
|
@ -1757,8 +1763,7 @@
|
||||||
text-data (some-> pdata wapi/extract-text)
|
text-data (some-> pdata wapi/extract-text)
|
||||||
transit-data (ex/ignoring (some-> text-data t/decode-str))]
|
transit-data (ex/ignoring (some-> text-data t/decode-str))]
|
||||||
(cond
|
(cond
|
||||||
(and (string? text-data)
|
(and (string? text-data) (re-find #"<svg\s" text-data))
|
||||||
(str/includes? text-data "<svg "))
|
|
||||||
(rx/of (paste-svg-text text-data))
|
(rx/of (paste-svg-text text-data))
|
||||||
|
|
||||||
(seq image-data)
|
(seq image-data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue