#2861June 28, 2020by makkaronis4e2 answers
Hi, i'm trying to implement possibility to save elements as custom blocks. How can i get css of component and its children? I can recursively get styles from each nested component, but maybe there is a way, how it can be done easier?
makkaronis4e
@Ju99ernaut thanks!
#2860June 28, 2020by MarlonV1231 answer
It helps with FireStore, since I've managed to save to the Firestore database, now I'd like to know how can I load those values from the database and display them as a template. I am new and I need help, sorry for the bad, this is my code. The data I use is from an example, so it doesn't matter much if others see it
artf
You can enable autoload: true, or you can load data programmatically by calling editor.load()
#2858June 26, 2020by hellocaio2 answers
Newbie question here, I added the plugin grapesjs-style-bg to the stack, now how to I show it in my StyleManager? I reset all the sectors from the StyleManager on initialization, and then I add them one by one using styleManager.addSector("id", {...}).
hellocaio
@pooriamo, thanks man! Life saver! It works great! :))) Thanks for the cheatssheet too, lots of goodies in there!
pooriamo
You can cheat from here: https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1127 You must add background-bg to the buildProps array and then config it in properties, the type must be bg:
#2857June 25, 2020by makkaronis4e3 answers
Hi, i want to use showComputed: false, to prevent from counting right/left/top/bottom for position absolute. But when i'm initializing grapesjs with this parameter, style manager doesnt show css-prop values for tablet/mobile screen size: you can check it here https://codepen.io/makkaronis4e/pen/PoZjaXJ
artf
Steps to reproduce, please?
makkaronis4e
Drop some element on canvasAdd some styles (for example background color)Switch to tablet/mobile viewcheck style prop value in style manager (it will be default).
artf
Ah ok, now I get it. Unfortunately, to show a style of a different view is part of the showComputed feature, so disabling it is what you get.
#2856June 25, 2020by mcottret2 answers
Hello again ! Our team has recently been trying to update GrapesJS' canvas programmatically without accidentally triggering an update event. If our understanding is correct, this would mean allowing a call to setStyle or setComponents not to trigger an update event, regardless of the current stepsBeforeSave & changesC...
artf
Yeah, it actually might make sense having options in these methods, so a PR would be welcome.
mcottret
Great ! #2872 opened.
#2855June 25, 2020by i3laddin3 answers
Hello @artf i am working with that awesome tool for long time i integrate it with react , and create a react plugin component for it , and create custom trait to get data from api and render it throw the plugin , i setup a local storage and also make a button to save all data in the local storage and db but i have a l...
artf
For sure you didn't configure correctly the Storage Manager Please read carefully this guide https://grapesjs.com/docs/modules/Storage.html
i3laddin
thanks @artf for answer , i know how much time is important to you , but sorry for that , i configure it correctly , also i am get 200 for post request , also i get all of html and components and css for load request , but i have a little...
artf
How did you define that custom component?
#2854June 24, 2020by cartifon2 answers
Hey man, once again, great work on the GrapesJS, you are getting tons of things done, it is incredible! So, my question is, how can I add multiples CSS properties with just one button on the StyleManager? What I want to add is a display: flex; justify-content: center, the way we have right now that I found on the docu...
Ju99ernaut
At the moment I don't think you can do that with the StyleManager it may be easier to use traits
artf
Yeah, unfortunately, @Ju99ernaut is right! Probably soon I'll start working on the StyleManager API which would allow a similar level of customization we have in Traits
#2853June 24, 2020by mikeholczer3 answers
I noticed that in https://github.com/artf/grapesjs/issues/74 when the move to the Pell based editor is listed it's use of Document.execCommand was mentioned as a liability. I see now that according to https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand it's consider Obsolete, so we were wondering if...
artf
I'd like to avoid putting external libraries in the core library (indeed we still have to extract some of them). If you need quilljs you can try to add it as a custom RTE. I close it as there is no real alternative to the native API (unfor...
artf
so we were wondering if you have plans to switch to a new editor? New editor? What would be the alternative?
mikeholczer
What additional information are you looking for? I did a quick google and found https://quilljs.com/ doing a quick search of it's source on github, the only use of execCommand I see is https://github.com/quilljs/quill/blob/fd400525d551315b...
#2852June 23, 2020by RJCAM2 answers
Hi, I'm trying to enable more than one custom panel button at the same time. I think when I create some custom panel button (using code below) they will have the same behavior as normal html radio inputs, meaning that you can only select one and not more then that. See the example below when I try to enable both butto...
RJCAM
Thank you @Ju99ernaut , that's exactly what I needed.
Ju99ernaut
You have to add a different context for each button
#2851June 22, 2020by pooriamo3 answers
Hi When I choose a block and try to change the styles, nothing happens. (I'm using the web preset) Here is my config:
VojtechLanka
Had the same problem, adding widthMedia: '' to my custom device fixed it. I think there is some problem when using millimeters in media queries so the styles aren't applied because it thinks your canvas is too big.
pooriamo
It seems that there is a problem with custom device size. When I set default size to desktop, it works.
pooriamo
@VojtechLanka Thank you