tinyMCEPopup.requireLangPack();
var charmap = [
['Ā', 'Ā', true, 'A - macron'],
['Ē', 'Ē', true, 'E - macron'],
['Ī', 'Ī', true, 'I - macron'],
['Ō', 'Ō', true, 'O - macron'],
['Ū', 'Ū', true, 'U - macron'],
['ā', 'ā', true, 'a - macron'],
['ē', 'ē', true, 'e - macron'],
['ī', 'ī', true, 'i - macron'],
['ō', 'ō', true, 'o - macron'],
['ū', 'ū', true, 'u - macron']
];
tinyMCEPopup.onInit.add(function() {
tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
});
function renderCharMapHTML() {
var charsPerRow = 5, tdWidth=20, tdHeight=20, i;
var html = '
';
var cols=-1;
for (i=0; i'
+ ''
+ charmap[i][1]
+ '';
if ((cols+1) % charsPerRow == 0)
html += '
';
}
}
if (cols % charsPerRow > 0) {
var padd = charsPerRow - (cols % charsPerRow);
for (var i=0; i ';
}
html += '
';
return html;
}
function insertChar(chr) {
tinyMCEPopup.execCommand('mceInsertContent', false, '' + chr + ';');
// Refocus in window
if (tinyMCEPopup.isWindow)
window.focus();
tinyMCEPopup.editor.focus();
tinyMCEPopup.close();
}
function previewChar(codeA, codeB, codeN) {
var elmV = document.getElementById('codeV');
var elmN = document.getElementById('codeN');
if (codeA=='#160;') {
elmV.innerHTML = '__';
} else {
elmV.innerHTML = '&' + codeA;
}
elmN.innerHTML = codeN;
}