GrapesJS Issues

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

3464 issues found

#3326March 9, 2021by devtechk2 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!

#3325March 9, 2021by mmotov3 answers
0 reactions

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

#3323March 8, 2021by RaresVlaiduc2 answers
0 reactions

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

#3320March 7, 2021by alumpeNo answers
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.

#3319March 5, 2021by anatoli-dp2 answers
0 reactions

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

#3317March 5, 2021by martijnc2 answers
0 reactions

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

#3316March 5, 2021by am1rb3 answers
1 reactions

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

#3315March 5, 2021by devtechk3 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.