GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2729April 22, 2020by DaithiLynch3 answers
0 reactions

[Question] Updating to latest verion

I updated to the latest version 0.16.3 from the downloaded newsletter 0.10.7 , the test-form for sending a test mail does not work in the newer version, actually it seemed to have stopped working after verion 0.10.8 , , the form itself seems to be appended to the end of the screen when opened

artf

Yeah that thing was dropped years ago (the service on which it was relying disabled the possibility to use it in that way)

DaithiLynch

Hi Arthur, Thanks for reply, It is not the sending that is the problem, I have that covered, it is the showing of the actual modal that is the issue, the send button is missing along with the subject , no matter what I tried to do, it will...

artf

don't try to reuse that modal, just create your own...

#2728April 22, 2020by ajumell1 answer
0 reactions

[QUESTION] How can I set the background image of a component programtically.

Hello, I want to create an option to change background of a component by double clicking it. I could open the modal when double clicking it. But how can I se the background-image property using it. I checked the codebase couldn't find a clue. Have any one done something similar. Please provide some suggestions or lead...

artf

@ajumell when, for example, you select the background to apply you can change the component background in this way

#2727April 22, 2020by adamwpe3 answers
6 reactions

[BUG] Custom Component Class is not being rendered unless trait changes

I think this is a bug, Basically, I have a custom component that has an attribute of a class ('gjs-button'), but that class only appears to get rendered/applied when a trait is changed.Drag and drop the component: Amend the component Trait.The component is rendered again, but now you can see the class 'gjs-button' has...

pouyamiralayi

Hi @adamwpe please use `classes attribute instead of attributes`: Cheers!

adamwpe

Oh Thanks, @pouyamiralayi, Seen someone used attributes and assume that was the correct method - worked like a charm!

adamwpe

Appears a similar thing happens on save and reload. With this custom component, you are allowed to amend the size, but when you save and reload, the renderer doesn't draw it to the correct size, even though it has saved the correct width:...

#2726April 21, 2020by adamwpe1 answer
0 reactions

[QUESTION] Make the content of component editable

Is it possible to make the content of a component completely editable? I want to make a custom anchor with a trait of the href, and then the user can style the anchor accordingly as I'm planning to make it styled as a button. Basically I want to let the user style 'Click Me' as they would style any text. I made a fidd...

adamwpe

Worked it out: Just had to make the type a link, and then include a text component. E.g.

#2725April 21, 2020by Chewhern3 answers
1 reactions

editor.getCss() issue with PHP when using Cookie to pass Css styles

My company would like me to develop an automated no import(Not downloading zip and upload zip) template builder that can be used on Email marketing system. However whenever I tried to export the CSS to a server file through writing and creating the file without downloading it. The CSS just contains the one that I high...

adamwpe

The StorageManager is only a mechanism to get the data to your endpoint in a nice format. I would see no reason why you then can't save it into a file if you wish. Just get the $POST data, and then do fileput_contents. Thanks Adam

adamwpe

Hi Chewhern, Cookies can't hold a lot of information - something like 4k - so it will not be large enough to store CSS or HTML. You really need to use the Storage Manager. https://grapesjs.com/docs/modules/Storage.html Thanks, Adam

Chewhern

since you are here, I did like to know on the behavior of the storage manager, if I create a script to store those 2 data in server, can i do so without saving it directly to database? Cuz i have seen some of the people here save it direct...

#2724April 21, 2020by jozue061 answer
2 reactions

[QUESTIONS] pages in one canvas

Hello, not sure exactly where this should go, but here goes. I'm creating a builder for making long menus for restaurants that will be printed. My question is, does anyone have any in the wild examples of making a page-size bounding box for each page of a "menu"? lets say i have 150 types of beer. i'd like to make eac...

Ju99ernaut

You can make use of css properties break-before or break-after. You can maybe create a page break block that you add manually after every page, check out grapesjs-plugin-page-break, or you can break before or after a certain element.Always...

#2723April 20, 2020by lewishealey1 answer
0 reactions

Event listening for loaded asset

I need to find a way to expose the event listener when an image has been selected in the Asset Manager, is there a way to do it? I can only see event listeners when the image is uploaded, not selecting a pre-defined asset. Thanks

lewishealey

I got it with update target updateTarget(trgt) { const image = this.model; const dirName = image.attributes.src; const filename = dirName.replace('https://d3d4x44eptevwm.cloudfront.net/md/',''); trgt.set('attributes', { src: https://d3d4x4...

#2722April 17, 2020by tomaskallup3 answers
0 reactions

[BUG] Highlight and toolbar positioned wrong on outside scroll

Are you using the latest release (older versions are NOT supported)? Yes Are you facing the bug with your local copy of GrapesJS or with the current demo? LocalOS: ArchlinuxBrowser: Firefox 74.0 and Firefox developer edition 75.0b11Grapes: v0.16.3 What is the expected behavior?Highlight should update its position when...

artf

Yeah really weird, my first guess was that canvas toolbars weren't updating on the window scroll, so I've tried to create a non-fullscreen example with a long page but I've realized that there is no scroll listener (on the main window) bec...

tomaskallup

Hi, thanks for the reply! Firefox doesn't seem to be the issue here (same behaviour in Chrome) Also the replication repo works in both browsers without the bug. I'm not loading anything in iframe (this is inspector layout from the actual p...

tomaskallup

@artf I think I found the cause, our root element <div id="❤"> has this style: Adding that to the reproduction repo caused the issue to appear! (Removing the flex seems to fix the issue, I'll investigate if we really need it in our case, b...

#2721April 17, 2020by alex19893 answers
1 reactions

[Bug] Can not import any locale file from grapesjs/locale/

Hi I run into an error when I'm trying to import any locale file from 'grapejs/locale' by using es6 import I followed by the documentation: https://grapesjs.com/docs/modules/I18n.html#configuration but I always get this: I can import it only in next way Could you explain why I can't import it directly from grapesjs/lo...

padcom

With the change provided by PR #6459 it is now possible to do the following: Make sure you also load the styles correctly:

artf

Should be fixed in https://github.com/artf/grapesjs/releases/tag/v0.16.12

willGabrielPereira

It still don't works, only works from "src/i18n/locale/...." Using v0.20.3

#2720April 17, 2020by novakbenNo answers
0 reactions

Confirm leaving the editor

I'm wanna cancel the "leave site?" confirm dialog when a user tries to leaves the editor (when StorageManager is disabled). The reason is that I'm storing the code inline, server-side and then pulling it with fromElement. But when I submit the form to store the page, I always get the JS confirm dialog. Even fake calli...