The TinyMCE Editor has a great button in the kitchen sink to insert custom characters / symbols.
Is there a way to control what symbols show up in this pop-up? (Specifically I need some unique Hawaiian language characters ‘okina and macrons).
Code Character
Ā Ä
ā Ä
Ē Ä
ē Ä
Ī Ī
ī Ä«
Ō Å
ō Å
Ū Ū
ū Å«
ʻ Ê»
Hawaiian Diacritical mark reference:
http://manoa.hawaii.edu/site/hawaiian_language.html
This has to do with your character map for tinyMCE it’s located inside:
Although I wouldn’t recommend editing the WP-Core you could theoretically just add new characters there like so:
and so on…
However when you update WordPress this will overwrite those changes. So it’s not the best solution but it would work.
WordPress and TinyMCE both recently have been updated to allow you to modify the special characters (charmap) without having to hack the core. You can lookup the symbols you want from https://dev.w3.org/html5/html-author/charref and then either add the following code to your theme’s functions.php or make a plugin:
This modification relies on the tiny_mce_before_init hook in WordPress and TinyMCE’s charmap_append settings. When adding elements you add each symbol as an array where the first item is the HTML entity code and the second is the description.
You can see in the screenshot below that my symbols have been appended to the existing list of symbols.
It looks like it’s possible to also override the default list of symbols by using TinyMCE’s
charmap
setting and listing the symbols you want.Its not that hard to write a plugin to replace something like !U !u !’ with the Hawaiian characters. That way you can just type a bang in front of the letter while typing your post to get the character you want.
I did this for suit symbols for card playing sites and it works beautifully and was very easy to do. See
http://bridgeteaching.com/2011/09/we-have-created-a-suit-symbol-plugin-for-wordpress/