GrapesJS Issues

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

231 issues found

πŸ” general
#3368Mar 27, 2021by sizhousama2 answers
0 reactions

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

GJSBlock

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

#3367Mar 26, 2021by kerryj894 answers
1 reactions

Modal template

Is there a way for me to modify the template from a compiled state? https://github.com/artf/grapesjs/blob/d3256e621bb43a537213ffcd86b10dc0bd070c0b/src/modal_dialog/view/ModalView.js#L1-L16 If not, what would be the cleanest way to insert title and content into a modal skeleton from our CMS for a tighter look and feel?...

artf

Now it's possible to replace the modal https://grapesjs.com/docs/modules/Modal.html#custom-modal

Ju99ernaut

Here's a list of plugins that use the built in modals, hopefully they're helpful: https://github.com/artf/grapesjs-tui-image-editor https://github.com/artf/grapesjs-custom-code https://github.com/Ju99ernaut/grapesjs-template-manager https:...

kerryj89

Thanks, but I was looking for a way to inject the content into my own modal. A lot of libraries have a modal template file or variable to do this.

#3366Mar 26, 2021by kerryj894 answers
0 reactions

Extending preview command

I am trying to extend the preview command. I expected the code below to run the normal preview command along with console output, but only console statement runs. How can I preserve the original preview code? The below works for me until someone can enlighten where my thought process went wrong.

artf

If you specify a new run() function the command will run only the new one, otherwise, it wouldn't be possible to fully change a command (here more about extending commands)

ronaldohoch

Hello Artf, oddly enough, i need the same thing he does. So, the best way to do is doing the same way he does? Running the original preview command inside the extended preview?

ronaldohoch

Well... Other thing i'm doing is extending the preview by running the command on event.:

#3365Mar 26, 2021by Franci5co5aoco4 answers
0 reactions

Contenteditable attribute on Layer's name span

Hi @artf I would like to know why layer's name span has a contenteditable attribute. There is no mechanism implemented on grapesJs to really change the layer name after refreshing the page if I'm not wrong. It can be a little bit confusing to the user. Thanks.

artf

If you double click on the layer name you can actually change its name :)

Franci5co5aoco

@artf , sorry I think I was misunderstood. I meant you can change the name but when you refresh the page the changes are not been saved... and I think that there isn't a mechanism implemented to achieve it. When the user modifies the layer...

artf

No, the mechanism to store/load custom layer names is there, the only issue is that the change is not triggering the store... indeed, if you try to move some component right after the change, you will see them after page refresh. Anyway, t...

#3362Mar 23, 2021by qweiop8013 answers
0 reactions

Double click problem

grapesjs - 0.16.105 When I click in one element(form - this element have disable cloning), next second element(column). First element clone in to second element and lost all styles. Can You help me? https://user-images.githubusercontent.com/44744754/112153667-cb534080-8be3-11eb-90ef-dbccc866fde2.mp4

artf

Hi, at first, you need to update your grapesjs version, it's too much old, and I can't help you without a reproducible demo of the issue

qweiop801

I update grapesjs to 0.16.45 and problem still exist

GJSBlock

Thanks for reporting this, @qweiop801. Great question about double click problem. 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...

#3358Mar 22, 2021by qweiop8012 answers
0 reactions

Set Model property.

How can I disable model drag button on this event:

artf

If for model drag button you mean the button on the toolbar, you should update the toolbar property, eg:

GJSBlock

Thanks for reporting this, @qweiop801. Thanks for sharing your report about Set Model property.. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version...

#3350Mar 18, 2021by devtechk3 answers
4 reactions

Uncaught TypeError: can't access property "el", n is undefined

Hello, I'm using grapesjs 0.16.44 and only in firefox I'm faceing this issue. Using grapesjs block basic preset. Anyone can help me? Thank you a lot!

artf

try to place your code inside

devtechk

Problem "solved" removing : looking for a better solution to make active the block panel af first I've also noticed other conflict like with my custom modals and modal from export plugin (clicking export plugin was fire my custom modal on...

GJSBlock

Thanks for reporting this, @devtechk. The issue with Uncaught TypeError: can't access property "el", n is undefined appears to be a race condition or state management timing problem. This typically happens when component lifecycle events a...

#3349Mar 18, 2021by maivanchuong953 answers
0 reactions

Import template from file zip this export

Hi all I want to import the zip file from the file previously exported by grapesjs. Can you help me ?

artf

This is has nothing to do with the core library. You can make your own plugin if you need it

Sunsiha

hi @maivanchuong95 have you figured any solution?

GJSBlock

Thanks for reporting this, @maivanchuong95. Great question about FEAT: Import template from file zip this export. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for yo...

#3348Mar 18, 2021by FreshImmuc2 answers
0 reactions

How

Hey, I know it got explained, how to use this but I didn't understand... How do I use this?

FreshImmuc

:/

GJSBlock

Thanks for reporting this, @FreshImmuc. Great question about How. 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() event listener...

#3344Mar 17, 2021by NagarRahul3 answers
0 reactions

I am trying to get js using getJs() method but i am getting null value. How I can get js?

NagarRahul

@artf

artf

That method takes the JS used in your components. So, if you don't have components with JS it'll be empty

GJSBlock

Thanks for reporting this, @NagarRahul. Great question about FEAT: I am trying to get js using getJs() method but i am getting null value. How I can get js?. The recommended approach with GrapesJS is to use the event-driven API. Start here...

Browse all topics