GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

545 issues found

πŸ” typescript
#3507Jun 1, 2021by cedriclajato2 answers
0 reactions

No Generated ID and No auto select ID

Hi Guys, I am using grapesjs-blocks-bootstrap4 and I check how they component it's looks fine. But when you select block like container it targets the class instead of Unique ID. I was able to setup random ID using this model.set('attributes', { id: randomID() }); but still when you select the block it targets the cla...

artf

https://github.com/artf/grapesjs/issues/2936#issuecomment-680322089

GJSBlock

Thanks for reporting this, @cedriclajato. Thanks for sharing your report about No Generated ID and No auto select ID. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Y...

#3504May 31, 2021by snowballrandom2 answers
0 reactions

I noticed that an earlier version of font awesome version 4.7 is being used.

I noticed that an earlier version of font awesome version 4.7 is being used. I use version 5.2 of fontawesome and it seems to cause issues when loaded alongside the version used with Grapes JS some of the fonts are not loading or class names have changed in the new fontawesome character set. How can I use the newer ve...

artf

You can change this option on init: https://github.com/artf/grapesjs/blob/88249c38577852dc3c42047356a70a12066ee6ca/src/editor/config/config.js#L165-L168

GJSBlock

Thanks for reporting this, @snowballrandom. Great question about *. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listen...

#3500May 28, 2021by vijayshukla302 answers
0 reactions

Remove custom trait by its type.

I have created a custom trait but the name of that trait will be dynamic which is unknown. The problem is that the current removeTrait() only works with name/id. But what if I want to remove all traits from the component with custom-trait. Ex: I create a trait 'my-custom-trait' and bind it to the component. component....

artf

You can use of the ID

GJSBlock

Thanks for reporting this, @vijayshukla30. Thanks for sharing your report about Remove custom trait by its type.. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your...

#3497May 28, 2021by mosh-tudor2 answers
1 reactions

Button trait command doesn't work

Version: LatestDescribe the bug detailed https://jsfiddle.net/cleaver/wgz2jsvq/2/ Nothing happens on: --- On version 0.16.45 the same code worked fine: https://jsfiddle.net/cleaver/kenvpt50/1/

artf

Thanks for the report @tudor-ooo will be fixed in the next release

GJSBlock

Thanks for reporting this, @mosh-tudor. The issue with Button trait command doesn't work appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overla...

#3496May 28, 2021by anlumo4 answers
1 reactions

Mark Component as Dirty

What are you trying to add to GrapesJS? Component should be able to mark themselves as dirty, triggering the onbeforeunload warning message. Describe your feature request detailed I have a (custom) text component where the user can enter arbitrary text. I'm storing the data on my server, and I want autosave. However,...

anlumo

I worked around this by completely disabling the onbeforeunload handling and rolling my own.

artf

The editor has editing property which changes any time RTE is enabled/disabled, so I guess, in your case, this should work

anlumo

Wouldn't this onbeforeunload handler be overwritten afterwards by the snippet I referenced above?

#3490May 27, 2021by samichamoun2 answers
0 reactions

Large images make area of content editor unreachable

Hi, If you for example add a 3 column block to a page, and try dragging a very wide image into each column, the content stretches and the overflow is hidden. How do we either add a vertical scrollbar or force the editor to limit the viewable size of images when dragged in. Currently if the content goes outside that ar...

artf

This is more a layout issue that you can easily fix by adding your CSS to all images, eg. img { max-width: 100%; }

GJSBlock

Thanks for reporting this, @samichamoun. Great question about Large images make area of content editor unreachable. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for you...

#3489May 27, 2021by samichamoun1 answer
0 reactions

Large images push out column width in editor view

Just as a preface, the issue I'm describing does not affect the output of content generated by the editor, it is just when looking at the content within the editor. Let's say I create two columns on the editor. Both are 50% width each. If I drag a large image into one of these cells, it pushes the width of the cell ou...

GJSBlock

Thanks for reporting this, @samichamoun. Great question about Large images push out column width in editor view. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your s...

#3485May 26, 2021by ahmedderkaoui1 answer
0 reactions

Element injected as HTML to canvas doesn't behave as a component

Consider a simple block: When dragged to canvas, this component can be selected and it's possible to modify its settings. Now, i'm doing this, to add the same input in a card: $(someElement).find(".card").html('<input type="text"/>'); The input is added successfully but doesn't behave as it did before. It can't be sel...

GJSBlock

Thanks for reporting this, @ahmedderkaoui. Great question about Element injected as HTML to canvas doesn't behave as a component. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS doc...

#3483May 25, 2021by Palash-Mandal2 answers
0 reactions

Hello @artf ,

Hello @artf , Many Many Thanks for previous help. I am fresher in development. Please help me with below I need a modal where I will get user input Like Block Name, Category, HTML, CSS, JS then click on save to store that as new block manager. Mean how to pass those data and store them as dragabe component I have made...

artf

Please follow the issue template

GJSBlock

Thanks for reporting this, @Palash-Mandal. Great question about *. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event lis...

#3482May 25, 2021by Palash-Mandal4 answers
0 reactions

Runtime updated traits not EDIT mode.

Hello @artf I having issue with a traits. When I drag and drop the block to canvas it's traits showing fine in under settings section. but when I saved and edit the in 2nd time and selected that tag in canvas that traits is now populating in setting Section. Please Please Please HELP!. `// Custom Heading Component blo...

artf

Are you defining your custom component in a plugin?

Palash-Mandal

Are you defining your custom component in a plugin? No. Just Add in init function editor = grapesjs.init({ const dc = editor.DomComponents; // Custom Heading Component blockManager.add('header', { label: 'Headings', category: 'Components',...

artf

The first rule of defining new component types is to place the code inside a plugin. From docs

Browse all topics