GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

569 issues found

๐Ÿ” canvas
#3115November 6, 2020by xinyufyj4 answers
1 reactions

component droped position is wrong when I changed canvas size under Absolute/Designer mode

WARNING I changed the canvas size and I drop a compent from blocks panel. The result is compent postion is wrong. By the way, the editor is under 'Absolute/Designer' mode. I read the source code of the drop part. I found the compent drag start position is not based on 'editor.Canvas.getFrameEl()'. So, is this right?

xinyufyj

@artf OK, I provide some screenshot for explaining.Sorry for my bad English.

artf

Can you provide a live demo of the issue?

artf

I close this issue as I'm planning to solve all ones related to absolute positioning here: https://github.com/artf/grapesjs/issues/3770

#3100October 28, 2020by stljeff13 answers
0 reactions

Adding external libraries after dragging custom block

Hi, I am customizing GrapesJS by creating components/blocks my users can drag onto the canvas. A number of these blocks depend upon external libraries like Bootstrap and FontAwesome.. Is there a way to check to see if the necessary dependencies are included on a page, and if not, add them to the page? Here is what I a...

GoodPHP

Hi, If you didn't find answer here, you can contact with Devfuture Team: https://devfuture.pro/contact/ We specialise on GrapesJS.

artf

@stljeff1 the correct way is to use Component related scripts which check if the dependency exists

stljeff1

@artf Can I do that with CSS files? Nonetheless, I did manage to "solve" my problem by creating a custom type for the blocks with any kind of dependency (CSS or JS). This custom type extends the default view by adding a custom callback whe...

#3095October 26, 2020by marcepoblet2 answers
1 reactions

BUG: RichTextEditor is not oppening in IE11.

When in the Canvas, I double click on some text to open the RichTextEditor in IE11, it throws me an error and does not open. In all other browsers it works. Attached a vide in the pptx and the code: Presentation2.pptx richTextEditor.add('insertHtml', { icon: '<select class="placeholders-select">' + options()'</select>...

fq-selbach

I'm surprised that you could even open it in IE11 since there is so much ES6 code and heavy template usage that isn't supported at all by IE11. I'd suggest to get rid of IE11 or at least build your templates/pages/widgets in a modern brows...

devuniverse

IE ... #shivers

#3083October 20, 2020by Joshmamroud3 answers
6 reactions

[Feature]: Highlight drop zones

Hi @artf , How would you recommend highlighting the components on the canvas that the selected block can be dropped into based on draggable & droppable rules? In other words, when a user starts dragging a block from the block manager I would like to highlight (add a border or inset box-shadow) the components on the ca...

artf

With the introduction of Canvas Spots I think this feature request can be considered done. Here is a quick demo example https://github.com/GrapesJS/grapesjs/assets/11614725/ea956282-b6bd-455e-af9b-6b5fb7707d71

artf

I think, currently, it's not easy to achieve it. The Sorter module is quite old and messy and I'd need to refactor it in order to allow such functionality (which, for sure, I'd be glad to have). Unfortunately, no ETA for such a thing :/

kerryj89

Was just thinking of this. I think it's the natural evolution and necessary when you can set limitations of where something is droppable.

#3070October 9, 2020by mhowey3 answers
2 reactions

BUG / Feature? Applying background color to body component isn't part of the exported HTML.

Hi Art, thanks for creating such a fantastic project! I'm not sure if this would be considered a bug or feature request...but I'm having issues deciding how to hande the background color on the body while using the newsletter plugin with GrapesJS. Steps to Reproduce:Select the body (root element) in the canvas.In the...

JoshLucio

@mhowey I have seen this also, but I always assumed that the body is just the placeholder canvas for the content. Changes to the body do not export since the content placed in the body is the only thing being exported. In my application us...

artf

You can use this option

mhowey

Thanks for the reply @JoshLucio . I'm using the newsletter preset plugin, which I believe is more targeted toward HTML email, rather than site building. I was actually thinking what you said to be the case, and I've explored all the getWra...

#3053September 30, 2020by anushabivera3 answers
5 reactions

Allowing user to add a global stylesheet to canvas dynamically

Hi, I wanted to provide the user the option to load a custom stylesheet to the canvas. This is so that the user can apply the custom defined styles to the control as class instead of inline style and also to maintain uniformity among the various users using the grapesjs based editor tool to generate the html template....

RJCAM

Hi @anushabivera if you want to load the stylesheets on init (local and with cdn) you can simply add the css/js links to the canvas property on editor init function, like this: If you want to add them dynamically you can try this (example...

theSC0RP

I got it! I removed it by using an id on the link tag.

anushabivera

Thank you @RJCAM . My plan is to provide the functionality as an attribute of the canvas and the user can enter the url of the custom stylesheet as value of the attribute

#3050September 29, 2020by Abhisheknanda13444632 answers
1 reactions

Map Not Loaded full-width

Hi @artf , When i drop a "Map" on the canvas and hit the preview in new tab which is my custom preview. In that new tab of preview "Map" will not loaded with full width. Could you please help me on that.

MartinPutz

@Abhisheknanda1344463 I checked on the demo editor and it seems to work fine. Could you create a jsfiddle with your problem?

artf

I guess it might be something wrong with your preview, provide a live example at least, for now, I'll close the issue

#3046September 24, 2020by jesusdp2 answers
1 reactions

QUESTION: How to keep default sections in the canvas without the possibility to be removed by the user?

I want to generate a PDF Tool to have three main sections: HEADER, BODY and FOOTER. The three sections needs to be there always and I want to disable the possibility to allow the users to delete those sections. The rest of the components like images, text, columns, etc. needs to be editable like remove them if the use...

MartinPutz

By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#component You would need t...

jesusdp

By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#componentYou would need to...

#3041September 23, 2020by WilburJZHAO1 answer
0 reactions

Question: How to render the website in frontend after designing it in the editor?

Hi all, I am wondering how to render the website with our own components designed by the editor into frontend? I cannot find any info about it in the documentation. I have tried several ways:directly load the html and css get from editor (It is not working as it does not contain any components info)use Canvas.getBody....

artf

I'd suggest reading this part https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates

#3039September 22, 2020by generalsystems1 answer
0 reactions

BUG: 3 issues I'm facing using grapesjs

the 3 issues I'm facing using grapesjs are: -- I can't render a react element inside the canvas: I add a component in the canvas and initiate the component js file in the canvas conf object but it didn't work. -- I can't add a color in the background layers -- when a tag a component to be unremovable it can be removed...

artf

Follow the issue template please