Issue #1899💬 AnsweredOpened March 17, 2019by prgmono20181 reactions

React with GrapeJS- without plugin

快速解答by simplecommerce1

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 In componentDidMount Something like that, normally it should work.

Read full answer below ↓

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, 2019

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, 2019

Nothing to add beyond what already said by @simplecommerce

lock[bot]March 22, 2020

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

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.