Issue #3242πŸ’¬ AnsweredOpened Jan 20, 2021by Nielsticot0 reactions

When Style Manager is in another div, the message "Select an element before using Style Manager" is not showing

Quick answerby mosh-tudor

I used this code to solve it:

Read full answer below ↓

Question

Version: 0.16.34 What is the expected behavior? When the editor is initialized, no element is selected, so the style manager should say "Select an element before using Style Manager" like it does when not using "appendTo" in the editor configuration. What is the current behavior? When using "appendTo" in the editor config like this : the style manager starts with all the sectors showing although no element is selected Demo The same behavior can be seen in the example from https://grapesjs.com/docs/getting-started.html#style-manager

Answers (4)

mosh-tudorβ€’ Jan 20, 2021

I used this code to solve it:

Nielsticotβ€’ Jan 21, 2021

This is not what I want, my issue is before any element is selected so before the event "component:selected" is trigerred. I temporarily fixed it by selecting an element on editor load but it is not what I really want

artfβ€’ Jan 28, 2021

If you're using the StyleManager in a custom element you have to handle that state on your own.

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @Nielsticot. Great question about When Style Manager is in another div, the message "Select an element before using Style Manager" is not showing. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for yo...

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.