GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2480December 30, 2019by ackvf1 answer
1 reactions

[Suggestion]: Use a shim function for components that use script function (not string)

The current approach that converts a component's script to text before placing it in the document is rather limiting. Wouldn't it be possible to use an approach like this, so that the scope is retained? Put the function in window and use a shim function in the component instead. original code: follows my suggestion: f...

artf

Wouldn't it be possible to use an approach like this, so that the scope is retained? No, because you're trying to mix the scope of the editor environment with the one which will be deployed to the final user (which has nothing to do with t...

#2478December 29, 2019by obrazkow3 answers
0 reactions

Error when trying to move cell from row

If try move cell from table on body then appears error Also error appears on grapesjs demo https://grapesjs.com/demo-newsletter-editor.html

obrazkow

Problem in Sorter. function dimsFromTarget return empty array, when target element not in draggable list see https://github.com/artf/grapesjs/blob/dev/src/utils/Sorter.js#L644(not found target) https://github.com/artf/grapesjs/blob/dev/src...

artf

Can you tell me exactly how to reproduce the error because I don't see any error by dragging off the cell

obrazkow

First error.Select cell wrapper(see on screenshot) and try drag itIn console will appear errors For more details i attach link on two video files. When i tried to reproduce, i found another bug. Try select first component for example text...

#2477December 28, 2019by bumpradar2 answers
1 reactions

Broken Import when trying to use GEditor

× Unhandled Rejection (Error): Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. import React from 'react...

pouyamiralayi

@bumpradar this issue must be posted here: grapesjs-react cheers!

Ace0611

Hi, I am getting this error while trying to import GEditor from grapesjs-react (import GEditor from 'grapesjs-react';): Error: 'grapesjs-react' does not contain a default export (imported as 'GEditor'). Has anyone resolved this issue?

#2476December 27, 2019by obrazkow1 answer
0 reactions

How remove color picker element from DOM tree

When dynamically add sectors with property type of color and following remove it(sector), color picker element not remove from DOM tree. How can i detach it, i worry about memory leaks if i will delete it manually. I mean element After initialize multiple time property with type color i have in dom tree Or maybe exist...

artf

At the moment I don't see any other way to remove it if not manually

#2473December 26, 2019by ramusesan3 answers
3 reactions

Drag and drop issue in dragMode of translate

there is an issue am facing (seems offset issue) while trying and hold and drag the toolbar's move icon i have added bootstrap and columns (col-sm-2 & col-sm-10) then trying to hold the targeted component and dragging its working fine. but it doesn't work properly when I try to drag the component by holding move icon...

MartinPutz

@ramusesan might be related to this issue: #2423 hopefully the refactored canvas will solve these issues As @artf suggested on that issue you could try this branch: https://github.com/artf/grapesjs/tree/multi-frame

pouyamiralayi

hi @ramusesan here is the PR. cheers!

ramusesan

thank you guys @MartinPutz @pouyamiralayi

#2472December 26, 2019by imranali20452 answers
0 reactions

DragData extend for other components like div etc

Hi @artf How to implement dragData event for custom components(external).I called dragData method on div drag but dataTransfer and content has no information of current drag component.Please help me its urgent thanks. this._editor.on('canvas:dragdata', (dataTransfer, content) => { console.log('dataTransfer', dataTrans...

artf

canvas:dragdata is meant to be used to enrich the Native D&D support. If for example, you drag into the canvas a video from your desktop and want the editor to understand it correctly, you would do something like this

manuel-84

have you managed to do this? i have problems with dropped text with mjml plugin enabled, it should create a mj-text element, instead it's creating a div

#2470December 25, 2019by kzdev4201 answer
1 reactions

Mobile device view is not working well.

This is for Desktop This is for Mobile Please teach me how to solve it.

devmohitagarwal

@Excellent-Developer what exactly is the problem in the UI? If you're suggesting that the button for the device selection don't have the resolutions you need,then you can change that from the config file inside editor forlder. If you're su...

#2469December 24, 2019by simplecommerce2 answers
1 reactions

[BUG] Adding buttons to RTE toolbar in React App causes buttons to be duplicated.

Are you using the latest release (older versions are NOT supported)? YES, 0.15.9Are you facing the bug with your local copy of GrapesJS or with the current demo?Local copyAre you able to reproduce the bug from the demo?No, not React app.What is the expected behavior?Toolbar buttons should only be added once on load of...

artf

Ok, seems like we don't clear the RTE instance in the destroy method... I'll fix it for the next release

simplecommerce

For now, I have to do rte.remove before my rte.add so it doesn't duplicate.

#2467December 23, 2019by jcamejo2 answers
0 reactions

[ISSUE] [SOLUTION PROPOSAL] Color picker remains open if the click happens on the canvas

Hi @artf, i hope you are doing good. I'm seeing some issues around the color picker, if one is open and afterwards a click is made on the canvas, the color picker will not close even if the option clickoutFiresChange of the plugin is set to true, this is because the event propagation is taken by the iframe of the canv...

artf

The PR would be great 👍

NorthstarTech

@artf @jcamejo any update on this?

#2466December 23, 2019by kzdev4201 answer
0 reactions

How to use grapesjs to Ruby on Rails 6 app?

I am going to use this in Rails 6 app. https://grapesjs.com/docs/getting-started.html#import-the-library I developed under this guide. But, It is not like a guide. I think CSS is not working well. My result Guide result. I will appreciate it if you kindly teach me how to use this on Rails 6.

artf

GrapesJS has nothing to do with your back-end stack and seems like you just didn't use the CSS in examples, eg: