Web Components

Web components is the name given to a set of features being added to the W3C HTML and DOM specifications that support the creation of reusable components in web documents and web applications.

CUE makes use of this technology to enable the inclusion of custom field types in your content items. Using web components you can, for example, configure CUE to display an integer field in a content item as a graphical slider instead of displaying a simple text field. You can also use it to display much more complex components containing many different controls and elements: a color picker component that offers the user several different ways to choose a color, for example.

All you need to do to add a web component to CUE is:

  • Create an HTML file containing the definition of your web component.

  • Put the web component definition in a web location that is accessible to CUE.

  • Add information about the web component to the CUE configuration file.

CUE is then ready to use the web component. You can now ask CUE to display the web component instead of specific fields in your content items by adding ui:editor elements to field definitions in your publication content-type resources.

This process is described in more detail in the following sections.