• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

TinyMCE add Custom Characters

July 29, 2011 by Webhead

Problem:

The Hawaiian language has the kahako but tinymce does not have these in their charmap.

 

Solution:

To add more characters to the custom character map in tinymce, find the file:

themes/advanced/js/charmap.js

If you are using wordpress that directory is located in wp-includes/js/tinymce/

Open that file and you’ll see a list of characters in the charmap.  The first parameter is the html code, the second is the unicode character, the third is whether to display or not, the fourth is a description.   The easiest way to do this is to first know how many characters you are adding.  Then comment out that many lines which are displayed (have “true” as the third parameter).  Then add you characters.  Below are the characters I added for Hawaiian.

 

	['Ā',     'Ā',  true,'A kahako'],
	['Ē',     'Ē',  true,'E kahako'],
	['Ī',     'Ī',  true,'I kahako'],
	['Ō',     'Ō',  true,'O kahako'],
	['Ū',     'Ū',  true,'U kahako'],

	['ā',     'ā',  true,'a kahako'],
	['ē',     'ē',  true,'e kahako'],
	['ī',     'ī',  true,'i kahako'],
	['ō',     'ō',  true,'o kahako'],
	['ū',     'ū',  true,'u kahako'],

 

 

For a full explanation to add characters or if you don’t want to comment out existing characters, visit:  http://www.patrickgmj.net/node/66

Filed Under: Coding Tagged With: cms, tinymce, wordpress

Primary Sidebar

Topics

502 apache apple bluehost bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git goDaddy google google analytics google maps hacked hosting htaccess html html 5 icons IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php tinymce wordpress wpengine yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools