Hi @PavelKu3,
1. Adobe’s Official “Custom Button” Example (Insert Content Only)
Adobe’s own example shows how to add a basic custom button (InsertTip) using the rte
extension—but it only inserts content and doesn’t provide a dropdown UI. This is a good starting point for any custom button implementation, but falls short when it comes to dropdowns.
2. AEM UIX GitHub – Dropdown-Enabled Extension
The adobe/aem-uix-examples GitHub repo includes several content-fragment-editor extensions. Notably:
-
cf-editor-form-field-dropdown-sample
-
cf-editor-rte-toolbar-configurable-buttons
-
cf-editor-custom-rte-field
… and critically:
-
cf-editor-rte-toolbar-button-sample
These repositories contain working extensions for both form-field dropdowns and RTE toolbar extensions—some of which include dropdown behavior, not just simple insert buttons.
You can clone the repo, explore the examples, and adapt the toolbar-button sample to include a dropdown instead of a basic button.
3. Custom RTE Plugins in Classic AEM
While older (AEM 6.x) examples like Exadel’s “footnote” plugin or the AEM Lab “style picker” use classic RTE plugin patterns (via cq:ClientLibrary
and rtePlugins
), they demonstrate how to:
Recommended Approach for Dropdown Button
-
Clone the cf-editor-rte-toolbar-button-sample
from the UIX repo.
-
Modify the onClick
handler to instead open a dropdown or popover with predefined options—similar to how classic plugins do.
-
Use InsertContent
or ReplaceContent
instruction based on the user's selection.
-
Style the dropdown/panel and integrate with Coral UI, Spectrum icons, etc.
Santosh Sai

