Issue #1979šŸ’¬ AnsweredOpened April 25, 2019by 3dmedium1 reactions

StyleManager Option for Editing single Elements allways

Quick answerby artfā¤ 1

You can make use of selector:add event

Read full answer below ↓

Question

I'm using this great Library for Editing only Parts of Pages. I mainly design Compontens ready to use on the Page and when using the style Manager it allways should only take effect to only the selected Elements, not its classes.

So at the Moment I allways have to deselect calsses and edit. Is it possible to add an Option so Style Manager will allways use the ID for generating CSS?

Answers (3)

artf• May 1, 2019

You can make use of selector:add event

editor.on('selector:add', selector => selector.set({ 
	active: false, // disable the selector
	// or
	private: true, // hide the selector
}));
3dmedium• May 1, 2019

Thanks for the Solution. This is rather easy.

lock[bot]• May 6, 2020

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.