Version 1, Update 42
New:
- Added
node.getStyledTextSegmentsfor text nodes to make it much faster and easier to get text properties which may have mixed values, along with which characters these values apply to. Compared to retrieving text properties character-by-character, this new function can be 10x to 500x faster. - Drop events in
figma.onare now officially supported (was previously a proposed API). This new API allows you to register a callback for drop events, which will trigger when objects outside Figma (such as elements from other browser windows, or files from the local filesystem) are dropped onto the canvas. - Added
prototypeBackgroundsproperty to PageNode for configuring the background color of the prototype. - Added
figma.getFileThumbnailNode()andfigma.setFileThumbnailNodeAsync(node)to get and set the thumbnail node for the current file. - Added
figma.base64Encodeandfigma.base64Decodeto convert between base64-encoded strings andUint8Arrays