Disclaimer: I'm brand new to Elm
I was messing around with Elm online editor and I ran into a problem. I cannot find a way to get certain special characters (copyright, trademark, etc.). I tried:
import Html exposing (text) main = text "©"
All that appeared was the actual text © . I also tried using the unicode character for it \u00A9 , but this resulted in a syntax error:
(line 1, column 16): unexpected "u" expecting space, "&" or escape code
The only way I found is to actually go to someone's website and copy / paste your copyright symbol into my application:
import Html exposing (text) main = text "©"
This works, but I would rather be able to quickly type in these characters, instead of tracking the actual characters on other sites. Is there a preferred / recommended method for getting unescaped text when returning HTML to Elm?
Edit:
Specifically for Mac:
- the + g option gives you
© - option + 2 gives you
™ - the + r option gives you
®
All were tested in the online editor, and they worked. This still does not attack the underlying problem, but it is just great for these special characters.
source share