GrapesJS Issues

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

231 issues found

πŸ” general
#3385Apr 3, 2021by pranay22102 answers
0 reactions

How to use grapesjs with nuxtjs ?

I'm trying to wrap up grapesjs with nuxtjs framework any solutions to this?

artf

I think it's just about creating a Vue component for GrapesJS and use it in some of your pages

GJSBlock

Thanks for reporting this, @pranay2210. Great question about How to use grapesjs with nuxtjs ?. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look...

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

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

#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

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

#3373Mar 31, 2021by ikenderham2 answers
0 reactions

Predefined background colors when selecting a element with a certain class or div.

I have a question i hope sombody can help with. I want to make a trait where i can chose predefined colors, when selecting a div with a certain div. Can anyone help me, how to achive that in a simple way?

artf

Well, you can use a simple select trait type with the list of colors and update its style once is changed. Here you can find all the examples necessary for your case: https://grapesjs.com/docs/modules/Traits.html

GJSBlock

Thanks for reporting this, @ikenderham. Great question about Question: Predefined background colors when selecting a element with a certain class or div.. The recommended approach with GrapesJS is to use the event-driven API. Start here: C...

#3371Mar 29, 2021by devtechk2 answers
2 reactions

Generate pages numbers any idea?

Hi, guys I'm creating a doc generator through grapesjs, I'd like to insert page numbers like "Page 1 of 5" at the bottom of each page. My starting template have a wrapping class called .page actually I'm able to clone one page under one other to get more pages. Do you have any idea, how can i implement this feature ?...

devtechk

Hi Guys! I've found a way to achieve my goal! CSS property! here's my working code (you can call pagination tag as you want). Source: https://www.pagedmedia.org/paged-js/ HTML: <pagination class="text-right paginating">Pag </pagination> CSS

GJSBlock

Thanks for reporting this, @devtechk. Great suggestion about Generate pages numbers any idea?! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative a...

#3370Mar 29, 2021by xinnai1 answer
0 reactions

Compressed getJs issue

@artf Hi, I'm not sure if you understand my question. I want to edit the js code in my own js editor, first I set the js code from your editor using getJs(), but it looks like this in your demo.html: These code are all compressed. I want an uncompressed code like this in https://github.com/Ju99ernaut/grapesjs-script-e...

GJSBlock

Thanks for reporting this, @xinnai. Great question about Compressed getJs issue. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on()...

Browse all topics