GrapesJS Issues

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

877 issues found

๐Ÿ” question
#6064Aug 18, 2024by mannyyang4 answers
0 reactions

Setting the text content programmatically clears it in the canvas

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? v126 Reproducible demo link https://jsfiddle.net/r5062suy/1/ Describe the bug How to reproduce the bug?Run the demo link (https://jsfiddle.net/r5062suy/1/)See that I try to update the text in the div from "Hello world!!" t...

danstarns

Try using the .getEl method on the component then setting the element directly.

mannyyang

Problem with this is that when you export the HTML, it returns the old text.

artf

@mannyyang where did you find the usage of set('content', ...? It's more like private property and you should never use it. To update inner components programmatically use component.components('test')

#6063Aug 16, 2024by sridharK643 answers
1 reactions

How to load grapesjs by default preview

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest Reproducible demo link https://stackblitz.com/edit/grapesjs-react-custom-ui-nrqcgn?file=src%2FApp.tsx Describe the bug How to reproduce the bug?...... What is the expected behavior? ... What is the current behavior?...

danstarns

Hi, @sridharK64 thank you for your report, can you elaborate on your issue, please? As we only have: 'How to load grapesjs by default preview'Your stack blitz Could you tell us what you're trying to achieve?

artf

@sridharK64 I got what you mean but the next time try to elaborate a bit better. To trigger the preview on load, this would be enough but in your example, you're using @grapesjs/react with full custom UI, which means you have to implement...

GJS Helper

To load GrapesJS in preview mode by default, you need to initialize the editor and then execute the built-in core:preview command. This command toggles the editor's state between editing and preview, effectively hiding the editor UI and di...

#6051Aug 9, 2024by SAJAD-CH2 answers
0 reactions

Issue in plugin

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link asdasd Describe the bug I am having an issue while installing NPM plugin packages like preset-webpage, preset-newsletter , the css file is missing while installing in both when i check node mo...

artf

@SAJAD-CH please provide a reproducible live demo (eg. via stackblitz) when you open a bug issue

GJS Helper

It seems you're encountering a common issue when integrating GrapesJS plugins into modern JavaScript frameworks like Angular, where the CSS files don't appear as standalone files in nodemodules for direct linking. This is expected behavior...

#6044Aug 7, 2024by danstarns2 answers
0 reactions

Node JS LTS Version

Across the codebase, we have built and linked dependencies against very old versions of Node.js. See: https://github.com/GrapesJS/grapesjs/blob/dev/.github/workflows/publish.yml#L15 https://github.com/GrapesJS/grapesjs/blob/dev/.github/workflows/build.yml#L15 https://github.com/GrapesJS/grapesjs/discussions/5973 https...

danstarns

Related:https://github.com/GrapesJS/grapesjs/issues/6048https://github.com/GrapesJS/grapesjs/issues/6049

GJS Helper

The issue correctly identifies that GrapesJS's CI/CD workflows and development recommendations currently rely on older Node.js versions (specifically Node.js 16.x). Updating these to the latest Long Term Support (LTS) version, Node.js 20.x...

#6040Aug 6, 2024by Vampire-V4 answers
0 reactions

Cannot read properties of undefined (reading 'lastComponent')

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 127.0.6533.89 (Official Build) (64-bit) Reproducible demo link Describe the bug Please check this.selected has a value of undefined . I used it in react and got an error exception. /*Returns model of the selected c...

artf

Hey @Vampire-V please follow properly the bug issue template. We can't help you here without a reproducible demo.

Aravinth-2020

### GrapesJS version[x] I confirm to use the latest version of GrapesJS### What browser are you using?Version 127.0.6533.89 (Official Build) (64-bit)### Reproducible demo link### Describe the bugPlease check this.selected has a value of un...

Aravinth-2020

Hey @Vampire-V please follow properly the bug issue template. We can't help you here without a reproducible demo. Can you please share the solution for that? I have a same issue when i select the open layer manager, this issue raises after...

#6039Aug 6, 2024by Gryphonn4 answers
3 reactions

Cannot set Block display value

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 126 Reproducible demo link https://jsfiddle.net/Gryphonn/ob1pznh6/ Describe the bug How to reproduce the bug?Select any word.Wrap it for style.Keep this word selected.Go to General -> DisplayI want Block. I click Bl...

artf

Yeah, the issue is here: https://github.com/GrapesJS/grapesjs/blob/1e3766f0060e6da502fccf9ba9eb938d5ac860bb/src/style_manager/model/PropertyFactory.ts#L267 Would it make sense to add a new option like initial and make it the default one?

danstarns

> Hi @Gryphonn,> I tried to reproduce your issue but the steps aren't that clear, please rephrase. bandicam.2024-08-08.21-07-14-667.mp4 Thank you for a detailed report ๐Ÿ™ It looks like we should better handle the default display so you don...

danstarns

Hi @Gryphonn, I tried to reproduce your issue but the steps aren't that clear, please rephrase.

#6038Aug 6, 2024by dharma-glui2 answers
0 reactions

Inline event declarations like onclick event on a buttons are getting removed

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://jsfiddle.net/6bn43a05/Describe the bug How to reproduce the bug?Add a onclick event for a html tag What is the expected behavior? It should not remove the event after getting loaded in to...

artf

This is intentional for security reasons, but you can disable it with the option config.parser.optionsHtml.allowUnsafeAttr (at your own risk): https://github.com/GrapesJS/grapesjs/blob/819bfcf44bb23d51990eba3b4330e9932df59cde/src/parser/co...

GJS Helper

The issue you're encountering, where onclick attributes are removed from HTML elements when loaded into GrapesJS, is a deliberate security feature and part of GrapesJS's HTML sanitization process. GrapesJS, like many modern HTML editors, s...

#6032Aug 3, 2024by aswinkumar8632 answers
0 reactions

Image Component allows upload and selection of video files via drag and drop

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v126 Reproducible demo link https://grapesjs.com/demo Describe the bug How to reproduce the bug?Open the demoDouble-click on any existing image component to open the asset manager.Drag and drop a video file into the...

artf

Thanks @aswinkumar863 for the report. I'll be happy to merge a PR of the fix.

GJS Helper

The issue you've reported, where the GrapesJS Image component allows video files to be uploaded and selected via drag and drop, is a common scenario when the default asset manager's drag-and-drop handler doesn't explicitly enforce file typ...

#6024Jul 30, 2024by yashvi20262 answers
0 reactions

Unable to hide rte for some particular component type

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Harshsne/pen/xxoOyXO Describe the bug https://github.com/GrapesJS/grapesjs/issues/6019 with reference to this, I wanted to hide rte only for some particular type . Example:...

artf

https://github.com/GrapesJS/grapesjs/issues/6019#issuecomment-2267466020 Avoid creating duplicate issues, please.

GJS Helper

The issue describes a common need to conditionally control the Rich Text Editor (RTE) in GrapesJS, specifically preventing it from activating for certain component types, such as 'link' components. While GrapesJS automatically enables RTE...

#6019Jul 26, 2024by yashvi20264 answers
0 reactions

Unable to hide rte in latest versions

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://codepen.io/Harshsne/pen/xxoOyXO Describe the bug How to reproduce the bug?drop text componentedit text component What is the expected behavior? rte shouldnt be displayed What is the cu...

artf

Yeah onActive is now an async method so extending it with extendFnView is not enough, your code is executed before the original one. Anyway, you can achieve the same result with a simple line of CSS

yashvi2026

but i wanted to hide only some particular type eg:text @artf

artf

You can still extend the view without using extendFnView. Reuse the original component type via prototype, as indicated in here.

Browse all topics