I’m developing a Figma plugin that pastes frames onto the canvas using the Plugin API. The frames are structured in JSON format and include nested auto-layout frames with text layers inside them. These text layers are set to “hug” content with specified max-height and max-width properties.
When pasting the frames, all elements are translated and positioned correctly. The text layers are nested within the auto-layout frames and have the layout value set to “hug.” However, the max-width and max-height properties are not being applied as expected.
The Figma app console displays the following error:
“Error applying maxHeight: Error: in set_maxHeight: Can only set maxHeight on auto layout nodes and their children.”
Has anyone else encountered similar issues or found a solution to this? Could this be a bug or a limitation within the Plugin API?