fix: use clipboard text if html->hiccup failed

pull/5578/head
Tienson Qin 2022-06-06 23:57:07 +08:00
parent bb804a520a
commit 1748beb7b4
1 changed files with 5 additions and 1 deletions

View File

@ -2987,7 +2987,11 @@
format (or (:block/format edit-block) :markdown)
initial-text (.getData clipboard-data "text")
text (if-not (string/blank? html)
(html-parser/convert format html)
(try
(html-parser/convert format html)
(catch :default e
(log/error :html->hiccup e)
initial-text))
initial-text)
input (state/get-input)]
(if-not (string/blank? text)