PageKit — the self-hosted GrapesJS site builder, sold as source. Get early access

Grapesjs Script Editor
1 images

Grapesjs Script Editor

Free
GrapesJS:0.17.x0.18.x0.19.x0.20.x0.21.x
Download from GitHub

What's Included

  • Free to download & use
  • Open for personal & commercial use

Support The Creator

Use one-time or monthly support to thank the creator for this free product.

GrapesJS Compatible

Tested with GrapesJS 0.17.x, 0.18.x, 0.19.x, 0.20.x, 0.21.x

Open Source on GitHub

Free to use, fork, and contribute

Editor Compatible

Designed for the GrapesJS open-source editor

Free to Use

Open for personal and commercial projects

GrapesJS components can carry their own scripts, but there is no interface for writing one. This plugin adds it: select a component, open the script modal from its toolbar, and the code you write is bound to that element.

What it adds

An edit-script command and a component toolbar button that opens it. Scripts live on the component, so duplicating or moving the element carries its behaviour along with it.

Options

  • starter — the code the editor opens with. Defaults to let el = this, the reference to the component the script belongs to.
  • scriptTypesSupport — component types allowed to have scripts attached: default, wrapper, text, textnode, image, video and svg by default. Keep components that already define their own scripts out of this list.
  • onRun — runs when the syntax check passes.
  • onError — receives the error when it does not, so you can surface it in your own interface.
  • modalTitle, buttonLabel and toolbarIcon — the modal heading, save button label and toolbar icon.
  • codeViewOptions — options for the underlying code viewer.
  • commandAttachScript — extend the command itself.

Good to know

Register the plugin after your other components. Install as grapesjs-script-editor.

Ratings:

No reviews yet. Be the first to share your experience.


Share this item:
Last Update:Sep 8, 2026
Published:Jul 9, 2023
Versions:
0.17.x0.18.x0.19.x0.20.x0.21.x

Questions & Answers

No questions yet. Have something to ask?