#2536January 29, 2020by andy-aware3 answers
Hi, Reading through the documentation, I can't find anywhere that explains what I'm looking to do. Currently, Grapes grabs the background image and puts it into the style, but I want to take this image and not add it to a background style, I want to put it into a data-element on the element that is selected. I've been...
pouyamiralayi
Hi @awaredigital StyleManager targets both Components and CssRules, so do it like below: Cheers!
andy-aware
That is great. How do i stop the data of model.getStyle()['background-image'] being passed into the CSS? Only the background image. Thanks
pouyamiralayi
@awaredigital i have tested the above code and it was working fine. but for the error, you may check `bg` before further processing because after we update the component style we may get the callback again which is your case here: Cheers!
#2535January 27, 2020by eyeamkd3 answers
I was following the getting started guide, encountered this error. CDN link works but unpkg link gives me this error.
pouyamiralayi
@eyeamkd make sure it is like this: `https://unpkg.com/grapesjs/dist/css/grapes.min.css for css and https://unpkg.com/grapesjs` for js also you can benefit from grapesjs cli which will do the setup and dependency configurations for you und...
eyeamkd
okay!! Thank you @pouyamiralayi
pouyamiralayi
@eyeamkd the links provided at gettingstartedguide are working fine! Cheers!
#2534January 25, 2020by andy-aware1 answer
Hi, I've been doing so much reading on GrapesJs to find out how to build a component and assign it to a block. But after some time, I've figured using components isn't the right way to go. I'm looking to swap out the image src and set a data-src to the image, however, I only want to do this on the save. I have a stora...
pouyamiralayi
@awaredigital you can perform operations like text replacement for your specific case before the grapesjs try to store the components & html. `editor.on('storage:start:store', objToStore => {} )` Cheers!
#2533January 25, 2020by nawaz1233 answers
"Open blocks" UI Components on right top are not visible in Downloaded (localhost) grapejs repository as shown in screenshot. while UI Components on right top are visible on online demo page (https://grapesjs.com/demo.html)
pouyamiralayi
@nawaz123 you can have them by using the grapesjs webpage preset Cheers!
nawaz123
@pouyamiralayi thanks, this is exactly what i wanted.
nawaz123
kindly guide me to resolve this issue?
#2532January 25, 2020by nawaz1231 answer
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...
nawaz123
Open block Components in UI are not visible in Downloaded (localhost) Grapejs as shown in screenshot while Open block Components in UI are visible in demo page (https://grapesjs.com/demo.html) Kingly guide to resolve this issue?
#2531January 24, 2020by darkcavalry2 answers
Hello, I'm using Font Awesome 5 in my project, I was checked grapejs' previously asked questions Font Awesome is removed I guess. So, I'm replaced some icons with panel/block options to font awesome 5 but I cant find some icon parameters in editor. When I click on element, drag and remove icons doesnt appears, how can...
artf
For changing toolbar icons I'd recommend checking the following issue #1632 Also Style manager show extra large plus icon over panel how can I remove it? Will be fixed in the next release, for now, use this temporary fix
pouyamiralayi
Hi @darkcavalry have you seen this PR? Cheers!
#2530January 24, 2020by alemenciones2 answers
i have a component type "table" and i find move this table draging her inner components (selectables/stylables) (th, td, ...) this is posible? thanks a lots
alemenciones
thanks man, but, i was looking for something like this (just for absolute mode) editor.on("run:tlb-move:before", (targetCollection) => { // Obtengo referencias al componente seleccionado var target = targetCollection.target; var el = targe...
pouyamiralayi
@alemenciones Select parent using the arrow icon: then drag parent like below: Cheers!
#2529January 24, 2020by vellmur2 answers
Can't choose/select/remove gjs-row after removing gjs-cell separately. Row that is left without cell exists on wrapper but can't be highlighted and selected. Example: <img src="https://raw.githubusercontent.com/VelMrnk/Images/master/ezgif.com-video-to-gif-3.gif"></img>
vellmur
Hi @VelMrnk this is not a bug, as the row is empty and doesn't have its own height, you can't see it (indeed is still selectable from Layers). If you want to change this behavior it's enough to update the component CSS (eg. using the min-h...
artf
Hi @VelMrnk this is not a bug, as the row is empty and doesn't have its own height, you can't see it (indeed is still selectable from Layers). If you want to change this behavior it's enough to update the component CSS (eg. using the min-h...
#2528January 24, 2020by mtasic-realware1 answer
Are there available events that's fired when layers are moving ? I've tried with sorter (sorter:drag:start) , block:drag:start ... Nothing happens Founded somewhere that there is event startSort but i can't set up it properly. I'm using grapesjs on angularjs , adding events like grapesEditor.on('sorter:drag:start', fu...
artf
https://github.com/artf/grapesjs/issues/2500#issuecomment-576463783
#2527January 24, 2020by csb3461 answer
Hi! I have a GrapesJS integration on a laravel project with custom components directly on the page (each block is supposed to be block link to a content). So far I replicated the block link component like that So far so good. But I need that each of these components has his own href defined by default. No matter if it...
pouyamiralayi
@csb346 you can define a new custom component type: and then use it inside a block: just remember you must define your custom component type inside a plugin Cheers!