Fixes #33782 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33981


git-svn-id: http://core.svn.wordpress.org/trunk@33950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-09-09 19:45:26 +00:00
parent 55f3b892fb
commit 0f3f7160e4
16 changed files with 87 additions and 66 deletions

View File

@ -381,16 +381,18 @@ tinymce.PluginManager.add('charmap', function(editor) {
}); });
} }
editor.addCommand('mceShowCharmap', showDialog);
editor.addButton('charmap', { editor.addButton('charmap', {
icon: 'charmap', icon: 'charmap',
tooltip: 'Special character', tooltip: 'Special character',
onclick: showDialog cmd: 'mceShowCharmap'
}); });
editor.addMenuItem('charmap', { editor.addMenuItem('charmap', {
icon: 'charmap', icon: 'charmap',
text: 'Special character', text: 'Special character',
onclick: showDialog, cmd: 'mceShowCharmap',
context: 'insert' context: 'insert'
}); });
}); });

File diff suppressed because one or more lines are too long

View File

@ -349,24 +349,22 @@ tinymce.PluginManager.add('lists', function(editor) {
dom.remove(li); dom.remove(li);
} }
return true;
} else {
if (ulParent.nodeName == 'LI') {
ul = ulParent;
newBlock = createNewTextBlock(li, 'LI');
} else if (isListNode(ulParent)) {
newBlock = createNewTextBlock(li, 'LI');
} else {
newBlock = createNewTextBlock(li);
}
splitList(ul, li, newBlock);
normalizeList(ul.parentNode);
return true; return true;
} }
return false; if (ulParent.nodeName == 'LI') {
ul = ulParent;
newBlock = createNewTextBlock(li, 'LI');
} else if (isListNode(ulParent)) {
newBlock = createNewTextBlock(li, 'LI');
} else {
newBlock = createNewTextBlock(li);
}
splitList(ul, li, newBlock);
normalizeList(ul.parentNode);
return true;
} }
function indent(li) { function indent(li) {

View File

@ -14,11 +14,11 @@
tinymce.PluginManager.add('media', function(editor, url) { tinymce.PluginManager.add('media', function(editor, url) {
var urlPatterns = [ var urlPatterns = [
{regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: '//www.youtube.com/embed/$1'}, {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
{regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: '//www.youtube.com/embed/$2'}, {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: '//www.youtube.com/embed/$2', allowFullscreen: true},
{regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc'}, {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
{regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&byline=0"}, {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&byline=0", allowfullscreen: true},
{regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"'} {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false}
]; ];
var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput'; var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
@ -265,6 +265,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
data.source1 = url; data.source1 = url;
data.type = pattern.type; data.type = pattern.type;
data.allowFullscreen = pattern.allowFullscreen;
data.width = data.width || pattern.w; data.width = data.width || pattern.w;
data.height = data.height || pattern.h; data.height = data.height || pattern.h;
} }
@ -288,7 +289,8 @@ tinymce.PluginManager.add('media', function(editor, url) {
}); });
if (data.type == "iframe") { if (data.type == "iframe") {
html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"></iframe>'; var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
} else if (data.source1mime == "application/x-shockwave-flash") { } else if (data.source1mime == "application/x-shockwave-flash") {
html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">'; html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
@ -394,7 +396,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
return html; return html;
} }
var writer = new tinymce.html.Writer(); var writer = new tinymce.html.Writer(), blocked;
new tinymce.html.SaxParser({ new tinymce.html.SaxParser({
validate: false, validate: false,
@ -414,6 +416,8 @@ tinymce.PluginManager.add('media', function(editor, url) {
}, },
start: function(name, attrs, empty) { start: function(name, attrs, empty) {
blocked = true;
if (name == 'script' || name == 'noscript') { if (name == 'script' || name == 'noscript') {
return; return;
} }
@ -422,13 +426,18 @@ tinymce.PluginManager.add('media', function(editor, url) {
if (attrs[i].name.indexOf('on') === 0) { if (attrs[i].name.indexOf('on') === 0) {
return; return;
} }
if (attrs[i].name == 'style') {
attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
}
} }
writer.start(name, attrs, empty); writer.start(name, attrs, empty);
blocked = false;
}, },
end: function(name) { end: function(name) {
if (name == 'script' || name == 'noscript') { if (blocked) {
return; return;
} }
@ -779,4 +788,6 @@ tinymce.PluginManager.add('media', function(editor, url) {
context: 'insert', context: 'insert',
prependToContext: true prependToContext: true
}); });
this.showDialog = showDialog;
}); });

File diff suppressed because one or more lines are too long

View File

@ -63,10 +63,12 @@
} }
function expose(ids) { function expose(ids) {
for (var i = 0; i < ids.length; i++) { var i, target, id, fragments, privateModules;
var target = exports;
var id = ids[i]; for (i = 0; i < ids.length; i++) {
var fragments = id.split(/[.\/]/); target = exports;
id = ids[i];
fragments = id.split(/[.\/]/);
for (var fi = 0; fi < fragments.length - 1; ++fi) { for (var fi = 0; fi < fragments.length - 1; ++fi) {
if (target[fragments[fi]] === undefined) { if (target[fragments[fi]] === undefined) {
@ -78,6 +80,21 @@
target[fragments[fragments.length - 1]] = modules[id]; target[fragments[fragments.length - 1]] = modules[id];
} }
// Expose private modules for unit tests
if (exports.AMDLC_TESTS) {
privateModules = exports.privateModules || {};
for (id in modules) {
privateModules[id] = modules[id];
}
for (i = 0; i < ids.length; i++) {
delete privateModules[ids[i]];
}
exports.privateModules = privateModules;
}
} }
// Included from: js/tinymce/plugins/paste/classes/Utils.js // Included from: js/tinymce/plugins/paste/classes/Utils.js

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} .mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:0 0;text-decoration:none;color:#000;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:400;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333}

View File

@ -1 +1 @@
body{background-color:#FFF;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} body{background-color:#FFF;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:0 0;text-decoration:none;color:#000;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:400;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
var defaultToolbar = "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | " + var defaultToolbar = "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | " +
"bullist numlist outdent indent | link image"; "bullist numlist outdent indent | link image";
function createToolbar(items) { function createToolbar(items, size) {
var toolbarItems = [], buttonGroup; var toolbarItems = [], buttonGroup;
if (!items) { if (!items) {
@ -88,12 +88,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
buttonGroup = null; buttonGroup = null;
} else { } else {
if (Factory.has(item)) { if (Factory.has(item)) {
item = {type: item}; item = {type: item, size: size};
if (settings.toolbar_items_size) {
item.size = settings.toolbar_items_size;
}
toolbarItems.push(item); toolbarItems.push(item);
buttonGroup = null; buttonGroup = null;
} else { } else {
@ -112,10 +107,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
} }
item.type = item.type || 'button'; item.type = item.type || 'button';
item.size = size;
if (settings.toolbar_items_size) {
item.size = settings.toolbar_items_size;
}
item = Factory.create(item); item = Factory.create(item);
buttonGroup.items.push(item); buttonGroup.items.push(item);
@ -140,14 +132,15 @@ tinymce.ThemeManager.add('modern', function(editor) {
/** /**
* Creates the toolbars from config and returns a toolbar array. * Creates the toolbars from config and returns a toolbar array.
* *
* @param {String} size Optional toolbar item size.
* @return {Array} Array with toolbars. * @return {Array} Array with toolbars.
*/ */
function createToolbars() { function createToolbars(size) {
var toolbars = []; var toolbars = [];
function addToolbar(items) { function addToolbar(items) {
if (items) { if (items) {
toolbars.push(createToolbar(items)); toolbars.push(createToolbar(items, size));
return true; return true;
} }
} }
@ -670,7 +663,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
border: 1, border: 1,
items: [ items: [
settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()}, settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
createToolbars() createToolbars(settings.toolbar_items_size)
] ]
}); });
@ -747,7 +740,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
border: 1, border: 1,
items: [ items: [
settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()}, settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
createToolbars(), createToolbars(settings.toolbar_items_size),
{type: 'panel', name: 'iframe', layout: 'stack', classes: 'edit-area', html: '', border: '1 0 0 0'} {type: 'panel', name: 'iframe', layout: 'stack', classes: 'edit-area', html: '', border: '1 0 0 0'}
] ]
}); });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-33979'; $wp_version = '4.4-alpha-33981';
/** /**
* 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.
@ -18,7 +18,7 @@ $wp_db_version = 33056;
* *
* @global string $tinymce_version * @global string $tinymce_version
*/ */
$tinymce_version = '4203-20150730'; $tinymce_version = '4205-20150908';
/** /**
* Holds the required PHP version * Holds the required PHP version