Skip to main content
Question

Preserving mixed text styles when replacing text via plugin API

  • June 23, 2026
  • 4 replies
  • 18 views

Ludivine Kasteleyn

Hi everyone, we translate Figma designs using AI. We've tried both a home-made Dust plugin and AI agents (Claude / Cursor) that write back to Figma via the plugin API and MCP. Both hit the same limitation: when a text node has mixed styles (different weights, sizes or colours within the same node), replacing the text flattens everything to a single style.

Is there a reliable way to preserve or restore mixed styles after replacing text content?

Would love to hear if others have found a workaround, or if this is just a current API constraint.

4 replies

Jaycee Lewis
Figmate

Hey ​@Ludivine Kasteleyn 👋 Happy Config week! Thank you for the great question. I’d love to dig in more and work on this together. I have a question for you: Are the mixed styles linked Text Styles, or raw character-range overrides?

Talk soon! — Jaycee


Ludivine Kasteleyn

Hey ​@Jaycee Lewis thanks for your reply and happy Config week! 

I’d say it’s related to raw character-range overrides. Whatever the setup (Claude/Cursor skill or Dust plugin), it never keeps bold or italic or bullet points for example.

Hope that helps you understand my issue :) 

Thanks again! Ludivine


Jaycee Lewis
Figmate

Hey ​@Ludivine Kasteleyn I hope you caught the livestream of the Config keynote. It was awesome 🤩 Thanks for the reply. That helps for sure. I have another question — When the translated text comes back, are you overwriting the whole node's text in one shot, or editing it segment by segment?

Thanks again! — Jaycee


Ludivine Kasteleyn

Hey ​@Jaycee Lewis not yet, will do shortly! But I already got a glimpse of it 👀

It overwrites in one shot yes. See part of the prompt in my screenshot. How could we make sure AI understand segments? I have two doubts:
- How can AI not embark the style from the first character only? (understand the notion of segments concretely without having to have each text style in a separate text layer)
- It’s not necessarily the same number of characters in French vs English or German for example. What if we have one word in bold in French and it should be two in German?

Thanks again for your help! Ludivine

Â