|
|
@@ -155,10 +155,11 @@
|
|
|
(utils/getClipText
|
|
|
(fn [clipboard-data]
|
|
|
(when-let [_ (state/get-input)]
|
|
|
- (let [data (or (when (gp-util/url? clipboard-data)
|
|
|
- (wrap-macro-url clipboard-data))
|
|
|
- clipboard-data)]
|
|
|
- (editor-handler/insert data true))))
|
|
|
+ (if (gp-util/url? clipboard-data)
|
|
|
+ (if (string/blank? (util/get-selected-text))
|
|
|
+ (editor-handler/insert (or (wrap-macro-url clipboard-data) clipboard-data) true)
|
|
|
+ (editor-handler/html-link-format! clipboard-data))
|
|
|
+ (editor-handler/insert clipboard-data true))))
|
|
|
(fn [error]
|
|
|
(js/console.error error))))
|
|
|
|