File was renamed from program/js/tiny_mce/themes/advanced/jscripts/charmap.js |
| | |
| | | function init() {
|
| | | tinyMCEPopup.resizeToInnerSize();
|
| | | }
|
| | | tinyMCEPopup.requireLangPack();
|
| | |
|
| | | var charmap = new Array();
|
| | |
|
| | | // for mor details please see w3c.org
|
| | | // now here is the complete list ;)
|
| | |
|
| | | charmap = [
|
| | | var charmap = [
|
| | | [' ', ' ', true, 'no-break space'],
|
| | | ['&', '&', true, 'ampersand'],
|
| | | ['"', '"', true, 'quotation mark'],
|
| | |
| | | ['­', '­', false,'soft hyphen']
|
| | | ];
|
| | |
|
| | | tinyMCEPopup.onInit.add(function() {
|
| | | tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
|
| | | });
|
| | |
|
| | | function renderCharMapHTML() {
|
| | | var charsPerRow = 20, tdWidth=20, tdHeight=20;
|
| | | var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
|
| | | var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">';
|
| | | var cols=-1;
|
| | | for (var i=0; i<charmap.length; i++) {
|
| | |
|
| | | for (i=0; i<charmap.length; i++) {
|
| | | if (charmap[i][2]==true) {
|
| | | cols++;
|
| | | html += ''
|
| | | + '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"'
|
| | | + ' onmouseover="this.className=\'charmapOver\';'
|
| | | + 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"'
|
| | | + ' onmouseout="this.className=\'charmap\';"'
|
| | | + ' nowrap="nowrap" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');"><a style="text-decoration: none;" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
|
| | | + '<td class="charmap">'
|
| | | + '<a onmouseover="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
|
| | | + charmap[i][1]
|
| | | + '</a></td>';
|
| | | if ((cols+1) % charsPerRow == 0)
|
| | | html += '</tr><tr height="' + tdHeight + '">';
|
| | | }
|
| | | }
|
| | |
|
| | | if (cols % charsPerRow > 0) {
|
| | | var padd = charsPerRow - (cols % charsPerRow);
|
| | | for (var i=0; i<padd-1; i++)
|
| | | html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
|
| | | }
|
| | |
|
| | | html += '</tr></table>';
|
| | | document.write(html);
|
| | |
|
| | | return html;
|
| | | }
|
| | |
|
| | | function insertChar(chr) {
|
| | |
| | | if (tinyMCEPopup.isWindow)
|
| | | window.focus();
|
| | |
|
| | | tinyMCEPopup.editor.focus();
|
| | | tinyMCEPopup.close();
|
| | | }
|
| | |
|