I am using This works but only for blocks which are added/drag-dropped to the editor manually after it is initialized. If we supply components when we call grapesjs.init({..., components: [..]}), the components defined in components do not have the traits. How can we apply traits to initially loaded components too, no...
artf
currently there is a problem on storing custom types unless they are defined inside a plugin. Not a problem ๐ฌ, you just need to load custom types before the content and using plugins is the only wayI can't add all possible such elements a...
varadero
This is how it can be reproduced:Go to https://jsfiddle.net/nwsy6mv1/3/Open blocks and place "1 Column" blockClick inside the column and go to "Settings"You will see the drop-down trait with label "Trait label"At this time the grapesjs com...
pouyamiralayi
Hi @varadero please define your custom type as a plugin. cheers!
how can i remove the link, button blocks from the section components because there is a conflict between it and ckeditor toolbar, I can create a link from ckeditor so i want now to hide the link and button components from grapsjs.
Steps to reproduce:Select all text in a componentMove the componentSelect all text againMove the component againDeselect the component Expected result: Text remains Actual result: Text disappears Reproducible in a web page demo, version 0.15.9. See attached screencast:
Hello, I've been looking to completely disable the badges that appear on hover, but I can only seem to disable it fro the wrapper with the following code: domComponents: { wrapper: {badgable: false} }, Is there a similar way to completely disable them? Thanks in advance!
fredrickreuben
You can use canvas: { customSpots: { hover: true }, },
artf
Probably in your case the easiest solution would be to hide it via CSS
The main problem that i have is I'm trying to do a resize in a component that I made, but if I have Two Components equals, when I do the resize one of them the other do the same resize. So, I think that I would need manage the style of them by id and not by class. This is my code: const buttonComponent = { name: "butt...
pouyamiralayi
@ramusesan @edwinjoel1984 your issues is because of the shared selectors. similar issue here. for the solution i suggest this thread. cheers!
edwinjoel1984
@artf this is the problem
ramusesan
even i am facing the same issue its probably issue with precedence, assume incase i have an id and class for the same element i.e <table id="myId" class="myClass"> ..... </table> and trying to resize a table then styles are applying on .my...
How do I make the styles of the components I take them by id and not by class
artf
You can toggle classes, this will change the style selector
edwinjoel1984
The main problem that i have is I'm trying to do a resize in a component that I made, but if I have Two Components equals, when I do the resize one of them the other do the same resize. So, I think that I would need manage the style of the...
This is a broad question, so I will provide the use case and some ideas instead of actual code.Basic description We are using grapesjs as part of a Drupal module (https://github.com/artf/grapesjs/issues/1798#issuecomment-559498604) and we are facing an issue with having too many html elements within the grapes contain...
pvbergen
Huh, that would be surprisingly simple. Thanks! I'll test it out in the next few days and see how we can integrate it with our workflow.
artf
Do you mean something like this? This will add an HTML without being actually related to GrapesJS Components
Hello @artf , I have a question about the grapes editor that I can not find in the documentation, so I hope you have an answer. Basic setup: The configuration of all components is set with the init this.editor = grapesjs.init(defaultConfiguration); The components from an earlier saved json are added with setComponents...
artf
Can the editor pick up on the new component config without having to add a new component to the canvas manually? Not really, if you store the component definition in one way, the editor will load that definition. One only thing I can sugge...
Hovius
Thanks for your response! I'm going to use avoidDefaults: true and make it work :)
Components are not dropped to the exact position if dragmode set to absolute and there is a zoom value applied on the canvas. GrapesJS version:0.15.8 The issue can be reproduced in the demo as well: https://jsfiddle.net/y8m1x4a3/ Expected behavior: Components can be dropped to the cursor position even if the dragmode...
artf
Should be fixed in this branch https://github.com/artf/grapesjs/tree/multi-frame Multi framing is still far from being complete but I hope to merge soon that branch (big canvas refactoring but without breaking changes), definitely not for...
artf
I close this issue as I'm planning to solve all ones related to absolute positioning here: https://github.com/artf/grapesjs/issues/3770