Issue #2719Opened April 17, 2020by ajumell0 reactions

[QUESTION] How can I mark a class name as protected or private in a component.

Question

Hi team,

First let me thank you all for creating this wonderful library. You guys are awesome.

I want to disable editing a specific class name in a component. like row and col. How can i do it. I saw private and protected option in selector_manager code. But I am not sure how to implement it. Can you guys please help me on this.

Answers (3)

pouyamiralayiApril 18, 20200 reactions

Hi @ajumell checkout #1979 comment Cheers!

ajumellApril 18, 20200 reactions

Hi @ajumell checkout #1979 comment Cheers!

Thanks for the response.

I have a doubt, this is generalised right, Do we have an option per component.

artfApril 23, 20200 reactions

@ajumell you can check the name of your selector before making it private

editor.on('selector:add', slc => 
	slc.get('name') === 'my-private-cls' && slc.set({ private: true })
);

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.