              (let [content (js->clj val :keywordize-keys true)
                    content (first content)]
                (st/emit! (dw/update-shape id {:content content}))
-               (reset! state val)))))
+               (reset! state val)
+               (reset! content-var content)))))
 
         loaded-fonts (mf/use-var 0)
         on-load-font #(swap! loaded-fonts inc)]

                 (st/emit! (dwt/update-overflow-text id true))

                 (and (= :fixed (:grow-type shape)) (:overflow-text shape) (<= height (:height shape)))
                 (st/emit! (dwt/update-overflow-text id false)))

               (if (#{:auto-width :auto-height} grow-type)
                 (st/emit! (dw/update-shape id (if (= grow-type :auto-width)
                                                 {:width width :height height}
                                                 {:height height}))))))))))

    [:foreignObject {:ref self-ref
                     :transform (geom/transform-matrix shape)

        (fn [event]
          (dom/prevent-default event)
          (dom/stop-propagation event)

          (let [sidebar (dom/get-element "settings-bar")
                cpicker (dom/get-element-by-class "colorpicker-tooltip")
                self    (mf/ref-val self-ref)
