Issue #1899Opened March 17, 2019by prgmono20181 reactions

React with GrapeJS- without plugin

Question

Hi, How can I use grapesjs with react? I don't want to use the plugin- I have made some changes and I want to use the editor with react and other pages. how can I do it?

Thanks you vaety much!

Answers (3)

simplecommerceMarch 17, 20191 reactions

Not sure what you mean by without plugin.

But if you are talking about just the GrapesJS instance, you just need to initialize it in componentDidMount.

So for example:

In your render

render() {
  return <div id="gjs"></div>
}

In componentDidMount

const editor = grapesjs.init({
  // Indicate where to init the editor. You can also pass an HTMLElement
  container: '#gjs',
});

Something like that, normally it should work.

artfMarch 23, 20190 reactions

Nothing to add beyond what already said by @simplecommerce

lock[bot]March 22, 20200 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.