This is a tiny little thing.
I’m attempting to insert a single em-dash into a paragraph. (Just before a quote attribution, to be exact). Into the html of my Pinegrow test-page I typed the hexadecimal code mentioned by w3schools.com for the Unicode character “em-dash” which is:
But instead of an em-dash displaying on my page when viewed in Safari, only the above line of type is shown. So it’s not working.
Clearly I’m doing something wrong. I’m not using proper technique for inserting a Unicode character.
However, if I DON’T use fancy coding and instead just type plain old “option-shift-hyphen” [Mac keyboard] into the PG code, it works! I get the proper em-dash displaying when I view the saved html page in Safari.
Can it really be this simple? Aren’t I SUPPOSED to be using proper hexadecimal coding? And if I am, I’m surely doing something incorrect. Leaving out something important.
Here’s screen shot from Safari:
Using simple typing (shift-option-dash) works, but typing the hex code does not.
What am I doing wrong?
Any help would be appreciated. Thanks.
Text editing mode doesn’t work with encoded characters - those are HTML entities. In the same way, as it doesn’t insert <h1> element if you type <h1>.
The best approach is to insert HTML entities like — in the Element Edit Code (the tool for editing the HTML code of the selected element).
That said, it would be nice to have some kind of helper for inserting special characters. Will put that on the to-do list.
I have to say, it’s lovely to see you finding some time to be active back again here as part of the the caring presence of PG once more @matjaz -just like The good old days.
Happy new yeah and It looks like you have made at least one good new resolution so far then
Welcome back home
Thank you @matjaz for the very helpful response. Appreciate you taking the time to answer.
And, of course, I could have just opened the code view and typed the special-character-code in there and it works just fine. (Duh.) As I have now learned.
Here’s sample (seeing as HTML works on this site) of em-dash typed as Unicode:
I am not the smartest or most talented person in the world, but I succeeded because I keep going, and going, and going.
— Sylvester Stallone
this link has many of the codes in multiple formats… when just typing in the text editor, i used the format in the first column and it always seems to work for me.