-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to obtain all textStyles in teamLibrary? #187
Comments
Hi @Dang-xiaorui - I don't believe this is currently possible with the Plugin API. I've shared the feedback with the team. Please feel free to share additional context about your specific use-case so that I can help provide that to the team for prioritization |
For typography, figma has the concept of Text Styles. I am currently developing a figma plugin that can replace the Text Styles of text nodes. For example, there is a text node that uses a local Text Style called "Small Text". I want to replace it with Text Style from teamLibrary, also known as "Small Text". Therefore, I need to retrieve all Text Styles from teamLibrary and find the Text Style named "Small Text" from it. So how can I obtain all textStyles and their detail information in teamLibrary? |
Thanks for sharing, @Dang-xiaorui. While this info isn't available via the Plugin API, you could make a REST API call to the GET team styles endpoint along with the importStyleByKeyAsync method to get that information. |
There is a node in the current file that uses local textStyle. I want to replace it with textStyle from teamLibrary.
At present, I can obtain all textStyles locally based on getLocalTextStylesSync(). So how can I obtain all textStyles and their detail information in teamLibrary?
The text was updated successfully, but these errors were encountered: