CharEntity Component Reference

Table of Contents


Introduction

Syntax

tml`<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.

Attributes

Children

The CharEntity component ignores all children.

Functions

The entities are defined in charEntity.js, which exports two functions:

DOM element properties