diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index 02926dc781..fa230f1af5 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -83,7 +83,13 @@ fill-color-ref-id (obj/get data "fill-color-ref-id") fill-color-ref-file (obj/get data "fill-color-ref-file") + ;; Uncomment this to allow to remove text colors. This could break the texts that already exist + ;;[r g b a] (if (nil? fill-color) + ;; [0 0 0 0] ;; Transparent color + ;; (uc/hex->rgba fill-color fill-opacity)) + [r g b a] (uc/hex->rgba fill-color fill-opacity) + text-color (if fill-color-gradient (uc/gradient->css (js->clj fill-color-gradient)) (str/format "rgba(%s, %s, %s, %s)" r g b a)) 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 8776173587..499b72b88f 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs @@ -37,7 +37,9 @@ [{:type "root" :children [{:type "paragraph-set" :children [{:type "paragraph" - :children [{:text (or text "")}]}]}]}])) + :children [{:fill-color "#000000" + :fill-opacity 1 + :text (or text "")}]}]}]}])) (defn- parse-content [content] (cond diff --git a/frontend/src/app/util/text.cljs b/frontend/src/app/util/text.cljs index 4e1ad7136a..c00547c9f7 100644 --- a/frontend/src/app/util/text.cljs +++ b/frontend/src/app/util/text.cljs @@ -16,7 +16,7 @@ :text-transform "none" :text-align "left" :text-decoration "none" - :fill-color "#000000" + :fill-color nil :fill-opacity 1}) (def typography-fields