createShapeWithText : by default it's always a circle?

How to get the current shape type of the palette ?

// Get the shape type of the selected ShapeWithTextNode
figma.currentPage.selection[0].shapeType;

// Create a new ShapeWithTextNode with the specified shape type
figma.createShapeWithText().shapeType = 'TRIANGLE_DOWN'

That I know :wink: My question is how to get the DEFAULT shape type that is the same as the PALETTE.

What do you mean by “palette”?

I mean this for example Diamond

Thanks for the screenshot. Now I understand what you meant.

The Plugin API doesn’t have access to the toolbar, so it is not possible to get/set the current tool and/or its type.

1 Like