I have problem loading stored remote content into the editor when the JSON contains non empty gjs-components My JSON data looks like this which is very basic blockquote with a sentence of text Example response when calling my remote endpoint I am able to load the content if I set gjs-components: "" and it will load th...
artf
There is actually might be a bug, can you try to return gjs-components as a string (so try to json encode your array)
artf
Thanks @iainheng, for now, keep it like this until the next release (hope to push it the next week)
iainheng
@artf Thanks for your help. π It is a bug indeed. I store the gjs-components as a string and it is working now. π This is the same data store as string
Hi, I'm wondering if there is the possibility to define properties for specific components. I mean, when I select the component Image I would like that in the style manager panel the section relative to the Typography is not shown; in the same way, when I select a Table component I would like to see in the style manag...
juanj
I'm not sure if this is the optimal way of doing it but you can listen to the event component:selected and if the component selected is the one you want you can add a new sector. Then you need to listen to the event component:deselected an...
artf
Actually, you can also rely on a few Component's properties made exactly for this purpose:stylable - True if it's possible to style the component. You can also indicate an array of CSS properties which is possible to style, eg. ['color', '...
artf
@peakrams the warning is actually there but the Github's Markdown doesn't let you apply custom styles to make it more visible Β―\\\(γ)\/Β―
I'm testing the editor on a particular template with Boostrap 4 using flex, but I realized that some paragraphs do not show the badge correctly, I'm going to put here the demo https://jsfiddle.net/kf5n9sdq/31/, I've given myself that if I delete the main image if you can select, but I do not really understand what hap...
juanj
It looks like it have something to do with the scroll. If you scroll, the blue selection box shows where the paragraph was at the start. I don't think it have anything to do with the image. Even if you delete the image and scroll you get t...
chiqui3d
Great observation mate, it was that, the problem came from the body that had the overflow: hidden; Thanks very much @juanj
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.
@artf how can we set some configuration so that while importing html in editor it will not consider some element as text component and it should consider as inside text of the parent. eg.. <p> here is some example text.<span> Do not make it as text component </span> Example text 2 </p> I don't want to make span as tex...
artf
Extend the text component type and implement your logic in isComponent. If the element meets your conditions (you would probably check for inner elements) just return the object in this way
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.
@Arif How can we validate the properties for the grapejs element like background color We have given an option for manual background entry as well as color picker . If user did not add valid css then style break and preview page is not working properly. Any help would be appreciated.
artf
There is no built-in functionality for such a thing but keep in mind that once you render the style manager, all the elements, even when not visible, are still reachable via DOM, so you can add your validation logic post render
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 have a custom component with a checkbox trait 'show-name'. When the trait value is 'true', the component renders in the view to the attribute show-name="true", whereas the model only has "show-name" and renders to "show-name" via getHtml(). How can I get a checkbox-trait to render to "show-name=true" via getHtml()?...
artf
@mararn1618 can you create a reproducible live demo of this issue, please?
mararn1618
Hi @artf, of course. I have extracted the relevant parts of my project and created a demo along with reproduction steps:Demo: https://www.secretbakery.io/grapesjs/issue1424.htmlList demo files: https://www.secretbakery.io/grapesjs/ Thanks...
mararn1618
I am right now using a workaround for this, so that my AngularJS directive - where this attribute shall be used - recalculates 'show-name' as if we had 'show-name="true"' in the link stage.Workaround AngularJS Directive
Hi @artf, Now I'm working on creating a breadcrumb similar to the LayerManager but I would like to know if already exists a method that I can tell it the dom element to be hovered when I'm over the breadcrumb item similar as you are doing on the LayerManager. Thanks
artf
Each component has a status property, so in your breadcrumb view you can listen to change:status on each component model. Look at how it's implemented in ComponentView and just re-used in Layers here ItemView. So you can basically do the s...
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.
Hey @artf, as already mentioned in this closed ticket => I think that this specific enhancement broke the behaviour of properties without units, like Opacity. The slider behaves weirdly in this case, even on the GrapesJS demo. Thank you in advance.
artf
You're right, I think I should use parseFloat here, will be fixed in the next release
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 I have seen that there was two separate blocks to add 'sections' and 'columns'.We have a flow like when we drag a section into canvas need to show a popup on that we manually able select the section to be one column section/two column section,how do we achieve this. And also we have seen the method editor.on('compo...
nojacko
If your sections always require 1 or 2 columns, why not remove the section and column blocks, instead, add new blocks for "section with 1 column" and "section with 2 columns" and save the popup?
sureshDurai123
Yeah it is possible only .But we have the requirement that we need to show single section to customer and based their pick in popup only we need to split it.
nojacko
Ok. In that case, it's the canvas:drop event. Hook into that, check it's a section and open your modal. I'm not sure on how you insert the columns but hope this helps.