Issue #2415💬 AnsweredOpened November 15, 2019by sdrebel1 reactions

Editor is not defined: When I import grapejsjs in react

快速解答by artf1

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)

artfNovember 17, 2019

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

pouyamiralayiNovember 15, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.