Hello, I have a Problem with styling individual Items. The following html Code: Loads fine. But when I Click the Component with "#icbp" then the class .ddm-flex-cols-element will get the style max-width. Setting this.el.style while rendering the Object is also Integrated to the CSS (Id only) the Docs tell changes to t...
artf
Can you please try to add this to your options avoidInlineStyle: true and let me know
3dmedium
Hi @artf , Yes I tried this, still no luck. I had the time to minimize this issue to a codesandbox: https://codesandbox.io/embed/jnplq7op55 Position of the protectedCss Content can be varied put it to style or in a file and load it by cvan...
artf
Ok, the problem happens here: https://github.com/artf/grapesjs/blob/e97afb429b4cada591e119025fcf34490cb0de8c/src/style_manager/index.js#L284-L285 if there is no CSS rule with the selector found on the component (in our case ddm-flex-cols-e...
Hi, have I modified my HTML using the toHTML function in traits. An HTML element is updated but the gjs-component is not updated still it shows the old code. my traits are but its shows older code like type="radio" is not stored in gjs-component after i loaded my saved screens before saving the screen after saved and...
artf
I barely understand you here... please provide a reproducible demo
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Thank you for the great open source project.I'm working on a web drag-and-drop site projectI have a requirement to drag the react component into the specified location sub-container of another component.A component may have several sub-containers in different locationsPrevious I use https://github.com/SortableJS/Sorta...
artf
About integrating react components start by reading this #170 You have to create your own render logic
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Firstly what a great tool you have here. I'm sorry if i ask questions that have been asked before. I have tried to read through the documentation and googled posts but am still a bit stuck. I am like a few people trying to integrate React components into grapesjs. https://github.com/artf/grapesjs/issues/170 mentions c...
rodenp
Fantastic work @beepsoft Integrating React properly into the core would be a great step and could make way for the support of other frameworks. This will raise the bar for grapesjs to another level.
artf
Really cool @beepsoft especially all the explanation of the processCould you please add a public API to be able to provide a custom HTML parser the same way as it is possible to provide a custom CSS parser? I'll see if I'll be able to add...
beepsoft
Hi, I created a poof of concept implementation/example of the integration of a React component as a GrapesJS block/component here: https://github.com/beepsoft/grapesjs-react-component-example Although "integrating with React" could mean ma...
Hi all, I want to create a socket for every button that I add to the canvas. This is working just fine. However, when I reload (using storage), I have to look for my components of type "Button" and reopen the sockets. Is it a way to loop over the components? Best,
artf
Hi @trafalmejo in case you need to iterate component's first level children you can do this: If you need to lookup ALL inner children, use onAll Once the component is rendered you can also make use of find method and pass any query selecto...
trafalmejo
Perfect! Highly appreciated.
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I've been reading the docs all day on creating a custom component. I've also looked at grapesjs-mjml for an example. I'm trying to create a base type for react components that can be extended as needed, but at the moment all I want to see is which lifecycle methods are called and when. I'm trying to work out the diffe...
artf
First of all, start using the improved definition of components. In your example, the content: (<div>Foo</div>), will be compiled to an object, and when you add an object/array of objects to the editor, it means you don't need the parsing...
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi there ! I am wondering if there is a way to force the dynamic class generation (of the form cXXXXX which happens when I drag'n'drop a component) at template import ? The problem is, when I use a template, the generated components in the editor don't have that dynamic class, which I need to be able to generate media...
artf
Hi Davy, if you need a class you can set it already in your template, if you need a dynamic one, probably you would make use of events like component:add or block:drag:stop
davydav
Thank you for your answer ! Is there anyway to access your method of class generation, or could you point me to where it is in your code ? I've been trying to find it but no luck ! Thanks again
artf
https://github.com/artf/grapesjs/blob/5fe64423b2a4c94f5b3cd9b7b8e1d887a8896ab0/src/dom_components/model/Components.js#L70-L87 As you see it's called on add, so you can actually disable it (forceClass option) and implement your own logic
is it possible ?, change the drag and drop event to on click when adding a new component, I want to add components by clicking the block then it will be added directly to the selected component, Thank's
artf
Not really, but I was already thinking about this possibility, so probably I'll add it in the next release. I'd ask what would you expect in case of your gif? On click, the block should be added inside the cell?
fmr411
Yes, I want when I click, the block is added to the cell, but can I know where the function handles the event to add the block?
In my opinion, this is two different ways of storing the same data,Now I have a need to convert gjs-components to gjs-html,Is there such a method? Looking forward to your reply, I wish the project better and better!
artf
Is there such a method? Not really, but actually it would be the same as initializing the editor with components (gjs-components) and then getting the code via editor.getHtml() (gjs-html)
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
https://github.com/artf/grapesjs/issues/1398#issuecomment-417954677 why i can't set any property ? i try to update dog's name into 'cat', but i can't make it. but followed your example code. both set({ name: 'cat' }) and set('name', 'cat'). the only reason i have to update properties' name is because i want to change...
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.