TinyMCE: Update to 4.9.10. Changelog: https://www.tiny.cloud/docs-4x/changelog/#version4910april232020.
Props hareesh-pillai, azaozz. Fixes #50431. git-svn-id: https://develop.svn.wordpress.org/trunk@48158 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
07e3dda9ba
commit
67839d5a62
@ -1,3 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Edited for compatibility with old TinyMCE 3.x plugins in WordPress.
|
||||||
|
* More info: https://core.trac.wordpress.org/ticket/31596#comment:10
|
||||||
|
*/
|
||||||
|
|
||||||
/* Generic */
|
/* Generic */
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
this.add = function (callback, scope, prepend) {
|
this.add = function (callback, scope, prepend) {
|
||||||
log('<target>.on' + newEventName + ".add(..)");
|
log('<target>.on' + newEventName + ".add(..)");
|
||||||
|
|
||||||
// Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2).
|
// Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2)
|
||||||
function patchedEventCallback(e) {
|
function patchedEventCallback(e) {
|
||||||
var callbackArgs = [];
|
var callbackArgs = [];
|
||||||
|
|
||||||
|
@ -204,6 +204,8 @@ var lists = (function (domGlobals) {
|
|||||||
resolveBookmark: resolveBookmark
|
resolveBookmark: resolveBookmark
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var noop = function () {
|
||||||
|
};
|
||||||
var constant = function (value) {
|
var constant = function (value) {
|
||||||
return function () {
|
return function () {
|
||||||
return value;
|
return value;
|
||||||
@ -221,8 +223,6 @@ var lists = (function (domGlobals) {
|
|||||||
var never = constant(false);
|
var never = constant(false);
|
||||||
var always = constant(true);
|
var always = constant(true);
|
||||||
|
|
||||||
var never$1 = never;
|
|
||||||
var always$1 = always;
|
|
||||||
var none = function () {
|
var none = function () {
|
||||||
return NONE;
|
return NONE;
|
||||||
};
|
};
|
||||||
@ -236,37 +236,27 @@ var lists = (function (domGlobals) {
|
|||||||
var id = function (n) {
|
var id = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
var noop = function () {
|
|
||||||
};
|
|
||||||
var nul = function () {
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
var undef = function () {
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
var me = {
|
var me = {
|
||||||
fold: function (n, s) {
|
fold: function (n, s) {
|
||||||
return n();
|
return n();
|
||||||
},
|
},
|
||||||
is: never$1,
|
is: never,
|
||||||
isSome: never$1,
|
isSome: never,
|
||||||
isNone: always$1,
|
isNone: always,
|
||||||
getOr: id,
|
getOr: id,
|
||||||
getOrThunk: call,
|
getOrThunk: call,
|
||||||
getOrDie: function (msg) {
|
getOrDie: function (msg) {
|
||||||
throw new Error(msg || 'error: getOrDie called on none.');
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
},
|
},
|
||||||
getOrNull: nul,
|
getOrNull: constant(null),
|
||||||
getOrUndefined: undef,
|
getOrUndefined: constant(undefined),
|
||||||
or: id,
|
or: id,
|
||||||
orThunk: call,
|
orThunk: call,
|
||||||
map: none,
|
map: none,
|
||||||
ap: none,
|
|
||||||
each: noop,
|
each: noop,
|
||||||
bind: none,
|
bind: none,
|
||||||
flatten: none,
|
exists: never,
|
||||||
exists: never$1,
|
forall: always,
|
||||||
forall: always$1,
|
|
||||||
filter: none,
|
filter: none,
|
||||||
equals: eq,
|
equals: eq,
|
||||||
equals_: eq,
|
equals_: eq,
|
||||||
@ -281,15 +271,10 @@ var lists = (function (domGlobals) {
|
|||||||
return me;
|
return me;
|
||||||
}();
|
}();
|
||||||
var some = function (a) {
|
var some = function (a) {
|
||||||
var constant_a = function () {
|
var constant_a = constant(a);
|
||||||
return a;
|
|
||||||
};
|
|
||||||
var self = function () {
|
var self = function () {
|
||||||
return me;
|
return me;
|
||||||
};
|
};
|
||||||
var map = function (f) {
|
|
||||||
return some(f(a));
|
|
||||||
};
|
|
||||||
var bind = function (f) {
|
var bind = function (f) {
|
||||||
return f(a);
|
return f(a);
|
||||||
};
|
};
|
||||||
@ -300,8 +285,8 @@ var lists = (function (domGlobals) {
|
|||||||
is: function (v) {
|
is: function (v) {
|
||||||
return a === v;
|
return a === v;
|
||||||
},
|
},
|
||||||
isSome: always$1,
|
isSome: always,
|
||||||
isNone: never$1,
|
isNone: never,
|
||||||
getOr: constant_a,
|
getOr: constant_a,
|
||||||
getOrThunk: constant_a,
|
getOrThunk: constant_a,
|
||||||
getOrDie: constant_a,
|
getOrDie: constant_a,
|
||||||
@ -309,35 +294,31 @@ var lists = (function (domGlobals) {
|
|||||||
getOrUndefined: constant_a,
|
getOrUndefined: constant_a,
|
||||||
or: self,
|
or: self,
|
||||||
orThunk: self,
|
orThunk: self,
|
||||||
map: map,
|
map: function (f) {
|
||||||
ap: function (optfab) {
|
return some(f(a));
|
||||||
return optfab.fold(none, function (fab) {
|
|
||||||
return some(fab(a));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
each: function (f) {
|
each: function (f) {
|
||||||
f(a);
|
f(a);
|
||||||
},
|
},
|
||||||
bind: bind,
|
bind: bind,
|
||||||
flatten: constant_a,
|
|
||||||
exists: bind,
|
exists: bind,
|
||||||
forall: bind,
|
forall: bind,
|
||||||
filter: function (f) {
|
filter: function (f) {
|
||||||
return f(a) ? me : NONE;
|
return f(a) ? me : NONE;
|
||||||
},
|
},
|
||||||
equals: function (o) {
|
|
||||||
return o.is(a);
|
|
||||||
},
|
|
||||||
equals_: function (o, elementEq) {
|
|
||||||
return o.fold(never$1, function (b) {
|
|
||||||
return elementEq(a, b);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toArray: function () {
|
toArray: function () {
|
||||||
return [a];
|
return [a];
|
||||||
},
|
},
|
||||||
toString: function () {
|
toString: function () {
|
||||||
return 'some(' + a + ')';
|
return 'some(' + a + ')';
|
||||||
|
},
|
||||||
|
equals: function (o) {
|
||||||
|
return o.is(a);
|
||||||
|
},
|
||||||
|
equals_: function (o, elementEq) {
|
||||||
|
return o.fold(never, function (b) {
|
||||||
|
return elementEq(a, b);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return me;
|
return me;
|
||||||
@ -375,27 +356,28 @@ var lists = (function (domGlobals) {
|
|||||||
var isFunction = isType('function');
|
var isFunction = isType('function');
|
||||||
var isNumber = isType('number');
|
var isNumber = isType('number');
|
||||||
|
|
||||||
var slice = Array.prototype.slice;
|
var nativeSlice = Array.prototype.slice;
|
||||||
|
var nativePush = Array.prototype.push;
|
||||||
var map = function (xs, f) {
|
var map = function (xs, f) {
|
||||||
var len = xs.length;
|
var len = xs.length;
|
||||||
var r = new Array(len);
|
var r = new Array(len);
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
r[i] = f(x, i, xs);
|
r[i] = f(x, i);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var each = function (xs, f) {
|
var each = function (xs, f) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
f(x, i, xs);
|
f(x, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var filter = function (xs, pred) {
|
var filter = function (xs, pred) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
r.push(x);
|
r.push(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -433,20 +415,19 @@ var lists = (function (domGlobals) {
|
|||||||
var find = function (xs, pred) {
|
var find = function (xs, pred) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
return Option.some(x);
|
return Option.some(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Option.none();
|
return Option.none();
|
||||||
};
|
};
|
||||||
var push = Array.prototype.push;
|
|
||||||
var flatten = function (xs) {
|
var flatten = function (xs) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||||
if (!isArray(xs[i])) {
|
if (!isArray(xs[i])) {
|
||||||
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
||||||
}
|
}
|
||||||
push.apply(r, xs[i]);
|
nativePush.apply(r, xs[i]);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -455,7 +436,7 @@ var lists = (function (domGlobals) {
|
|||||||
return flatten(output);
|
return flatten(output);
|
||||||
};
|
};
|
||||||
var reverse = function (xs) {
|
var reverse = function (xs) {
|
||||||
var r = slice.call(xs, 0);
|
var r = nativeSlice.call(xs, 0);
|
||||||
r.reverse();
|
r.reverse();
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -466,7 +447,7 @@ var lists = (function (domGlobals) {
|
|||||||
return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
|
return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
|
||||||
};
|
};
|
||||||
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
||||||
return slice.call(x);
|
return nativeSlice.call(x);
|
||||||
};
|
};
|
||||||
|
|
||||||
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
|
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
|
||||||
@ -621,17 +602,8 @@ var lists = (function (domGlobals) {
|
|||||||
fromPoint: fromPoint
|
fromPoint: fromPoint
|
||||||
};
|
};
|
||||||
|
|
||||||
var liftN = function (arr, f) {
|
var lift2 = function (oa, ob, f) {
|
||||||
var r = [];
|
return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
|
||||||
for (var i = 0; i < arr.length; i++) {
|
|
||||||
var x = arr[i];
|
|
||||||
if (x.isSome()) {
|
|
||||||
r.push(x.getOrDie());
|
|
||||||
} else {
|
|
||||||
return Option.none();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Option.some(f.apply(null, r));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var fromElements = function (elements, scope) {
|
var fromElements = function (elements, scope) {
|
||||||
@ -670,7 +642,7 @@ var lists = (function (domGlobals) {
|
|||||||
for (var k = 0, len = props.length; k < len; k++) {
|
for (var k = 0, len = props.length; k < len; k++) {
|
||||||
var i = props[k];
|
var i = props[k];
|
||||||
var x = obj[i];
|
var x = obj[i];
|
||||||
f(x, i, obj);
|
f(x, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1197,10 +1169,7 @@ var lists = (function (domGlobals) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
var appendSegments = function (head$1, tail) {
|
var appendSegments = function (head$1, tail) {
|
||||||
liftN([
|
lift2(last(head$1), head(tail), joinSegment);
|
||||||
last(head$1),
|
|
||||||
head(tail)
|
|
||||||
], joinSegment);
|
|
||||||
};
|
};
|
||||||
var createSegment = function (scope, listType) {
|
var createSegment = function (scope, listType) {
|
||||||
var segment = {
|
var segment = {
|
||||||
@ -1497,10 +1466,7 @@ var lists = (function (domGlobals) {
|
|||||||
};
|
};
|
||||||
var getItemSelection = function (editor) {
|
var getItemSelection = function (editor) {
|
||||||
var selectedListItems = map(Selection.getSelectedListItems(editor), Element.fromDom);
|
var selectedListItems = map(Selection.getSelectedListItems(editor), Element.fromDom);
|
||||||
return liftN([
|
return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
|
||||||
find(selectedListItems, not(hasFirstChildList)),
|
|
||||||
find(reverse(selectedListItems), not(hasFirstChildList))
|
|
||||||
], function (start, end) {
|
|
||||||
return {
|
return {
|
||||||
start: start,
|
start: start,
|
||||||
end: end
|
end: end
|
||||||
|
File diff suppressed because one or more lines are too long
@ -47,9 +47,154 @@ var media = (function () {
|
|||||||
hasDimensions: hasDimensions
|
hasDimensions: hasDimensions
|
||||||
};
|
};
|
||||||
|
|
||||||
var global$3 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');
|
var Cell = function (initial) {
|
||||||
|
var value = initial;
|
||||||
|
var get = function () {
|
||||||
|
return value;
|
||||||
|
};
|
||||||
|
var set = function (v) {
|
||||||
|
value = v;
|
||||||
|
};
|
||||||
|
var clone = function () {
|
||||||
|
return Cell(get());
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
get: get,
|
||||||
|
set: set,
|
||||||
|
clone: clone
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
var noop = function () {
|
||||||
|
};
|
||||||
|
var constant = function (value) {
|
||||||
|
return function () {
|
||||||
|
return value;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
var never = constant(false);
|
||||||
|
var always = constant(true);
|
||||||
|
|
||||||
|
var none = function () {
|
||||||
|
return NONE;
|
||||||
|
};
|
||||||
|
var NONE = function () {
|
||||||
|
var eq = function (o) {
|
||||||
|
return o.isNone();
|
||||||
|
};
|
||||||
|
var call = function (thunk) {
|
||||||
|
return thunk();
|
||||||
|
};
|
||||||
|
var id = function (n) {
|
||||||
|
return n;
|
||||||
|
};
|
||||||
|
var me = {
|
||||||
|
fold: function (n, s) {
|
||||||
|
return n();
|
||||||
|
},
|
||||||
|
is: never,
|
||||||
|
isSome: never,
|
||||||
|
isNone: always,
|
||||||
|
getOr: id,
|
||||||
|
getOrThunk: call,
|
||||||
|
getOrDie: function (msg) {
|
||||||
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
|
},
|
||||||
|
getOrNull: constant(null),
|
||||||
|
getOrUndefined: constant(undefined),
|
||||||
|
or: id,
|
||||||
|
orThunk: call,
|
||||||
|
map: none,
|
||||||
|
each: noop,
|
||||||
|
bind: none,
|
||||||
|
exists: never,
|
||||||
|
forall: always,
|
||||||
|
filter: none,
|
||||||
|
equals: eq,
|
||||||
|
equals_: eq,
|
||||||
|
toArray: function () {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
toString: constant('none()')
|
||||||
|
};
|
||||||
|
if (Object.freeze) {
|
||||||
|
Object.freeze(me);
|
||||||
|
}
|
||||||
|
return me;
|
||||||
|
}();
|
||||||
|
var some = function (a) {
|
||||||
|
var constant_a = constant(a);
|
||||||
|
var self = function () {
|
||||||
|
return me;
|
||||||
|
};
|
||||||
|
var bind = function (f) {
|
||||||
|
return f(a);
|
||||||
|
};
|
||||||
|
var me = {
|
||||||
|
fold: function (n, s) {
|
||||||
|
return s(a);
|
||||||
|
},
|
||||||
|
is: function (v) {
|
||||||
|
return a === v;
|
||||||
|
},
|
||||||
|
isSome: always,
|
||||||
|
isNone: never,
|
||||||
|
getOr: constant_a,
|
||||||
|
getOrThunk: constant_a,
|
||||||
|
getOrDie: constant_a,
|
||||||
|
getOrNull: constant_a,
|
||||||
|
getOrUndefined: constant_a,
|
||||||
|
or: self,
|
||||||
|
orThunk: self,
|
||||||
|
map: function (f) {
|
||||||
|
return some(f(a));
|
||||||
|
},
|
||||||
|
each: function (f) {
|
||||||
|
f(a);
|
||||||
|
},
|
||||||
|
bind: bind,
|
||||||
|
exists: bind,
|
||||||
|
forall: bind,
|
||||||
|
filter: function (f) {
|
||||||
|
return f(a) ? me : NONE;
|
||||||
|
},
|
||||||
|
toArray: function () {
|
||||||
|
return [a];
|
||||||
|
},
|
||||||
|
toString: function () {
|
||||||
|
return 'some(' + a + ')';
|
||||||
|
},
|
||||||
|
equals: function (o) {
|
||||||
|
return o.is(a);
|
||||||
|
},
|
||||||
|
equals_: function (o, elementEq) {
|
||||||
|
return o.fold(never, function (b) {
|
||||||
|
return elementEq(a, b);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return me;
|
||||||
|
};
|
||||||
|
var from = function (value) {
|
||||||
|
return value === null || value === undefined ? NONE : some(value);
|
||||||
|
};
|
||||||
|
var Option = {
|
||||||
|
some: some,
|
||||||
|
none: none,
|
||||||
|
from: from
|
||||||
|
};
|
||||||
|
|
||||||
|
var hasOwnProperty = Object.hasOwnProperty;
|
||||||
|
var get = function (obj, key) {
|
||||||
|
return has(obj, key) ? Option.from(obj[key]) : Option.none();
|
||||||
|
};
|
||||||
|
var has = function (obj, key) {
|
||||||
|
return hasOwnProperty.call(obj, key);
|
||||||
|
};
|
||||||
|
|
||||||
|
var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||||
|
|
||||||
|
var global$4 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');
|
||||||
|
|
||||||
var getVideoScriptMatch = function (prefixes, src) {
|
var getVideoScriptMatch = function (prefixes, src) {
|
||||||
if (prefixes) {
|
if (prefixes) {
|
||||||
@ -62,76 +207,65 @@ var media = (function () {
|
|||||||
};
|
};
|
||||||
var VideoScript = { getVideoScriptMatch: getVideoScriptMatch };
|
var VideoScript = { getVideoScriptMatch: getVideoScriptMatch };
|
||||||
|
|
||||||
|
var DOM = global$3.DOM;
|
||||||
var trimPx = function (value) {
|
var trimPx = function (value) {
|
||||||
return value.replace(/px$/, '');
|
return value.replace(/px$/, '');
|
||||||
};
|
};
|
||||||
var addPx = function (value) {
|
var getEphoxEmbedData = function (attrs) {
|
||||||
return /^[0-9.]+$/.test(value) ? value + 'px' : value;
|
var style = attrs.map.style;
|
||||||
};
|
var styles = style ? DOM.parseStyle(style) : {};
|
||||||
var getSize = function (name) {
|
return {
|
||||||
return function (elm) {
|
type: 'ephox-embed-iri',
|
||||||
return elm ? trimPx(elm.style[name]) : '';
|
source1: attrs.map['data-ephox-embed-iri'],
|
||||||
|
source2: '',
|
||||||
|
poster: '',
|
||||||
|
width: get(styles, 'max-width').map(trimPx).getOr(''),
|
||||||
|
height: get(styles, 'max-height').map(trimPx).getOr('')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var setSize = function (name) {
|
var htmlToData = function (prefixes, html) {
|
||||||
return function (elm, value) {
|
var isEphoxEmbed = Cell(false);
|
||||||
if (elm) {
|
|
||||||
elm.style[name] = addPx(value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var Size = {
|
|
||||||
getMaxWidth: getSize('maxWidth'),
|
|
||||||
getMaxHeight: getSize('maxHeight'),
|
|
||||||
setMaxWidth: setSize('maxWidth'),
|
|
||||||
setMaxHeight: setSize('maxHeight')
|
|
||||||
};
|
|
||||||
|
|
||||||
var DOM = global$4.DOM;
|
|
||||||
var getEphoxEmbedIri = function (elm) {
|
|
||||||
return DOM.getAttrib(elm, 'data-ephox-embed-iri');
|
|
||||||
};
|
|
||||||
var isEphoxEmbed = function (html) {
|
|
||||||
var fragment = DOM.createFragment(html);
|
|
||||||
return getEphoxEmbedIri(fragment.firstChild) !== '';
|
|
||||||
};
|
|
||||||
var htmlToDataSax = function (prefixes, html) {
|
|
||||||
var data = {};
|
var data = {};
|
||||||
global$3({
|
global$4({
|
||||||
validate: false,
|
validate: false,
|
||||||
allow_conditional_comments: true,
|
allow_conditional_comments: true,
|
||||||
special: 'script,noscript',
|
special: 'script,noscript',
|
||||||
start: function (name, attrs) {
|
start: function (name, attrs) {
|
||||||
if (!data.source1 && name === 'param') {
|
if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
|
||||||
data.source1 = attrs.map.movie;
|
isEphoxEmbed.set(true);
|
||||||
}
|
data = getEphoxEmbedData(attrs);
|
||||||
if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
|
} else {
|
||||||
if (!data.type) {
|
if (!data.source1 && name === 'param') {
|
||||||
data.type = name;
|
data.source1 = attrs.map.movie;
|
||||||
}
|
}
|
||||||
data = global$2.extend(attrs.map, data);
|
if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
|
||||||
}
|
if (!data.type) {
|
||||||
if (name === 'script') {
|
data.type = name;
|
||||||
var videoScript = VideoScript.getVideoScriptMatch(prefixes, attrs.map.src);
|
}
|
||||||
if (!videoScript) {
|
data = global$2.extend(attrs.map, data);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
data = {
|
if (name === 'script') {
|
||||||
type: 'script',
|
var videoScript = VideoScript.getVideoScriptMatch(prefixes, attrs.map.src);
|
||||||
source1: attrs.map.src,
|
if (!videoScript) {
|
||||||
width: videoScript.width,
|
return;
|
||||||
height: videoScript.height
|
}
|
||||||
};
|
data = {
|
||||||
}
|
type: 'script',
|
||||||
if (name === 'source') {
|
source1: attrs.map.src,
|
||||||
if (!data.source1) {
|
width: videoScript.width,
|
||||||
data.source1 = attrs.map.src;
|
height: videoScript.height
|
||||||
} else if (!data.source2) {
|
};
|
||||||
data.source2 = attrs.map.src;
|
}
|
||||||
|
if (name === 'source') {
|
||||||
|
if (!data.source1) {
|
||||||
|
data.source1 = attrs.map.src;
|
||||||
|
} else if (!data.source2) {
|
||||||
|
data.source2 = attrs.map.src;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (name === 'img' && !data.poster) {
|
||||||
|
data.poster = attrs.map.src;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (name === 'img' && !data.poster) {
|
|
||||||
data.poster = attrs.map.src;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).parse(html);
|
}).parse(html);
|
||||||
@ -140,21 +274,6 @@ var media = (function () {
|
|||||||
data.poster = data.poster || '';
|
data.poster = data.poster || '';
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
var ephoxEmbedHtmlToData = function (html) {
|
|
||||||
var fragment = DOM.createFragment(html);
|
|
||||||
var div = fragment.firstChild;
|
|
||||||
return {
|
|
||||||
type: 'ephox-embed-iri',
|
|
||||||
source1: getEphoxEmbedIri(div),
|
|
||||||
source2: '',
|
|
||||||
poster: '',
|
|
||||||
width: Size.getMaxWidth(div),
|
|
||||||
height: Size.getMaxHeight(div)
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var htmlToData = function (prefixes, html) {
|
|
||||||
return isEphoxEmbed(html) ? ephoxEmbedHtmlToData(html) : htmlToDataSax(prefixes, html);
|
|
||||||
};
|
|
||||||
var HtmlToData = { htmlToData: htmlToData };
|
var HtmlToData = { htmlToData: htmlToData };
|
||||||
|
|
||||||
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
||||||
@ -174,22 +293,21 @@ var media = (function () {
|
|||||||
};
|
};
|
||||||
var Mime = { guess: guess };
|
var Mime = { guess: guess };
|
||||||
|
|
||||||
var global$6 = tinymce.util.Tools.resolve('tinymce.html.Writer');
|
var global$6 = tinymce.util.Tools.resolve('tinymce.html.Schema');
|
||||||
|
|
||||||
var global$7 = tinymce.util.Tools.resolve('tinymce.html.Schema');
|
var global$7 = tinymce.util.Tools.resolve('tinymce.html.Writer');
|
||||||
|
|
||||||
var DOM$1 = global$4.DOM;
|
var DOM$1 = global$3.DOM;
|
||||||
|
var addPx = function (value) {
|
||||||
|
return /^[0-9.]+$/.test(value) ? value + 'px' : value;
|
||||||
|
};
|
||||||
var setAttributes = function (attrs, updatedAttrs) {
|
var setAttributes = function (attrs, updatedAttrs) {
|
||||||
var name;
|
for (var name in updatedAttrs) {
|
||||||
var i;
|
var value = '' + updatedAttrs[name];
|
||||||
var value;
|
|
||||||
var attr;
|
|
||||||
for (name in updatedAttrs) {
|
|
||||||
value = '' + updatedAttrs[name];
|
|
||||||
if (attrs.map[name]) {
|
if (attrs.map[name]) {
|
||||||
i = attrs.length;
|
var i = attrs.length;
|
||||||
while (i--) {
|
while (i--) {
|
||||||
attr = attrs[i];
|
var attr = attrs[i];
|
||||||
if (attr.name === name) {
|
if (attr.name === name) {
|
||||||
if (value) {
|
if (value) {
|
||||||
attrs.map[name] = value;
|
attrs.map[name] = value;
|
||||||
@ -209,17 +327,19 @@ var media = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var normalizeHtml = function (html) {
|
var updateEphoxEmbed = function (data, attrs) {
|
||||||
var writer = global$6();
|
var style = attrs.map.style;
|
||||||
var parser = global$3(writer);
|
var styleMap = style ? DOM$1.parseStyle(style) : {};
|
||||||
parser.parse(html);
|
styleMap['max-width'] = addPx(data.width);
|
||||||
return writer.getContent();
|
styleMap['max-height'] = addPx(data.height);
|
||||||
|
setAttributes(attrs, { style: DOM$1.serializeStyle(styleMap) });
|
||||||
};
|
};
|
||||||
var updateHtmlSax = function (html, data, updateAll) {
|
var updateHtml = function (html, data, updateAll) {
|
||||||
var writer = global$6();
|
var writer = global$7();
|
||||||
|
var isEphoxEmbed = Cell(false);
|
||||||
var sourceCount = 0;
|
var sourceCount = 0;
|
||||||
var hasImage;
|
var hasImage;
|
||||||
global$3({
|
global$4({
|
||||||
validate: false,
|
validate: false,
|
||||||
allow_conditional_comments: true,
|
allow_conditional_comments: true,
|
||||||
special: 'script,noscript',
|
special: 'script,noscript',
|
||||||
@ -233,101 +353,94 @@ var media = (function () {
|
|||||||
writer.text(text, raw);
|
writer.text(text, raw);
|
||||||
},
|
},
|
||||||
start: function (name, attrs, empty) {
|
start: function (name, attrs, empty) {
|
||||||
switch (name) {
|
if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
|
||||||
case 'video':
|
isEphoxEmbed.set(true);
|
||||||
case 'object':
|
updateEphoxEmbed(data, attrs);
|
||||||
case 'embed':
|
} else {
|
||||||
case 'img':
|
|
||||||
case 'iframe':
|
|
||||||
if (data.height !== undefined && data.width !== undefined) {
|
|
||||||
setAttributes(attrs, {
|
|
||||||
width: data.width,
|
|
||||||
height: data.height
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (updateAll) {
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 'video':
|
case 'video':
|
||||||
setAttributes(attrs, {
|
case 'object':
|
||||||
poster: data.poster,
|
case 'embed':
|
||||||
src: ''
|
case 'img':
|
||||||
});
|
case 'iframe':
|
||||||
if (data.source2) {
|
if (data.height !== undefined && data.width !== undefined) {
|
||||||
setAttributes(attrs, { src: '' });
|
setAttributes(attrs, {
|
||||||
|
width: data.width,
|
||||||
|
height: data.height
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'iframe':
|
}
|
||||||
setAttributes(attrs, { src: data.source1 });
|
if (updateAll) {
|
||||||
break;
|
switch (name) {
|
||||||
case 'source':
|
case 'video':
|
||||||
sourceCount++;
|
|
||||||
if (sourceCount <= 2) {
|
|
||||||
setAttributes(attrs, {
|
setAttributes(attrs, {
|
||||||
src: data['source' + sourceCount],
|
poster: data.poster,
|
||||||
type: data['source' + sourceCount + 'mime']
|
src: ''
|
||||||
});
|
});
|
||||||
if (!data['source' + sourceCount]) {
|
if (data.source2) {
|
||||||
|
setAttributes(attrs, { src: '' });
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'iframe':
|
||||||
|
setAttributes(attrs, { src: data.source1 });
|
||||||
|
break;
|
||||||
|
case 'source':
|
||||||
|
sourceCount++;
|
||||||
|
if (sourceCount <= 2) {
|
||||||
|
setAttributes(attrs, {
|
||||||
|
src: data['source' + sourceCount],
|
||||||
|
type: data['source' + sourceCount + 'mime']
|
||||||
|
});
|
||||||
|
if (!data['source' + sourceCount]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'img':
|
||||||
|
if (!data.poster) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
hasImage = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case 'img':
|
|
||||||
if (!data.poster) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hasImage = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.start(name, attrs, empty);
|
writer.start(name, attrs, empty);
|
||||||
},
|
},
|
||||||
end: function (name) {
|
end: function (name) {
|
||||||
if (name === 'video' && updateAll) {
|
if (!isEphoxEmbed.get()) {
|
||||||
for (var index = 1; index <= 2; index++) {
|
if (name === 'video' && updateAll) {
|
||||||
if (data['source' + index]) {
|
for (var index = 1; index <= 2; index++) {
|
||||||
var attrs = [];
|
if (data['source' + index]) {
|
||||||
attrs.map = {};
|
var attrs = [];
|
||||||
if (sourceCount < index) {
|
attrs.map = {};
|
||||||
setAttributes(attrs, {
|
if (sourceCount < index) {
|
||||||
src: data['source' + index],
|
setAttributes(attrs, {
|
||||||
type: data['source' + index + 'mime']
|
src: data['source' + index],
|
||||||
});
|
type: data['source' + index + 'mime']
|
||||||
writer.start('source', attrs, true);
|
});
|
||||||
|
writer.start('source', attrs, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (data.poster && name === 'object' && updateAll && !hasImage) {
|
||||||
if (data.poster && name === 'object' && updateAll && !hasImage) {
|
var imgAttrs = [];
|
||||||
var imgAttrs = [];
|
imgAttrs.map = {};
|
||||||
imgAttrs.map = {};
|
setAttributes(imgAttrs, {
|
||||||
setAttributes(imgAttrs, {
|
src: data.poster,
|
||||||
src: data.poster,
|
width: data.width,
|
||||||
width: data.width,
|
height: data.height
|
||||||
height: data.height
|
});
|
||||||
});
|
writer.start('img', imgAttrs, true);
|
||||||
writer.start('img', imgAttrs, true);
|
}
|
||||||
}
|
}
|
||||||
writer.end(name);
|
writer.end(name);
|
||||||
}
|
}
|
||||||
}, global$7({})).parse(html);
|
}, global$6({})).parse(html);
|
||||||
return writer.getContent();
|
return writer.getContent();
|
||||||
};
|
};
|
||||||
var isEphoxEmbed$1 = function (html) {
|
|
||||||
var fragment = DOM$1.createFragment(html);
|
|
||||||
return DOM$1.getAttrib(fragment.firstChild, 'data-ephox-embed-iri') !== '';
|
|
||||||
};
|
|
||||||
var updateEphoxEmbed = function (html, data) {
|
|
||||||
var fragment = DOM$1.createFragment(html);
|
|
||||||
var div = fragment.firstChild;
|
|
||||||
Size.setMaxWidth(div, data.width);
|
|
||||||
Size.setMaxHeight(div, data.height);
|
|
||||||
return normalizeHtml(div.outerHTML);
|
|
||||||
};
|
|
||||||
var updateHtml = function (html, data, updateAll) {
|
|
||||||
return isEphoxEmbed$1(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll);
|
|
||||||
};
|
|
||||||
var UpdateHtml = { updateHtml: updateHtml };
|
var UpdateHtml = { updateHtml: updateHtml };
|
||||||
|
|
||||||
var urlPatterns = [
|
var urlPatterns = [
|
||||||
@ -551,6 +664,31 @@ var media = (function () {
|
|||||||
isCached: isCached
|
isCached: isCached
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var trimPx$1 = function (value) {
|
||||||
|
return value.replace(/px$/, '');
|
||||||
|
};
|
||||||
|
var addPx$1 = function (value) {
|
||||||
|
return /^[0-9.]+$/.test(value) ? value + 'px' : value;
|
||||||
|
};
|
||||||
|
var getSize = function (name) {
|
||||||
|
return function (elm) {
|
||||||
|
return elm ? trimPx$1(elm.style[name]) : '';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
var setSize = function (name) {
|
||||||
|
return function (elm, value) {
|
||||||
|
if (elm) {
|
||||||
|
elm.style[name] = addPx$1(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
var Size = {
|
||||||
|
getMaxWidth: getSize('maxWidth'),
|
||||||
|
getMaxHeight: getSize('maxHeight'),
|
||||||
|
setMaxWidth: setSize('maxWidth'),
|
||||||
|
setMaxHeight: setSize('maxHeight')
|
||||||
|
};
|
||||||
|
|
||||||
var doSyncSize = function (widthCtrl, heightCtrl) {
|
var doSyncSize = function (widthCtrl, heightCtrl) {
|
||||||
widthCtrl.state.set('oldVal', widthCtrl.value());
|
widthCtrl.state.set('oldVal', widthCtrl.value());
|
||||||
heightCtrl.state.set('oldVal', heightCtrl.value());
|
heightCtrl.state.set('oldVal', heightCtrl.value());
|
||||||
@ -825,13 +963,13 @@ var media = (function () {
|
|||||||
};
|
};
|
||||||
var Dialog = { showDialog: showDialog };
|
var Dialog = { showDialog: showDialog };
|
||||||
|
|
||||||
var get = function (editor) {
|
var get$1 = function (editor) {
|
||||||
var showDialog = function () {
|
var showDialog = function () {
|
||||||
Dialog.showDialog(editor);
|
Dialog.showDialog(editor);
|
||||||
};
|
};
|
||||||
return { showDialog: showDialog };
|
return { showDialog: showDialog };
|
||||||
};
|
};
|
||||||
var Api = { get: get };
|
var Api = { get: get$1 };
|
||||||
|
|
||||||
var register = function (editor) {
|
var register = function (editor) {
|
||||||
var showDialog = function () {
|
var showDialog = function () {
|
||||||
@ -847,9 +985,9 @@ var media = (function () {
|
|||||||
if (Settings.shouldFilterHtml(editor) === false) {
|
if (Settings.shouldFilterHtml(editor) === false) {
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
var writer = global$6();
|
var writer = global$7();
|
||||||
var blocked;
|
var blocked;
|
||||||
global$3({
|
global$4({
|
||||||
validate: false,
|
validate: false,
|
||||||
allow_conditional_comments: false,
|
allow_conditional_comments: false,
|
||||||
special: 'script,noscript',
|
special: 'script,noscript',
|
||||||
@ -864,14 +1002,16 @@ var media = (function () {
|
|||||||
},
|
},
|
||||||
start: function (name, attrs, empty) {
|
start: function (name, attrs, empty) {
|
||||||
blocked = true;
|
blocked = true;
|
||||||
if (name === 'script' || name === 'noscript') {
|
if (name === 'script' || name === 'noscript' || name === 'svg') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < attrs.length; i++) {
|
for (var i = attrs.length - 1; i >= 0; i--) {
|
||||||
if (attrs[i].name.indexOf('on') === 0) {
|
var attrName = attrs[i].name;
|
||||||
return;
|
if (attrName.indexOf('on') === 0) {
|
||||||
|
delete attrs.map[attrName];
|
||||||
|
attrs.splice(i, 1);
|
||||||
}
|
}
|
||||||
if (attrs[i].name === 'style') {
|
if (attrName === 'style') {
|
||||||
attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
|
attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -884,7 +1024,7 @@ var media = (function () {
|
|||||||
}
|
}
|
||||||
writer.end(name);
|
writer.end(name);
|
||||||
}
|
}
|
||||||
}, global$7({})).parse(html);
|
}, global$6({})).parse(html);
|
||||||
return writer.getContent();
|
return writer.getContent();
|
||||||
};
|
};
|
||||||
var Sanitize = { sanitize: sanitize };
|
var Sanitize = { sanitize: sanitize };
|
||||||
|
File diff suppressed because one or more lines are too long
@ -249,11 +249,11 @@ var paste = (function (domGlobals) {
|
|||||||
|
|
||||||
var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
|
var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
|
||||||
|
|
||||||
var global$8 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
var global$8 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
|
||||||
|
|
||||||
var global$9 = tinymce.util.Tools.resolve('tinymce.html.Schema');
|
var global$9 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
||||||
|
|
||||||
var global$a = tinymce.util.Tools.resolve('tinymce.html.Serializer');
|
var global$a = tinymce.util.Tools.resolve('tinymce.html.Schema');
|
||||||
|
|
||||||
function filter(content, items) {
|
function filter(content, items) {
|
||||||
global$4.each(items, function (v) {
|
global$4.each(items, function (v) {
|
||||||
@ -266,7 +266,7 @@ var paste = (function (domGlobals) {
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
function innerText(html) {
|
function innerText(html) {
|
||||||
var schema = global$9();
|
var schema = global$a();
|
||||||
var domParser = global$7({}, schema);
|
var domParser = global$7({}, schema);
|
||||||
var text = '';
|
var text = '';
|
||||||
var shortEndedElements = schema.getShortEndedElements();
|
var shortEndedElements = schema.getShortEndedElements();
|
||||||
@ -426,7 +426,7 @@ var paste = (function (domGlobals) {
|
|||||||
}
|
}
|
||||||
if (!currentListNode || currentListNode.name !== listName) {
|
if (!currentListNode || currentListNode.name !== listName) {
|
||||||
prevListNode = prevListNode || currentListNode;
|
prevListNode = prevListNode || currentListNode;
|
||||||
currentListNode = new global$8(listName, 1);
|
currentListNode = new global$9(listName, 1);
|
||||||
if (start > 1) {
|
if (start > 1) {
|
||||||
currentListNode.attr('start', '' + start);
|
currentListNode.attr('start', '' + start);
|
||||||
}
|
}
|
||||||
@ -538,11 +538,11 @@ var paste = (function (domGlobals) {
|
|||||||
});
|
});
|
||||||
if (/(bold)/i.test(outputStyles['font-weight'])) {
|
if (/(bold)/i.test(outputStyles['font-weight'])) {
|
||||||
delete outputStyles['font-weight'];
|
delete outputStyles['font-weight'];
|
||||||
node.wrap(new global$8('b', 1));
|
node.wrap(new global$9('b', 1));
|
||||||
}
|
}
|
||||||
if (/(italic)/i.test(outputStyles['font-style'])) {
|
if (/(italic)/i.test(outputStyles['font-style'])) {
|
||||||
delete outputStyles['font-style'];
|
delete outputStyles['font-style'];
|
||||||
node.wrap(new global$8('i', 1));
|
node.wrap(new global$9('i', 1));
|
||||||
}
|
}
|
||||||
outputStyles = editor.dom.serializeStyle(outputStyles, node.name);
|
outputStyles = editor.dom.serializeStyle(outputStyles, node.name);
|
||||||
if (outputStyles) {
|
if (outputStyles) {
|
||||||
@ -577,7 +577,7 @@ var paste = (function (domGlobals) {
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
var validElements = Settings.getWordValidElements(editor);
|
var validElements = Settings.getWordValidElements(editor);
|
||||||
var schema = global$9({
|
var schema = global$a({
|
||||||
valid_elements: validElements,
|
valid_elements: validElements,
|
||||||
valid_children: '-li[p]'
|
valid_children: '-li[p]'
|
||||||
});
|
});
|
||||||
@ -653,7 +653,7 @@ var paste = (function (domGlobals) {
|
|||||||
if (Settings.shouldConvertWordFakeLists(editor)) {
|
if (Settings.shouldConvertWordFakeLists(editor)) {
|
||||||
convertFakeListsToProperLists(rootNode);
|
convertFakeListsToProperLists(rootNode);
|
||||||
}
|
}
|
||||||
content = global$a({ validate: editor.settings.validate }, schema).serialize(rootNode);
|
content = global$8({ validate: editor.settings.validate }, schema).serialize(rootNode);
|
||||||
return content;
|
return content;
|
||||||
};
|
};
|
||||||
var preProcess = function (editor, content) {
|
var preProcess = function (editor, content) {
|
||||||
@ -664,6 +664,19 @@ var paste = (function (domGlobals) {
|
|||||||
isWordContent: isWordContent
|
isWordContent: isWordContent
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var preProcess$1 = function (editor, html) {
|
||||||
|
var parser = global$7({}, editor.schema);
|
||||||
|
parser.addNodeFilter('meta', function (nodes) {
|
||||||
|
global$4.each(nodes, function (node) {
|
||||||
|
return node.remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
var fragment = parser.parse(html, {
|
||||||
|
forced_root_block: false,
|
||||||
|
isRootContent: true
|
||||||
|
});
|
||||||
|
return global$8({ validate: editor.settings.validate }, editor.schema).serialize(fragment);
|
||||||
|
};
|
||||||
var processResult = function (content, cancelled) {
|
var processResult = function (content, cancelled) {
|
||||||
return {
|
return {
|
||||||
content: content,
|
content: content,
|
||||||
@ -677,10 +690,11 @@ var paste = (function (domGlobals) {
|
|||||||
};
|
};
|
||||||
var filterContent = function (editor, content, internal, isWordHtml) {
|
var filterContent = function (editor, content, internal, isWordHtml) {
|
||||||
var preProcessArgs = Events.firePastePreProcess(editor, content, internal, isWordHtml);
|
var preProcessArgs = Events.firePastePreProcess(editor, content, internal, isWordHtml);
|
||||||
|
var filteredContent = preProcess$1(editor, preProcessArgs.content);
|
||||||
if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
|
if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
|
||||||
return postProcessFilter(editor, preProcessArgs.content, internal, isWordHtml);
|
return postProcessFilter(editor, filteredContent, internal, isWordHtml);
|
||||||
} else {
|
} else {
|
||||||
return processResult(preProcessArgs.content, preProcessArgs.isDefaultPrevented());
|
return processResult(filteredContent, preProcessArgs.isDefaultPrevented());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var process = function (editor, html, internal) {
|
var process = function (editor, html, internal) {
|
||||||
@ -690,15 +704,8 @@ var paste = (function (domGlobals) {
|
|||||||
};
|
};
|
||||||
var ProcessFilters = { process: process };
|
var ProcessFilters = { process: process };
|
||||||
|
|
||||||
var removeMeta = function (editor, html) {
|
|
||||||
var body = editor.dom.create('body', {}, html);
|
|
||||||
global$4.each(body.querySelectorAll('meta'), function (elm) {
|
|
||||||
return elm.parentNode.removeChild(elm);
|
|
||||||
});
|
|
||||||
return body.innerHTML;
|
|
||||||
};
|
|
||||||
var pasteHtml = function (editor, html) {
|
var pasteHtml = function (editor, html) {
|
||||||
editor.insertContent(removeMeta(editor, html), {
|
editor.insertContent(html, {
|
||||||
merge: Settings.shouldMergeFormats(editor),
|
merge: Settings.shouldMergeFormats(editor),
|
||||||
paste: true
|
paste: true
|
||||||
});
|
});
|
||||||
@ -754,6 +761,8 @@ var paste = (function (domGlobals) {
|
|||||||
insertContent: insertContent
|
insertContent: insertContent
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var noop = function () {
|
||||||
|
};
|
||||||
var constant = function (value) {
|
var constant = function (value) {
|
||||||
return function () {
|
return function () {
|
||||||
return value;
|
return value;
|
||||||
@ -776,8 +785,6 @@ var paste = (function (domGlobals) {
|
|||||||
var never = constant(false);
|
var never = constant(false);
|
||||||
var always = constant(true);
|
var always = constant(true);
|
||||||
|
|
||||||
var never$1 = never;
|
|
||||||
var always$1 = always;
|
|
||||||
var none = function () {
|
var none = function () {
|
||||||
return NONE;
|
return NONE;
|
||||||
};
|
};
|
||||||
@ -791,37 +798,27 @@ var paste = (function (domGlobals) {
|
|||||||
var id = function (n) {
|
var id = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
var noop = function () {
|
|
||||||
};
|
|
||||||
var nul = function () {
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
var undef = function () {
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
var me = {
|
var me = {
|
||||||
fold: function (n, s) {
|
fold: function (n, s) {
|
||||||
return n();
|
return n();
|
||||||
},
|
},
|
||||||
is: never$1,
|
is: never,
|
||||||
isSome: never$1,
|
isSome: never,
|
||||||
isNone: always$1,
|
isNone: always,
|
||||||
getOr: id,
|
getOr: id,
|
||||||
getOrThunk: call,
|
getOrThunk: call,
|
||||||
getOrDie: function (msg) {
|
getOrDie: function (msg) {
|
||||||
throw new Error(msg || 'error: getOrDie called on none.');
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
},
|
},
|
||||||
getOrNull: nul,
|
getOrNull: constant(null),
|
||||||
getOrUndefined: undef,
|
getOrUndefined: constant(undefined),
|
||||||
or: id,
|
or: id,
|
||||||
orThunk: call,
|
orThunk: call,
|
||||||
map: none,
|
map: none,
|
||||||
ap: none,
|
|
||||||
each: noop,
|
each: noop,
|
||||||
bind: none,
|
bind: none,
|
||||||
flatten: none,
|
exists: never,
|
||||||
exists: never$1,
|
forall: always,
|
||||||
forall: always$1,
|
|
||||||
filter: none,
|
filter: none,
|
||||||
equals: eq,
|
equals: eq,
|
||||||
equals_: eq,
|
equals_: eq,
|
||||||
@ -836,15 +833,10 @@ var paste = (function (domGlobals) {
|
|||||||
return me;
|
return me;
|
||||||
}();
|
}();
|
||||||
var some = function (a) {
|
var some = function (a) {
|
||||||
var constant_a = function () {
|
var constant_a = constant(a);
|
||||||
return a;
|
|
||||||
};
|
|
||||||
var self = function () {
|
var self = function () {
|
||||||
return me;
|
return me;
|
||||||
};
|
};
|
||||||
var map = function (f) {
|
|
||||||
return some(f(a));
|
|
||||||
};
|
|
||||||
var bind = function (f) {
|
var bind = function (f) {
|
||||||
return f(a);
|
return f(a);
|
||||||
};
|
};
|
||||||
@ -855,8 +847,8 @@ var paste = (function (domGlobals) {
|
|||||||
is: function (v) {
|
is: function (v) {
|
||||||
return a === v;
|
return a === v;
|
||||||
},
|
},
|
||||||
isSome: always$1,
|
isSome: always,
|
||||||
isNone: never$1,
|
isNone: never,
|
||||||
getOr: constant_a,
|
getOr: constant_a,
|
||||||
getOrThunk: constant_a,
|
getOrThunk: constant_a,
|
||||||
getOrDie: constant_a,
|
getOrDie: constant_a,
|
||||||
@ -864,35 +856,31 @@ var paste = (function (domGlobals) {
|
|||||||
getOrUndefined: constant_a,
|
getOrUndefined: constant_a,
|
||||||
or: self,
|
or: self,
|
||||||
orThunk: self,
|
orThunk: self,
|
||||||
map: map,
|
map: function (f) {
|
||||||
ap: function (optfab) {
|
return some(f(a));
|
||||||
return optfab.fold(none, function (fab) {
|
|
||||||
return some(fab(a));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
each: function (f) {
|
each: function (f) {
|
||||||
f(a);
|
f(a);
|
||||||
},
|
},
|
||||||
bind: bind,
|
bind: bind,
|
||||||
flatten: constant_a,
|
|
||||||
exists: bind,
|
exists: bind,
|
||||||
forall: bind,
|
forall: bind,
|
||||||
filter: function (f) {
|
filter: function (f) {
|
||||||
return f(a) ? me : NONE;
|
return f(a) ? me : NONE;
|
||||||
},
|
},
|
||||||
equals: function (o) {
|
|
||||||
return o.is(a);
|
|
||||||
},
|
|
||||||
equals_: function (o, elementEq) {
|
|
||||||
return o.fold(never$1, function (b) {
|
|
||||||
return elementEq(a, b);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toArray: function () {
|
toArray: function () {
|
||||||
return [a];
|
return [a];
|
||||||
},
|
},
|
||||||
toString: function () {
|
toString: function () {
|
||||||
return 'some(' + a + ')';
|
return 'some(' + a + ')';
|
||||||
|
},
|
||||||
|
equals: function (o) {
|
||||||
|
return o.is(a);
|
||||||
|
},
|
||||||
|
equals_: function (o, elementEq) {
|
||||||
|
return o.fold(never, function (b) {
|
||||||
|
return elementEq(a, b);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return me;
|
return me;
|
||||||
@ -926,34 +914,34 @@ var paste = (function (domGlobals) {
|
|||||||
};
|
};
|
||||||
var isFunction = isType('function');
|
var isFunction = isType('function');
|
||||||
|
|
||||||
var slice = Array.prototype.slice;
|
var nativeSlice = Array.prototype.slice;
|
||||||
var map = function (xs, f) {
|
var map = function (xs, f) {
|
||||||
var len = xs.length;
|
var len = xs.length;
|
||||||
var r = new Array(len);
|
var r = new Array(len);
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
r[i] = f(x, i, xs);
|
r[i] = f(x, i);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var each = function (xs, f) {
|
var each = function (xs, f) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
f(x, i, xs);
|
f(x, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var filter$1 = function (xs, pred) {
|
var filter$1 = function (xs, pred) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
r.push(x);
|
r.push(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
||||||
return slice.call(x);
|
return nativeSlice.call(x);
|
||||||
};
|
};
|
||||||
|
|
||||||
var exports$1 = {}, module = { exports: exports$1 };
|
var exports$1 = {}, module = { exports: exports$1 };
|
||||||
@ -1597,10 +1585,10 @@ var paste = (function (domGlobals) {
|
|||||||
var par$1 = function (futures) {
|
var par$1 = function (futures) {
|
||||||
return par(futures, Future.nu);
|
return par(futures, Future.nu);
|
||||||
};
|
};
|
||||||
var mapM = function (array, fn) {
|
var traverse = function (array, fn) {
|
||||||
var futures = map(array, fn);
|
return par$1(map(array, fn));
|
||||||
return par$1(futures);
|
|
||||||
};
|
};
|
||||||
|
var mapM = traverse;
|
||||||
|
|
||||||
var value = function () {
|
var value = function () {
|
||||||
var subject = Cell(Option.none());
|
var subject = Cell(Option.none());
|
||||||
@ -2045,7 +2033,7 @@ var paste = (function (domGlobals) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var noop = function () {
|
var noop$1 = function () {
|
||||||
};
|
};
|
||||||
var hasWorkingClipboardApi = function (clipboardData) {
|
var hasWorkingClipboardApi = function (clipboardData) {
|
||||||
return global$2.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
|
return global$2.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
|
||||||
@ -2128,7 +2116,7 @@ var paste = (function (domGlobals) {
|
|||||||
var copy = function (editor) {
|
var copy = function (editor) {
|
||||||
return function (evt) {
|
return function (evt) {
|
||||||
if (hasSelectedContent(editor)) {
|
if (hasSelectedContent(editor)) {
|
||||||
setClipboardData(evt, getData(editor), fallback(editor), noop);
|
setClipboardData(evt, getData(editor), fallback(editor), noop$1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;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:normal;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-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.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:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}
|
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;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:normal;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-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.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:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}
|
@ -1 +1 @@
|
|||||||
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;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:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;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:normal;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-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.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:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}
|
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;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:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;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:normal;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-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.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:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}
|
File diff suppressed because one or more lines are too long
@ -560,8 +560,6 @@ var inlite = (function (domGlobals) {
|
|||||||
var never = constant(false);
|
var never = constant(false);
|
||||||
var always = constant(true);
|
var always = constant(true);
|
||||||
|
|
||||||
var never$1 = never;
|
|
||||||
var always$1 = always;
|
|
||||||
var none = function () {
|
var none = function () {
|
||||||
return NONE;
|
return NONE;
|
||||||
};
|
};
|
||||||
@ -575,37 +573,27 @@ var inlite = (function (domGlobals) {
|
|||||||
var id = function (n) {
|
var id = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
var noop = function () {
|
|
||||||
};
|
|
||||||
var nul = function () {
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
var undef = function () {
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
var me = {
|
var me = {
|
||||||
fold: function (n, s) {
|
fold: function (n, s) {
|
||||||
return n();
|
return n();
|
||||||
},
|
},
|
||||||
is: never$1,
|
is: never,
|
||||||
isSome: never$1,
|
isSome: never,
|
||||||
isNone: always$1,
|
isNone: always,
|
||||||
getOr: id,
|
getOr: id,
|
||||||
getOrThunk: call,
|
getOrThunk: call,
|
||||||
getOrDie: function (msg) {
|
getOrDie: function (msg) {
|
||||||
throw new Error(msg || 'error: getOrDie called on none.');
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
},
|
},
|
||||||
getOrNull: nul,
|
getOrNull: constant(null),
|
||||||
getOrUndefined: undef,
|
getOrUndefined: constant(undefined),
|
||||||
or: id,
|
or: id,
|
||||||
orThunk: call,
|
orThunk: call,
|
||||||
map: none,
|
map: none,
|
||||||
ap: none,
|
|
||||||
each: noop,
|
each: noop,
|
||||||
bind: none,
|
bind: none,
|
||||||
flatten: none,
|
exists: never,
|
||||||
exists: never$1,
|
forall: always,
|
||||||
forall: always$1,
|
|
||||||
filter: none,
|
filter: none,
|
||||||
equals: eq,
|
equals: eq,
|
||||||
equals_: eq,
|
equals_: eq,
|
||||||
@ -620,15 +608,10 @@ var inlite = (function (domGlobals) {
|
|||||||
return me;
|
return me;
|
||||||
}();
|
}();
|
||||||
var some = function (a) {
|
var some = function (a) {
|
||||||
var constant_a = function () {
|
var constant_a = constant(a);
|
||||||
return a;
|
|
||||||
};
|
|
||||||
var self = function () {
|
var self = function () {
|
||||||
return me;
|
return me;
|
||||||
};
|
};
|
||||||
var map = function (f) {
|
|
||||||
return some(f(a));
|
|
||||||
};
|
|
||||||
var bind = function (f) {
|
var bind = function (f) {
|
||||||
return f(a);
|
return f(a);
|
||||||
};
|
};
|
||||||
@ -639,8 +622,8 @@ var inlite = (function (domGlobals) {
|
|||||||
is: function (v) {
|
is: function (v) {
|
||||||
return a === v;
|
return a === v;
|
||||||
},
|
},
|
||||||
isSome: always$1,
|
isSome: always,
|
||||||
isNone: never$1,
|
isNone: never,
|
||||||
getOr: constant_a,
|
getOr: constant_a,
|
||||||
getOrThunk: constant_a,
|
getOrThunk: constant_a,
|
||||||
getOrDie: constant_a,
|
getOrDie: constant_a,
|
||||||
@ -648,35 +631,31 @@ var inlite = (function (domGlobals) {
|
|||||||
getOrUndefined: constant_a,
|
getOrUndefined: constant_a,
|
||||||
or: self,
|
or: self,
|
||||||
orThunk: self,
|
orThunk: self,
|
||||||
map: map,
|
map: function (f) {
|
||||||
ap: function (optfab) {
|
return some(f(a));
|
||||||
return optfab.fold(none, function (fab) {
|
|
||||||
return some(fab(a));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
each: function (f) {
|
each: function (f) {
|
||||||
f(a);
|
f(a);
|
||||||
},
|
},
|
||||||
bind: bind,
|
bind: bind,
|
||||||
flatten: constant_a,
|
|
||||||
exists: bind,
|
exists: bind,
|
||||||
forall: bind,
|
forall: bind,
|
||||||
filter: function (f) {
|
filter: function (f) {
|
||||||
return f(a) ? me : NONE;
|
return f(a) ? me : NONE;
|
||||||
},
|
},
|
||||||
equals: function (o) {
|
|
||||||
return o.is(a);
|
|
||||||
},
|
|
||||||
equals_: function (o, elementEq) {
|
|
||||||
return o.fold(never$1, function (b) {
|
|
||||||
return elementEq(a, b);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toArray: function () {
|
toArray: function () {
|
||||||
return [a];
|
return [a];
|
||||||
},
|
},
|
||||||
toString: function () {
|
toString: function () {
|
||||||
return 'some(' + a + ')';
|
return 'some(' + a + ')';
|
||||||
|
},
|
||||||
|
equals: function (o) {
|
||||||
|
return o.is(a);
|
||||||
|
},
|
||||||
|
equals_: function (o, elementEq) {
|
||||||
|
return o.fold(never, function (b) {
|
||||||
|
return elementEq(a, b);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return me;
|
return me;
|
||||||
@ -712,44 +691,45 @@ var inlite = (function (domGlobals) {
|
|||||||
var isFunction$1 = isType$1('function');
|
var isFunction$1 = isType$1('function');
|
||||||
var isNumber$1 = isType$1('number');
|
var isNumber$1 = isType$1('number');
|
||||||
|
|
||||||
var slice = Array.prototype.slice;
|
var nativeSlice = Array.prototype.slice;
|
||||||
var rawIndexOf = function () {
|
var nativeIndexOf = Array.prototype.indexOf;
|
||||||
var pIndexOf = Array.prototype.indexOf;
|
var nativePush = Array.prototype.push;
|
||||||
var fastIndex = function (xs, x) {
|
var rawIndexOf = function (ts, t) {
|
||||||
return pIndexOf.call(xs, x);
|
return nativeIndexOf.call(ts, t);
|
||||||
};
|
};
|
||||||
var slowIndex = function (xs, x) {
|
|
||||||
return slowIndexOf(xs, x);
|
|
||||||
};
|
|
||||||
return pIndexOf === undefined ? slowIndex : fastIndex;
|
|
||||||
}();
|
|
||||||
var indexOf = function (xs, x) {
|
var indexOf = function (xs, x) {
|
||||||
var r = rawIndexOf(xs, x);
|
var r = rawIndexOf(xs, x);
|
||||||
return r === -1 ? Option.none() : Option.some(r);
|
return r === -1 ? Option.none() : Option.some(r);
|
||||||
};
|
};
|
||||||
var exists = function (xs, pred) {
|
var exists = function (xs, pred) {
|
||||||
return findIndex(xs, pred).isSome();
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
|
var x = xs[i];
|
||||||
|
if (pred(x, i)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
var map = function (xs, f) {
|
var map = function (xs, f) {
|
||||||
var len = xs.length;
|
var len = xs.length;
|
||||||
var r = new Array(len);
|
var r = new Array(len);
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
r[i] = f(x, i, xs);
|
r[i] = f(x, i);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var each = function (xs, f) {
|
var each = function (xs, f) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
f(x, i, xs);
|
f(x, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var filter = function (xs, pred) {
|
var filter = function (xs, pred) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
r.push(x);
|
r.push(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -764,42 +744,24 @@ var inlite = (function (domGlobals) {
|
|||||||
var find = function (xs, pred) {
|
var find = function (xs, pred) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
return Option.some(x);
|
return Option.some(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Option.none();
|
return Option.none();
|
||||||
};
|
};
|
||||||
var findIndex = function (xs, pred) {
|
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
|
||||||
var x = xs[i];
|
|
||||||
if (pred(x, i, xs)) {
|
|
||||||
return Option.some(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Option.none();
|
|
||||||
};
|
|
||||||
var slowIndexOf = function (xs, x) {
|
|
||||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
|
||||||
if (xs[i] === x) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
var push = Array.prototype.push;
|
|
||||||
var flatten$1 = function (xs) {
|
var flatten$1 = function (xs) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||||
if (!isArray$1(xs[i])) {
|
if (!isArray$1(xs[i])) {
|
||||||
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
||||||
}
|
}
|
||||||
push.apply(r, xs[i]);
|
nativePush.apply(r, xs[i]);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var from$1 = isFunction$1(Array.from) ? Array.from : function (x) {
|
var from$1 = isFunction$1(Array.from) ? Array.from : function (x) {
|
||||||
return slice.call(x);
|
return nativeSlice.call(x);
|
||||||
};
|
};
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
@ -1231,7 +1193,7 @@ var inlite = (function (domGlobals) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var Collection$1, proto;
|
var Collection$1, proto;
|
||||||
var push$1 = Array.prototype.push, slice$1 = Array.prototype.slice;
|
var push = Array.prototype.push, slice = Array.prototype.slice;
|
||||||
proto = {
|
proto = {
|
||||||
length: 0,
|
length: 0,
|
||||||
init: function (items) {
|
init: function (items) {
|
||||||
@ -1245,10 +1207,10 @@ var inlite = (function (domGlobals) {
|
|||||||
if (items instanceof Collection$1) {
|
if (items instanceof Collection$1) {
|
||||||
self.add(items.toArray());
|
self.add(items.toArray());
|
||||||
} else {
|
} else {
|
||||||
push$1.call(self, items);
|
push.call(self, items);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
push$1.apply(self, items);
|
push.apply(self, items);
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
},
|
},
|
||||||
@ -1285,7 +1247,7 @@ var inlite = (function (domGlobals) {
|
|||||||
return new Collection$1(matches);
|
return new Collection$1(matches);
|
||||||
},
|
},
|
||||||
slice: function () {
|
slice: function () {
|
||||||
return new Collection$1(slice$1.apply(this, arguments));
|
return new Collection$1(slice.apply(this, arguments));
|
||||||
},
|
},
|
||||||
eq: function (index) {
|
eq: function (index) {
|
||||||
return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
|
return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
|
||||||
@ -7837,11 +7799,11 @@ var inlite = (function (domGlobals) {
|
|||||||
return menuItem && menuItem.text === '-';
|
return menuItem && menuItem.text === '-';
|
||||||
};
|
};
|
||||||
var trimMenuItems = function (menuItems) {
|
var trimMenuItems = function (menuItems) {
|
||||||
var menuItems2 = filter(menuItems, function (menuItem, i, menuItems) {
|
var menuItems2 = filter(menuItems, function (menuItem, i) {
|
||||||
return !isSeparator(menuItem) || !isSeparator(menuItems[i - 1]);
|
return !isSeparator(menuItem) || !isSeparator(menuItems[i - 1]);
|
||||||
});
|
});
|
||||||
return filter(menuItems2, function (menuItem, i, menuItems) {
|
return filter(menuItems2, function (menuItem, i) {
|
||||||
return !isSeparator(menuItem) || i > 0 && i < menuItems.length - 1;
|
return !isSeparator(menuItem) || i > 0 && i < menuItems2.length - 1;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var createContextMenuItems = function (editor, context) {
|
var createContextMenuItems = function (editor, context) {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -159,8 +159,6 @@ var modern = (function (domGlobals) {
|
|||||||
var never = constant(false);
|
var never = constant(false);
|
||||||
var always = constant(true);
|
var always = constant(true);
|
||||||
|
|
||||||
var never$1 = never;
|
|
||||||
var always$1 = always;
|
|
||||||
var none = function () {
|
var none = function () {
|
||||||
return NONE;
|
return NONE;
|
||||||
};
|
};
|
||||||
@ -174,37 +172,27 @@ var modern = (function (domGlobals) {
|
|||||||
var id = function (n) {
|
var id = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
var noop = function () {
|
|
||||||
};
|
|
||||||
var nul = function () {
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
var undef = function () {
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
var me = {
|
var me = {
|
||||||
fold: function (n, s) {
|
fold: function (n, s) {
|
||||||
return n();
|
return n();
|
||||||
},
|
},
|
||||||
is: never$1,
|
is: never,
|
||||||
isSome: never$1,
|
isSome: never,
|
||||||
isNone: always$1,
|
isNone: always,
|
||||||
getOr: id,
|
getOr: id,
|
||||||
getOrThunk: call,
|
getOrThunk: call,
|
||||||
getOrDie: function (msg) {
|
getOrDie: function (msg) {
|
||||||
throw new Error(msg || 'error: getOrDie called on none.');
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
},
|
},
|
||||||
getOrNull: nul,
|
getOrNull: constant(null),
|
||||||
getOrUndefined: undef,
|
getOrUndefined: constant(undefined),
|
||||||
or: id,
|
or: id,
|
||||||
orThunk: call,
|
orThunk: call,
|
||||||
map: none,
|
map: none,
|
||||||
ap: none,
|
|
||||||
each: noop,
|
each: noop,
|
||||||
bind: none,
|
bind: none,
|
||||||
flatten: none,
|
exists: never,
|
||||||
exists: never$1,
|
forall: always,
|
||||||
forall: always$1,
|
|
||||||
filter: none,
|
filter: none,
|
||||||
equals: eq,
|
equals: eq,
|
||||||
equals_: eq,
|
equals_: eq,
|
||||||
@ -219,15 +207,10 @@ var modern = (function (domGlobals) {
|
|||||||
return me;
|
return me;
|
||||||
}();
|
}();
|
||||||
var some = function (a) {
|
var some = function (a) {
|
||||||
var constant_a = function () {
|
var constant_a = constant(a);
|
||||||
return a;
|
|
||||||
};
|
|
||||||
var self = function () {
|
var self = function () {
|
||||||
return me;
|
return me;
|
||||||
};
|
};
|
||||||
var map = function (f) {
|
|
||||||
return some(f(a));
|
|
||||||
};
|
|
||||||
var bind = function (f) {
|
var bind = function (f) {
|
||||||
return f(a);
|
return f(a);
|
||||||
};
|
};
|
||||||
@ -238,8 +221,8 @@ var modern = (function (domGlobals) {
|
|||||||
is: function (v) {
|
is: function (v) {
|
||||||
return a === v;
|
return a === v;
|
||||||
},
|
},
|
||||||
isSome: always$1,
|
isSome: always,
|
||||||
isNone: never$1,
|
isNone: never,
|
||||||
getOr: constant_a,
|
getOr: constant_a,
|
||||||
getOrThunk: constant_a,
|
getOrThunk: constant_a,
|
||||||
getOrDie: constant_a,
|
getOrDie: constant_a,
|
||||||
@ -247,35 +230,31 @@ var modern = (function (domGlobals) {
|
|||||||
getOrUndefined: constant_a,
|
getOrUndefined: constant_a,
|
||||||
or: self,
|
or: self,
|
||||||
orThunk: self,
|
orThunk: self,
|
||||||
map: map,
|
map: function (f) {
|
||||||
ap: function (optfab) {
|
return some(f(a));
|
||||||
return optfab.fold(none, function (fab) {
|
|
||||||
return some(fab(a));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
each: function (f) {
|
each: function (f) {
|
||||||
f(a);
|
f(a);
|
||||||
},
|
},
|
||||||
bind: bind,
|
bind: bind,
|
||||||
flatten: constant_a,
|
|
||||||
exists: bind,
|
exists: bind,
|
||||||
forall: bind,
|
forall: bind,
|
||||||
filter: function (f) {
|
filter: function (f) {
|
||||||
return f(a) ? me : NONE;
|
return f(a) ? me : NONE;
|
||||||
},
|
},
|
||||||
equals: function (o) {
|
|
||||||
return o.is(a);
|
|
||||||
},
|
|
||||||
equals_: function (o, elementEq) {
|
|
||||||
return o.fold(never$1, function (b) {
|
|
||||||
return elementEq(a, b);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toArray: function () {
|
toArray: function () {
|
||||||
return [a];
|
return [a];
|
||||||
},
|
},
|
||||||
toString: function () {
|
toString: function () {
|
||||||
return 'some(' + a + ')';
|
return 'some(' + a + ')';
|
||||||
|
},
|
||||||
|
equals: function (o) {
|
||||||
|
return o.is(a);
|
||||||
|
},
|
||||||
|
equals_: function (o, elementEq) {
|
||||||
|
return o.fold(never, function (b) {
|
||||||
|
return elementEq(a, b);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return me;
|
return me;
|
||||||
@ -685,44 +664,45 @@ var modern = (function (domGlobals) {
|
|||||||
var isFunction = isType('function');
|
var isFunction = isType('function');
|
||||||
var isNumber = isType('number');
|
var isNumber = isType('number');
|
||||||
|
|
||||||
var slice = Array.prototype.slice;
|
var nativeSlice = Array.prototype.slice;
|
||||||
var rawIndexOf = function () {
|
var nativeIndexOf = Array.prototype.indexOf;
|
||||||
var pIndexOf = Array.prototype.indexOf;
|
var nativePush = Array.prototype.push;
|
||||||
var fastIndex = function (xs, x) {
|
var rawIndexOf = function (ts, t) {
|
||||||
return pIndexOf.call(xs, x);
|
return nativeIndexOf.call(ts, t);
|
||||||
};
|
};
|
||||||
var slowIndex = function (xs, x) {
|
|
||||||
return slowIndexOf(xs, x);
|
|
||||||
};
|
|
||||||
return pIndexOf === undefined ? slowIndex : fastIndex;
|
|
||||||
}();
|
|
||||||
var indexOf = function (xs, x) {
|
var indexOf = function (xs, x) {
|
||||||
var r = rawIndexOf(xs, x);
|
var r = rawIndexOf(xs, x);
|
||||||
return r === -1 ? Option.none() : Option.some(r);
|
return r === -1 ? Option.none() : Option.some(r);
|
||||||
};
|
};
|
||||||
var exists = function (xs, pred) {
|
var exists = function (xs, pred) {
|
||||||
return findIndex(xs, pred).isSome();
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
|
var x = xs[i];
|
||||||
|
if (pred(x, i)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
var map = function (xs, f) {
|
var map = function (xs, f) {
|
||||||
var len = xs.length;
|
var len = xs.length;
|
||||||
var r = new Array(len);
|
var r = new Array(len);
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
r[i] = f(x, i, xs);
|
r[i] = f(x, i);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var each = function (xs, f) {
|
var each = function (xs, f) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
f(x, i, xs);
|
f(x, i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var filter = function (xs, pred) {
|
var filter = function (xs, pred) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
r.push(x);
|
r.push(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -737,7 +717,7 @@ var modern = (function (domGlobals) {
|
|||||||
var find = function (xs, pred) {
|
var find = function (xs, pred) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
return Option.some(x);
|
return Option.some(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -746,33 +726,24 @@ var modern = (function (domGlobals) {
|
|||||||
var findIndex = function (xs, pred) {
|
var findIndex = function (xs, pred) {
|
||||||
for (var i = 0, len = xs.length; i < len; i++) {
|
for (var i = 0, len = xs.length; i < len; i++) {
|
||||||
var x = xs[i];
|
var x = xs[i];
|
||||||
if (pred(x, i, xs)) {
|
if (pred(x, i)) {
|
||||||
return Option.some(i);
|
return Option.some(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Option.none();
|
return Option.none();
|
||||||
};
|
};
|
||||||
var slowIndexOf = function (xs, x) {
|
|
||||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
|
||||||
if (xs[i] === x) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
var push = Array.prototype.push;
|
|
||||||
var flatten = function (xs) {
|
var flatten = function (xs) {
|
||||||
var r = [];
|
var r = [];
|
||||||
for (var i = 0, len = xs.length; i < len; ++i) {
|
for (var i = 0, len = xs.length; i < len; ++i) {
|
||||||
if (!isArray(xs[i])) {
|
if (!isArray(xs[i])) {
|
||||||
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
||||||
}
|
}
|
||||||
push.apply(r, xs[i]);
|
nativePush.apply(r, xs[i]);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
||||||
return slice.call(x);
|
return nativeSlice.call(x);
|
||||||
};
|
};
|
||||||
|
|
||||||
var defaultMenus = {
|
var defaultMenus = {
|
||||||
@ -828,11 +799,11 @@ var modern = (function (domGlobals) {
|
|||||||
var menuItemsPass1 = filter(namedMenuItems, function (namedMenuItem) {
|
var menuItemsPass1 = filter(namedMenuItems, function (namedMenuItem) {
|
||||||
return removedMenuItems.hasOwnProperty(namedMenuItem.name) === false;
|
return removedMenuItems.hasOwnProperty(namedMenuItem.name) === false;
|
||||||
});
|
});
|
||||||
var menuItemsPass2 = filter(menuItemsPass1, function (namedMenuItem, i, namedMenuItems) {
|
var menuItemsPass2 = filter(menuItemsPass1, function (namedMenuItem, i) {
|
||||||
return !isSeparator(namedMenuItem) || !isSeparator(namedMenuItems[i - 1]);
|
return !isSeparator(namedMenuItem) || !isSeparator(menuItemsPass1[i - 1]);
|
||||||
});
|
});
|
||||||
return filter(menuItemsPass2, function (namedMenuItem, i, namedMenuItems) {
|
return filter(menuItemsPass2, function (namedMenuItem, i) {
|
||||||
return !isSeparator(namedMenuItem) || i > 0 && i < namedMenuItems.length - 1;
|
return !isSeparator(namedMenuItem) || i > 0 && i < menuItemsPass2.length - 1;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var createMenu = function (editorMenuItems, menus, removedMenuItems, context) {
|
var createMenu = function (editorMenuItems, menus, removedMenuItems, context) {
|
||||||
@ -1771,7 +1742,7 @@ var modern = (function (domGlobals) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var Collection$1, proto;
|
var Collection$1, proto;
|
||||||
var push$1 = Array.prototype.push, slice$1 = Array.prototype.slice;
|
var push = Array.prototype.push, slice = Array.prototype.slice;
|
||||||
proto = {
|
proto = {
|
||||||
length: 0,
|
length: 0,
|
||||||
init: function (items) {
|
init: function (items) {
|
||||||
@ -1785,10 +1756,10 @@ var modern = (function (domGlobals) {
|
|||||||
if (items instanceof Collection$1) {
|
if (items instanceof Collection$1) {
|
||||||
self.add(items.toArray());
|
self.add(items.toArray());
|
||||||
} else {
|
} else {
|
||||||
push$1.call(self, items);
|
push.call(self, items);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
push$1.apply(self, items);
|
push.apply(self, items);
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
},
|
},
|
||||||
@ -1825,7 +1796,7 @@ var modern = (function (domGlobals) {
|
|||||||
return new Collection$1(matches);
|
return new Collection$1(matches);
|
||||||
},
|
},
|
||||||
slice: function () {
|
slice: function () {
|
||||||
return new Collection$1(slice$1.apply(this, arguments));
|
return new Collection$1(slice.apply(this, arguments));
|
||||||
},
|
},
|
||||||
eq: function (index) {
|
eq: function (index) {
|
||||||
return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
|
return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
|
||||||
@ -7679,11 +7650,11 @@ var modern = (function (domGlobals) {
|
|||||||
return menuItem && menuItem.text === '-';
|
return menuItem && menuItem.text === '-';
|
||||||
};
|
};
|
||||||
var trimMenuItems = function (menuItems) {
|
var trimMenuItems = function (menuItems) {
|
||||||
var menuItems2 = filter(menuItems, function (menuItem, i, menuItems) {
|
var menuItems2 = filter(menuItems, function (menuItem, i) {
|
||||||
return !isSeparator$1(menuItem) || !isSeparator$1(menuItems[i - 1]);
|
return !isSeparator$1(menuItem) || !isSeparator$1(menuItems[i - 1]);
|
||||||
});
|
});
|
||||||
return filter(menuItems2, function (menuItem, i, menuItems) {
|
return filter(menuItems2, function (menuItem, i) {
|
||||||
return !isSeparator$1(menuItem) || i > 0 && i < menuItems.length - 1;
|
return !isSeparator$1(menuItem) || i > 0 && i < menuItems2.length - 1;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var createContextMenuItems = function (editor, context) {
|
var createContextMenuItems = function (editor, context) {
|
||||||
|
File diff suppressed because one or more lines are too long
953
src/js/_enqueues/vendor/tinymce/tinymce.js
vendored
953
src/js/_enqueues/vendor/tinymce/tinymce.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -27,7 +27,7 @@ $wp_db_version = 48121;
|
|||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4960-20190918';
|
$tinymce_version = '49100-20200624';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version.
|
* Holds the required PHP version.
|
||||||
|
Loading…
Reference in New Issue
Block a user