GrapesJS Issues

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

3464 issues found

#3286February 23, 2021by abulka2 answers
0 reactions

FEAT: Codemirror custom keys and addons

Is there a way of adding shortcut keys and add-ons for the built in Codemirror editor? I especially want a commenting hot key. There are various plugins that use the Grapesjs editor, incl. https://github.com/artf/grapesjs/issues/324#issuecomment-330571539 and the custom html code plugins https://github.com/Ju99ernaut/...

abulka

I finally got the Grapesjs bundled commentRange to work - it must be invoked directly cm.commentRange not via cm.execCommand. Furthermore, it takes parameters. Thus I was able to get some commenting working, as long as you select the area...

artf

Yeah, I think it's not a problem exposing it in CodeMirrorEditor.js

#3285February 21, 2021by ashercoren3 answers
6 reactions

[Question]: Doctype in the canvas iframe

Hi. This question has already been asked twice (here and here) but has never got an answer. Is there a way to add <!DOCTYPE html> as the beginning of the canvas iframe so that the iframe will be in standards mode. I need this since I am trying to use tinyMce as the custom RTE, and tinyMce requires standards mode.

artf

In the next release, I'll add a new event helper that will allow editing iframe content before load:

bgrand-ch

Hello, For future questions or technical issues, which aren't bugs, GitHub's Discussions tab is the place to be. Don't forget to close this issue if it is resolved or write a new detailed message in Discussions -> Q&A category (and close t...

artf

Not really, but I'm open to solutions on how to make it customizable.

#3284February 20, 2021by mig8447No answers
0 reactions

BUG: Block rendering is being called twice

https://github.com/artf/grapesjs/blob/b199083f6a6128ecff41d20865493294f71fe0a1/src/block_manager/view/BlocksView.js#L142 This line makes the block to be re-rendered since rendering is listening for change events, but since this property does not affect the block rendering per-se the set should be silent as in:

#3283February 20, 2021by mig84473 answers
2 reactions

BUG: BlocksView rendering is being called twice

https://github.com/artf/grapesjs/blob/b199083f6a6128ecff41d20865493294f71fe0a1/src/block_manager/view/BlocksView.js#L186 The Block Manager is looking for a rendered property in the model to tell if the view did render already or not but this method doesn't set said property and therefore this function is called twice,...

mig8447

@RutujaBadbe This is the exact change you need: https://github.com/artf/grapesjs/commit/640661b0a44e5e2857b615559c1db27da3e17a6c

artf

Yeah, makes sense, thanks

RutujaBadbe

https://github.com/artf/grapesjs/blob/b199083f6a6128ecff41d20865493294f71fe0a1/src/block_manager/view/BlocksView.js#L186The Block Manager is looking for a rendered property in the model to tell if the view did render already or not but thi...

#3282February 20, 2021by ThomasPof1 answer
0 reactions

BUG: CleanId function not working with MJML code

CleanID is still not working for MJML code, even on latest version of grapesJS (0.16.41) It's related to this closed issue : https://github.com/artf/grapesjs/issues/3276 This function is not reading MJML tags : attrs are empty, and I cannot find why...

artf

The id issue should be solved already on the latest mjml plugin release

#3280February 19, 2021by bgrand-chNo answers
0 reactions

FEAT: Renderless

What are you trying to add to GrapesJS? I try to styling GrapesJS and positioning its elements (panels, buttons, canvas, etc.), it's annoying to override all style elements. Describe your feature request A renderless GrapesJS.Append a specific GrapesJS element (panels, buttons, canvas, etc.) into any container in the...

#3279February 19, 2021by abulka1 answer
0 reactions

QUESTION: how to make textnode editing update component content?

I'm building a custom textarea component and want it to behave like the built in text component such that editing the textnode on the grapesjs canvas updates the textnode found in .components. And I want the component exported as HTML correctly e.g. <textarea>MY user edited TEXTNODE CONTENT</textarea>. At the moment,...

artf

Hi @abulka, as the editing is happening in the view, you should update the component model once the view is updated. So it should work with something like this

#3278February 18, 2021by Dmurl5No answers
0 reactions

BUG: Custom component view onRender is called early

Version: Reproduced in codepen below using 0.16.34 (returned from https://unpkg.com/grapesjs) and 0.16.22 in a Preact project Describe the bug detailed A custom GrapesJS component calls its view's "onRender" function when the component is rendered to the canvas. Per the documentation: I would expect this to be called...

#3277February 18, 2021by FrancoFasano1 answer
1 reactions

BUG: Default PDF size: US letter How to set A4?

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueJSFiddle Starter template https://jsfiddle.net/szLp8h4nCodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl *Version:0.16.3 You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug fr...

artf

Hi Franco, you can define the frame size by changing devices

#3276February 18, 2021by ThomasPof1 answer
0 reactions

BUG: CleanId function not working with MJML code

This issue is about MJML code but I think this is more about grapesjs than grapesjs-mjml There is a function that remove unnecessary IDs in src/code_manager/model/HtmlGenerator.js. This function is working well on HTML tags, but not on MJML tags. What I found is

artf

https://github.com/artf/grapesjs/releases/tag/v0.16.41