Setting Vertical Trim of Text Node

I’m developing a plugin that includes functionality to create a text node with content. I’m trying to set the text node’s vertical alignment to ‘cap height to baseline,’ but I’m having trouble achieving this.

text.textCase = "TITLE";
text.textAlignVertical = "TOP";
text.textAutoResize = "WIDTH_AND_HEIGHT";
text.textLineHeight = "CAP_HEIGHT";

The other ones work fine – but not the Vertical Trim. Thoughts?

Where did you get this property? It doesn’t exist in the Plugin API, and you should have seen an error in the console.

Instead of accessing a non-existent property, access the leadingTrim.

Please read the developer documentation: