Issue #3137πŸ’¬ AnsweredOpened Nov 12, 2020by Asha15970 reactions

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

Quick answerby artf

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.

Read full answer below ↓

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

Answers (3)

artfβ€’ Nov 19, 2020

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]β€’ Nov 29, 2020

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

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @Asha1597. The issue with When I select an particular element I'm not getting its styles. This issue happens only with some elements. appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifica...

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.