Skip to main content
Dieses Thema wurde für Antworten geschlossen.

3 Antworten

anupampat
Community Advisor
Community Advisor
März 14, 2024 10:53 AM UTC

Hi @johann_lu ,

 

The styles under the edit bar are associated to cq:styleId which are stored under Template policies. You can create a custom event listener and listen to change for cq:styleId property under the content path, e.g.

/content/<pagePath>/jcr:content/root/main/responsivegrid/cards1

 

Übersetzen
Level 4
März 15, 2024 1:14 AM UTC

It is a good method, but I want to do this in js, is it possible?

Übersetzen
anupampat
Community Advisor
Community Advisor
März 15, 2024 8:30 AM UTC

Ideally yes you could if you target the class one of the OOTB classes like 'editor-styleselector-form' and write your logic based on change or click, but this will not be consistent.

Übersetzen