Turn FigJam into a collaborative JavaScript canvas
Turn FigJam into a collaborative JavaScript canvas
Could be used for:
Found a creative use for this widget? Tell me about it on Twitter (@colebemis)
https://www.figma.com/community/widget/1034005547769330556
Every live code block has access to the following variables:
Name | Type | Description |
---|---|---|
fetch() |
function |
MDN docs |
fetchJson() |
function |
A convenient wrapper around fetch() specifically for fetching JSON data |
Math |
object |
MDN docs |
Array |
object |
MDN docs |
Object |
object |
MDN docs |
Clone the repository
git clone https://github.com/colebemis/figjam-javascript-repl.git
cd figjam-javascript-repl
Install the dependencies
yarn
Run local development scripts
yarn start
Open the Figma desktop app
Inside a FigJam file, go to Menu > Widgets > Development > Import widget from manifest...
Select /path/to/figjam-javascript-repl/manifest.json
Add the widget to the canvas by selecting Menu > Widgets > Developement > JavaScript REPL
or search for JavaScript REPL
in the quick actions bar (⌘ /
)