GrapesJS Issues

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

3,464 issues found

#3548Jun 18, 2021by tannguyen972 answers
0 reactions

Cann't copy with "control + C" when elements have attribute tabindex = -1

Hi everyone! i have a problem with custom component. i was created a modal component have attribute tabindex = -1 and i can't use key Ctrl + C to copy this component. Pls helps me. thanks very much !!!

artf

Just remove that attribute in your component view (eg. in onRender method) in that way you'll still get the attribute in your final HTML

GJSBlock

Thanks for reporting this, @tannguyen97. Thanks for sharing your report about cann't copy with "control + C" when elements have attribute tabindex = -1. To help the team investigate and prioritize this: Please provide: A minimal reproducib...

#3547Jun 17, 2021by japo322 answers
1 reactions

Dragging multiple blocks reverses the order

Version: 0.17.4 Are you able to reproduce the bug from the demo? YES What is the expected behavior? When dragging the blocks, the order should be preserved. What is the current behavior? When dragging to the top or above the set of blocks, it goes in one order. When dragging to the bottom or below the set of blocks, i...

lexoyo

Hello I'm trying to fix this bug This is more of an exercise for me to dive in grapesjs code, let me know if I'm loosing my time or if it sounds useful

GJSBlock

Thanks for reporting this, @japo32. The issue with Dragging multiple blocks reverses the order appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications...

#3546Jun 16, 2021by ankx062 answers
0 reactions

How can I add the custom left toolbar for Image component similar to text

We want to add a custom toolbar to the image component to be shown at left side (similar to what we show for text component). Please let me know how can I do this. We want to add different custom toolbar for custom components too.

artf

Check the toolbar property in Components API reference and try to search for something related in Issues

GJSBlock

Thanks for reporting this, @ankx06. Great question about How can I add the custom left toolbar for Image component similar to text. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS doc...

#3544Jun 15, 2021by maekawataiki2 answers
0 reactions

Trait Button Command not working on 0.17.4

Version:0.17.4 The trait with type button does not call command on 0.17.4 which is used to work before 0.17.3.Expected Behaviour Clicking button invoke command defined in trait.What is happening Clicking button does nothingjsfiddle example Command working on 0.17.3 -> https://jsfiddle.net/7pmz4u1v/3/ Command not worki...

mosh-tudor

@maekawataiki This is fixed, but not yet released - https://github.com/artf/grapesjs/issues/3497

GJSBlock

Thanks for reporting this, @maekawataiki. Great question about Trait Button Command not working on 0.17.4. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specifi...

#3541Jun 15, 2021by deiga3 answers
0 reactions

What is the idiomatic way to append and remove classes from components?

Hey there πŸ‘‹ Love the editor! We're using traits to modify what classes a component has, but that feels a bit hacky as you have to redeclare ALL classnames for each trait selection Here a simple example: Each trait option has to have all the classes defined, because otherwise it will remove any existing classes. This...

krishnaeverestengineering

@deiga we are doing something like this.

artf

I'd attach the trait to some component property instead of the class attribute, and based on the value I'd use properly removeClass and addClass

GJSBlock

Thanks for reporting this, @deiga. Great question about [QUESTION] What is the idiomatic way to append and remove classes from components?. The recommended approach with Components is to use the event-driven API. Start here: Check the Grap...

#3535Jun 14, 2021by vuongluc2 answers
0 reactions

Grapesjs lory slider

I am using the plugin grapesjs-blocks-bootstrap4 and integrated grapesjs-lory-slider it works the first time I use it but when I load it from the database it loses the slider feature . Where am I doing wrong? When pulled in, it still works normally This is when I load them from the database and they turn into box this...

artf

Hi @vuongluc yeah, it might be a problem loading back html/css in that way for editing. You should store and load back JSON data, check out this guide

GJSBlock

Thanks for reporting this, @vuongluc. Great suggestion about grapesjs lory slider! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: L...

#3534Jun 13, 2021by iabhiyaan4 answers
0 reactions

Npm run build error

npm run build gives error @version 0.17.3../../lib/codemirror in ./src/editor/dist/grapes.min.js../css/css in ./src/editor/dist/grapes.min.js../javascript/javascript in ./src/editor/dist/grapes.min.js../xml/xml in ./src/editor/dist/grapes.min.js

artf

Give us more details about your build and the error

iabhiyaan

iabhiyaan

npm run build:css works fine. But npm run build gives those errors

#3531Jun 12, 2021by ola-8932 answers
0 reactions

JSON Object model of the page generated

I need to generate the JSON object model of the page designed instead of generating the HTML, CSS, and js code, is there a function that returns the JSON object of the page designed? Also, I'm implementing the UI builder in angular so the typescript version will be preferred.

artf

I'd highly recommend reading the documentation pages like Components and Storage Manager where all these parts are covered.

GJSBlock

Thanks for reporting this, @ola-893. Great question about FEAT: JSON Object model of the page generated. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your speci...

#3529Jun 10, 2021by tmrowe1231 answer
0 reactions

Trying to add onClick attribute to component

Hello, Fairly new to this great project but I am trying to change the display of a component onClick of another component after the component id is selected from the dropMenu. I'm having trouble trying to add an onClick attribute to the component after selection from a dropMenu trait. I can't seem to access the value...

GJSBlock

Thanks for reporting this, @tmrowe123. Thanks for sharing your report about Trying to add onClick attribute to component. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddl...

Browse all topics