GrapesJS Issues

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

829 issues found

🔍 question
#3370March 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...

ClaudeCode

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

#3368March 27, 2021by sizhousama2 answers
0 reactions

[QUESTION] I need to reload "https://.../main.js" every time I add a block,what should I do?

I need to reload "https://.../main.js" every time I add a block,what should I do?

artf

Subscribe to the event you think might be useful for you and then reload as you wish

ClaudeCode

Thanks for reporting this, @sizhousama. Great question about [QUESTION] I need to reload "https://.../main.js" every time I add a block,what should I do?. The recommended approach with GrapesJS is to use the event-driven API. Start here: C...

#3364March 25, 2021by NagarRahul3 answers
0 reactions

FEAT: @How to fix container size when we are drag element inside the container,Container will be expended according to the child dragged element. How we can auto size child element according to the parent container. Container should not be expend according to the child element. It's should be show scroll.

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

NagarRahul

@artf when I drag button it is expend. I want to fix it. It's should not expend when drag new button. It will shoe scroll after overflow.

artf

it just depends on the styling of the component (eg. using display inline-block for that button might fix the that)

ClaudeCode

Thanks for reporting this, @NagarRahul. Great suggestion about FEAT: @How to fix container size when we are drag element inside the container,Container will be expended according to the child dragged element. How we can auto size child ele...

#3341March 15, 2021by HeyWrecker4 answers
2 reactions

Question: Social Media Group - Facebook

Hello, Is the Facebook social media component intended to be used to provide a Facebook link to a business or organizations Facebook page or is it exclusively designed to share something specific to your timeline? It appears to be the latter, even though that seems counter-intuitive to me since many emails simply prov...

artf

I guess you're looking for this https://github.com/artf/grapesjs-mjml

HeyWrecker

Ah, my mistake, then, thank you!

HeyWrecker

As a follow-up, I have confirmed that the Instagram social component does link to the IG profile page. Whereas the Facebook option does not link to the Facebook page.

#3339March 14, 2021by Nigus3 answers
0 reactions

Question: How to add different aspect ratios to mobile devices in the device manager.

We are working on a cms system that uses grapes js. We came up with a condition where we couldn't add aspect ratio in the "mediaCondition" by keeping the orientation. Our design editor has a portrait and landscape design modes with 16:9 ratio. But we would like to add more aspect ratios like, 18:9, 19:9 and 19.5:9, so...

artf

Sorry, can you illustrate better what do you need? What is the final CSS you'd expect from the editor

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

ClaudeCode

Thanks for reporting this, @Nigus. Great question about Question: How to add different aspect ratios to mobile devices in the device manager.. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the Gra...

#3337March 12, 2021by wfcheng4 answers
0 reactions

Question: Use arrow keys to move blocks in canvas configured in absolute positioning mode

Hi, I am building a solution for students to tell their high school experiences as slides built from grapejs editor (similar to canva), and have configured the editor in 'absolute' mode, which works wonderfully. However I can't seem to find a way to move the dropped block in the editor with the arrow keys. I am aware...

artf

No, unfortunately, for such a case, the custom keymap would be the only solution. You should just get the selected component and update its style.

michaelhofer

I have found a working solution for this as follows: The commands are being added as follows: The moveSelectedElements method just does the following: However, when moving the elements with arrow keys, the canvas scrolls as well, which is...

sathudeva7

keymaps.add('ns:my-keymap', '⌘+s, ctrl+s', 'some-gjs-command', { // Prevent the default browser action prevent: true, });

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

#3296March 1, 2021by RaresVlaiduc3 answers
1 reactions

[QUESTION]: Multiple pages plugin

Hello there! I've seen some discussions about some sort of multiple pages plugin in here. Is this still a thing? Is there something done regarding this or should I start my own plugin? Thanks!

Ju99ernaut

I've made a simple one for indexedDB but it can also be adapted for other storage types https://github.com/Ju99ernaut/grapesjs-indexeddb-ui however I plan on deprecating it in favour of a new plugin that has other storage types built in, a...

artf

Yeah, it's still quite in progress (I have no ETA, unfortunately) but for sure the PageManager will be in the core.

ClaudeCode

Thanks for reporting this, @RaresVlaiduc. Great question about [QUESTION]: Multiple pages plugin. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module...

#3293February 26, 2021by eikerd2 answers
0 reactions

Blockmanager: adding custom class gjs-block-category / gjs-title DIVs

I have a list of categories, and I want to mark some with a different style depending on if they are required or not. so ideally i could add a class to the div with class 'gjs-title' so that it says 'gjs-title required-field' this.editor.BlockManager.getCategories(); returns an array of all my block-categories, but my...

artf

Hi @eikerd by checking the code, at the moment, I don't see any other way of customizing block category DOMs if not doing something on your own with the DOM (once blocks are rendered). I'll probably add the view to the category model in th...

ClaudeCode

Thanks for reporting this, @eikerd. Great question about Blockmanager: adding custom class gjs-block-category / gjs-title DIVs. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS docum...

#3285February 21, 2021by ashercoren4 answers
6 reactions

[Question]: Doctype in the canvas iframe

Hi. This question has already been asked twice (here and here) but has never got an answer. Is there a way to add <!DOCTYPE html> as the beginning of the canvas iframe so that the iframe will be in standards mode. I need this since I am trying to use tinyMce as the custom RTE, and tinyMce requires standards mode.

artf

In the next release, I'll add a new event helper that will allow editing iframe content before load:

bgrand-ch

Hello, For future questions or technical issues, which aren't bugs, GitHub's Discussions tab is the place to be. Don't forget to close this issue if it is resolved or write a new detailed message in Discussions -> Q&A category (and close t...

artf

Not really, but I'm open to solutions on how to make it customizable.