GrapesJS Issues

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

1180 issues found

#3459May 16, 2021by anlumo1 answer
1 reactions

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

#3457May 13, 2021by RaresVlaiduc3 answers
3 reactions

BUG: 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 harsh2012 answers
2 reactions

BUG: 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?

#3454May 12, 2021by TheDude702 answers
0 reactions

BUG: 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

#3449May 11, 2021by chiragkataria222 answers
0 reactions

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

#3447May 10, 2021by lbmir3 answers
2 reactions

BUG: 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?

#3443May 7, 2021by chilled-capybara3 answers
0 reactions

BUG: backbone-undo/underscore security advisory

Version: v0.17.3 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? See below What is the current behavior? There is a known security vulnerability in one of the versions of underscore used by a nested dependency. The current version of grapejs utilises backbone-undo ^0.2.5 ht...

emyasnikov

I'm also wondering if backbone-undo is needed or can be replaced by something similar. The package hasn't been updated for 6 years

artf

The package hasn't been updated for 6 years Well, except updating its dependencies (like in this case, for security reason) it's a feature-complete library, there is no need to add/update anything else. Anyway, this PR seems to fix the sec...

chilled-capybara

Thanks for your replyAnyway, this PR seems to fix the security vulnerability at the .lock level but I'm not sure if are kept on a fresh install. I think that might fix the version in the main grapejs repo, but I'm not sure it restricts the...

#3442May 7, 2021by zgeist3 answers
4 reactions

BUG: Error after call `editor.destroy()`

Create editor instance Try destroy Got error

artf

Thanks for the report, I'll try to fix it in the next release @ershadul1 nope, there is a FrameWrapView (stuff around the iframe, like wrappers, tools for selection etc.), and inside there is a FrameView (the iframe itself), but probably f...

ershadul1

https://github.com/artf/grapesjs/blob/0027dcd1194715eeaf4b24db878dd7ebac069cc4/src/canvas/view/FrameWrapView.js#L73 I'm seeing that the remove is used inside the remove itself. I don't understand. Was this a mistake? If I set this.frame =...

PRTTMPRPHT

+1

#3441May 7, 2021by emilsedgh3 answers
1 reactions

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

#3437May 6, 2021by RaresVlaiduc1 answer
0 reactions

BUG: UNDO/REDO ISSUE

@artf , it's pretty important if u ask me :) Version: v0.17.3 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? If I change the device and then I press undo and redo I will get to the last device type. (e.g: Mobile -> Tablet, Undo, Redo) Describe the bug How to reproduce:Ente...

artf

Thanks @RaresVlaiduc I'll prevent tracking device changes in undo manager