Hi , I want to make dynamic component using table with dynamic data.And want to render generated html in react component.Will you please help me out how can I do that I didn’t find any thing that help me out.I m stuck.
artf
You need to create a custom component and you could load the dynamic data in onRender callback function
Sorry for the newbie question, but say I have a text field component and I only want to allow the user to drop a specific number of them into the canvas, say just one. How do I limit it? Perhaps a way that shows an alert to explain they cannot add another text field component to the canvas unless they remove the exist...
pouyamiralayi
#25151 #25152
kickbk
So I have a very ugly solution right now: This basically looks whether the component is in the canvas on load. If it is then it hides the draggable component button - Here I could use a better way to hide the button - how? I can get to the...
Is there an event listener I can use to fire a function as the user is typing each letter into a Grapejs field? I'm looking to save to a remote database as the user is typing each letter. Currently I can only fire a function on blur, or if the user presses a custom button.
artf
if you use blur you can probably use input(triggers on any input change) too
Hi everyone, I'm trying to create a component that will update it's view based on a property value My approach is bassed on #1227 and on the docs In my use case I don't need the trait, I can just update the property programmatically. But this won't work and will not display any component on the canvas even though they...
artf
to update the HTML you have to change toHTML in the model
artf
Did you try something like this?
rjrodriguezalvarez97
I’ll give it a try the day after tomorrow. Thanks for your quick replies!
Hi everyone! I have a question about my problem, which I want to solve for about 1 month. The question is: Can I create a component, like a image component, so when I drop it, it will open my own asset manager, that will not overwrite original asset manager, so Image component will have same functionality as it has no...
artf
You just need to create your own command which calls your modal. Obviously, as you're implementing your own Asset Manager it's up to you knowing WHEN to update the target For your custom image component you could do something like this: Wh...
What I'm trying to achieve is whenever the "block" inside of the canvas is edited the style isn't added to an #id but instead added to a class. My logic is to take the current ID that is used - the random string and remove it as the ID and make it a class and then assign styles to that class instead of the ID, yes it'...
artf
Just create blocks/components with classes and, by default, the Style Manager will apply styles to them
Fahad-ishfaq
Just create blocks/components with classes and, by default, the Style Manager will apply styles to them Hi! Can you please tell if we can switch off this behaviour. I want to editor to setup CSS style to element id instead of class names....
I am a designer, i want to try around GrapeJS. My understanding is that i can use GrapeJS locally similar to that of WordPress. I am familiar with Commandline and followed the Docs to install npm followed by installing grape js.. and i dont know what else to do so that i can try it. WOuld be helpful if there is some f...
pouyamiralayi
@SNaushadS grapesjs is a template builder so it can be integrated into wordpress or any other cms out there. See this one as an example of integration for october cms Please visit the getting_started guide to become familiar with the basic...
artf
@SNaushadS GrapesJS might be a good base for building something like that
SNaushadS
@pouyamiralayi thanks for the reply. to clarify further, grapejs is not something which can be used like pinegrow .
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...
pouyamiralayi
@ayana30 you can append them to the global category, check out more on this here Cheers!
pouyamiralayi
@ayana30 please refer to uploading assets Cheers!
ayana30
am trying to list images here by using unsplash api.
I need to create an element, that probably is of span type, but the user need to drop it inline with a text. How can i achieve this functionality? To elaborate further, this block of mine, should have the property that could enable it to be inserted anywhere inside already defined text blocks
pouyamiralayi
Hi @eyeamkd you need to set `textable property of your custom component type to true`. here is more info custom component docs Cheers!
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!