Cannot set dialog width or size
See original GitHub issueI’m using the TinyMCE 5.0.1 Dialog UI component in a custom plugin. The docs don’t really mention how to set the dialog dimensions but from looking at the source code I’ve seen references to “width” and “size” properties; the former taking an integer and the latter a string such as “normal”.
However, I’ve set both of these properties with various values and neither seem to have an effect on the dialog size. It looks like the default size is hard coded as 480px max-width in the editor stylesheet and the dialog config can’t currently be used to override this. Or am I missing something?
For example, setting Dialog width in this way does nothing:
editor.windowManager.open({
title: 'Test',
width: 800,
body: {
type: 'panel',
items: []
},
buttons: []
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Can't set properly my Dialog Window size and placement target
To solve my problems i removed the binding for width and height and simply added in the constructor of the DialogWindow
Read more >Dialog | Dimensions | JET Developer Cookbook - Oracle
A dialog displays a popup window that provides information and gathers input from the application user. Dialog dimensions - width, height, min-width, ...
Read more >How to Size and Position the MUI Dialog Component - Medium
Successfully set custom size and position for the Dialog ... any width or height passed to PaperProps sx value will affect the Dialog...
Read more >EJ2 Grid Add/Edit Dialog size | ASP.NET Core - EJ 2 Forums
I am trying to change the height & width of the Add/Edit dialog in ... So in the normal window, we cannot set...
Read more >How to Make an Alert Dialog Fill Majority of the Screen Size in ...
setting width to 90% of display. layoutParams.width = ( int ) (displayMetrics.widthPixels * 0 .9f);. // setting height to 90% of display.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t agree with the solution by TinyMCE team in this case. Limiting developers liberty is generally frowned upon.
In order to set a custom size of your dialog:
TinyMCE will set the size of next opened dialog correctly so you can use this safely. As of version 1ac52053224165998fe49b7d5d2d6236fa7f94ab (5.2 / 5.3 dev)
Yeah, I get it, but this is the decision we made and instead we offer a fully customisable theme (hopefully we’ll release our theme builder soon which will make customising much easier).