TinyMCE: update the `charmap` plugin to the latest dev. version. Fixes problems with inserting white space characters.
Fixes #37936. Built from https://develop.svn.wordpress.org/trunk@38780 git-svn-id: http://core.svn.wordpress.org/trunk@38723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
220c0589da
commit
61c95f84f6
|
@ -354,9 +354,13 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||||
var index = y * width + x;
|
var index = y * width + x;
|
||||||
if (index < charmap.length) {
|
if (index < charmap.length) {
|
||||||
var chr = charmap[index];
|
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">' +
|
gridHtml += (
|
||||||
(chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ') + '</div></td>';
|
'<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + chrText + '">' +
|
||||||
|
chrText +
|
||||||
|
'</div></td>'
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
gridHtml += '<td />';
|
gridHtml += '<td />';
|
||||||
}
|
}
|
||||||
|
@ -375,7 +379,7 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||||
|
|
||||||
if (/^(TD|DIV)$/.test(target.nodeName)) {
|
if (/^(TD|DIV)$/.test(target.nodeName)) {
|
||||||
if (getParentTd(target).firstChild) {
|
if (getParentTd(target).firstChild) {
|
||||||
insertChar(tinymce.trim(target.innerText || target.textContent));
|
insertChar(target.getAttribute('data-chr'));
|
||||||
|
|
||||||
if (!e.ctrlKey) {
|
if (!e.ctrlKey) {
|
||||||
win.close();
|
win.close();
|
||||||
|
@ -459,4 +463,4 @@ tinymce.PluginManager.add('charmap', function(editor) {
|
||||||
getCharMap: getCharMap,
|
getCharMap: getCharMap,
|
||||||
insertChar: insertChar
|
insertChar: insertChar
|
||||||
};
|
};
|
||||||
});
|
});
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-alpha-38779';
|
$wp_version = '4.7-alpha-38780';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue