Issue #1241💬 AnsweredOpened June 26, 2018by SalesFeed0 reactions

New style is not reflected in panel

Quick answerby artf

First of all, I'd avoid applying the style on selected component editor.getSelected(), you should do it on opts.target as it might be different from the selected one editor.runCommand('open-assets', { target: someOtherComponet })how do I detect what property or attribute the user is editting? Make use of https://githu...

Read full answer below ↓

Question

Hello, In my project I have replaced the AssetManager by my own. However, when I use the new manager to update a components background-image, the background-image shows up, but the new state isn't reflected in the panel. Basically my question is: how do I detect what property or attribute the user is editting? And how to reflect the new state in the panel? Best, Richard

Answers (3)

artfJune 30, 2018

First of all, I'd avoid applying the style on selected component editor.getSelected(), you should do it on opts.target as it might be different from the selected one editor.runCommand('open-assets', { target: someOtherComponet })how do I detect what property or attribute the user is editting? Make...

no-response[bot]July 10, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

SalesFeedJuly 13, 2018

@artf Thanks, I followed your suggestions, but I can not get it to work.

opts.target does not have a addStyle method

It also seems the editor is generating an extra id in the css, so there are duplicates. I have set avoidInlineStyle: true, but that does not seem to help

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.