mirror of https://github.com/logseq/logseq
fix: use clipboard text if html->hiccup failed
parent
bb804a520a
commit
1748beb7b4
|
@ -2987,7 +2987,11 @@
|
||||||
format (or (:block/format edit-block) :markdown)
|
format (or (:block/format edit-block) :markdown)
|
||||||
initial-text (.getData clipboard-data "text")
|
initial-text (.getData clipboard-data "text")
|
||||||
text (if-not (string/blank? html)
|
text (if-not (string/blank? html)
|
||||||
|
(try
|
||||||
(html-parser/convert format html)
|
(html-parser/convert format html)
|
||||||
|
(catch :default e
|
||||||
|
(log/error :html->hiccup e)
|
||||||
|
initial-text))
|
||||||
initial-text)
|
initial-text)
|
||||||
input (state/get-input)]
|
input (state/get-input)]
|
||||||
(if-not (string/blank? text)
|
(if-not (string/blank? text)
|
||||||
|
|
Loading…
Reference in New Issue