Custom Element Processors

The custom elements module comes with Custom element processors that try to implement a reasonable default for content entities and fields. These defaults can be further customized with custom modules as suiting.

The default entity processor renders the data of all visible fields either as attribute to the custom element tag, or as nested markup via a slot. The module maps simple fields and their properties to attributes and falls back to rendering more complex fields to regular markup, which gets added as slot to the parent custom element.

This method was the default in version 2.x and since 3.x, it's used when "Use automatic processing" is enabled in the Custom Elements display. Besides that, when "Auto" is selected for individual fields the field is formatted using processors.

Processors are provided via services, for example see TextFieldItemProcessor as registered at the services.yml file.