mirror of https://github.com/logseq/logseq
fix: can't use template for blocks
parent
71b6695669
commit
1bea86974c
|
@ -429,6 +429,13 @@
|
|||
:multiple-choices? multiple-values?
|
||||
:dropdown? dropdown?))
|
||||
|
||||
:template
|
||||
(let [id (first (:classes schema))
|
||||
template (when id (db/entity [:block/uuid id]))]
|
||||
(when template
|
||||
(create-new-block-from-template! block property template)
|
||||
(exit-edit-property)))
|
||||
|
||||
(let [config {:editor-opts (new-text-editor-opts repo block property value editor-id)}]
|
||||
[:div
|
||||
(editor-box editor-args editor-id (cond-> config
|
||||
|
|
Loading…
Reference in New Issue