You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow passing config.root.modelElement etc. in the configuration to define the model root #20029
Currently the model root element name is always $root — it is hardcoded throughout the engine and cannot be changed by the integrator. This task introduces a config.root.modelElement option (and potentially other config.root.* options) that allows configuring the root element name used when the editor is initialized.
This is a prerequisite for editors that need a custom root schema — for example, a root that restricts or extends what content is allowed at the top level differently from the default $root. It is also the foundation that makes #20026 meaningful: fixing hardcoded $root checks is only useful once the root name can actually differ.
Definition of Done
config.root.modelElement is accepted — the editor reads this option during initialization and uses it as the model root element name instead of $root.
Editor constructor uses the configured root name — the editor constructor reads config.root.modelElement and passes it when creating the model root, instead of hardcoding '$root'.
This one applies to all editors (classic, …).
Backward compatible — omitting config.root.modelElement results in identical behavior to today ($root is used).
Documented — the new config option is described in the API docs with a usage example.
Automated tests cover initialization with a custom root name, schema registration, and data round-trip.
introduces verification whether the provided modelElement is registered in the schema as isLimit, as this is a requirement for many features.
changes promise chaining to async/await in editor classes (as it gets over-complicated to read when adding another chained call).
As in the above PR, the code combines this issue and #20026, so it may already have been reviewed, and the rest of the $root cleaning could be handled in a separate PR.
Activity
niegowski commentedon Apr 8, 2026
All points from this ticket are already covered in #20028.
That PR also includes:
$inlineRootin schema and updates schema deep dive guide to cover it.$rootfixes from Make sure all data parsing or schema related checks use proper/actual root #20026, as development started from that ticket, but for easier testing, I switched to actualmodelElementconfig handling.modelElementis registered in the schema asisLimit, as this is a requirement for many features.As in the above PR, the code combines this issue and #20026, so it may already have been reviewed, and the rest of the
$rootcleaning could be handled in a separate PR.