mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 09:56:31 +00:00
[refactor] support React change event for set-edit-content! & fix image style of block conent
This commit is contained in:
@@ -157,10 +157,8 @@
|
||||
(let [href (if (util/starts-with? href "http")
|
||||
href
|
||||
(get-file-absolute-path config href))]
|
||||
[:img.rounded-sm.shadow-xl.mb-2.mt-2
|
||||
{:class "object-contain object-center"
|
||||
:loading "lazy"
|
||||
:style {:max-height "24rem"}
|
||||
[:img.rounded-sm.shadow-xl
|
||||
{:loading "lazy"
|
||||
;; :on-error (fn [])
|
||||
:src href
|
||||
:title (second (first label))}]))
|
||||
|
||||
15
src/main/frontend/components/block.css
Normal file
15
src/main/frontend/components/block.css
Normal file
@@ -0,0 +1,15 @@
|
||||
.blocks-container {
|
||||
}
|
||||
|
||||
.block-content {
|
||||
}
|
||||
|
||||
.block-children {
|
||||
}
|
||||
|
||||
.ls-block {
|
||||
}
|
||||
|
||||
.block-content img {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
[frontend.text :as text]
|
||||
["/frontend/utils" :as utils]))
|
||||
|
||||
(def *warn-on-infer* false)
|
||||
(set! *warn-on-infer* false)
|
||||
|
||||
(rum/defc commands < rum/reactive
|
||||
[id format]
|
||||
@@ -355,8 +355,8 @@
|
||||
false
|
||||
*slash-caret-pos)))])
|
||||
|
||||
(def evt-passthrough! #(if (instance? goog.events.Event %) (set! (. % -pt) true)))
|
||||
(def evt-passthrough? #(if (instance? goog.events.Event %) (. % -pt)))
|
||||
(defonce evt-passthrough! #(if (instance? goog.events.Event %) (set! (. % -pt) true)))
|
||||
(defonce evt-passthrough? #(if (instance? goog.events.Event %) (. % -pt)))
|
||||
|
||||
(rum/defcs box < rum/reactive
|
||||
(mixins/event-mixin
|
||||
@@ -365,8 +365,6 @@
|
||||
input-id id
|
||||
input (gdom/getElement input-id)
|
||||
repo (:block/repo block)]
|
||||
;; (.addEventListener input "paste" (fn [event]
|
||||
;; (editor-handler/append-paste-doc! format event)))
|
||||
(mixins/on-key-down
|
||||
state
|
||||
{;; enter
|
||||
|
||||
Reference in New Issue
Block a user