GrapesJS Issues

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

3464 issues found

#3548June 18, 2021by tannguyen971 answer
0 reactions

BUG: 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

#3547June 17, 2021by japo321 answer
1 reactions

BUG: 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

#3546June 16, 2021by ankx061 answer
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

#3544June 15, 2021by maekawataiki1 answer
0 reactions

BUG: 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

#3541June 15, 2021by deiga2 answers
0 reactions

[QUESTION] 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

#3535June 14, 2021by vuongluc1 answer
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

#3534June 13, 2021by iabhiyaan3 answers
0 reactions

BUG: 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

#3531June 12, 2021by ola-8931 answer
0 reactions

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

#3529June 10, 2021by tmrowe123No answers
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...