grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Update property Input value from model style.

Open yashvirsoftobiz opened this issue 8 years ago • 3 comments

@artf I want to update height of the element and want to give a custom height using following code

var model = editor.getSelected();
var style=model.getStyle();
    style['height'] = '600px';
    model.setStyle(style);


height

It's working fine and it's update the selected model style but it does not update the property input value. How can we update the input values also while updating the style.

Any help would be appreciated, thanks in advance.

yashvirsoftobiz avatar Oct 22 '18 16:10 yashvirsoftobiz

For now, use this editor.trigger('component:toggled') maybe one day I'll make it update automatically

artf avatar Oct 29 '18 19:10 artf

@artf I have used

var model = editor.getSelected();
var style=model.getStyle();
    style['height'] = '500px';
    model.setStyle(style);
editor.trigger('component:toggled')

but it did not updated the value of height field in left panel.

yashvirsoftobiz avatar Nov 01 '18 07:11 yashvirsoftobiz

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Nov 01 '19 07:11 lock[bot]