PricingBlog

<text> in svg doesn't display

  • benjamin.h-1283123871905611807

    Ben H

    1 year ago

    I copied an SVG that has text in it to toddle (as text not as a path), but the text doesn't display. Anyone know why? I figured out a workaround, overlaying another HTML text container, but just curious about best practice using SVGs with <text> </text> fields.

    Claude generated the SVG for me:
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 40">
    <rect width="100" height="40" rx="20" fill="#F4EEE8" />
    <text x="50" y="27" font-size="24" fill="#3A3238" text-anchor="middle" font-weight="bold">test text!</text>
    </svg>
    1283123872497012736-Screenshot_2024-09-10_at_11.47.33_AM.png
    1
  • andreasmoller-1283124118366982195

    Andreas Møller

    1 year ago

    No unfortunately that is a known issue right now 😦 I’ll talk with the team and see if we can find a quick solution
    👍2
  • benjamin.h-1283124388203597825

    Ben H

    1 year ago

    No worries, just wanted to make sure I'm not crazy 🙂