Hello @agyawa ,
To prevent users from selecting more than one style from the Rich Text Editor (RTE) Styles plugin dropdown in AEM, you will likely need to customize the behavior of the styles plugin itself. By default, AEM’s Styles plugin allows multiple CSS classes to be applied to selected text, which is why multiple entries can be selected and combined.
There is no explicit configuration in standard AEM documentation to restrict the styles dropdown to single selection via configuration only, but this restriction can be managed by:
-
Customizing the plugin’s JavaScript behavior: You would need to override or extend the default styles plugin so that, when a style is chosen, it removes any previously added style class from the selected text, enforcing single choice.
-
Modify the widget to single select: If you're using CoralUI-based dropdowns in your dialog or plugin UI, ensure you use a widget that supports single selection (like the regular select, not multi-select, or one with multiple attribute disabled).
-
Implement client-side filtering logic: You can implement JavaScript in your component to clear styles classes before adding a new one.
Here is a helpful reference about configuring the Rich Text Editor and customizing plugin behavior:
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con...
No direct OOTB configuration for single-select which means,
The standard configuration nodes and properties (features, styles, etc.) only define what styles are available—not how many can be applied at once:
“Once the Styles plug-in is enabled, the Style drop-down list is displayed in the edit dialog. However, the list is empty as no Styles are configured.”