thanhtunguet / grapesjs-react

A React wrapper for GrapesJS library
https://thanhtunguet.github.io/grapesjs-react
194 stars 58 forks source link

Drag/Drop in Editor instantiated with grapesjs-mjml plugin not working #26

Closed sahsharm closed 4 years ago

sahsharm commented 4 years ago

Hi, Drag and Drop of any MJML block on the canvas fails with the following warning:- Target collection not found, Target is not droppable, accepts [undefined], Component not draggable, acceptable by [undefined]

sahsharm commented 4 years ago

Hi Team, Can anybody please respond ? Thanks, Sahil

thanhtunguet commented 4 years ago

Hi @sahsharm , please read the official documentation of grapesjs and config your editor by passing onInit function prop

sahsharm commented 4 years ago

Hi @thanhtunguet, thank you for replying.

This is what I have been trying to do. Not sure where I am going wrong.

import React from 'react'; import './App.css'; import {Editor} from 'grapesjs-react'; function App() { return ( <Editor plugins={["grapesjs-mjml"]}/> ); } export default App;

Index.html grapejs dependencies

sahsharm commented 4 years ago

Drag and Drop in default editor without the plugins property works fine.

thanhtunguet commented 4 years ago

Drag and Drop in default editor without the plugins property works fine.

Did you passed both plugins mjml as a string and presetType? It may caused that error

sahsharm commented 4 years ago

No, I just passed the plugins, it will be really helpful if you can paste the recommended configuration here.

sahsharm commented 4 years ago

Hi @thanhtunguet , if you could please help in resolving this.

thanhtunguet commented 4 years ago

@sahsharm Can you help me solving this? I am a little bit busy and do not have time to solve issues of this package

thanhtunguet commented 4 years ago

@sahsharm Have you try this:

<Editor presetType="mjml" />
buzztnt commented 3 years ago

@sahsharm did you ever find a solution to this ?