|
@@ -1814,11 +1814,14 @@
|
|
|
(state/toggle-collapsed-block! uuid)
|
|
(state/toggle-collapsed-block! uuid)
|
|
|
(if collapsed?
|
|
(if collapsed?
|
|
|
(editor-handler/expand-block! uuid)
|
|
(editor-handler/expand-block! uuid)
|
|
|
- (editor-handler/collapse-block! uuid))))}
|
|
|
|
|
|
|
+ (editor-handler/collapse-block! uuid)))
|
|
|
|
|
+ ;; debug config context
|
|
|
|
|
+ (when (and (state/developer-mode?) (.-metaKey event))
|
|
|
|
|
+ (js/console.debug "[block config]==" config)))}
|
|
|
[:span {:class (if (or (and control-show?
|
|
[:span {:class (if (or (and control-show?
|
|
|
- (or collapsed?
|
|
|
|
|
- (editor-handler/collapsable? uuid {:semantic? true})))
|
|
|
|
|
- (and collapsed? (or order-list? config/publishing?)))
|
|
|
|
|
|
|
+ (or collapsed?
|
|
|
|
|
+ (editor-handler/collapsable? uuid {:semantic? true})))
|
|
|
|
|
+ (and collapsed? (or order-list? config/publishing?)))
|
|
|
"control-show cursor-pointer"
|
|
"control-show cursor-pointer"
|
|
|
"control-hide")}
|
|
"control-hide")}
|
|
|
(ui/rotating-arrow collapsed?)]])
|
|
(ui/rotating-arrow collapsed?)]])
|
|
@@ -2545,9 +2548,12 @@
|
|
|
(p/do!
|
|
(p/do!
|
|
|
(state/set-editor-op! :escape)
|
|
(state/set-editor-op! :escape)
|
|
|
(editor-handler/save-block! (editor-handler/get-state) value)
|
|
(editor-handler/save-block! (editor-handler/get-state) value)
|
|
|
- (js/setTimeout #(editor-handler/escape-editing select?) 10))))}
|
|
|
|
|
- edit-input-id
|
|
|
|
|
- config))]
|
|
|
|
|
|
|
+ (js/setTimeout (fn []
|
|
|
|
|
+ (editor-handler/escape-editing select?)
|
|
|
|
|
+ (some-> config :on-escape-editing
|
|
|
|
|
+ (apply []))) 10))))}
|
|
|
|
|
+ edit-input-id
|
|
|
|
|
+ config))]
|
|
|
[:div.flex.flex-1.flex-row.gap-1.items-start
|
|
[:div.flex.flex-1.flex-row.gap-1.items-start
|
|
|
editor-cp
|
|
editor-cp
|
|
|
(when (and (seq (:block/tags block)) db-based?)
|
|
(when (and (seq (:block/tags block)) db-based?)
|
|
@@ -2559,8 +2565,8 @@
|
|
|
[:div.flex.flex-row
|
|
[:div.flex.flex-row
|
|
|
[:div.flex-1.w-full {:style {:display (if (:slide? config) "block" "flex")}}
|
|
[:div.flex-1.w-full {:style {:display (if (:slide? config) "block" "flex")}}
|
|
|
(ui/catch-error
|
|
(ui/catch-error
|
|
|
- (ui/block-error "Block Render Error:"
|
|
|
|
|
- {:content (:block/content block)
|
|
|
|
|
|
|
+ (ui/block-error "Block Render Error:"
|
|
|
|
|
+ {:content (:block/content block)
|
|
|
:section-attrs
|
|
:section-attrs
|
|
|
{:on-click #(let [content (or (:block/original-name block)
|
|
{:on-click #(let [content (or (:block/original-name block)
|
|
|
(:block/content block))]
|
|
(:block/content block))]
|