GrapesJS Issues

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

336 issues found

πŸ” style-manager
#3472May 24, 2021by YyueeiWY2 answers
2 reactions

Css attribute (-webkit-background-clip:text;) doesn't work in grapesjs-preset-webpage.

Version: "grapesjs": "^0.17.3" "grapesjs-preset-webpage": "^0.1.11" You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the current behavior? Css attribute (-webkit-background-clip:text;) doesn't work in grapesjs-preset-webpage(disap...

YyueeiWY

Alright I solved it by using grapesjs-parser-postcss I didn't know there's a CSS parser plugin. https://github.com/artf/grapesjs-parser-postcss

GJSBlock

Thanks for reporting this, @YyueeiWY. The issue with Css attribute (-webkit-background-clip:text;) doesn't work in grapesjs-preset-webpage. appears to be a race condition or state management timing problem. This typically happens when comp...

#3465May 19, 2021by anatoli-dp3 answers
0 reactions

Update breaks some things with css

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...

artf

Well, actually the proper API would be .components('html string here') which seems to work as expected, but I'll investigate the reset thing because I'd expect to work the same way

artf

Ok seems like the backbone's reset method injects the silent option which prevents the CSS collection to render the added style, so for now, I'd prefer to avoid putting hacky conditions to remove that option and would recommend sticking wi...

GJSBlock

Thanks for reporting this, @anatoli-dp. The issue with update breaks some things with css appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overl...

#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...

#3446May 9, 2021by Spectrevuln-sketch4 answers
0 reactions

Cannot Store Data Unexpected token '-'

Please Help Me, I Want To Store gjs data to mysql but i cannot get any data from front end to back end here my code: const editor = grapesjs.init({ container: "#editor", storageManager: { type: 'remote', params: {}, // For custom values on requests // your SERVER endpoints urlStore: 'http://example.com/store-webpage',...

Ju99ernaut

Variable names can't contain '-', so this syntax is invalid:

Spectrevuln-sketch

please help i want to store my the template to mysql how i to do it?

Ju99ernaut

Unfortunately this may be beyond the scope of grapesjs but some things to note Also since it looks like you're removing the gjs- prefix during storage, you must also add it back during loading. A similar approach is used here https://githu...

#3441May 7, 2021by emilsedgh4 answers
1 reactions

Parser breaks `mj-style` as of 16.30

Version: All Grapesjs version from 16.30 to now have this issues. Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? The following is valid MJML code. It should work fine on grapesjs-mjml. Describe the bug detailed Right now, if you use grapesjs-mjml with the code above it wil...

emilsedgh

Hi Artur. Thank you for the great job done on grapesjs. It really is fantastic. The interim solution works just fine. Feel free to close out if necessary, but providing a way of manipulating the behavior would definitely be pretty nice.

artf

Hi @emilsedgh I apologize for being so late on this issue, but anyway, we can think about how to skip escape in cases like that but probably the fastest way is to simply extend mj-style toHTML method

artf

Thanks Emil, for now, I'll close this one, in case another similar issue will arise, we'll think about adding a new prop for skipping the escape.

#3434May 5, 2021by advancedsoftwarecanada4 answers
1 reactions

Using imported HTML/CSS/JS into the editor shows outlines, but no content, JS Fiddle inside

You can get the version by typing grapesjs.version into the console YES: https://jsfiddle.net/75a9u1cf/2/ What is the expected behavior? I am expecting to be able to edit the HTML and content in the editor Describe the bug detailed The screen is simply white, I can see the shapes and drag elements, but the editor is j...

advancedsoftwarecanada

This issue can be resolved. I simply switched out the HTML/JS application to flat HTML -- disabled all the stupid loading effects. I'll just have an external script when not in editor do fancy stuff. ALL HAIL GRAPEJS.

advancedsoftwarecanada

advancedsoftwarecanada

HALF SOLVED IT, found some stuff on Google: https://jsfiddle.net/75a9u1cf/3/ But some images still don't work.

Browse all topics