Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Andrey Antukh 2022-08-23 08:11:58 +02:00
commit b3d6b4b402
46 changed files with 909 additions and 788 deletions

View file

@ -121,7 +121,7 @@
(defn get-current-target
"Extract the current target from event instance (different from target
when event triggered in a child of the subscribing element)."
when event triggered in a child of the subscribing element)."
[^js event]
(when (some? event)
(.-currentTarget event)))

View file

@ -72,10 +72,10 @@
(defn get-editor-current-inline-styles
[state]
(if (impl/isCurrentEmpty state)
(let [block (impl/getCurrentBlock state)]
(get-editor-block-data block))
(get-editor-current-block-data state)
(-> (.getCurrentInlineStyle ^js state)
(txt/styles-to-attrs))))
(txt/styles-to-attrs)
(dissoc :text-align :text-direction))))
(defn update-editor-current-block-data
[state attrs]
@ -89,7 +89,8 @@
(impl/updateBlockData state block-key (clj->js attrs))
(let [attrs (-> (impl/getInlineStyle state block-key 0)
(txt/styles-to-attrs))]
(txt/styles-to-attrs)
(dissoc :text-align :text-direction))]
(impl/updateBlockData state block-key (clj->js attrs)))))
state (impl/applyInlineStyle state (txt/attrs-to-styles attrs))