mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 07:35:01 +00:00
enhance: properties inserting
Multiple properties drawers are allowed for now, this PR limits the creation of multiple drawers to make sure that each block has only one. Call <properties multiple times will insert the property in same drawer.
This commit is contained in:
@@ -121,11 +121,21 @@
|
||||
[input]
|
||||
(move-cursor-to input (line-beginning-pos input)))
|
||||
|
||||
(defn move-cursor-to-beginning
|
||||
[input]
|
||||
(move-cursor-to input 0))
|
||||
|
||||
(defn move-cursor-to-end
|
||||
[input]
|
||||
(let [pos (count (gobj/get input "value"))]
|
||||
(move-cursor-to input pos)))
|
||||
|
||||
(defn move-cursor-to-thing
|
||||
[input thing from]
|
||||
(let [[content _pos] (get-input-content&pos input)
|
||||
pos (string/index-of content thing from)]
|
||||
(move-cursor-to input pos)))
|
||||
|
||||
(defn move-cursor-forward-by-word
|
||||
[input]
|
||||
(let [val (.-value input)
|
||||
|
||||
Reference in New Issue
Block a user