A developer needs to configure two style options (style-a and style-b) for a text component so authors can choose between different pre-defined styles for their content. What is the correct way to define the cq:editConfig node?
When defining component style options in AEM, authors can select from pre-defined CSS classes by configuring them in the component’s cq:editConfig node under /cq:style. The correct properties are:
cq:styleClasses: Defines the list of CSS classes that authors can apply.
cq:styleLabel: Defines the label displayed in the authoring dialog for the style selection.
Options B, C, D are incorrect because they use invalid property names (cssClasses, styleLabel, cssStyles, cssLabel) which are not recognized by AEM.
From Adobe Documentation:
“Component styles can be defined using the cq:editConfig node. Authors can choose between style variations configured under cq:styleClasses with a descriptive cq:styleLabel.”
— AEM 6.5 – Defining Component Styles with cq:editConfig
— AEM Core Components – Style System
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit