TinyMCE: update the charmap
plugin to the latest dev. version. Fixes problems with inserting white space characters.
Fixes #37936. git-svn-id: https://develop.svn.wordpress.org/trunk@38780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2b641b0c17
commit
23bf03c3be
@ -354,9 +354,13 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||
var index = y * width + x;
|
||||
if (index < charmap.length) {
|
||||
var chr = charmap[index];
|
||||
var chrText = chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ';
|
||||
|
||||
gridHtml += '<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button">' +
|
||||
(chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ') + '</div></td>';
|
||||
gridHtml += (
|
||||
'<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + chrText + '">' +
|
||||
chrText +
|
||||
'</div></td>'
|
||||
);
|
||||
} else {
|
||||
gridHtml += '<td />';
|
||||
}
|
||||
@ -375,7 +379,7 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||
|
||||
if (/^(TD|DIV)$/.test(target.nodeName)) {
|
||||
if (getParentTd(target).firstChild) {
|
||||
insertChar(tinymce.trim(target.innerText || target.textContent));
|
||||
insertChar(target.getAttribute('data-chr'));
|
||||
|
||||
if (!e.ctrlKey) {
|
||||
win.close();
|
||||
@ -459,4 +463,4 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||
getCharMap: getCharMap,
|
||||
insertChar: insertChar
|
||||
};
|
||||
});
|
||||
});
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user