GrapesJS Issues

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

3,464 issues found

#3383Apr 2, 2021by KieronWiltshire4 answers
0 reactions

Is it possible to include the style in the html?

I'm currently using grapesjs to build email templates, however when I import HTML with the <style> tag already inside, before this is stored it split's the HTML and CSS up. When this is stored in my backend database, there is no <style> or <link> tag in the HTML, instead it's stored separately. Is there a way to preve...

Ju99ernaut

Grapesjs doesn't support inlinecss, but you can use the same technique used here https://github.com/artf/grapesjs-preset-newsletter. It uses the juice package to merge the html and css

artf

Yeah, at the moment the inline CSS is parsed for the CssComposer and removed from the DOM. This allows the editor to edit its styles.

ronaldohoch

One question about it. How can ckeditor edit putting the span with inline styles and keep it after close and reopen the same template?

#3382Apr 2, 2021by Squirrel14892 answers
1 reactions

Not able to add more than 2 projects under free version

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

Ju99ernaut

grapesjs and grapedrop are separate projects, you should try raising your issue here https://spectrum.chat/grapedrop

GJSBlock

Thanks for reporting this, @Squirrel1489. The issue with Not able to add more than 2 projects under free version appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and...

#3381Apr 2, 2021by pranay22103 answers
1 reactions

Switching between components gives maximum call stack size error

Hey artf, I would like to thank you for building such a powerful tool for building customized CMS. I'm implementing a new page feature in my project so I'm using your reference to switch between components but It gives me an error, Please can you guide me on how to build a new page on click add new button from the pan...

Ju99ernaut

I think arrays aren't the best method of storing page objects, so running array operations to get the page plus loading the page is probably too much for your call stack. You should consider loading the pages into memory only when you need...

artf

I'm not sure what is happening on your side but I'd suggest keeping an eye on #3206 as the built-in page manager is almost ready (I'll update that issue)

GJSBlock

Thanks for reporting this, @pranay2210. Great suggestion about Switching between components gives maximum call stack size error! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Usi...

#3380Apr 2, 2021by alemenciones2 answers
0 reactions

Default properties not selected in styleManager

Hello dear, can you know why default properties is not selected in style manager ?? What event can I trigger to update this ??

artf

Try to check your configuration for the styleManager https://github.com/artf/grapesjs/blob/dev/src/style_manager/config/config.js (highlightChanged should be true)

GJSBlock

Thanks for reporting this, @alemenciones. Great question about Default properties not selected in styleManager. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for you...

#3379Apr 2, 2021by silicahd3 answers
1 reactions

Tailwind CSS

I think the one thing that would make this builder amazing is adding tailwind css classes. Especially now with the new tailwind css on demand generator.

Ju99ernaut

I'm not sure if this is something that can be added to the core library, but definitely a plugin for that would be awesome.

artf

Yeah, I agree with Brendon, this is definitely something that could be added as a plugin

GJSBlock

Thanks for reporting this, @silicahd. Thanks for sharing your report about FEAT: Tailwind CSS. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version nu...

#3378Apr 1, 2021by dluague2 answers
0 reactions

Null text after saving.

Version: 0.16.45 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? There shouldn't have null text. What is the current behavior? After saving the data to the database and retrieving it (see attached components object) the null will appear. This is how I assign the components...

artf

Seems to be an issue on your side as I can't reproduce it (maybe you're doing something wrong on your back-end?!). Try to create a reproducible demo first (by using the localStorage)

GJSBlock

Thanks for reporting this, @dluague. The issue with null text after saving. appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating a...

#3377Apr 1, 2021by assadnazar3 answers
1 reactions

StyleManager options repeating 2 times

Version: 0.16.45 If i add grapejs-preset-js, then stylemanager repeats each option 2 times. Here is the jsfiddle link where you can check the same behaviour. https://jsfiddle.net/assadnazar/2asojqrc/1/ Maybe it's not merging the options

Ju99ernaut

Use:

assadnazar

bump!

GJSBlock

Thanks for reporting this, @assadnazar. Thanks for sharing your report about StyleManager options repeating 2 times. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Yo...

#3376Apr 1, 2021by rcloss4 answers
3 reactions

Changing upload URL for AssetManager programmatically

I've got an situation where depending on how the Asset Manager is opened I want to pass a slightly different upload URL. In the asset:upload:start event I have it looking to see which upload URL it should use, and if I have to change it I'm doing the amConfig = editorAssetManager.getConfig() amConfig.upload = 'NEW URL...

SzaboGabesz

editor.AssetManager.config.upload = 'NEW_URL' will do it

Ju99ernaut

The value in config is only used during init so changing it does nothing, maybe changing these might help:

rcloss

Thanks, just tried both of those, but no luck, at least in the asset:upload:start event

#3375Mar 31, 2021by christosapos2 answers
0 reactions

Cannot add spaces to extended button component based on text component.

Hello guys, First of all i would like to express my gratitudes for this amazing tool. I have extended button component based on text component so as to can edit the content of button manually without using traits. The code for the extended button component is this: var comps = editor.DomComponents; var defaultType4 =...

artf

Seems like space triggers the click event in Chrome. The solution seems to be to add the preventDefault on keypress https://stackoverflow.com/questions/22104860/chrome-firing-onclick-when-space-typed-in-contenteditable-button ps. avoid ext...

GJSBlock

Thanks for reporting this, @christosapos. Great question about Cannot add spaces to extended button component based on text component.. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS...

#3374Mar 31, 2021by FacuCarbon2 answers
1 reactions

Images and videos are not focused

Hello, I have a problem which is that when adding a video or an image to the canvas, it is not centered, but to the left. With the help of the panel I set the alignment but it does not center it either.

Ju99ernaut

Try placing it inside a container, you can probably centre it using something like flexbox.

GJSBlock

Thanks for reporting this, @FacuCarbon. Thanks for sharing your report about images and videos are not focused. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your Gr...

Browse all topics