[Question] Custom Modal Classes
Question
Hi there,
Great app, much appreciated that you have put this out there for the community.
Just a quick question, I would like to modify the size and appearance of the different modals, ie. Export, Image upload etc.
But it seems there is no unique class/ID on any of the modals.
Is there an easy way to add a unique class based on the modal type?
I would like to add it specifically to the "gjs-mdl-dialog" element.
Thanks!
Answers (2)
You can do it by intercepting their commands
const getDialog = () => document.querySelector('.gjs-mdl-dialog');
const assetsCls = 'gjs-mdl-dialog--assets';
editor.on('run:open-assets', () => getDialog().classList.add(assetsCls))
editor.on('stop:open-assets', () => getDialog().classList.remove(assetsCls))
Great, thanks @artf.
I will give it a go.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3415
QUESTION: Custom Asset Manager. How to set bg image
Hi there! I'm building a custom modal for the Asset Manager and basically, it seems that I need to override command. How I can understand i...
Issue #923
[Question]: Add a select-option to toolbar
I have read the code and only I could find out that there is only a list of ToolbarButton associated with the toolbar. I have a special tra...
Issue #1144
[Question]: Custom property to change multiple settings
Is there a way to extend a current property or create a new one to change multiple properties? I have a component in which I would like to...
Issue #2381
[QUESTION] Is it possible to add info modal on the editor
Hi, I would like to add on the grapejs editor a clickable questionmark we can click so we could give information on what does this specific...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.