Plugin Preview
About this plugin
JavaScriptをFigma上で実行できるプラグインです。
ユーティリティー系の外部アプリと組み合わせることで、Figmaのさまざまな操作をショートカットキーでカスタマイズすることを目的に作成しました。
※以前はexecCommandを使用していましたが、アップデートで利用できなくなりました。Clipboard APIもFigmaは対応していないため、仕方なくペーストまで外部アプリ側で行う方針に変更しています。
想定しているユーティリティー系アプリはKeyboard Maestroです。
- Keyboard Maestroで、クリップボードにFigmaを操作するJavaScriptをセットする
- あらかじめプラグインを保存しておき、Keyboard MaestroでFigmaメニューバーの[プラグイン]→[保存済みプラグイン]→[DoJavaScript]→[コード入力画面]を選択する
- JavaScriptコードをペーストする
- command + enterを押してコードを実行する
- 実行が終わったらKeyboard Maestroでセットしたクリップボードは破棄する
Keyboard Maestroでこれら一連の操作をまとめたマクロにショートカットキーを設定すれば、好きなショートカットキーで任意のJavaScriptをFigma上で実行できるようになります。
■使用イメージ
下記投稿のようなFigma APIの実行を好きなショートカットキーで実行できるようになります。
https://twitter.com/31mskz10/status/1684541017561903104
これは下記のFigma APIを使ったJavaScriptをKeyboard Maestroでコピーし、プラグインを実行して実現しています。
const selection = figma.currentPage.selection.slice()
for (let node of selection) {
node.resize(200, 300)
}
Plugin Details
Version | 2 |
---|---|
Created | August 3, 2023 |
Last Updated | July 20, 2025 |
Category | design-tools-other |
Creator | 31mskz10 |
Stats | 15 installs, 0 likes |
Pricing | Free |
Technical Details
- API:1.0.0
- UI:ui.html
- main:code.js
- Document Access:dynamic-page
- Editor Types:figma
- Allowed Domains:
- none
More Like This
Discover other plugins in the design-tools-other category.