Skip to content

Add Universal Editor domain-based action button extension#66

Open
fe-lix- wants to merge 2 commits intomainfrom
universal-editor-domain-button-sample
Open

Add Universal Editor domain-based action button extension#66
fe-lix- wants to merge 2 commits intomainfrom
universal-editor-domain-button-sample

Conversation

@fe-lix-
Copy link
Copy Markdown
Contributor

@fe-lix- fe-lix- commented Mar 23, 2026

Summary

  • New universal-editor-domain-button-sample extension for the Universal Editor (universal-editor/ui/1)
  • Adds a header menu action button whose visibility is controlled by AEM Cloud program/environment IDs
  • Reads the current editor location via guestConnection.host.editorState.get() and parses author-p{programId}-e{environmentId} from the URL
  • Configuration (set in Extension Manager) accepts program: string[] and environment: string[] — empty arrays mean visible everywhere

Configuration

{
  "program": "[\"62254\"]",
  "environment": "[\"555348\"]"
}
program configured environment configured Behaviour
No No Always visible
Yes No Visible if current program ID is in the list
No Yes Visible if current environment ID is in the list
Yes Yes Visible only if both match

Test plan

  • npm install && aio app run from universal-editor-domain-button-sample/
  • Open Universal Editor — button appears with no configuration set
  • Set program to a non-matching ID → button is hidden
  • Set correct program/environment IDs → button is visible
  • Click button → modal opens

🤖 Generated with Claude Code

fe-lix- and others added 2 commits March 23, 2026 18:50
New extension that registers a header menu button in the Universal Editor
and controls its visibility based on AEM Cloud program/environment IDs
parsed from the editorState location. Configuration is provided via the
Extension Manager using program[] and environment[] arrays.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant