Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unicode and/or HTML Entities

I'm trying to use entities such as ¼, ½, and ¾.

 

I've tried using all the codes from https://www.toptal.com/designers/htmlarrows/numbers/fraction-three-quarters/ to get a ¾. It seems to work if I place it directly in the index.gui, but outputs the literal string if I try to change an element's text via JavaScript.

document.getElementById('myElement').text='¾';

Is this a known issue? Are there any good workarounds? 

Best Answer
0 Votes
1 REPLY 1

If I'm not mistaken, .text will sanitize the input, causing literal output instead of HTML.

 

.innerHTML should work. Though I have not tested it specifically with the Fitbit Ionic.

 

document.getElementById('myElement').innerHTML = '¾';

 

Best Answer
0 Votes