Hi, I have a question can the photos and videos we add in grapesjs be stored on a server using sftp?
artf
You can read more about how to handle asset upload here: https://grapesjs.com/docs/modules/Assets.html#uploading-assets
ClaudeCode
Thanks for reporting this, @Francos10. Great question about SFTP. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener...
Wondering how to do a reverse lookup, from component back to block. I use Block Manager add() to add a block like below after initialization. How do I if the selected component is generated by this custom block ?
artf
You should think more about components than blocks, indeed the right Block should look more like that. But in case you need it, you can always attach custom properties to your content block (which then will be appended to the component) On...
ClaudeCode
Thanks for reporting this, @amliu. Great question about [Question] How to know from which block is the selected component generated ?. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS...
Hi @artf ! Is there any way to parse the styles into a CSS string? This would be helpful in a scenario where you have multiple GrapesJs instances stored and you want to update the CSS on all of them. You can manipulate the styles because that is an array and it's reliable. Currently, on the CSS I am using regex to loc...
artf
Well, you should be able to take the CSS from any GrapesJS instance with editorInstance.getCss(). Which basically generates the CSS from the styles JSON
ClaudeCode
Thanks for reporting this, @lacieri. Great question about [QUESTION]: Parse styles to a Css string. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific m...
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...
ClaudeCode
Thanks for reporting this, @nithinpillalamarri123. The issue with how to customise the grapes js form to append style appears to be a race condition or state management timing problem. This typically happens when component lifecycle events...
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...
kumarabhishek008
Issue has been resolved
ClaudeCode
Thanks for reporting this, @kumarabhishek008. The issue with Background Image of wrapper component is not loading in second time when updating appears to be a race condition or state management timing problem. This typically happens when c...
@artf I am loving working with GJS. I have one last thing I'd love your help on. It would be incredibly helpful to be able to customise the labels in the layer manager. I've searched high and low but not found anything. The default way it just shows and is not very helpful when wanting to navigate efficiently. <img wi...
artf
You can extend the model of your component/s and overwrite the getName function
fmay
In case this is useful for anyone, I found an easy/alternative way of doing this when a component is created.
flauc
This is how I did it: The benefit is that if the components id or tag change later it will still be updated in the layer manager and you can also rename individual components.
Hey, @artf. I want to access the json that is generated when a template is stored without actually storing the template. The json object can be accessed using the events but I don't want to call editor.store() and then use the events. Is there a way I can do get the json object (a function call on editor or some prope...
Joshmamroud
@theSC0RP Is this what you're looking for? editor.getComponents()
artf
@theSC0RP it's not clear if you want the storage functionality or not, but what proposed Josh is correct or you can always add your storage (and do nothing inside if need to...) https://grapesjs.com/docs/modules/Storage.html#define-new-sto...
theSC0RP
you can always add your storage (and do nothing inside if need to...) https://grapesjs.com/docs/modules/Storage.html#define-new-storage Thanks @artf. This is what I ended up doing. With editor.getComponents(), you get a cyclic structure st...
Hi @artf - what you've built is magnificent. It's been a gentle struggle as I'm far from being a JS wizard. However, I've got just about everything fully configured - except for this! I want to set traits that display when an image is selected (alt, src, id). I am sure it can be done once at initialisation, but I'm bu...
artf
Hi Freddy, you can simply extend the image component in this case
ClaudeCode
Thanks for reporting this, @fmay. Great question about Question : Traits. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() even...
I would like to create a new custom trait to use, that has the input of the color picker and a checkbox so that the end result is either the predefined color coming from the checked checkbox or if unchecked choosing from the picker. This is too specific for my case so my question is if i can use pre-existing trait typ...
artf
Not at the moment, I'm working on a new UI module that will allow the reuse and override of internal UI elements.
ClaudeCode
Thanks for reporting this, @ThetripGr. Great question about Is it possible to use existing trait types in new custom traits? (e.g the colorpicker). The recommended approach with GrapesJS is to use the event-driven API. Start here: Check th...
We have a use case where we want to insert charts dynamically using Highcharts Editor. I have created a component, which on drag and drop, opens a modal based and based on user's selection, returns a SVG image. I am wondering how can I add it to the model's body. Right now I am using innerHTML to insert but the getHTM...
artf
You don't need components with JS in this case (in your final code you don't execute any JS), is enough for you something like this:
harsh201
Sorry for spamming. I was not able to upload usecase video from my work laptop. https://user-images.githubusercontent.com/2502711/106098322-d39c7b80-615e-11eb-8569-cf76ffc7fcc7.mov
harsh201
@artf Any help here will be appreciated. I went through the docs again and nothing stands out, which I could be missing.