When I enter the editor and use setComponents or addComponents to add components in the store, the first class of the first element will be added to the class of a certain element inexplicably. Does anyone know the reason? I need help! ! !
sizhousama
@artf
artf
That class is coming from your app so there could be thousands of reasons, we can't help you just by looking at 2 screenshots. If you think there is a bug, open the issue correctly (by following the template) and create a reproducible demo.
GJSBlock
Thanks for reporting this, @sizhousama. Great question about Editor's strange behavior!. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look fo...
I would like to create a custom component with a property that will be updated by specific code, but I don't want this property to be visible and updatable as a trait; let say my property is called "ebTesto", I wrote a plugin function like that: I expected to find my new property in the "gjs-components" part of the st...
ltenti-eventboost
Thank you both!
Ju99ernaut
I think it's not stored since the property hasn't been changed from the default. The editor should be able to recover the property from the component definition itself.
What are you trying to add to GrapesJS? Add support for CSS Grid (display: grid;) and its various options. I have no immediate personal need for this, but I figured it should be tracked.
Ju99ernaut
This plugin has a css grid layout tool https://github.com/Ju99ernaut/grapesjs-plugin-toolbox https://user-images.githubusercontent.com/48953676/115495409-d98a9000-a267-11eb-923a-b6f86cbefc99.mp4
artf
@Ju99ernaut amazing plugin
GJSBlock
Thanks for reporting this, @rattrayalex. Great suggestion about FEAT: CSS Grid! 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: List...
WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdDo a quick SEARCH first, to see if someone else didn't open the same issueAll relative statements/questions have to be filled/answered, otherwise, th...
artf
Hi @chrisijoyah did you try using canvas:dragdata? Here an example of usage https://jsfiddle.net/artur_arseniev/87rcb24n/
chrisijoyah
Hi @chrisijoyah did you try using canvas:dragdata? Here an example of usage https://jsfiddle.net/artur_arseniev/87rcb24n/ Does this mean I can prevent the dropped model from being added to the Canvas. Ideally I want to carry out some check...
artf
Can I do something like result.content= '' Yeah, you should be able to do that with that trick. Can you tell me more about your use case, what kind of check are you trying to perform?
When we style an element in the editor, if this element doesn't have neither a class or an id, the style manager generate a new id with the css style. However, styling an element with a class makes the style manager use this class to add styles. Is there a way to always use IDs for styling and not work with classes ?...
Ju99ernaut
ahmedderkaoui
Thanks a lot!
GJSBlock
Thanks for reporting this, @ahmedderkaoui. Great question about Can style manager always generate IDs instead of using already defined element's class ?. The recommended approach with StyleManager is to use the event-driven API. Start here...
So first of all, thank you @artf for this amazing project. I have a question: Is it possible to easily convert the components-JSON to HTML on the server-side (in a Node.js environment)? If it is possible, can you give me a hint how to achieve this? On the client-side it's quite straightforward: I can get the component...
bgrand-ch
Hello, For future questions or technical issues, which aren't bugs, GitHub's Discussions tab is the place to be. Don't forget to close this issue if it is resolved or write a new detailed message in Discussions -> Q&A category (and close t...
anlumo
Yes, if you have any kind of interactive content, that probably wouldn't work. Fortunately that's not the case for my application.
Ju99ernaut
Maybe you could install grapesjs server-side(similar to client-side) and use it for rendering, otherwise you'll have to reverse engineer the renderer. Another alternative would be to store the generated HTML in the database as well.
Version:0.16.45 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? Given a parent web component instance rendering some elements with slot, in the shadowDOM, if the parent element of slot got display: flex style, the sorter should be vertical, for in the result the elements ar...
GJSBlock
Thanks for reporting this, @YumiChen. The issue with sorter direction incorrect with web component slot appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modif...
Version:0.16.45 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? Given a parent element with display: flex and flex-direction: column styles, with the child elements having float: left styles, the sorter should be horizontal, for in the result the elements are aligned vertic...
GJSBlock
Thanks for reporting this, @YumiChen. The issue with flex-direction: column & float: left make sorter direction incorrect appears to be a race condition or state management timing problem. This typically happens when component lifecycle ev...
Hi @artf Please have a look to the attached video. I've checked the mobile view and observed that mobile view is different as compared to editor-mobile view. Any thoughts on this? or It's supposed to be work like this way Screen Recording 2021-04-09 at 2.55.45 PM.zip
Abhisheknanda1344463
It's fixed. Closing the issue.
GJSBlock
Thanks for reporting this, @Abhisheknanda1344463. Great question about Observation -: Inconsistent Mobile view. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your sp...
I have a requirement where I cannot use selectors to determine if an element is droppable. For example: The "child" component must be within a "parent" component, however if the child component contains a ref attribute it can only be dragged into other parent containers that match the same ref value as the current par...
@artf do have any questions regarding this feature or the approach taken in the PR?
GJSBlock
Thanks for reporting this, @rywilson28. Great suggestion about FEAT: Allow dynamic droppable configuration using a function! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using t...