Editor is not defined: When I import grapejsjs in react
I'm not getting this issue when I downloaded the package from dev version. The issue with the not defined editor is fixed in dev and will be released in the next versionIf set using window.editor it works, but is there any alternative way or fix? No, for now, the only solution is to have editor globally available
Read full answer below ↓Question
Hi @artf ,
I'm importing grapesjs in React and getting the error editor not defined when we add dragMode in the configuration. I'm not getting this issue when I downloaded the package from dev version.
Version is 0.15.8
If set using window.editor it works, but is there any alternative way or fix?
Answers (2)
I'm not getting this issue when I downloaded the package from dev version.
The issue with the not defined editor is fixed in dev and will be released in the next version
If set using window.editor it works, but is there any alternative way or fix?
No, for now, the only solution is to have editor globally available
Hi @sdrebel this project is a good reference on how to use grapesjs inside react. cheers!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3233
Set Toolbar on every Component
Hi @artf Is there any standard way to add a new toolbar on every component I've tried this way When I run this code on the browser console...
Issue #1337
[Question] Loading from package in TypeScript giving undefined error.
Similar to issue #902 but I can't seem to resolve with the steps taken in that discussion. I'm using the latest version of Angular, Webpack...
Issue #599
Set Device Height along with Device Width
Hi I want to add new devices with both width and height, Is there any way I can do this? An other issue is that when I give width of device...
Issue #1307
Question: To stop dynamically generated classes in grapes Editor
Hi @artf is there any Way to stop dynamically generating classes on reloading editor. let say when i add my custom class i.e "my_class" to...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.