GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

3,464 issues found

#3460May 17, 2021by Redix02 answers
0 reactions

TypeError: Cannot read property 'get' of undefined

Error: (node:206) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined (node:206) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled wi...

artf

Please follow the issue template

GJSBlock

Thanks for reporting this, @Redix0. Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date. For you right now: Run npm audit fix to see available patches Check for a newer GrapesJS...

#3459May 16, 2021by anlumo2 answers
1 reactions

DomComponents' Config Incorrect

Version: 0.17.3 What is the expected behavior? The documentation says that I can configure the wrapper element via the configuration: https://github.com/artf/grapesjs/blob/0027dcd1194715eeaf4b24db878dd7ebac069cc4/src/dom_components/config/config.js#L6-L24 Describe the bug detailed I don't think that this configuration...

artf

Yeah, actually the name, by default, is managed via i18n configuration. From 0.17.* version even the wrapper option is not necessary anymore as now you should extend the wrapper component as all others (in previous versions the wrapper was...

GJSBlock

Thanks for reporting this, @anlumo. The issue with DomComponents' Config Incorrect appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, cre...

#3458May 16, 2021by divesham1 answer
0 reactions

ADD CUSTOM BLOCKS (i.e iframe) and customise it like image i.e on double click it open assets options for video link in custom iframe block

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdDo a quick SEARCH first, to see if someone else didn't open the same issueAll relative statements/questions have to be filled/answered, otherwise, th...

GJSBlock

Thanks for reporting this, @divesham. Great suggestion about FEAT: ADD CUSTOM BLOCKS (i.e iframe) and customise it like image i.e on double click it open assets options for video link in custom iframe block! While this specific feature isn...

#3457May 13, 2021by RaresVlaiduc4 answers
3 reactions

Custom trait input not working

Hi @artf ! Version: 0.17.3 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? The input is created correctly Describe the bug detailed I am trying to create a custom input (checkbox) and it doesn't work. What is the current behavior? See attach. Are you able to attach screensh...

artf

@RaresVlaiduc mmm I'd expect it to work also with an HTML string... I have to check it

ahmedderkaoui

Then, in createInput() you should return an Element. So instead of returning a simple string, do this:

ahmedderkaoui

If you want to have a simple checkbox with label, no need to create custom trait, you can just use directly:

#3455May 12, 2021by harsh2013 answers
2 reactions

Style gets wiped out when inserting components in multiple page using Page Manager

Version: 0.17.3 What is the expected behavior? Style should be retained across multiple pages Describe the bug detailed We have use case where we save and reload the content of GrapesJS. We want to leverage Page Manager to reduce the content rendered and manage it in smaller chunks. The issue pops up when we try to lo...

artf

Hi @harsh201 styles are available across all pages, so you shouldn't use editor.setStyle (which replaces all styles with a new set) but instead something like editor.getStyle().add('...')

harsh201

Hi @artf, any help here?

GJSBlock

Thanks for reporting this, @harsh201. The issue with Style gets wiped out when inserting components in multiple page using Page Manager appears to be a race condition or state management timing problem. This typically happens when componen...

#3454May 12, 2021by TheDude703 answers
0 reactions

RTE insert link does not update DOM

Version: "0.17.3" Are you able to reproduce the bug from the demo?[X] Yes[ ] No What is the expected behavior? After inserting link using default RTE that it is immediately available to be further edited in settings, i.e. setting the HREF and Target Describe the bug detailed After selecting text with the default RTE a...

artf

Yeah, this is how it works right now (content is parsed and transformed in components only once the editing is finished). Probably we can use an approach like this as the default behaviour for links.

artf

Updated the link creation from this release https://github.com/artf/grapesjs/releases/tag/v0.18.3

GJSBlock

Thanks for reporting this, @TheDude70. The issue with RTE insert link does not update DOM appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overl...

#3453May 12, 2021by alemenciones2 answers
0 reactions

How to resize start/end in absolute mode?

Hello, dear i'm trying something like "resize:start/end" in absoluteMode with styleable:change:width/height. can you help me?

alemenciones

this work:

GJSBlock

Thanks for reporting this, @alemenciones. Great question about FEAT: how to resize start/end in absolute mode?. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for you...

#3449May 11, 2021by chiragkataria223 answers
0 reactions

Switching pages calls canvas styles and scripts again and again

Hi I am integrating page manager into my project. But the issue I am facing is that whenever I switch between pages it loads CSS and script files given in canvas object at the time of init, again and again. It makes the switching between pages slow. Implementation: grapesjs.init({ pageManager: { pages: [ { id: 'Page-1...

chiragkataria22

@artf Can you please help?

artf

Unfortunately, switching pages creates a new iframe so, the behavior is correct. I preferred to remove previous iframes in order to keep the memory usage as low as possible. One solution might be to find a way to reuse previous iframes but...

GJSBlock

Thanks for reporting this, @chiragkataria22. Thanks for sharing your report about Switching pages calls canvas styles and scripts again and again. To help the team investigate and prioritize this: Please provide: A minimal reproducible exa...

#3448May 10, 2021by rcloss2 answers
0 reactions

Applying custom class to component doesn't seem to be working

I'm adding a class on a component when certain conditions aren't met, in this case when there's no href set. I viewed the source and see the "nolink" class in the source but it's not setting the background color to red and I'm not seeing it when inspecting the element, this is how I'm trying to add it, but when I do c...

artf

I also tried editor.CssComposer.setRule('.nolink', {'background-color':'red'}); but that didn't seem to work either setRule is the right API to use and it works, but it creates only the rule, you have also to add the class to the component...

GJSBlock

Thanks for reporting this, @rcloss. Thanks for sharing your report about applying custom class to component doesn't seem to be working. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeS...

#3447May 10, 2021by lbmir4 answers
2 reactions

Javascripts are not working due to encoding issue

1 - I copied Typed text components code instead of demo HTML code; 2 - And added allowScripts: 1; You can see example here: http://bashworld.ru/demo.html press to View code and we see many encoded characters in JS. How can I fix this issue? I need to decode all &, <, >, ' characters, please see screenshow below

Ju99ernaut

It's not recommended to use allowScripts: 1, anyways in your case why not just drag in the typed block, but if you have to include it in your from element use:

Ju99ernaut

You should setup your storage correctly https://grapesjs.com/docs/modules/Storage.html#basic-configuration

lbmir

@artf Can you help please?

Browse all topics