Custom Device Manager as width/height inputs #4472
Unanswered
badiuciprian
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You should be able to accomplish that by updating the device properties. Currently, the iframe size is not reacting directly to the device properties changes but you should be able to trigger that manually (probably something I can fix for the next release). // Get the selected device or use editor.Devices.get('device-id')
const device = editor.Devices.getSelected();
// Update the device
device.set({ width: '500px', height: '...', widthMedia: '...' });
// Trigger manually the iframe update
editor.Canvas.getModel().updateDevice(); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hy guys, really excited about grapesjs, but I have a question:
Is it possible to have the device manager as 2 inputs, one for page width and one for page height?
I want to be allow the user to set specific page size from the ui.
Beta Was this translation helpful? Give feedback.
All reactions