1

Can I add html HTML Entity to lightning component for example:

HTML5 Named Entity:☆ or Decimal: ☆ or Hexadecimal: ☆

For example:

<ui:outputText value='&star;'/>

1 Answer 1

1

You can add the entity within a Lightning component, using the aura frameworks as follows:

<div> &amp; </div>

which is translated to :

<aura:html tag="div"/> &amp;

according to the aura documentation.

(you can also use the above syntax.)

the framework's outputText component supports entities and you can use them(as far as my testing goes), however, this is not covered in the documentation.

<ui:outputText value='&lt;'/>

the above will render the following:

<span data-aura-rendered-by="11:0" class="uiOutputText" data-aura-class="uiOutputText">&lt;</span>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .