diff --git a/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs index d279c16fa4..c628651463 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs @@ -222,6 +222,11 @@ (fn [event] (dwt/editor-select-all! editor)) + on-composition-start + (mf/use-callback + (fn [] + (.insertText slate/Editor editor ""))) + on-change (mf/use-callback (fn [val] @@ -263,6 +268,7 @@ (dom/stop-propagation event) ;; WARN: monky patch (obj/set! slate/Transforms "deselect" (constantly nil))) + :on-composition-start on-composition-start :placeholder (when (= :fixed grow-type) "Type some text here...")}]]])) (mf/defc text-shape-edit