Hello @artf , is there a way to not convert a css added into shorthand? for example: border: 4px solid rgb(239, 13, 24); after visiting the code viewer, the above css is converted to the following ------------------------------------------------------------------------------------ how can I prevent this kind of conver...
artf
That happens due to the browser's CSS parser, which is used by default in GrapesJS. You can prevent that by using grapesjs-parser-postcss
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 @artf, I noticed that when I used the style manager it applies the style to the whole class of the component selected for example if i have a component that has class like this <div class="class1 class2 c1234"></div> the style manager applies the style to is there a way to apply the style only in ".c1234" class? so...
artf
https://github.com/artf/grapesjs/issues/1558
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 found a pair of broken links in docs https://grapesjs.com/docs/modules/Components/ in page https://grapesjs.com/docs/modules/Blocks.html And https://grapesjs.com/docs/modules/Components-&-JS in https://grapesjs.com/docs/modules/Components.html#components-js Bye.
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 @artf. Is there something similar to this editor.CodeManager.setCode(component, 'css', {cssc: editor.CssComposer} to update the css rule of the selected block returned from editor.CodeManager.getCode(component, 'css', {cssc: editor.CssComposer}); For example: This is the returned css rule collection from using edit...
artf
Hi @froderf, for now, the only way to get that rule is to use CssComposer.get method. In your case, .classx .c1234 is stored inside selectorsAdd as not being a single level class selector (eg. .class1.class2)
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 try to use template engine with grapesjs. Add new block by this: Drag new block to editor then the content of editor is different from above: (the {% for orderline in order.orderlines %} is moved up) How can i prevent this? Thanks.
artf
If you drop a not valid HTML structure it will be rearranged by the browser, you can't prevent it
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.
Is there some way to force a block to be dropped only at bottom of wrapper and be droppend only a single time (if user remove, can drop it again)?
artf
You can use draggable and droppable properties of the Component as CSS selectors to control what can be dropped and where, so you have the same limits of CSS selectors
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.
When I retrieve my template from the database. My Cells have become box and I can not modify their width as when they are cells. Can I make my Cells remain cells without becoming something else by retrieving the template? Creating Template Reloading Template
cjpollard
Looks like you're storing/loading incorrectly. Check here. https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates
Aitortilla22
Looks like you're storing/loading incorrectly. Check here. https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates Thank's @cjpollard I wasn't save the components only saved the html. Now I save the components and when I re...
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 need to manipulate DOM with jQuery, when my model changes, but it seems the View is unaware of it.
yomeshgupta
Yes, $ is available would be available under editor.$ However, I am not sure if that would be full fledged jQuery. You can always insert custom JS scripts in the canvas during initialisation. If you want, you can add jQuery there and then...
artf
@isvaljek use this.$el instead of this.el
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 @artf , I'm reading and experimenting the setStyle method but when i used setStyle editor.getSelectedToStyle().setStyle({ color: 'red' }) it duplicates the css rule of that class e.g What I want is either removed the existing class or update that existing class css rule This issue is very similar to issue 932. I ne...
froderf
If there's no work around for this issue. what I need right now is used cssComposer.getClassRule() but the problem is, it is selecting the first class and not this updated class
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.