GrapesJS Issues

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

877 issues found

πŸ” question
#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()...

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

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

#3313Mar 5, 2021by fahad1574 answers
2 reactions

There are lots of click required to make text editable, can we make text field editable on a single Click.

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

Andrew-Chen-Wang

Single click can get annoying when dragging around blocks. If you've already selected a block, you still need to do a double click. If you didn't select a block, then you can just double click the block to edit the text. I think that's pre...

fahad157

@Andrew-Chen-Wang Yes that's right but in my scenario i want edit on just single click, if it is possible then plz guide.

mihir-khandekar

@fahad157 were you able to fix this?

#3312Mar 5, 2021by Andrew-Chen-Wang3 answers
0 reactions

Make side panel's width to 20%

What are you trying to add to GrapesJS? The side panel looks scrunched. Unless you've got a big desktop, I'd rather not have images from the blocks panel go off to the side. Additionally, the icons at the top e.g. "getting a new block" icon is just obscured unless you've got a decently large screen. Describe your feat...

Ju99ernaut

The idea is to maximize the area covered by the canvas, but you can easily change panel sizes with custom css.

Andrew-Chen-Wang

For sure, I just don't think the demo should look all scrunched up like that :P I suppose it's personal opinion then.

GJSBlock

Thanks for reporting this, @Andrew-Chen-Wang. Great suggestion about FEAT: Make side panel's width to 20%! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: A...

#3310Mar 5, 2021by Andrew-Chen-Wang3 answers
3 reactions

Tablet and mobile view not resizing

Version: The one in the demo Are you able to reproduce the bug from the demo? [X] Yes [ ] No What is the expected behavior? Mobile and tablet view should resize the canvas when window resizes. Describe the bug detailed The desktop view properly resizes the canvas when resizing the window What is the current behavior?...

Ju99ernaut

The mobile and tablet devices are pixel pased, so they just resize the canvas to a certain number of pixels regardless of window size. I believe desktop just sets canvas to 100%.

artf

As mentioned by @Ju99ernaut this is how devices work. Honestly, I don't even see the reason behind such a case, why the user should resize the window? You might also start to see/update styles not related to the proper device and that woul...

GJSBlock

Thanks for reporting this, @Andrew-Chen-Wang. The issue with Tablet and mobile view not resizing appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modification...

#3307Mar 3, 2021by neon123454 answers
3 reactions

Provide a not minified version

Is there a single file version of grapesjs that is not minified? It would be nice to have one for bug fixing and quick testing of new features/improvements.

neon12345

It is disappointing that this is just closed. Sure I could change my workflow but why not make it as comfortable as possible for people to contribute?

stljeff1

Would somebody kindly explain how to use the sourcemap? I am having a very difficult time upgrading to the latest grapes version, and need any debugging help I can get. I am importing grapesjs into my Angular/Typescript app. I don't unders...

Ju99ernaut

That's already available, just reference grapesjs.js instead of grapesjs.min.js

Browse all topics