Issue #3367💬 AnsweredOpened March 26, 2021by kerryj891 reactions

Modal template

Quick answerby artf1

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

Read full answer below ↓

Question

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? I realize by doing that it would lose grapesjs modal open close events.

Answers (4)

Ju99ernautApril 3, 2021

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://github.com/Ju99ernaut/grapesjs-script-editor https://githu...

kerryj89April 5, 2021

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.

GJSBlockMay 17, 2026

Thanks for reporting this, @kerryj89. Great question about Modal template. 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 method Most operations can be achieved by listenin...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.