How can I stop TinyMCE from converting my HTML entities to characters?

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?

2 Answers
2

According to this page, you can use the tiny_mce_before_init filter, make sure the entity encoding is set to named, and then add whichever special characters you want to the entities array.

Leave a Comment