Issue #1534💬 AnsweredOpened October 22, 2018by YashPrince0 reactions

Update property Input value from model style.

快速解答by artf

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

Read full answer below ↓

Question

@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.

Answers (3)

artfOctober 29, 2018

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

YashPrinceNovember 1, 2018

@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.

lock[bot]November 1, 2019

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.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.