Issue #3137Opened November 12, 2020by Asha15970 reactions

BUG: When I select an particular element I'm not getting its styles. This issue happens only with some elements.

Question

Not getting styles of the selected element

Here is my code, const model = editor.StyleManager.getModelToStyle(component); let styleObject = model.getStyle(); console.log("styles", styleObject)

Version:

0.14.49

Are you able to reproduce the bug from the demo?

[X] Yes [ ] No

What is the expected behavior?

When an element is selected I should get the styles of the selected element.

What is the current behavior?

When an element is selected I'm not getting any styles only empty object.

Are you able to attach screenshots, screencasts or a live demo?

[X] Yes (attach) [ ] No

Here's the screenshot of actual and expected result,

Actual

Screenshot from 2020-11-12 16-54-12

Expected

Screenshot from 2020-11-12 16-54-41

Answers (2)

artfNovember 19, 20200 reactions

First of all, you need to upgrade your grapesjs version (you're using a 2 years old one), then you have to provide a live demo of the issue.

no-response[bot]November 29, 20200 reactions

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 need so that we can investigate further.

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

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.