Here’s the problem: I paste the HTML entity code for, let’s say, a service mark (℠
) into the HTML view of the editor. As soon as I switch to the “visual” tab, my entity code is turned into an actual service mark character (I guess the corresponding UTF-8 character or something? I don’t know from character encodings…). I don’t want this–I want it to stay as the entity reference.
Is there some kind of configuration I can change to stop TinyMCE from doing this? My understanding from reading the internets is that this is not the default behavior–that TinyMCE should actually be doing the opposite, and converting characters to their entities. So is this something specific to WordPress’ version of TinyMCE?
According to this page, you can use the
tiny_mce_before_init
filter, make sure the entity encoding is set tonamed
, and then add whichever special characters you want to the entities array.Thanks, fdsa!
For posterity, here’s the actual code I used. It adds copyright, registered, trademark, service mark and euro to the array of allowed entities. I’m confused as to why some of these aren’t in there by default, as they’re really common. But in any case, this works: