GrapesJS Issues

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

3,464 issues found

#3327Mar 9, 2021by DMSlam1 answer
0 reactions

Is there a way to keep VML code in CSS to keep some of the styles away from Outlook?

Hi. When I try to generate a newsletter template out of an existing HTML code with some VML wrapping <style> tags, the existing styling classes are processed well although any mentioning of such VML is removed from the Editor. Can you please give a hint of a possible workaround? Is that even possible to have VML code...

GJSBlock

Thanks for reporting this, @DMSlam. Great question about Is there a way to keep VML code in CSS to keep some of the styles away from Outlook?. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the...

#3326Mar 9, 2021by devtechk3 answers
2 reactions

Canvas style css

Hi guys instead of styling in the init in this way... it's possibile to use a scss file in canvas? canvas { style:['FILE.SCSS'] } or simple make it cleaner with a single init css? Thank you! myComponent.append(<style> body { background: rgb(204,204,204); } .footer { position: absolute; bottom: 5mm; width: auto; left:...

artf

You can use canvasCSS option if you don't want to use files.

devtechk

Thank you very much! This config file is gonna help me a lot!

GJSBlock

Thanks for reporting this, @devtechk. Great question about canvas style css. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on()...

#3325Mar 9, 2021by mmotov4 answers
0 reactions

JSON.stringify(this.editor.getComponents()) Error

Version: 0.16.44 Hi there! I have remote storage for pages, and recently I faced an issue when saving page, JSON.stringify(editor.getComponents()) started to throw error Uncaught TypeError: e[M].getId is not a function. I investigated the already saved JSON representation of the page and found out that it fails on thi...

yucomds

Same error here ... do you have a solution? [EDIT] Downgrading seems to be the only solution for now

josfh2005

Same problem here, if I preprocess the components and remove that attribute (__symbol) before load the Editor the template works fine. Is the a way @artf to disable the symbols for now?

artf

Yeah unfortunately the previous version of grapesjs had a bug that created symbols involuntary. In the current version, the bug is fixed and symbols are disabled, but unfortunately, this still happens if you try to load a component with a...

#3323Mar 8, 2021by RaresVlaiduc3 answers
0 reactions

Increase the padding of layer item

Hi! I am trying to increase the value of the padding-left in the layer manager. I've found the file where this is happening but honestly I have no idea how I could modify that. I could do a small trick to achieve this but I am curios if I can do this by a config or something.

artf

No @RaresVlaiduc as you can see by yourself it's not configurable at the moment, but I'd be happy to accept a PR for such a case (eg. a new function option here which takes the level as the argument and returns the number for the padding)

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

GJSBlock

Thanks for reporting this, @RaresVlaiduc. Thanks for sharing your report about increase the padding of layer item. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your...

#3322Mar 7, 2021by Andrew-Chen-Wang1 answer
0 reactions

How to update built-in component's traits?

nvm You have to put component overriding in the plugins.

GJSBlock

Thanks for reporting this, @Andrew-Chen-Wang. Great question about How to update built-in component's traits?. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your s...

#3320Mar 7, 2021by alumpe1 answer
0 reactions

Typo for word "layer" in german language support

In the german locale file there is a typo in line 75 for the word "layer". Instead of layer: 'Evene' it should be layer: 'Ebene' someone must have accidently hit v instead of b on the keyboard when translating it. I am creating a pull request for it right now.

GJSBlock

Thanks for reporting this, @alumpe. Thanks for sharing your report about Typo for word "layer" in german language support. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFidd...

#3319Mar 5, 2021by anatoli-dp3 answers
0 reactions

Layers text does not center after creating a new line

Version: current? You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug from the demo? [ ] Yes [ x] No // to be fair never tried in the demo What is the expected behavior? when editing the layers text and adding a new line then backspacing i would expect the edited text...

artf

Ok, I'll push a fix for the editing of layers name, probably it doesn't make sense having new lines enabled there (I'll make stop the editing on Enter/Esc). For the second issue, If you're using something yours to resize the canvas, probab...

anatoli-dp

yeah I didn't realize editor.refresh() was a thing until after. otherwise thanks. awesome project

GJSBlock

Thanks for reporting this, @anatoli-dp. Great question about layers text does not center after creating a new line. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your...

#3317Mar 5, 2021by martijnc3 answers
0 reactions

Add support for promises to custom RTE API

What are you trying to add to GrapesJS? Support for richtext editors with promise based APIs. Describe your feature request detailed CKEditor5's Editor.create and Editor.destroy methods return a Promise that resolves when the editor has been fully created or destroyed. This causes an issue when destroying the editor (...

artf

Yeah, makes sense, probably I'd try to check if it's possible to make enable/disable methods (from ComponentTextView) async by default without breaking stuff, but checking if are thennable is always an option.

artf

This should be already possible.

GJSBlock

Thanks for reporting this, @martijnc. Great suggestion about FEAT: Add support for promises to custom RTE API! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event syste...

#3316Mar 5, 2021by am1rb4 answers
1 reactions

The editor does not remove the dead script blocks

Version: 0.16.34 Are you able to reproduce the bug from the demo? [ ] Yes [x ] No As I understand the code import dialog skips all the HTML scripts, so I can not reproduce the issue on the demo What is the expected behavior? The editor must remove dead script blocks before appending a new script block at the end of th...

Ju99ernaut

I'm unable to reproduce this, maybe you can provide more information on the custom component itself, anyway I suspect this is a storage related issue. Are you storing then loading pages from the generated html?

Andrew-Chen-Wang

Typically inline scripts go in the body at the bottom. Try putting it there maybe?

am1rb

I do not append anything by myself. The editor appends the scripts related to my components in a new script tag at the end of the generated HTML. Please take a look at this file: https://github.com/artf/grapesjs/blob/dev/src/editor/model/E...

#3315Mar 5, 2021by devtechk4 answers
3 reactions

Mm or cm Units are converted to px

I realized that mm or cm units are converted to px. How can i solve this problem? Thank you

Ju99ernaut

Did you add mm, cm etc, as units to the style manager inputs, these are not built in

Ju99ernaut

As stated above it's what the browser engine does, usually this is the fix, but I've never used it with units that aren't built in:

Andrew-Chen-Wang

I think that's just what the browser engine does in general. I'm no expert, but I think that output is just the final info interpreted by the engine.

Browse all topics