Disclaimer: I'm brand new to Elm
I'm fiddling around with the online Elm editor and I've run into an issue. I can't find a way to get certain special characters (copyright, trademark, etc.) to show up. I tried:
import Html exposing (text)
main =
text "©"
All that showed up was the actual text ©
. I also tried to use the unicode character for it \u00A9
but that ended up giving me a syntax error:
(line 1, column 16): unexpected "u" expecting space, "&" or escape code
The only way I found was to actually go to someone's website and copy/paste their copyright symbol into my app:
import Html exposing (text)
main =
text "©"
This works, but I would much rather be able to type these characters out quickly instead of having to hunt down the actual symbols on other websites. Is there a preferred/recommended method of getting non-escaped text when returning HTML in Elm?
Edit:
Specifically for Mac:
- option+g gives you
©
- option+2 gives you
™
- option+r gives you
®
All tested in the online editor and they worked. This still doesn't attack the core issue, but it's just something nice to note for these specific special characters.