CharEntity Component Referencetml`<CharEntity id=entityId />`
The CharEntity component renders a character entity using the entity ID given in the id attribute. It retreives the character entity contents and if the result is a string, it creates a DOM text node with the string. Otherwise, it renders the contents as a template.
A numeric entity of the form &#NNN; is converted to the character with that decimal character code. An entity ID that is not defined is rendered literally as &id; (the text the author wrote) rather than being dropped.
The normal component build process extracts character entities strings of the form &entityId; and replaces them with CharEntity components, so the CharEntity component is not typically used for page rendering.
id (required)The CharEntity component ignores all children.
The entities are defined in charEntity.js, which exports two functions:
charEntity(name)name (without the leading '&' or trailing ';'): a string, or a Template for entities such as lineBreak and sync. Numeric entities (#NNN) return the character string. Names not in the built-in table are looked up as standard HTML entities, and an unknown name returns the literal text &name;.charEntityString(str)str with every &name; replaced by the string value of charEntity(name). Useful for plain-text output such as speech or labels that cannot contain templates.CharEntity Component will render a DOM TEXT node if the character entity contents is a string. Otherwise, it renders the contents as a template.