#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!
#2486January 2, 2020by andrewryan19061 answer
I want to go through all existing component types and add a trait to the model-> defaults and can't figure out how to do this. According to the documentation, I should be able to (in my plugin): But this overrides the traits array, which removes the existing traits, which isn't what I want. My next step was to try to...
pouyamiralayi
@andrewryan1906 for pulling the default traits: so your traits definition would be like below: cheers!
#2426November 25, 2019by Hovius2 answers
Hello @artf , I have a question about the grapes editor that I can not find in the documentation, so I hope you have an answer. Basic setup: The configuration of all components is set with the init this.editor = grapesjs.init(defaultConfiguration); The components from an earlier saved json are added with setComponents...
artf
Can the editor pick up on the new component config without having to add a new component to the canvas manually? Not really, if you store the component definition in one way, the editor will load that definition. One only thing I can sugge...
Hovius
Thanks for your response! I'm going to use avoidDefaults: true and make it work :)
#2386November 7, 2019by navewi1 answer
I can't figure how to add line height to ckeditor. I read the documentation from ckeditor and did all the steps they're providing to add the ckeditor-plugin, but the icon ist not showing in toolbar and I am not even sure if the line-height plugin ist loaded. Can somebody help me or added a plugin to ckeditor within gr...
navewi
Okay Nevermind. I had an character mistake "=" instead of ":" in the config. For everyone with the same problem: To add a ckeditor plugin in grapesjs add the extraPlugins Command in the plugin options in the init function: [....] 'grapesjs...
#2369November 2, 2019by timkelly08103 answers
My team and I built an application that uses grapesjs to build an email template. When pictures are introduced into the template they are automatically base64 encoded which was found to come from line 77 of: https://github.com/artf/grapesjs/blob/dev/src/asset_manager/config/config.js#L77. Since they are being base64 e...
artf
@timkelly0810 to disable encoding just turn false this option ALL YOU NEED to know about uploading assets is here: https://grapesjs.com/docs/modules/Assets.html#uploading-assets
pouyamiralayi
Adding Image Upload Feature
timkelly0810
What does grapesjs send images to a database as? We are trying to determine how grapes sends images to spring so that we can set up our database to receive the incoming images.
#2191August 14, 2019by andyjoneski1 answer
hi, Grapesjs is a fantastic bit of software and I've been playing with it for a week or so now. Im struggling a little with the urlLoad. Im using an end point which is returning json as you can see here: How I've read the documentation, is this supposed to load the layout into the canvas? What I'm trying to do, is use...
artf
The result of your endpoint is totally wrong. Read carefully this part please: https://grapesjs.com/docs/modules/Storage.html#setup-the-server You should return something like this: Now, you're returning only components:
#2152July 19, 2019by csb3461 answer
Hi! I'm integrating GrapesJS ina laravel app and so far so good. After configuring remote load and storage, I'm trying to show a notification after any store (auto or manual). Following the API documentation I got that easily: editor.on('storage:end:store', () => { showNotification() }); This works fine. Then I tried...
artf
@csb346 yes, you're right, there is no storage:success:store, the event storage:end:store is correctly called even in case of errors, but being the last called you can make use of a flag variable
#2132July 11, 2019by paskuale752 answers
Really very difficult to understand how to use this excellent tool !! Documentation does not seem sufficient :'(
artf
Elaborate, please! What would you like to do with GrapesJS and what is missing in documentation?
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
#2036May 24, 2019by Gummibeer1 answer
Hey, I would like to incorporate this package with my existing element based backend. To do so I would need to map the data posted to the remote storage server into my own data structure and during load also back to grapesjs structure. So for a super basic example I've took the simple heading element <h1> which is als...
artf
You can see all the Component's properties here: https://grapesjs.com/docs/api/component.html#component and none of them are required
#2000May 6, 2019by DylanSp2 answers
I'd like to trigger some behavior when a component's Id is changed in the Settings panel. I've tried editor.on() with the following events:component:update:idcomponent:update:Idcomponent:update:{id}component:update:{Id} following the documentation here for component:update:propertyName, but none of them trigger the ca...
DylanSp
After some experimentation and looking through the source, component:update:attributes is what's fired.
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.