-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal width #2592
Comments
Correct, probably it would be great to let it pass custom attributes... a PR would be welcome |
OK, what I'm thinking is to create a function to be able to set the width like: setWidth('400px'), and also a method to set custom attributes: setAttributes({'data-custom-attribute': 123}). I think 2 functions are needed because the width is controlled by CSS, and so is the modal's design, so just letting the user set the width is good enough in this case. The attribute function would be for any other case that's needed What do you think? |
Good idea, but to be honest, for now, I'd simply add a new |
I can help with this, @artf, let me know if it is okay to contribute. |
@sunnykgupta sure if @kaoz70 is not already on it, it would be great |
Hello, sorry I'm piled with work now, if @sunnykgupta can give this a shot it would be great. |
Hi, This change was introduced in grapesjs? we have some property to change the size of the modal? |
I'll add the |
Perfect thanks |
For those who don't know how to use modal const modal = editor.Modal;
const opts = {
attributes: { class:'my-custom-class', id:'my-custom-id' }
}
modal.open(opts); Because I didn't find how to use it in the documentation here. |
Hello, is there a way to set a modal's width, its currently set to 850px by CSS, but I would like to create a dialog with a small amount of text and its too big for this:
But it would be great to get this:
Without overriding the CSS, because I would still like to use large modals.
I checked the source code and the docs, it seems the only properties you can set are title and content.
The text was updated successfully, but these errors were encountered: