🐛 Maintain selection after font change

This commit is contained in:
Miguel de Benito Delgado 2025-10-26 12:02:20 +00:00
parent e9dcd64463
commit 57bfca4062
1 changed files with 4 additions and 2 deletions

View File

@ -101,8 +101,10 @@
(impl/updateBlockData state block-key (clj->js attrs)))))
state (impl/applyInlineStyle state (legacy.txt/attrs-to-styles attrs))
selected (impl/getSelectedBlocks state)]
(reduce update-blocks state selected)))
selection-after-apply (impl/getSelection state)
selected (impl/getSelectedBlocks state)
state (reduce update-blocks state selected)]
(impl/setSelection state selection-after-apply)))
(defn update-editor-current-inline-styles-fn
[state update-fn]