🐛 Fix problem with pasting text into text editor

This commit is contained in:
alonso.torres 2021-07-27 15:53:58 +02:00 committed by Andrey Antukh
parent 7fe419ecb0
commit 9d545004cb
3 changed files with 63 additions and 6 deletions

View file

@ -126,3 +126,7 @@
(as-> state $
(reduce redfn $ blocks)
(impl/setSelection $ selection)))))
(defn insert-text [state text attrs]
(let [style (txt/attrs-to-styles attrs)]
(impl/insertText state text (clj->js attrs) (clj->js style))))