mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
TinyMCE: update to 4.2.1. Changelog: https://github.com/tinymce/tinymce-dist/blob/master/changelog.txt.
Fixes #32801. Built from https://develop.svn.wordpress.org/trunk@33013 git-svn-id: http://core.svn.wordpress.org/trunk@32984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec407bc971
commit
5919fdd4c9
@ -116,7 +116,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mce-window .mce-wp-help .mce-container-body.mce-undefined {
|
.mce-window .mce-wp-help > .mce-container-body {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,6 +423,10 @@ div.mce-path {
|
|||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mce-toolbar .mce-listbox button {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.mce-toolbar .mce-btn i {
|
.mce-toolbar .mce-btn i {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
@ -472,13 +476,7 @@ div.mce-path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mce-listbox i.mce-caret {
|
.mce-listbox i.mce-caret {
|
||||||
left: 6px;
|
left: 4px;
|
||||||
}
|
|
||||||
|
|
||||||
.mce-panel .mce-btn button.mce-open i.mce-caret,
|
|
||||||
.mce-panel .mce-btn.mce-listbox i.mce-caret {
|
|
||||||
margin-right: 0;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mce-panel .mce-btn:hover i.mce-caret {
|
.mce-panel .mce-btn:hover i.mce-caret {
|
||||||
|
2
wp-includes/css/editor-rtl.min.css
vendored
2
wp-includes/css/editor-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -116,7 +116,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mce-window .mce-wp-help .mce-container-body.mce-undefined {
|
.mce-window .mce-wp-help > .mce-container-body {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,6 +423,10 @@ div.mce-path {
|
|||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mce-toolbar .mce-listbox button {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.mce-toolbar .mce-btn i {
|
.mce-toolbar .mce-btn i {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
@ -472,13 +476,7 @@ div.mce-path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mce-listbox i.mce-caret {
|
.mce-listbox i.mce-caret {
|
||||||
right: 6px;
|
right: 4px;
|
||||||
}
|
|
||||||
|
|
||||||
.mce-panel .mce-btn button.mce-open i.mce-caret,
|
|
||||||
.mce-panel .mce-btn.mce-listbox i.mce-caret {
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mce-panel .mce-btn:hover i.mce-caret {
|
.mce-panel .mce-btn:hover i.mce-caret {
|
||||||
|
2
wp-includes/css/editor.min.css
vendored
2
wp-includes/css/editor.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -278,7 +278,7 @@
|
|||||||
tinymce.addI18n = function(prefix, o) {
|
tinymce.addI18n = function(prefix, o) {
|
||||||
var I18n = tinymce.util.I18n, each = tinymce.each;
|
var I18n = tinymce.util.I18n, each = tinymce.each;
|
||||||
|
|
||||||
if (typeof(prefix) == "string" && prefix.indexOf('.') === -1) {
|
if (typeof prefix == "string" && prefix.indexOf('.') === -1) {
|
||||||
I18n.add(prefix, o);
|
I18n.add(prefix, o);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -23,7 +23,7 @@ tinymce.PluginManager.add('image', function(editor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
done(img.clientWidth, img.clientHeight);
|
done(Math.max(img.width, img.clientWidth), Math.max(img.height, img.clientHeight));
|
||||||
};
|
};
|
||||||
|
|
||||||
img.onerror = function() {
|
img.onerror = function() {
|
||||||
@ -308,6 +308,7 @@ tinymce.PluginManager.add('image', function(editor) {
|
|||||||
win.find('#src').value(e.control.value()).fire('change');
|
win.find('#src').value(e.control.value()).fire('change');
|
||||||
},
|
},
|
||||||
onPostRender: function() {
|
onPostRender: function() {
|
||||||
|
/*eslint consistent-this: 0*/
|
||||||
imageListCtrl = this;
|
imageListCtrl = this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -175,7 +175,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
title: 'Embed',
|
title: 'Embed',
|
||||||
type: "panel",
|
type: "container",
|
||||||
layout: 'flex',
|
layout: 'flex',
|
||||||
direction: 'column',
|
direction: 'column',
|
||||||
align: 'stretch',
|
align: 'stretch',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -85,8 +85,8 @@
|
|||||||
/**
|
/**
|
||||||
* Utils.js
|
* Utils.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -217,8 +217,8 @@ define("tinymce/pasteplugin/Utils", [
|
|||||||
/**
|
/**
|
||||||
* Clipboard.js
|
* Clipboard.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -281,7 +281,7 @@ define("tinymce/pasteplugin/Clipboard", [
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!args.isDefaultPrevented()) {
|
if (!args.isDefaultPrevented()) {
|
||||||
editor.insertContent(html, {merge: editor.settings.paste_merge_formats !== false});
|
editor.insertContent(html, {merge: editor.settings.paste_merge_formats !== false, data: {paste: true}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -805,19 +805,40 @@ define("tinymce/pasteplugin/Clipboard", [
|
|||||||
|
|
||||||
// Remove all data images from paste for example from Gecko
|
// Remove all data images from paste for example from Gecko
|
||||||
// except internal images like video elements
|
// except internal images like video elements
|
||||||
editor.parser.addNodeFilter('img', function(nodes) {
|
editor.parser.addNodeFilter('img', function(nodes, name, args) {
|
||||||
if (!editor.settings.paste_data_images) {
|
function isPasteInsert(args) {
|
||||||
|
return args.data && args.data.paste === true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove(node) {
|
||||||
|
if (!node.attr('data-mce-object') && src !== Env.transparentSrc) {
|
||||||
|
node.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isWebKitFakeUrl(src) {
|
||||||
|
return src.indexOf("webkit-fake-url") === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isDataUri(src) {
|
||||||
|
return src.indexOf("data:") === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!editor.settings.paste_data_images && isPasteInsert(args)) {
|
||||||
var i = nodes.length;
|
var i = nodes.length;
|
||||||
|
|
||||||
while (i--) {
|
while (i--) {
|
||||||
var src = nodes[i].attributes.map.src;
|
var src = nodes[i].attributes.map.src;
|
||||||
|
|
||||||
// Some browsers automatically produce data uris on paste
|
if (!src) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Safari on Mac produces webkit-fake-url see: https://bugs.webkit.org/show_bug.cgi?id=49141
|
// Safari on Mac produces webkit-fake-url see: https://bugs.webkit.org/show_bug.cgi?id=49141
|
||||||
if (src && /^(data:image|webkit\-fake\-url)/.test(src)) {
|
if (isWebKitFakeUrl(src)) {
|
||||||
if (!nodes[i].attr('data-mce-object') && src !== Env.transparentSrc) {
|
remove(nodes[i]);
|
||||||
nodes[i].remove();
|
} else if (!editor.settings.allow_html_data_urls && isDataUri(src)) {
|
||||||
}
|
remove(nodes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -831,8 +852,8 @@ define("tinymce/pasteplugin/Clipboard", [
|
|||||||
/**
|
/**
|
||||||
* WordFilter.js
|
* WordFilter.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -1332,8 +1353,8 @@ define("tinymce/pasteplugin/WordFilter", [
|
|||||||
/**
|
/**
|
||||||
* Quirks.js
|
* Quirks.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -1494,8 +1515,8 @@ define("tinymce/pasteplugin/Quirks", [
|
|||||||
/**
|
/**
|
||||||
* Plugin.js
|
* Plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* plugin.js
|
* plugin.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -648,6 +648,10 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
|||||||
toolbar.bottom = bottom;
|
toolbar.bottom = bottom;
|
||||||
|
|
||||||
function reposition() {
|
function reposition() {
|
||||||
|
if ( ! currentSelection ) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
var scrollX = window.pageXOffset || document.documentElement.scrollLeft,
|
var scrollX = window.pageXOffset || document.documentElement.scrollLeft,
|
||||||
scrollY = window.pageYOffset || document.documentElement.scrollTop,
|
scrollY = window.pageYOffset || document.documentElement.scrollTop,
|
||||||
windowWidth = window.innerWidth,
|
windowWidth = window.innerWidth,
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -60,4 +60,24 @@
|
|||||||
<glyph unicode="" d="M128 416l288-288 480 480-128 128-352-352-160 160z" />
|
<glyph unicode="" d="M128 416l288-288 480 480-128 128-352-352-160 160z" />
|
||||||
<glyph unicode="" d="M928 832h-416l-32 64h-352l-64-128h896zM904.34 256h74.86l44.8 448h-1024l64-640h484.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM1002.996 46.25l-198.496 174.692c17.454 28.92 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l174.692-198.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM640 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
|
<glyph unicode="" d="M928 832h-416l-32 64h-352l-64-128h896zM904.34 256h74.86l44.8 448h-1024l64-640h484.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM1002.996 46.25l-198.496 174.692c17.454 28.92 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l174.692-198.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM640 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
|
||||||
<glyph unicode="" d="M512 448v-128h32l32 64h64v-256h-48v-64h224v64h-48v256h64l32-64h32v128zM832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h640v704h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM960 0h-512v576h512v-576z" />
|
<glyph unicode="" d="M512 448v-128h32l32 64h64v-256h-48v-64h224v64h-48v256h64l32-64h32v128zM832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h640v704h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM960 0h-512v576h512v-576z" />
|
||||||
|
<glyph unicode="" d="M483.2 320l-147.2 336c-9.6 25.6-19.2 44.8-25.6 54.4s-16 12.8-25.6 12.8c-16 0-25.6-3.2-28.8-3.2v70.4c9.6 6.4 25.6 6.4 38.4 9.6 32 0 57.6-6.4 73.6-22.4 6.4-6.4 12.8-16 19.2-25.6 6.4-12.8 12.8-25.6 16-41.6l121.6-291.2 150.4 371.2h92.8l-198.4-470.4v-224h-86.4v224zM0 960v-1024h1024v1024h-1024zM960 0h-896v896h896v-896z" />
|
||||||
|
<glyph unicode="" d="M627.2 80h-579.2v396.8h579.2v-396.8zM553.6 406.4h-435.2v-256h435.2v256zM259.2 732.8c176 176 457.6 176 633.6 0s176-457.6 0-633.6c-121.6-121.6-297.6-160-454.4-108.8 121.6-28.8 262.4 9.6 361.6 108.8 150.4 150.4 160 384 22.4 521.6-121.6 121.6-320 128-470.4 19.2l86.4-86.4-294.4-22.4 22.4 294.4 92.8-92.8z" />
|
||||||
|
<glyph unicode="" d="M892.8-22.4l-89.6 89.6c-70.4-80-172.8-131.2-288-131.2-208 0-380.8 166.4-384 377.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4v0c0 0 0 0 0 3.2 0 0 0 3.2 0 3.2 3.2 105.6 48 211.2 105.6 304l-192 192 44.8 44.8 182.4-182.4c0 0 0 0 0 0l569.6-569.6c0 0 0 0 0 0l99.2-99.2-48-44.8zM896 326.4c0 0 0 0 0 0 0 3.2 0 6.4 0 6.4-9.6 316.8-384 627.2-384 627.2s-108.8-89.6-208-220.8l70.4-70.4c6.4 9.6 16 22.4 22.4 32 41.6 51.2 83.2 96 115.2 128v0c32-32 73.6-76.8 115.2-128 108.8-137.6 169.6-265.6 172.8-371.2 0 0 0-3.2 0-3.2v0 0c0-3.2 0-3.2 0-6.4s0-3.2 0-3.2v0 0c0-22.4-3.2-41.6-9.6-64l76.8-76.8c16 41.6 28.8 89.6 28.8 137.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4z" />
|
||||||
|
<glyph unicode="" d="M768 416v-352h-640v640h352l128 128h-512c-52.8 0-96-43.2-96-96v-704c0-52.8 43.2-96 96-96h704c52.798 0 96 43.2 96 96v512l-128-128zM864 960l-608-608v-160h160l608 608c0 96-64 160-160 160zM416 320l-48 48 480 480 48-48-480-480z" />
|
||||||
|
<glyph unicode="" d="M864.626 486.838c-65.754 183.44-205.11 348.15-352.626 473.162-147.516-125.012-286.87-289.722-352.626-473.162-40.664-113.436-44.682-236.562 12.584-345.4 65.846-125.14 198.632-205.438 340.042-205.438s274.196 80.298 340.040 205.44c57.27 108.838 53.25 231.962 12.586 345.398zM738.764 201.044c-43.802-83.252-132.812-137.044-226.764-137.044-55.12 0-108.524 18.536-152.112 50.652 13.242-1.724 26.632-2.652 40.112-2.652 117.426 0 228.668 67.214 283.402 171.242 44.878 85.292 40.978 173.848 23.882 244.338 14.558-28.15 26.906-56.198 36.848-83.932 22.606-63.062 40.024-156.34-5.368-242.604z" />
|
||||||
|
<glyph unicode="" d="M704 896c-247.424 0-448-200.576-448-448h-224l288-288 288 288h-224c0 176.73 143.27 320 320 320 176.732 0 320-143.27 320-320 0-176.732-143.268-320-320-320v-128c247.424 0 448 200.576 448 448s-200.576 448-448 448z" horiz-adv-x="1152" />
|
||||||
|
<glyph unicode="" d="M448 896c247.424 0 448-200.576 448-448h224l-288-288-288 288h224c0 176.73-143.27 320-320 320-176.732 0-320-143.27-320-320 0-176.732 143.268-320 320-320v-128c-247.424 0-448 200.576-448 448s200.576 448 448 448z" horiz-adv-x="1152" />
|
||||||
|
<glyph unicode="" d="M0 576h1024v384zM1024 0v384h-1024z" />
|
||||||
|
<glyph unicode="" d="M576 960v-1024h384zM0-64h384v1024z" />
|
||||||
|
<glyph unicode="" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM448 768h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" />
|
||||||
|
<glyph unicode="" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM192 640h384v-128h-384z" />
|
||||||
|
<glyph unicode="" d="M768 832h-512l-256-256 512-576 512 576-256 256zM512 181.334v2.666h-2.37l-14.222 16h16.592v16h-30.814l-14.222 16h45.036v16h-59.258l-14.222 16h73.48v16h-87.704l-14.222 16h101.926v16h-116.148l-14.222 16h130.37v16h-144.592l-14.222 16h158.814v16h-173.038l-14.222 16h187.26v16h-201.482l-14.222 16h215.704v16h-229.926l-14.222 16h244.148v16h-258.372l-14.222 16h272.594v16h-286.816l-14.222 16h301.038v16h-315.26l-14.222 16h329.482v16h-343.706l-7.344 8.262 139.072 139.072h211.978v-3.334h215.314l16-16h-231.314v-16h247.314l16-16h-263.314v-16h279.314l16-16h-295.314v-16h311.314l16-16h-327.314v-16h343.312l7.738-7.738-351.050-394.928z" />
|
||||||
|
<glyph unicode="" d="M64 768h896v-192h-896zM64 512h896v-192h-896zM64 256h896v-192h-896z" />
|
||||||
|
<glyph unicode="" d="M512 128c35.346 0 64-28.654 64-64v-64c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c0 35.346 28.654 64 64 64zM512 768c-35.346 0-64 28.654-64 64v64c0 35.346 28.654 64 64 64s64-28.654 64-64v-64c0-35.346-28.654-64-64-64zM960 512c35.346 0 64-28.654 64-64s-28.654-64-64-64h-64c-35.348 0-64 28.654-64 64s28.652 64 64 64h64zM192 448c0-35.346-28.654-64-64-64h-64c-35.346 0-64 28.654-64 64s28.654 64 64 64h64c35.346 0 64-28.654 64-64zM828.784 221.726l45.256-45.258c24.992-24.99 24.992-65.516 0-90.508-24.994-24.992-65.518-24.992-90.51 0l-45.256 45.256c-24.992 24.99-24.992 65.516 0 90.51 24.994 24.992 65.518 24.992 90.51 0zM195.216 674.274l-45.256 45.256c-24.994 24.994-24.994 65.516 0 90.51s65.516 24.994 90.51 0l45.256-45.256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0zM828.784 674.274c-24.992-24.992-65.516-24.992-90.51 0-24.992 24.994-24.992 65.516 0 90.51l45.256 45.254c24.992 24.994 65.516 24.994 90.51 0 24.992-24.994 24.992-65.516 0-90.51l-45.256-45.254zM195.216 221.726c24.992 24.992 65.518 24.992 90.508 0 24.994-24.994 24.994-65.52 0-90.51l-45.254-45.256c-24.994-24.992-65.516-24.992-90.51 0s-24.994 65.518 0 90.508l45.256 45.258zM512 704c-141.384 0-256-114.616-256-256 0-141.382 114.616-256 256-256 141.382 0 256 114.618 256 256 0 141.384-114.616 256-256 256zM512 288c-88.366 0-160 71.634-160 160s71.634 160 160 160 160-71.634 160-160-71.634-160-160-160z" />
|
||||||
|
<glyph unicode="" d="M715.812 895.52c-60.25 34.784-124.618 55.904-189.572 64.48 122.936-160.082 144.768-384.762 37.574-570.42-107.2-185.67-312.688-279.112-512.788-252.68 39.898-51.958 90.376-97.146 150.628-131.934 245.908-141.974 560.37-57.72 702.344 188.198 141.988 245.924 57.732 560.372-188.186 702.356z" />
|
||||||
|
<glyph unicode="" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM128 448c0 212.078 171.922 384 384 384v-768c-212.078 0-384 171.922-384 384z" />
|
||||||
|
<glyph unicode="" d="M893.254 738.746l-90.508 90.508-290.746-290.744-290.746 290.744-90.508-90.506 290.746-290.748-290.746-290.746 90.508-90.508 290.746 290.746 290.746-290.746 90.508 90.51-290.744 290.744z" />
|
||||||
|
<glyph unicode="" d="M672-64l192 192-320 320 320 320-192 192-512-512z" />
|
||||||
|
<glyph unicode="" d="M0 896v-384c0-35.346 28.654-64 64-64s64 28.654 64 64v229.488l677.488-677.488h-229.488c-35.346 0-64-28.652-64-64 0-35.346 28.654-64 64-64h384c35.346 0 64 28.654 64 64v384c0 35.348-28.654 64-64 64s-64-28.652-64-64v-229.488l-677.488 677.488h229.488c35.346 0 64 28.654 64 64s-28.652 64-64 64h-384c-35.346 0-64-28.654-64-64z" />
|
||||||
|
<glyph unicode="" d="M832 704l192 192-64 64-192-192h-448v192h-128v-192h-192v-128h192v-512h512v-192h128v192h192v128h-192v448zM320 640h320l-320-320v320zM384 256l320 320v-320h-320z" />
|
||||||
</font></defs></svg>
|
</font></defs></svg>
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* theme.js
|
* theme.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -11,7 +11,8 @@
|
|||||||
/*global tinymce:true */
|
/*global tinymce:true */
|
||||||
|
|
||||||
tinymce.ThemeManager.add('modern', function(editor) {
|
tinymce.ThemeManager.add('modern', function(editor) {
|
||||||
var self = this, settings = editor.settings, Factory = tinymce.ui.Factory, each = tinymce.each, DOM = tinymce.DOM;
|
var self = this, settings = editor.settings, Factory = tinymce.ui.Factory,
|
||||||
|
each = tinymce.each, DOM = tinymce.DOM, Rect = tinymce.ui.Rect;
|
||||||
|
|
||||||
// Default menus
|
// Default menus
|
||||||
var defaultMenus = {
|
var defaultMenus = {
|
||||||
@ -27,6 +28,115 @@ 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) {
|
||||||
|
var toolbarItems = [], buttonGroup;
|
||||||
|
|
||||||
|
if (!items) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
each(items.split(/[ ,]/), function(item) {
|
||||||
|
var itemName;
|
||||||
|
|
||||||
|
function bindSelectorChanged() {
|
||||||
|
var selection = editor.selection;
|
||||||
|
|
||||||
|
if (itemName == "bullist") {
|
||||||
|
selection.selectorChanged('ul > li', function(state, args) {
|
||||||
|
var nodeName, i = args.parents.length;
|
||||||
|
|
||||||
|
while (i--) {
|
||||||
|
nodeName = args.parents[i].nodeName;
|
||||||
|
if (nodeName == "OL" || nodeName == "UL") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
item.active(state && nodeName == "UL");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemName == "numlist") {
|
||||||
|
selection.selectorChanged('ol > li', function(state, args) {
|
||||||
|
var nodeName, i = args.parents.length;
|
||||||
|
|
||||||
|
while (i--) {
|
||||||
|
nodeName = args.parents[i].nodeName;
|
||||||
|
if (nodeName == "OL" || nodeName == "UL") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
item.active(state && nodeName == "OL");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.settings.stateSelector) {
|
||||||
|
selection.selectorChanged(item.settings.stateSelector, function(state) {
|
||||||
|
item.active(state);
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.settings.disabledStateSelector) {
|
||||||
|
selection.selectorChanged(item.settings.disabledStateSelector, function(state) {
|
||||||
|
item.disabled(state);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item == "|") {
|
||||||
|
buttonGroup = null;
|
||||||
|
} else {
|
||||||
|
if (Factory.has(item)) {
|
||||||
|
item = {type: item};
|
||||||
|
|
||||||
|
if (settings.toolbar_items_size) {
|
||||||
|
item.size = settings.toolbar_items_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
toolbarItems.push(item);
|
||||||
|
buttonGroup = null;
|
||||||
|
} else {
|
||||||
|
if (!buttonGroup) {
|
||||||
|
buttonGroup = {type: 'buttongroup', items: []};
|
||||||
|
toolbarItems.push(buttonGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (editor.buttons[item]) {
|
||||||
|
// TODO: Move control creation to some UI class
|
||||||
|
itemName = item;
|
||||||
|
item = editor.buttons[itemName];
|
||||||
|
|
||||||
|
if (typeof item == "function") {
|
||||||
|
item = item();
|
||||||
|
}
|
||||||
|
|
||||||
|
item.type = item.type || 'button';
|
||||||
|
|
||||||
|
if (settings.toolbar_items_size) {
|
||||||
|
item.size = settings.toolbar_items_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
item = Factory.create(item);
|
||||||
|
buttonGroup.items.push(item);
|
||||||
|
|
||||||
|
if (editor.initialized) {
|
||||||
|
bindSelectorChanged();
|
||||||
|
} else {
|
||||||
|
editor.on('init', bindSelectorChanged);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: 'toolbar',
|
||||||
|
layout: 'flow',
|
||||||
|
items: toolbarItems
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the toolbars from config and returns a toolbar array.
|
* Creates the toolbars from config and returns a toolbar array.
|
||||||
*
|
*
|
||||||
@ -36,110 +146,10 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
var toolbars = [];
|
var toolbars = [];
|
||||||
|
|
||||||
function addToolbar(items) {
|
function addToolbar(items) {
|
||||||
var toolbarItems = [], buttonGroup;
|
if (items) {
|
||||||
|
toolbars.push(createToolbar(items));
|
||||||
if (!items) {
|
return true;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
each(items.split(/[ ,]/), function(item) {
|
|
||||||
var itemName;
|
|
||||||
|
|
||||||
function bindSelectorChanged() {
|
|
||||||
var selection = editor.selection;
|
|
||||||
|
|
||||||
if (itemName == "bullist") {
|
|
||||||
selection.selectorChanged('ul > li', function(state, args) {
|
|
||||||
var nodeName, i = args.parents.length;
|
|
||||||
|
|
||||||
while (i--) {
|
|
||||||
nodeName = args.parents[i].nodeName;
|
|
||||||
if (nodeName == "OL" || nodeName == "UL") {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
item.active(state && nodeName == "UL");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (itemName == "numlist") {
|
|
||||||
selection.selectorChanged('ol > li', function(state, args) {
|
|
||||||
var nodeName, i = args.parents.length;
|
|
||||||
|
|
||||||
while (i--) {
|
|
||||||
nodeName = args.parents[i].nodeName;
|
|
||||||
if (nodeName == "OL" || nodeName == "UL") {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
item.active(state && nodeName == "OL");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.settings.stateSelector) {
|
|
||||||
selection.selectorChanged(item.settings.stateSelector, function(state) {
|
|
||||||
item.active(state);
|
|
||||||
}, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.settings.disabledStateSelector) {
|
|
||||||
selection.selectorChanged(item.settings.disabledStateSelector, function(state) {
|
|
||||||
item.disabled(state);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item == "|") {
|
|
||||||
buttonGroup = null;
|
|
||||||
} else {
|
|
||||||
if (Factory.has(item)) {
|
|
||||||
item = {type: item};
|
|
||||||
|
|
||||||
if (settings.toolbar_items_size) {
|
|
||||||
item.size = settings.toolbar_items_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
toolbarItems.push(item);
|
|
||||||
buttonGroup = null;
|
|
||||||
} else {
|
|
||||||
if (!buttonGroup) {
|
|
||||||
buttonGroup = {type: 'buttongroup', items: []};
|
|
||||||
toolbarItems.push(buttonGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (editor.buttons[item]) {
|
|
||||||
// TODO: Move control creation to some UI class
|
|
||||||
itemName = item;
|
|
||||||
item = editor.buttons[itemName];
|
|
||||||
|
|
||||||
if (typeof item == "function") {
|
|
||||||
item = item();
|
|
||||||
}
|
|
||||||
|
|
||||||
item.type = item.type || 'button';
|
|
||||||
|
|
||||||
if (settings.toolbar_items_size) {
|
|
||||||
item.size = settings.toolbar_items_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
item = Factory.create(item);
|
|
||||||
buttonGroup.items.push(item);
|
|
||||||
|
|
||||||
if (editor.initialized) {
|
|
||||||
bindSelectorChanged();
|
|
||||||
} else {
|
|
||||||
editor.on('init', bindSelectorChanged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
toolbars.push({type: 'toolbar', layout: 'flow', items: toolbarItems});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert toolbar array to multiple options
|
// Convert toolbar array to multiple options
|
||||||
@ -358,6 +368,234 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
self.resizeTo(elm.clientWidth + dw, elm.clientHeight + dh);
|
self.resizeTo(elm.clientWidth + dw, elm.clientHeight + dh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles contextual toolbars.
|
||||||
|
*/
|
||||||
|
function addContextualToolbars() {
|
||||||
|
var scrollContainer;
|
||||||
|
|
||||||
|
function getContextToolbars() {
|
||||||
|
return editor.contextToolbars || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getElementRect(elm) {
|
||||||
|
var pos, targetRect, root;
|
||||||
|
|
||||||
|
pos = tinymce.DOM.getPos(editor.getContentAreaContainer());
|
||||||
|
targetRect = editor.dom.getRect(elm);
|
||||||
|
root = editor.dom.getRoot();
|
||||||
|
|
||||||
|
// Adjust targetPos for scrolling in the editor
|
||||||
|
if (root.nodeName == 'BODY') {
|
||||||
|
targetRect.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
|
||||||
|
targetRect.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
targetRect.x += pos.x;
|
||||||
|
targetRect.y += pos.y;
|
||||||
|
|
||||||
|
return targetRect;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideAllFloatingPanels() {
|
||||||
|
each(editor.contextToolbars, function(toolbar) {
|
||||||
|
if (toolbar.panel) {
|
||||||
|
toolbar.panel.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reposition(match) {
|
||||||
|
var relPos, panelRect, elementRect, contentAreaRect, panel, relRect, testPositions;
|
||||||
|
|
||||||
|
if (editor.removed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!match || !match.toolbar.panel) {
|
||||||
|
hideAllFloatingPanels();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
testPositions = [
|
||||||
|
'tc-bc', 'bc-tc',
|
||||||
|
'tl-bl', 'bl-tl',
|
||||||
|
'tr-br', 'br-tr'
|
||||||
|
];
|
||||||
|
|
||||||
|
panel = match.toolbar.panel;
|
||||||
|
panel.show();
|
||||||
|
|
||||||
|
elementRect = getElementRect(match.element);
|
||||||
|
panelRect = tinymce.DOM.getRect(panel.getEl());
|
||||||
|
contentAreaRect = tinymce.DOM.getRect(editor.getContentAreaContainer() || editor.getBody());
|
||||||
|
|
||||||
|
if (!editor.inline) {
|
||||||
|
contentAreaRect.w = editor.getDoc().documentElement.offsetWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inflate the elementRect so it doesn't get placed above resize handles
|
||||||
|
if (editor.selection.controlSelection.isResizable(match.element)) {
|
||||||
|
elementRect = Rect.inflate(elementRect, 0, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
relPos = Rect.findBestRelativePosition(panelRect, elementRect, contentAreaRect, testPositions);
|
||||||
|
|
||||||
|
if (relPos) {
|
||||||
|
each(testPositions.concat('inside'), function(pos) {
|
||||||
|
panel.classes.toggle('tinymce-inline-' + pos, pos == relPos);
|
||||||
|
});
|
||||||
|
|
||||||
|
relRect = Rect.relativePosition(panelRect, elementRect, relPos);
|
||||||
|
panel.moveTo(relRect.x, relRect.y);
|
||||||
|
} else {
|
||||||
|
each(testPositions, function(pos) {
|
||||||
|
panel.classes.toggle('tinymce-inline-' + pos, false);
|
||||||
|
});
|
||||||
|
|
||||||
|
panel.classes.toggle('tinymce-inline-inside', true);
|
||||||
|
|
||||||
|
elementRect = Rect.intersect(contentAreaRect, elementRect);
|
||||||
|
|
||||||
|
if (elementRect) {
|
||||||
|
relPos = Rect.findBestRelativePosition(panelRect, elementRect, contentAreaRect, [
|
||||||
|
'tc-tc', 'tl-tl', 'tr-tr'
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (relPos) {
|
||||||
|
relRect = Rect.relativePosition(panelRect, elementRect, relPos);
|
||||||
|
panel.moveTo(relRect.x, relRect.y);
|
||||||
|
} else {
|
||||||
|
panel.moveTo(elementRect.x, elementRect.y);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
panel.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//drawRect(contentAreaRect, 'blue');
|
||||||
|
//drawRect(elementRect, 'red');
|
||||||
|
//drawRect(panelRect, 'green');
|
||||||
|
}
|
||||||
|
|
||||||
|
function repositionHandler() {
|
||||||
|
function execute() {
|
||||||
|
reposition(findFrontMostMatch(editor.selection.getNode()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.requestAnimationFrame) {
|
||||||
|
window.requestAnimationFrame(execute);
|
||||||
|
} else {
|
||||||
|
execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function bindScrollEvent() {
|
||||||
|
if (!scrollContainer) {
|
||||||
|
scrollContainer = editor.selection.getScrollContainer() || editor.getWin();
|
||||||
|
tinymce.$(scrollContainer).on('scroll', repositionHandler);
|
||||||
|
|
||||||
|
editor.on('remove', function() {
|
||||||
|
tinymce.$(scrollContainer).off('scroll');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showContextToolbar(match) {
|
||||||
|
var panel;
|
||||||
|
|
||||||
|
if (match.toolbar.panel) {
|
||||||
|
match.toolbar.panel.show();
|
||||||
|
reposition(match);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bindScrollEvent();
|
||||||
|
|
||||||
|
panel = Factory.create({
|
||||||
|
type: 'floatpanel',
|
||||||
|
role: 'application',
|
||||||
|
classes: 'tinymce tinymce-inline',
|
||||||
|
layout: 'flex',
|
||||||
|
direction: 'column',
|
||||||
|
align: 'stretch',
|
||||||
|
autohide: false,
|
||||||
|
autofix: true,
|
||||||
|
fixed: true,
|
||||||
|
border: 1,
|
||||||
|
items: createToolbar(match.toolbar.items)
|
||||||
|
});
|
||||||
|
|
||||||
|
match.toolbar.panel = panel;
|
||||||
|
panel.renderTo(document.body).reflow();
|
||||||
|
reposition(match);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideAllContextToolbars() {
|
||||||
|
tinymce.each(getContextToolbars(), function(toolbar) {
|
||||||
|
if (toolbar.panel) {
|
||||||
|
toolbar.panel.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function findFrontMostMatch(targetElm) {
|
||||||
|
var i, y, parentsAndSelf, toolbars = getContextToolbars();
|
||||||
|
|
||||||
|
parentsAndSelf = editor.$(targetElm).parents().add(targetElm);
|
||||||
|
for (i = parentsAndSelf.length - 1; i >= 0; i--) {
|
||||||
|
for (y = toolbars.length - 1; y >= 0; y--) {
|
||||||
|
if (toolbars[y].predicate(parentsAndSelf[i])) {
|
||||||
|
return {
|
||||||
|
toolbar: toolbars[y],
|
||||||
|
element: parentsAndSelf[i]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
editor.on('click keyup blur', function() {
|
||||||
|
// Needs to be delayed to avoid Chrome img focus out bug
|
||||||
|
window.setTimeout(function() {
|
||||||
|
var match;
|
||||||
|
|
||||||
|
if (editor.removed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
match = findFrontMostMatch(editor.selection.getNode());
|
||||||
|
if (match) {
|
||||||
|
showContextToolbar(match);
|
||||||
|
} else {
|
||||||
|
hideAllContextToolbars();
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
editor.on('ObjectResizeStart', function() {
|
||||||
|
var match = findFrontMostMatch(editor.selection.getNode());
|
||||||
|
|
||||||
|
if (match && match.toolbar.panel) {
|
||||||
|
match.toolbar.panel.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
editor.on('nodeChange ResizeEditor ResizeWindow', repositionHandler);
|
||||||
|
|
||||||
|
editor.on('remove', function() {
|
||||||
|
tinymce.each(getContextToolbars(), function(toolbar) {
|
||||||
|
if (toolbar.panel) {
|
||||||
|
toolbar.panel.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
editor.contextToolbars = {};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the inline editor UI.
|
* Renders the inline editor UI.
|
||||||
*
|
*
|
||||||
@ -397,7 +635,15 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
if (panel) {
|
if (panel) {
|
||||||
|
// We require two events as the inline float panel based toolbar does not have autohide=true
|
||||||
panel.hide();
|
panel.hide();
|
||||||
|
|
||||||
|
// All other autohidden float panels will be closed below.
|
||||||
|
// Need to check for hideAll since it might be a normal panel
|
||||||
|
if (panel.hideAll) {
|
||||||
|
panel.hideAll();
|
||||||
|
}
|
||||||
|
|
||||||
DOM.removeClass(editor.getBody(), 'mce-edit-focus');
|
DOM.removeClass(editor.getBody(), 'mce-edit-focus');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -441,6 +687,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
|
|
||||||
addAccessibilityKeys(panel);
|
addAccessibilityKeys(panel);
|
||||||
show();
|
show();
|
||||||
|
addContextualToolbars();
|
||||||
|
|
||||||
editor.on('nodeChange', reposition);
|
editor.on('nodeChange', reposition);
|
||||||
editor.on('activate', show);
|
editor.on('activate', show);
|
||||||
@ -555,8 +802,9 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
panel = null;
|
panel = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add accesibility shortkuts
|
// Add accesibility shortcuts
|
||||||
addAccessibilityKeys(panel);
|
addAccessibilityKeys(panel);
|
||||||
|
addContextualToolbars();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
iframeContainer: panel.find('#iframe')[0].getEl(),
|
iframeContainer: panel.find('#iframe')[0].getEl(),
|
||||||
|
File diff suppressed because one or more lines are too long
4
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
4
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Popup.js
|
* tinymce_mce_popup.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
25
wp-includes/js/tinymce/tinymce.min.js
vendored
25
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* editable_selects.js
|
* editable_selects.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* form_utils.js
|
* form_utils.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* mctabs.js
|
* mctabs.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -48,14 +48,14 @@ MCTabs.prototype.hideTab =function(tab){
|
|||||||
};
|
};
|
||||||
|
|
||||||
MCTabs.prototype.showPanel = function(panel) {
|
MCTabs.prototype.showPanel = function(panel) {
|
||||||
panel.className = 'current';
|
panel.className = 'current';
|
||||||
panel.setAttribute("aria-hidden", false);
|
panel.setAttribute("aria-hidden", false);
|
||||||
};
|
};
|
||||||
|
|
||||||
MCTabs.prototype.hidePanel = function(panel) {
|
MCTabs.prototype.hidePanel = function(panel) {
|
||||||
panel.className = 'panel';
|
panel.className = 'panel';
|
||||||
panel.setAttribute("aria-hidden", true);
|
panel.setAttribute("aria-hidden", true);
|
||||||
};
|
};
|
||||||
|
|
||||||
MCTabs.prototype.getPanelForTab = function(tabElm) {
|
MCTabs.prototype.getPanelForTab = function(tabElm) {
|
||||||
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
|
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
|
||||||
@ -98,7 +98,7 @@ MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
|
|||||||
t.hidePanel(nodes[i]);
|
t.hidePanel(nodes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!avoid_focus) {
|
if (!avoid_focus) {
|
||||||
tabElm.focus();
|
tabElm.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* validate.js
|
* validate.js
|
||||||
*
|
*
|
||||||
* Copyright, Moxiecode Systems AB
|
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||||
*
|
*
|
||||||
* License: http://www.tinymce.com/license
|
* License: http://www.tinymce.com/license
|
||||||
* Contributing: http://www.tinymce.com/contributing
|
* Contributing: http://www.tinymce.com/contributing
|
||||||
@ -111,7 +111,7 @@ var AutoValidator = {
|
|||||||
invalidate : function(n) {
|
invalidate : function(n) {
|
||||||
this.mark(n.form, n);
|
this.mark(n.form, n);
|
||||||
},
|
},
|
||||||
|
|
||||||
getErrorMessages : function(f) {
|
getErrorMessages : function(f) {
|
||||||
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
|
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
|
||||||
nl = this.tags(f, "label");
|
nl = this.tags(f, "label");
|
||||||
@ -129,7 +129,7 @@ var AutoValidator = {
|
|||||||
} else {
|
} else {
|
||||||
message = ed.getLang('invalid_data');
|
message = ed.getLang('invalid_data');
|
||||||
}
|
}
|
||||||
|
|
||||||
message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
|
message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
|
||||||
return values[b] || '{#' + b + '}';
|
return values[b] || '{#' + b + '}';
|
||||||
});
|
});
|
||||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-33012';
|
$wp_version = '4.3-alpha-33013';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = 32814;
|
|||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4110-20150505';
|
$tinymce_version = '4201-20150630';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version
|
* Holds the required PHP version
|
||||||
|
Loading…
Reference in New Issue
Block a user