mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
enhance: paste from clipboard (#8642)
replace the selected part from the clipboard instead of formatting it to a link if it's within the link
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
(defn html-link-format!
|
||||
([]
|
||||
(html-link-format! nil))
|
||||
([link]
|
||||
([text]
|
||||
(when-let [m (get-selection-and-format)]
|
||||
(let [{:keys [selection-start selection-end format selection value edit-id input]} m
|
||||
cur-pos (cursor/pos input)
|
||||
@@ -137,8 +137,11 @@
|
||||
empty-selection?
|
||||
(config/get-empty-link-and-forward-pos format)
|
||||
|
||||
link
|
||||
(config/with-label-link format selection link)
|
||||
(and text selection-link?)
|
||||
(config/with-label-link format text selection)
|
||||
|
||||
text
|
||||
(config/with-label-link format selection text)
|
||||
|
||||
selection-link?
|
||||
(config/with-default-link format selection)
|
||||
|
||||
Reference in New Issue
Block a user