Issue #1573๐Ÿ’ฌ AnsweredOpened November 12, 2018by crypto-dump1 reactions

Open modal after drop element

Quick answerby mcsekar12โค 1

Please check the docs https://grapesjs.com/docs/api/modal_dialog.html#modal use Modal.setContent();

Read full answer below โ†“

Question

How to show custom modal dialog when drop element on editor? like asset modal dialog appears when drop image block to the editor.

Answers (3)

mcsekar12โ€ข November 13, 2018

Use Editor events https://grapesjs.com/docs/api/editor.html#available-events editor.on('component:add', (model, argument) => { //filter using component name if (model.getName() === 'modelName') { //show modal } //filter using css Class if (model.getAttrToHTML().class === 'className') { //show model...

crypto-dumpโ€ข November 13, 2018

Thanks. I'm new to this plugin. How to create my own modal dialog that has checkbox or select options or etc ?

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.