Universal Editor Component Models
يجهز بلوك AEM Edge Delivery للمحرر الشامل.
Use this to set up an AEM Edge Delivery Services block for the Universal Editor in an AEM-authoring (xwalk) project: the block's component definition, model (properties-panel fields) and filters in blocks/<name>/_<name>.json, adding it to the editor's add menu, option fields, multi-value fields, and tabs or containers. Also use it to fix a block missing from the add menu, or edits to component-definition.json, component-models.json or component-filters.json that disappear (those files are genera
Install
npx skills add adobe/skills --skill ue-component-modelWorks with
claude-code (native), claude (native), codex (native), chatgpt (native), gemini-cli (native), cursor (native), copilot (native), opencode (native), amp (native), roo (native), kiro (native), goose (native), junie (native), trae (native), cline (compatible), continue (compatible), antigravity (compatible), windsurf (compatible), augment (compatible), qwen-code (compatible)
Content
Universal Editor Component Models
In AEM-authoring projects (aem-boilerplate-xwalk) authors fill properties-panel fields instead of a table. AEM renders those properties as the same table structure that document authors would type, so one block serves both. The structure therefore comes from content-modeling; this skill maps it to fields and registers the block. Skip it for document-based projects.
Steps
- Get the content model (rows, cells, variants) from content-modeling. If it does not exist, create it first. Do not derive fields from
decorate(). - Map it to properties. Each row (or group of cells) is one property, in table order. Container blocks (cards, carousel): the container has a
filter, each item has its own model, one row per item and one column per property. - Write the partial
blocks/<name>/_<name>.jsonwithdefinitions,modelsandfilters. Register it where authors can add it, or they cannot: a block id goes into thesectionfilter inmodels/_section.json; a custom section type (for example a tab panel) goes into themainfilter inmodels/_component-filters.json. Then runnpm run build:json: it regenerates the rootcomponent-definition.json,component-models.jsonandcomponent-filters.json, which you never edit by hand (the pre-commit hook also runs it). - Check ids match (definition
template.modelorfilterto the model or filter id), JSON is valid, anddecorate()keepsdata-aue-*instrumentation when it moves elements (moveInstrumentation(), defined inscripts/scripts.jsof aem-boilerplate-xwalk).
Rules
The fields produce the same table a document author would type, so content-modeling's rules still apply to it (default content in cells, limited columns, no key/value for content, no nested blocks). The rules below are only the Universal Editor specifics.
- Block definitions use resource type
core/franklin/components/block/v1/blockand a templatename; without either the block renders nothing. Do not write custom AEM components. Default content (text, title, image, button) already has components. - Field names control the markup.
image+imageAltbecome one picture;link+linkText,linkTitle,linkTypeone link (typeprimaryorsecondaryadds strong or em);title+titleTypeone heading. Suffixes are case sensitive:Title,Type,MimeType,Alt,Text. - Group fields into one cell by prefixing
<group>_(teaserText_title,teaserText_cta1): authors get separate fields, the block gets one cell of semantic elements. - Block options: a
classesproperty (select or multiselect) becomes the options in the block header.classes_<name>fields extend it; a booleanclasses_field adds its name when on. Prefer options to key/value rows. - One level of nesting. Tabs, accordions and similar are modelled as sections (
core/franklin/components/section/v1/section) that client-side auto-blocking combines into one block, not as blocks authored inside blocks. Auto-blocking producing a nested result is fine. For tabs, each tab panel is a section whose model has atab-labelfield (section metadata); the tab list is auto-blocked from it. This is the maintainers' example pattern (see below), even though a heading would be the preferred label in document authoring. - Short lists of simple parts in one block (logos with alt text, keywords, several CTAs, carousel images) are multi-value fields:
multi: true, as acontainerwith its fields when each entry has several parts (for exampleimage+imageAlt). Use child items (a container block with afilterand an item model) when each entry is rich content. Multi-value fields render as lists only when multi-field is enabled:public.xwalk.multi-field.enabled: trueinxwalk.json(or the site config); check it and enable it if you rely on it. Otherwise values arrive as one comma-separated string. Containers cannot nest inside multi-fields. - Columns has no content model: only
rows,columnsandclasses, default content in the cells. "key-value": truerendersname | valuerows. Only for configuration-style blocks, never for content.- Field types:
text,textarea,richtext,reference(assets),aem-content(any AEM content, for links),select,multiselect,checkbox-group,radio-group,boolean,number,date-time,container,tab,aem-content-fragment,aem-experience-fragment,aem-tag. Always setvalueTypeas the type requires (string[]for checkbox-group,boolean,number). - Page metadata fields: a model with id
page-metadata(or<template>-metadata).
Examples
Before inventing a pattern, read the example PRs in adobe-rnd/aem-boilerplate-xwalk (titles start with "Example:", by the xwalk maintainers; they are best practice): Tabs (#69), Multi-Fields and Composite Multi-Fields (#79), Column Layout (#72), Content Fragment Block (#76), Authoring Governance (#81). gh pr view <n> and gh pr diff <n> show the definition, model, filter and code.
Source and license
- Source
- Adobe Skills
- Original
- adobe/skills/plugins/aem/edge-delivery-services/skills/ue-component-model/SKILL.md
- License
- Apache-2.0