tinymce-rails 4.0.18 → 4.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/app/assets/source/tinymce/tinymce.jquery.js +466 -420
- data/app/assets/source/tinymce/tinymce.js +480 -427
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.jquery.js +10 -10
- data/vendor/assets/javascripts/tinymce/tinymce.js +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c73958992ac308c2e36adddb53bb830bead67c09
|
4
|
+
data.tar.gz: 6d61070d761174a06d0ef391ddab7497e1281948
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 000443eccfbe9cb6afdc44936f10e2e8c6d603a5577363913ea0d45d858219721f8a0a049d29d817dcba4a95d72d852dc25e2d76d2df438f42abeef29a93d882
|
7
|
+
data.tar.gz: 58a671d81776ee23a9987db2f7d84c16897952ed4a5595ac36e63a1d0a9a66726365f9bfcf484ffa56e12b132bb1f7e0cac4f67046599e140774746ef5e958ec
|
data/README.md
CHANGED
@@ -107,6 +107,16 @@ Using the `tinymce` helper and global configuration file is entirely optional. T
|
|
107
107
|
</script>
|
108
108
|
|
109
109
|
|
110
|
+
Asset Compilation
|
111
|
+
-----------------
|
112
|
+
|
113
|
+
If you are including TinyMCE via `application.js` or using the `tinymce_assets` helper, the TinyMCE assets will be automatically precompiled when you run `rake assets:precompile`.
|
114
|
+
|
115
|
+
However if you wish to include `tinymce-jquery.js` independently, you will need to add it to the precompile list in `config/environments/production.rb`:
|
116
|
+
|
117
|
+
config.assets.precompile << "tinymce-jquery.js"
|
118
|
+
|
119
|
+
|
110
120
|
Custom Plugins & Skins
|
111
121
|
----------------------
|
112
122
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.0.
|
1
|
+
// 4.0.19 (2014-03-11)
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Compiled inline version. (Library mode)
|
@@ -141,6 +141,7 @@ define("tinymce/dom/Sizzle", [], function() {
|
|
141
141
|
define("tinymce/html/Styles", [], function() {
|
142
142
|
return function(settings, schema) {
|
143
143
|
/*jshint maxlen:255 */
|
144
|
+
/*eslint max-len:0 */
|
144
145
|
var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,
|
145
146
|
urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,
|
146
147
|
styleRegExp = /\s*([^:]+):\s*([^;]+);?/g,
|
@@ -447,6 +448,7 @@ define("tinymce/html/Styles", [], function() {
|
|
447
448
|
*/
|
448
449
|
|
449
450
|
/*jshint loopfunc:true*/
|
451
|
+
/*eslint no-loop-func:0 */
|
450
452
|
|
451
453
|
define("tinymce/dom/EventUtils", [], function() {
|
452
454
|
"use strict";
|
@@ -1099,9 +1101,10 @@ define("tinymce/util/Tools", [], function() {
|
|
1099
1101
|
* @return {String} New string with removed whitespace.
|
1100
1102
|
*/
|
1101
1103
|
var whiteSpaceRegExp = /^\s*|\s*$/g;
|
1102
|
-
|
1104
|
+
|
1105
|
+
function trim(str) {
|
1103
1106
|
return (str === null || str === undefined) ? '' : ("" + str).replace(whiteSpaceRegExp, '');
|
1104
|
-
}
|
1107
|
+
}
|
1105
1108
|
|
1106
1109
|
/**
|
1107
1110
|
* Returns true/false if the object is an array or not.
|
@@ -1211,7 +1214,7 @@ define("tinymce/util/Tools", [], function() {
|
|
1211
1214
|
|
1212
1215
|
if (o.length !== undefined) {
|
1213
1216
|
// Indexed arrays, needed for Safari
|
1214
|
-
for (n=0, l = o.length; n < l; n++) {
|
1217
|
+
for (n = 0, l = o.length; n < l; n++) {
|
1215
1218
|
if (cb.call(s, o[n], n, o) === false) {
|
1216
1219
|
return 0;
|
1217
1220
|
}
|
@@ -1320,14 +1323,14 @@ define("tinymce/util/Tools", [], function() {
|
|
1320
1323
|
* });
|
1321
1324
|
*/
|
1322
1325
|
function create(s, p, root) {
|
1323
|
-
var
|
1326
|
+
var self = this, sp, ns, cn, scn, c, de = 0;
|
1324
1327
|
|
1325
1328
|
// Parse : <prefix> <class>:<super class>
|
1326
1329
|
s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
|
1327
1330
|
cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name
|
1328
1331
|
|
1329
1332
|
// Create namespace for new class
|
1330
|
-
ns =
|
1333
|
+
ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
|
1331
1334
|
|
1332
1335
|
// Class already exists
|
1333
1336
|
if (ns[cn]) {
|
@@ -1353,11 +1356,11 @@ define("tinymce/util/Tools", [], function() {
|
|
1353
1356
|
|
1354
1357
|
// Add constructor and methods
|
1355
1358
|
ns[cn] = p[cn];
|
1356
|
-
|
1359
|
+
self.extend(ns[cn].prototype, p);
|
1357
1360
|
|
1358
1361
|
// Extend
|
1359
1362
|
if (s[5]) {
|
1360
|
-
sp =
|
1363
|
+
sp = self.resolve(s[5]).prototype;
|
1361
1364
|
scn = s[5].match(/\.(\w+)$/i)[1]; // Class name
|
1362
1365
|
|
1363
1366
|
// Extend constructor
|
@@ -1377,12 +1380,12 @@ define("tinymce/util/Tools", [], function() {
|
|
1377
1380
|
ns[cn].prototype[cn] = ns[cn];
|
1378
1381
|
|
1379
1382
|
// Add super methods
|
1380
|
-
|
1383
|
+
self.each(sp, function(f, n) {
|
1381
1384
|
ns[cn].prototype[n] = sp[n];
|
1382
1385
|
});
|
1383
1386
|
|
1384
1387
|
// Add overridden methods
|
1385
|
-
|
1388
|
+
self.each(p, function(f, n) {
|
1386
1389
|
// Extend methods if needed
|
1387
1390
|
if (sp[n]) {
|
1388
1391
|
ns[cn].prototype[n] = function() {
|
@@ -1399,7 +1402,7 @@ define("tinymce/util/Tools", [], function() {
|
|
1399
1402
|
|
1400
1403
|
// Add static methods
|
1401
1404
|
/*jshint sub:true*/
|
1402
|
-
|
1405
|
+
self.each(p['static'], function(f, n) {
|
1403
1406
|
ns[cn][n] = f;
|
1404
1407
|
});
|
1405
1408
|
}
|
@@ -1499,7 +1502,7 @@ define("tinymce/util/Tools", [], function() {
|
|
1499
1502
|
o = o || window;
|
1500
1503
|
|
1501
1504
|
n = n.split('.');
|
1502
|
-
for (i=0; i<n.length; i++) {
|
1505
|
+
for (i = 0; i < n.length; i++) {
|
1503
1506
|
v = n[i];
|
1504
1507
|
|
1505
1508
|
if (!o[v]) {
|
@@ -1594,7 +1597,7 @@ define("tinymce/dom/Range", [
|
|
1594
1597
|
], function(Tools) {
|
1595
1598
|
// Range constructor
|
1596
1599
|
function Range(dom) {
|
1597
|
-
var
|
1600
|
+
var self = this,
|
1598
1601
|
doc = dom.doc,
|
1599
1602
|
EXTRACT = 0,
|
1600
1603
|
CLONE = 1,
|
@@ -1638,14 +1641,14 @@ define("tinymce/dom/Range", [
|
|
1638
1641
|
|
1639
1642
|
function collapse(ts) {
|
1640
1643
|
if (ts) {
|
1641
|
-
|
1642
|
-
|
1644
|
+
self[END_CONTAINER] = self[START_CONTAINER];
|
1645
|
+
self[END_OFFSET] = self[START_OFFSET];
|
1643
1646
|
} else {
|
1644
|
-
|
1645
|
-
|
1647
|
+
self[START_CONTAINER] = self[END_CONTAINER];
|
1648
|
+
self[START_OFFSET] = self[END_OFFSET];
|
1646
1649
|
}
|
1647
1650
|
|
1648
|
-
|
1651
|
+
self.collapsed = TRUE;
|
1649
1652
|
}
|
1650
1653
|
|
1651
1654
|
function selectNode(n) {
|
@@ -1659,7 +1662,7 @@ define("tinymce/dom/Range", [
|
|
1659
1662
|
}
|
1660
1663
|
|
1661
1664
|
function compareBoundaryPoints(h, r) {
|
1662
|
-
var sc =
|
1665
|
+
var sc = self[START_CONTAINER], so = self[START_OFFSET], ec = self[END_CONTAINER], eo = self[END_OFFSET],
|
1663
1666
|
rsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset;
|
1664
1667
|
|
1665
1668
|
// Check START_TO_START
|
@@ -1731,21 +1734,21 @@ define("tinymce/dom/Range", [
|
|
1731
1734
|
}
|
1732
1735
|
|
1733
1736
|
function surroundContents(n) {
|
1734
|
-
var f =
|
1737
|
+
var f = self.extractContents();
|
1735
1738
|
|
1736
|
-
|
1739
|
+
self.insertNode(n);
|
1737
1740
|
n.appendChild(f);
|
1738
|
-
|
1741
|
+
self.selectNode(n);
|
1739
1742
|
}
|
1740
1743
|
|
1741
1744
|
function cloneRange() {
|
1742
1745
|
return extend(new Range(dom), {
|
1743
|
-
startContainer:
|
1744
|
-
startOffset:
|
1745
|
-
endContainer:
|
1746
|
-
endOffset:
|
1747
|
-
collapsed:
|
1748
|
-
commonAncestorContainer:
|
1746
|
+
startContainer: self[START_CONTAINER],
|
1747
|
+
startOffset: self[START_OFFSET],
|
1748
|
+
endContainer: self[END_CONTAINER],
|
1749
|
+
endOffset: self[END_OFFSET],
|
1750
|
+
collapsed: self.collapsed,
|
1751
|
+
commonAncestorContainer: self.commonAncestorContainer
|
1749
1752
|
});
|
1750
1753
|
}
|
1751
1754
|
|
@@ -1776,7 +1779,7 @@ define("tinymce/dom/Range", [
|
|
1776
1779
|
}
|
1777
1780
|
|
1778
1781
|
function _isCollapsed() {
|
1779
|
-
return (
|
1782
|
+
return (self[START_CONTAINER] == self[END_CONTAINER] && self[START_OFFSET] == self[END_OFFSET]);
|
1780
1783
|
}
|
1781
1784
|
|
1782
1785
|
function _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) {
|
@@ -1892,23 +1895,23 @@ define("tinymce/dom/Range", [
|
|
1892
1895
|
var ec, sc;
|
1893
1896
|
|
1894
1897
|
if (st) {
|
1895
|
-
|
1896
|
-
|
1898
|
+
self[START_CONTAINER] = n;
|
1899
|
+
self[START_OFFSET] = o;
|
1897
1900
|
} else {
|
1898
|
-
|
1899
|
-
|
1901
|
+
self[END_CONTAINER] = n;
|
1902
|
+
self[END_OFFSET] = o;
|
1900
1903
|
}
|
1901
1904
|
|
1902
1905
|
// If one boundary-point of a Range is set to have a root container
|
1903
1906
|
// other than the current one for the Range, the Range is collapsed to
|
1904
1907
|
// the new position. This enforces the restriction that both boundary-
|
1905
1908
|
// points of a Range must have the same root container.
|
1906
|
-
ec =
|
1909
|
+
ec = self[END_CONTAINER];
|
1907
1910
|
while (ec.parentNode) {
|
1908
1911
|
ec = ec.parentNode;
|
1909
1912
|
}
|
1910
1913
|
|
1911
|
-
sc =
|
1914
|
+
sc = self[START_CONTAINER];
|
1912
1915
|
while (sc.parentNode) {
|
1913
1916
|
sc = sc.parentNode;
|
1914
1917
|
}
|
@@ -1918,34 +1921,34 @@ define("tinymce/dom/Range", [
|
|
1918
1921
|
// end position. To enforce this restriction, if the start is set to
|
1919
1922
|
// be at a position after the end, the Range is collapsed to that
|
1920
1923
|
// position.
|
1921
|
-
if (_compareBoundaryPoints(
|
1922
|
-
|
1924
|
+
if (_compareBoundaryPoints(self[START_CONTAINER], self[START_OFFSET], self[END_CONTAINER], self[END_OFFSET]) > 0) {
|
1925
|
+
self.collapse(st);
|
1923
1926
|
}
|
1924
1927
|
} else {
|
1925
|
-
|
1928
|
+
self.collapse(st);
|
1926
1929
|
}
|
1927
1930
|
|
1928
|
-
|
1929
|
-
|
1931
|
+
self.collapsed = _isCollapsed();
|
1932
|
+
self.commonAncestorContainer = dom.findCommonAncestor(self[START_CONTAINER], self[END_CONTAINER]);
|
1930
1933
|
}
|
1931
1934
|
|
1932
1935
|
function _traverse(how) {
|
1933
1936
|
var c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep;
|
1934
1937
|
|
1935
|
-
if (
|
1938
|
+
if (self[START_CONTAINER] == self[END_CONTAINER]) {
|
1936
1939
|
return _traverseSameContainer(how);
|
1937
1940
|
}
|
1938
1941
|
|
1939
|
-
for (c =
|
1940
|
-
if (p ==
|
1942
|
+
for (c = self[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {
|
1943
|
+
if (p == self[START_CONTAINER]) {
|
1941
1944
|
return _traverseCommonStartContainer(c, how);
|
1942
1945
|
}
|
1943
1946
|
|
1944
1947
|
++endContainerDepth;
|
1945
1948
|
}
|
1946
1949
|
|
1947
|
-
for (c =
|
1948
|
-
if (p ==
|
1950
|
+
for (c = self[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {
|
1951
|
+
if (p == self[END_CONTAINER]) {
|
1949
1952
|
return _traverseCommonEndContainer(c, how);
|
1950
1953
|
}
|
1951
1954
|
|
@@ -1954,13 +1957,13 @@ define("tinymce/dom/Range", [
|
|
1954
1957
|
|
1955
1958
|
depthDiff = startContainerDepth - endContainerDepth;
|
1956
1959
|
|
1957
|
-
startNode =
|
1960
|
+
startNode = self[START_CONTAINER];
|
1958
1961
|
while (depthDiff > 0) {
|
1959
1962
|
startNode = startNode.parentNode;
|
1960
1963
|
depthDiff--;
|
1961
1964
|
}
|
1962
1965
|
|
1963
|
-
endNode =
|
1966
|
+
endNode = self[END_CONTAINER];
|
1964
1967
|
while (depthDiff < 0) {
|
1965
1968
|
endNode = endNode.parentNode;
|
1966
1969
|
depthDiff++;
|
@@ -1983,21 +1986,21 @@ define("tinymce/dom/Range", [
|
|
1983
1986
|
}
|
1984
1987
|
|
1985
1988
|
// If selection is empty, just return the fragment
|
1986
|
-
if (
|
1989
|
+
if (self[START_OFFSET] == self[END_OFFSET]) {
|
1987
1990
|
return frag;
|
1988
1991
|
}
|
1989
1992
|
|
1990
1993
|
// Text node needs special case handling
|
1991
|
-
if (
|
1994
|
+
if (self[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) {
|
1992
1995
|
// get the substring
|
1993
|
-
s =
|
1994
|
-
sub = s.substring(
|
1996
|
+
s = self[START_CONTAINER].nodeValue;
|
1997
|
+
sub = s.substring(self[START_OFFSET], self[END_OFFSET]);
|
1995
1998
|
|
1996
1999
|
// set the original text node to its new value
|
1997
2000
|
if (how != CLONE) {
|
1998
|
-
n =
|
1999
|
-
start =
|
2000
|
-
len =
|
2001
|
+
n = self[START_CONTAINER];
|
2002
|
+
start = self[START_OFFSET];
|
2003
|
+
len = self[END_OFFSET] - self[START_OFFSET];
|
2001
2004
|
|
2002
2005
|
if (start === 0 && len >= n.nodeValue.length - 1) {
|
2003
2006
|
n.parentNode.removeChild(n);
|
@@ -2006,7 +2009,7 @@ define("tinymce/dom/Range", [
|
|
2006
2009
|
}
|
2007
2010
|
|
2008
2011
|
// Nothing is partially selected, so collapse to start point
|
2009
|
-
|
2012
|
+
self.collapse(TRUE);
|
2010
2013
|
}
|
2011
2014
|
|
2012
2015
|
if (how == DELETE) {
|
@@ -2021,8 +2024,8 @@ define("tinymce/dom/Range", [
|
|
2021
2024
|
}
|
2022
2025
|
|
2023
2026
|
// Copy nodes between the start/end offsets.
|
2024
|
-
n = _getSelectedNode(
|
2025
|
-
cnt =
|
2027
|
+
n = _getSelectedNode(self[START_CONTAINER], self[START_OFFSET]);
|
2028
|
+
cnt = self[END_OFFSET] - self[START_OFFSET];
|
2026
2029
|
|
2027
2030
|
while (n && cnt > 0) {
|
2028
2031
|
sibling = n.nextSibling;
|
@@ -2038,7 +2041,7 @@ define("tinymce/dom/Range", [
|
|
2038
2041
|
|
2039
2042
|
// Nothing is partially selected, so collapse to start point
|
2040
2043
|
if (how != CLONE) {
|
2041
|
-
|
2044
|
+
self.collapse(TRUE);
|
2042
2045
|
}
|
2043
2046
|
|
2044
2047
|
return frag;
|
@@ -2058,14 +2061,14 @@ define("tinymce/dom/Range", [
|
|
2058
2061
|
}
|
2059
2062
|
|
2060
2063
|
endIdx = nodeIndex(endAncestor);
|
2061
|
-
cnt = endIdx -
|
2064
|
+
cnt = endIdx - self[START_OFFSET];
|
2062
2065
|
|
2063
2066
|
if (cnt <= 0) {
|
2064
2067
|
// Collapse to just before the endAncestor, which
|
2065
2068
|
// is partially selected.
|
2066
2069
|
if (how != CLONE) {
|
2067
|
-
|
2068
|
-
|
2070
|
+
self.setEndBefore(endAncestor);
|
2071
|
+
self.collapse(FALSE);
|
2069
2072
|
}
|
2070
2073
|
|
2071
2074
|
return frag;
|
@@ -2087,8 +2090,8 @@ define("tinymce/dom/Range", [
|
|
2087
2090
|
// Collapse to just before the endAncestor, which
|
2088
2091
|
// is partially selected.
|
2089
2092
|
if (how != CLONE) {
|
2090
|
-
|
2091
|
-
|
2093
|
+
self.setEndBefore(endAncestor);
|
2094
|
+
self.collapse(FALSE);
|
2092
2095
|
}
|
2093
2096
|
|
2094
2097
|
return frag;
|
@@ -2109,7 +2112,7 @@ define("tinymce/dom/Range", [
|
|
2109
2112
|
startIdx = nodeIndex(startAncestor);
|
2110
2113
|
++startIdx; // Because we already traversed it
|
2111
2114
|
|
2112
|
-
cnt =
|
2115
|
+
cnt = self[END_OFFSET] - startIdx;
|
2113
2116
|
n = startAncestor.nextSibling;
|
2114
2117
|
while (n && cnt > 0) {
|
2115
2118
|
sibling = n.nextSibling;
|
@@ -2124,15 +2127,15 @@ define("tinymce/dom/Range", [
|
|
2124
2127
|
}
|
2125
2128
|
|
2126
2129
|
if (how != CLONE) {
|
2127
|
-
|
2128
|
-
|
2130
|
+
self.setStartAfter(startAncestor);
|
2131
|
+
self.collapse(TRUE);
|
2129
2132
|
}
|
2130
2133
|
|
2131
2134
|
return frag;
|
2132
2135
|
}
|
2133
2136
|
|
2134
2137
|
function _traverseCommonAncestors(startAncestor, endAncestor, how) {
|
2135
|
-
var n, frag,
|
2138
|
+
var n, frag, startOffset, endOffset, cnt, sibling, nextSibling;
|
2136
2139
|
|
2137
2140
|
if (how != DELETE) {
|
2138
2141
|
frag = createDocumentFragment();
|
@@ -2143,7 +2146,6 @@ define("tinymce/dom/Range", [
|
|
2143
2146
|
frag.appendChild(n);
|
2144
2147
|
}
|
2145
2148
|
|
2146
|
-
commonParent = startAncestor.parentNode;
|
2147
2149
|
startOffset = nodeIndex(startAncestor);
|
2148
2150
|
endOffset = nodeIndex(endAncestor);
|
2149
2151
|
++startOffset;
|
@@ -2170,16 +2172,16 @@ define("tinymce/dom/Range", [
|
|
2170
2172
|
}
|
2171
2173
|
|
2172
2174
|
if (how != CLONE) {
|
2173
|
-
|
2174
|
-
|
2175
|
+
self.setStartAfter(startAncestor);
|
2176
|
+
self.collapse(TRUE);
|
2175
2177
|
}
|
2176
2178
|
|
2177
2179
|
return frag;
|
2178
2180
|
}
|
2179
2181
|
|
2180
2182
|
function _traverseRightBoundary(root, how) {
|
2181
|
-
var next = _getSelectedNode(
|
2182
|
-
var prevSibling, clonedChild, clonedGrandParent, isFullySelected = next !=
|
2183
|
+
var next = _getSelectedNode(self[END_CONTAINER], self[END_OFFSET] - 1), parent, clonedParent;
|
2184
|
+
var prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != self[END_CONTAINER];
|
2183
2185
|
|
2184
2186
|
if (next == root) {
|
2185
2187
|
return _traverseNode(next, isFullySelected, FALSE, how);
|
@@ -2219,7 +2221,7 @@ define("tinymce/dom/Range", [
|
|
2219
2221
|
}
|
2220
2222
|
|
2221
2223
|
function _traverseLeftBoundary(root, how) {
|
2222
|
-
var next = _getSelectedNode(
|
2224
|
+
var next = _getSelectedNode(self[START_CONTAINER], self[START_OFFSET]), isFullySelected = next != self[START_CONTAINER];
|
2223
2225
|
var parent, clonedParent, nextSibling, clonedChild, clonedGrandParent;
|
2224
2226
|
|
2225
2227
|
if (next == root) {
|
@@ -2270,11 +2272,11 @@ define("tinymce/dom/Range", [
|
|
2270
2272
|
txtValue = n.nodeValue;
|
2271
2273
|
|
2272
2274
|
if (isLeft) {
|
2273
|
-
offset =
|
2275
|
+
offset = self[START_OFFSET];
|
2274
2276
|
newNodeValue = txtValue.substring(offset);
|
2275
2277
|
oldNodeValue = txtValue.substring(0, offset);
|
2276
2278
|
} else {
|
2277
|
-
offset =
|
2279
|
+
offset = self[END_OFFSET];
|
2278
2280
|
newNodeValue = txtValue.substring(0, offset);
|
2279
2281
|
oldNodeValue = txtValue.substring(offset);
|
2280
2282
|
}
|
@@ -2312,7 +2314,7 @@ define("tinymce/dom/Range", [
|
|
2312
2314
|
return dom.create('body', null, cloneContents()).outerText;
|
2313
2315
|
}
|
2314
2316
|
|
2315
|
-
extend(
|
2317
|
+
extend(self, {
|
2316
2318
|
// Inital states
|
2317
2319
|
startContainer: doc,
|
2318
2320
|
startOffset: 0,
|
@@ -2347,7 +2349,7 @@ define("tinymce/dom/Range", [
|
|
2347
2349
|
toStringIE: toStringIE
|
2348
2350
|
});
|
2349
2351
|
|
2350
|
-
return
|
2352
|
+
return self;
|
2351
2353
|
}
|
2352
2354
|
|
2353
2355
|
// Older IE versions doesn't let you override toString by it's constructor so we have to stick it in the prototype
|
@@ -2371,6 +2373,7 @@ define("tinymce/dom/Range", [
|
|
2371
2373
|
*/
|
2372
2374
|
|
2373
2375
|
/*jshint bitwise:false */
|
2376
|
+
/*eslint no-bitwise:0 */
|
2374
2377
|
|
2375
2378
|
/**
|
2376
2379
|
* Entity encoder class.
|
@@ -2763,190 +2766,190 @@ define("tinymce/Env", [], function() {
|
|
2763
2766
|
|
2764
2767
|
// Included from: js/tinymce/classes/dom/StyleSheetLoader.js
|
2765
2768
|
|
2766
|
-
/**
|
2767
|
-
* StyleSheetLoader.js
|
2768
|
-
*
|
2769
|
-
* Copyright, Moxiecode Systems AB
|
2770
|
-
* Released under LGPL License.
|
2771
|
-
*
|
2772
|
-
* License: http://www.tinymce.com/license
|
2773
|
-
* Contributing: http://www.tinymce.com/contributing
|
2774
|
-
*/
|
2775
|
-
|
2776
|
-
/**
|
2777
|
-
* This class handles loading of external stylesheets and fires events when these are loaded.
|
2778
|
-
*
|
2779
|
-
* @class tinymce.dom.StyleSheetLoader
|
2780
|
-
* @private
|
2781
|
-
*/
|
2782
|
-
define("tinymce/dom/StyleSheetLoader", [], function() {
|
2783
|
-
"use strict";
|
2784
|
-
|
2785
|
-
return function(document, settings) {
|
2786
|
-
var idCount = 0, loadedStates = {}, maxLoadTime;
|
2787
|
-
|
2788
|
-
settings = settings || {};
|
2789
|
-
maxLoadTime = settings.maxLoadTime || 5000;
|
2790
|
-
|
2791
|
-
function appendToHead(node) {
|
2792
|
-
document.getElementsByTagName('head')[0].appendChild(node);
|
2793
|
-
}
|
2794
|
-
|
2795
|
-
/**
|
2796
|
-
* Loads the specified css style sheet file and call the loadedCallback once it's finished loading.
|
2797
|
-
*
|
2798
|
-
* @method load
|
2799
|
-
* @param {String} url Url to be loaded.
|
2800
|
-
* @param {Function} loadedCallback Callback to be executed when loaded.
|
2801
|
-
* @param {Function} errorCallback Callback to be executed when failed loading.
|
2802
|
-
*/
|
2803
|
-
function load(url, loadedCallback, errorCallback) {
|
2804
|
-
var link, style, startTime, state;
|
2805
|
-
|
2806
|
-
function passed() {
|
2807
|
-
var callbacks = state.passed, i = callbacks.length;
|
2808
|
-
|
2809
|
-
while (i--) {
|
2810
|
-
callbacks[i]();
|
2811
|
-
}
|
2812
|
-
|
2813
|
-
state.status = 2;
|
2814
|
-
state.passed = [];
|
2815
|
-
state.failed = [];
|
2816
|
-
}
|
2817
|
-
|
2818
|
-
function failed() {
|
2819
|
-
var callbacks = state.failed, i = callbacks.length;
|
2820
|
-
|
2821
|
-
while (i--) {
|
2822
|
-
callbacks[i]();
|
2823
|
-
}
|
2824
|
-
|
2825
|
-
state.status = 3;
|
2826
|
-
state.passed = [];
|
2827
|
-
state.failed = [];
|
2828
|
-
}
|
2829
|
-
|
2830
|
-
// Sniffs for older WebKit versions that have the link.onload but a broken one
|
2831
|
-
function isOldWebKit() {
|
2832
|
-
var webKitChunks = navigator.userAgent.match(/WebKit\/(\d*)/);
|
2833
|
-
return !!(webKitChunks && webKitChunks[1] < 536);
|
2834
|
-
}
|
2835
|
-
|
2836
|
-
// Calls the waitCallback until the test returns true or the timeout occurs
|
2837
|
-
function wait(testCallback, waitCallback) {
|
2838
|
-
if (!testCallback()) {
|
2839
|
-
// Wait for timeout
|
2840
|
-
if ((new Date().getTime()) - startTime < maxLoadTime) {
|
2841
|
-
window.setTimeout(waitCallback, 0);
|
2842
|
-
} else {
|
2843
|
-
failed();
|
2844
|
-
}
|
2845
|
-
}
|
2846
|
-
}
|
2847
|
-
|
2848
|
-
// Workaround for WebKit that doesn't properly support the onload event for link elements
|
2849
|
-
// Or WebKit that fires the onload event before the StyleSheet is added to the document
|
2850
|
-
function waitForWebKitLinkLoaded() {
|
2851
|
-
wait(function() {
|
2852
|
-
var styleSheets = document.styleSheets, styleSheet, i = styleSheets.length, owner;
|
2853
|
-
|
2854
|
-
while (i--) {
|
2855
|
-
styleSheet = styleSheets[i];
|
2856
|
-
owner = styleSheet.ownerNode ? styleSheet.ownerNode : styleSheet.owningElement;
|
2857
|
-
if (owner && owner.id === link.id) {
|
2858
|
-
passed();
|
2859
|
-
return true;
|
2860
|
-
}
|
2861
|
-
}
|
2862
|
-
}, waitForWebKitLinkLoaded);
|
2863
|
-
}
|
2864
|
-
|
2865
|
-
// Workaround for older Geckos that doesn't have any onload event for StyleSheets
|
2866
|
-
function waitForGeckoLinkLoaded() {
|
2867
|
-
wait(function() {
|
2868
|
-
try {
|
2869
|
-
// Accessing the cssRules will throw an exception until the CSS file is loaded
|
2870
|
-
var cssRules = style.sheet.cssRules;
|
2871
|
-
passed();
|
2872
|
-
return !!cssRules;
|
2873
|
-
} catch (ex) {
|
2874
|
-
// Ignore
|
2875
|
-
}
|
2876
|
-
}, waitForGeckoLinkLoaded);
|
2877
|
-
}
|
2878
|
-
|
2879
|
-
if (!loadedStates[url]) {
|
2880
|
-
state = {
|
2881
|
-
passed: [],
|
2882
|
-
failed: []
|
2883
|
-
};
|
2884
|
-
|
2885
|
-
loadedStates[url] = state;
|
2886
|
-
} else {
|
2887
|
-
state = loadedStates[url];
|
2888
|
-
}
|
2889
|
-
|
2890
|
-
if (loadedCallback) {
|
2891
|
-
state.passed.push(loadedCallback);
|
2892
|
-
}
|
2893
|
-
|
2894
|
-
if (errorCallback) {
|
2895
|
-
state.failed.push(errorCallback);
|
2896
|
-
}
|
2897
|
-
|
2898
|
-
// Is loading wait for it to pass
|
2899
|
-
if (state.status == 1) {
|
2900
|
-
return;
|
2901
|
-
}
|
2902
|
-
|
2903
|
-
// Has finished loading and was success
|
2904
|
-
if (state.status == 2) {
|
2905
|
-
passed();
|
2906
|
-
return;
|
2907
|
-
}
|
2908
|
-
|
2909
|
-
// Has finished loading and was a failure
|
2910
|
-
if (state.status == 3) {
|
2911
|
-
failed();
|
2912
|
-
return;
|
2913
|
-
}
|
2914
|
-
|
2915
|
-
// Start loading
|
2916
|
-
state.status = 1;
|
2917
|
-
link = document.createElement('link');
|
2918
|
-
link.rel = 'stylesheet';
|
2919
|
-
link.type = 'text/css';
|
2920
|
-
link.id = 'u' + (idCount++);
|
2921
|
-
link.async = false;
|
2922
|
-
link.defer = false;
|
2923
|
-
startTime = new Date().getTime();
|
2924
|
-
|
2925
|
-
// Feature detect onload on link element and sniff older webkits since it has an broken onload event
|
2926
|
-
if ("onload" in link && !isOldWebKit()) {
|
2927
|
-
link.onload = waitForWebKitLinkLoaded;
|
2928
|
-
link.onerror = failed;
|
2929
|
-
} else {
|
2930
|
-
// Sniff for old Firefox that doesn't support the onload event on link elements
|
2931
|
-
// TODO: Remove this in the future when everyone uses modern browsers
|
2932
|
-
if (navigator.userAgent.indexOf("Firefox") > 0) {
|
2933
|
-
style = document.createElement('style');
|
2934
|
-
style.textContent = '@import "' + url + '"';
|
2935
|
-
waitForGeckoLinkLoaded();
|
2936
|
-
appendToHead(style);
|
2937
|
-
return;
|
2938
|
-
} else {
|
2939
|
-
// Use the id owner on older webkits
|
2940
|
-
waitForWebKitLinkLoaded();
|
2941
|
-
}
|
2942
|
-
}
|
2943
|
-
|
2944
|
-
appendToHead(link);
|
2945
|
-
link.href = url;
|
2946
|
-
}
|
2947
|
-
|
2948
|
-
this.load = load;
|
2949
|
-
};
|
2769
|
+
/**
|
2770
|
+
* StyleSheetLoader.js
|
2771
|
+
*
|
2772
|
+
* Copyright, Moxiecode Systems AB
|
2773
|
+
* Released under LGPL License.
|
2774
|
+
*
|
2775
|
+
* License: http://www.tinymce.com/license
|
2776
|
+
* Contributing: http://www.tinymce.com/contributing
|
2777
|
+
*/
|
2778
|
+
|
2779
|
+
/**
|
2780
|
+
* This class handles loading of external stylesheets and fires events when these are loaded.
|
2781
|
+
*
|
2782
|
+
* @class tinymce.dom.StyleSheetLoader
|
2783
|
+
* @private
|
2784
|
+
*/
|
2785
|
+
define("tinymce/dom/StyleSheetLoader", [], function() {
|
2786
|
+
"use strict";
|
2787
|
+
|
2788
|
+
return function(document, settings) {
|
2789
|
+
var idCount = 0, loadedStates = {}, maxLoadTime;
|
2790
|
+
|
2791
|
+
settings = settings || {};
|
2792
|
+
maxLoadTime = settings.maxLoadTime || 5000;
|
2793
|
+
|
2794
|
+
function appendToHead(node) {
|
2795
|
+
document.getElementsByTagName('head')[0].appendChild(node);
|
2796
|
+
}
|
2797
|
+
|
2798
|
+
/**
|
2799
|
+
* Loads the specified css style sheet file and call the loadedCallback once it's finished loading.
|
2800
|
+
*
|
2801
|
+
* @method load
|
2802
|
+
* @param {String} url Url to be loaded.
|
2803
|
+
* @param {Function} loadedCallback Callback to be executed when loaded.
|
2804
|
+
* @param {Function} errorCallback Callback to be executed when failed loading.
|
2805
|
+
*/
|
2806
|
+
function load(url, loadedCallback, errorCallback) {
|
2807
|
+
var link, style, startTime, state;
|
2808
|
+
|
2809
|
+
function passed() {
|
2810
|
+
var callbacks = state.passed, i = callbacks.length;
|
2811
|
+
|
2812
|
+
while (i--) {
|
2813
|
+
callbacks[i]();
|
2814
|
+
}
|
2815
|
+
|
2816
|
+
state.status = 2;
|
2817
|
+
state.passed = [];
|
2818
|
+
state.failed = [];
|
2819
|
+
}
|
2820
|
+
|
2821
|
+
function failed() {
|
2822
|
+
var callbacks = state.failed, i = callbacks.length;
|
2823
|
+
|
2824
|
+
while (i--) {
|
2825
|
+
callbacks[i]();
|
2826
|
+
}
|
2827
|
+
|
2828
|
+
state.status = 3;
|
2829
|
+
state.passed = [];
|
2830
|
+
state.failed = [];
|
2831
|
+
}
|
2832
|
+
|
2833
|
+
// Sniffs for older WebKit versions that have the link.onload but a broken one
|
2834
|
+
function isOldWebKit() {
|
2835
|
+
var webKitChunks = navigator.userAgent.match(/WebKit\/(\d*)/);
|
2836
|
+
return !!(webKitChunks && webKitChunks[1] < 536);
|
2837
|
+
}
|
2838
|
+
|
2839
|
+
// Calls the waitCallback until the test returns true or the timeout occurs
|
2840
|
+
function wait(testCallback, waitCallback) {
|
2841
|
+
if (!testCallback()) {
|
2842
|
+
// Wait for timeout
|
2843
|
+
if ((new Date().getTime()) - startTime < maxLoadTime) {
|
2844
|
+
window.setTimeout(waitCallback, 0);
|
2845
|
+
} else {
|
2846
|
+
failed();
|
2847
|
+
}
|
2848
|
+
}
|
2849
|
+
}
|
2850
|
+
|
2851
|
+
// Workaround for WebKit that doesn't properly support the onload event for link elements
|
2852
|
+
// Or WebKit that fires the onload event before the StyleSheet is added to the document
|
2853
|
+
function waitForWebKitLinkLoaded() {
|
2854
|
+
wait(function() {
|
2855
|
+
var styleSheets = document.styleSheets, styleSheet, i = styleSheets.length, owner;
|
2856
|
+
|
2857
|
+
while (i--) {
|
2858
|
+
styleSheet = styleSheets[i];
|
2859
|
+
owner = styleSheet.ownerNode ? styleSheet.ownerNode : styleSheet.owningElement;
|
2860
|
+
if (owner && owner.id === link.id) {
|
2861
|
+
passed();
|
2862
|
+
return true;
|
2863
|
+
}
|
2864
|
+
}
|
2865
|
+
}, waitForWebKitLinkLoaded);
|
2866
|
+
}
|
2867
|
+
|
2868
|
+
// Workaround for older Geckos that doesn't have any onload event for StyleSheets
|
2869
|
+
function waitForGeckoLinkLoaded() {
|
2870
|
+
wait(function() {
|
2871
|
+
try {
|
2872
|
+
// Accessing the cssRules will throw an exception until the CSS file is loaded
|
2873
|
+
var cssRules = style.sheet.cssRules;
|
2874
|
+
passed();
|
2875
|
+
return !!cssRules;
|
2876
|
+
} catch (ex) {
|
2877
|
+
// Ignore
|
2878
|
+
}
|
2879
|
+
}, waitForGeckoLinkLoaded);
|
2880
|
+
}
|
2881
|
+
|
2882
|
+
if (!loadedStates[url]) {
|
2883
|
+
state = {
|
2884
|
+
passed: [],
|
2885
|
+
failed: []
|
2886
|
+
};
|
2887
|
+
|
2888
|
+
loadedStates[url] = state;
|
2889
|
+
} else {
|
2890
|
+
state = loadedStates[url];
|
2891
|
+
}
|
2892
|
+
|
2893
|
+
if (loadedCallback) {
|
2894
|
+
state.passed.push(loadedCallback);
|
2895
|
+
}
|
2896
|
+
|
2897
|
+
if (errorCallback) {
|
2898
|
+
state.failed.push(errorCallback);
|
2899
|
+
}
|
2900
|
+
|
2901
|
+
// Is loading wait for it to pass
|
2902
|
+
if (state.status == 1) {
|
2903
|
+
return;
|
2904
|
+
}
|
2905
|
+
|
2906
|
+
// Has finished loading and was success
|
2907
|
+
if (state.status == 2) {
|
2908
|
+
passed();
|
2909
|
+
return;
|
2910
|
+
}
|
2911
|
+
|
2912
|
+
// Has finished loading and was a failure
|
2913
|
+
if (state.status == 3) {
|
2914
|
+
failed();
|
2915
|
+
return;
|
2916
|
+
}
|
2917
|
+
|
2918
|
+
// Start loading
|
2919
|
+
state.status = 1;
|
2920
|
+
link = document.createElement('link');
|
2921
|
+
link.rel = 'stylesheet';
|
2922
|
+
link.type = 'text/css';
|
2923
|
+
link.id = 'u' + (idCount++);
|
2924
|
+
link.async = false;
|
2925
|
+
link.defer = false;
|
2926
|
+
startTime = new Date().getTime();
|
2927
|
+
|
2928
|
+
// Feature detect onload on link element and sniff older webkits since it has an broken onload event
|
2929
|
+
if ("onload" in link && !isOldWebKit()) {
|
2930
|
+
link.onload = waitForWebKitLinkLoaded;
|
2931
|
+
link.onerror = failed;
|
2932
|
+
} else {
|
2933
|
+
// Sniff for old Firefox that doesn't support the onload event on link elements
|
2934
|
+
// TODO: Remove this in the future when everyone uses modern browsers
|
2935
|
+
if (navigator.userAgent.indexOf("Firefox") > 0) {
|
2936
|
+
style = document.createElement('style');
|
2937
|
+
style.textContent = '@import "' + url + '"';
|
2938
|
+
waitForGeckoLinkLoaded();
|
2939
|
+
appendToHead(style);
|
2940
|
+
return;
|
2941
|
+
} else {
|
2942
|
+
// Use the id owner on older webkits
|
2943
|
+
waitForWebKitLinkLoaded();
|
2944
|
+
}
|
2945
|
+
}
|
2946
|
+
|
2947
|
+
appendToHead(link);
|
2948
|
+
link.href = url;
|
2949
|
+
}
|
2950
|
+
|
2951
|
+
this.load = load;
|
2952
|
+
};
|
2950
2953
|
});
|
2951
2954
|
|
2952
2955
|
// Included from: js/tinymce/classes/dom/DOMUtils.js
|
@@ -3699,7 +3702,7 @@ define("tinymce/dom/DOMUtils", [
|
|
3699
3702
|
* tinymce.dom.setAttrib('mydiv', 'class', 'myclass');
|
3700
3703
|
*/
|
3701
3704
|
setAttrib: function(e, n, v) {
|
3702
|
-
var
|
3705
|
+
var self = this;
|
3703
3706
|
|
3704
3707
|
// What's the point
|
3705
3708
|
if (!e || !n) {
|
@@ -3707,14 +3710,14 @@ define("tinymce/dom/DOMUtils", [
|
|
3707
3710
|
}
|
3708
3711
|
|
3709
3712
|
return this.run(e, function(e) {
|
3710
|
-
var s =
|
3713
|
+
var s = self.settings;
|
3711
3714
|
var originalValue = e.getAttribute(n);
|
3712
3715
|
if (v !== null) {
|
3713
3716
|
switch (n) {
|
3714
3717
|
case "style":
|
3715
3718
|
if (!is(v, 'string')) {
|
3716
3719
|
each(v, function(v, n) {
|
3717
|
-
|
3720
|
+
self.setStyle(e, n, v);
|
3718
3721
|
});
|
3719
3722
|
|
3720
3723
|
return;
|
@@ -3740,10 +3743,10 @@ define("tinymce/dom/DOMUtils", [
|
|
3740
3743
|
case "href":
|
3741
3744
|
if (s.keep_values) {
|
3742
3745
|
if (s.url_converter) {
|
3743
|
-
v = s.url_converter.call(s.url_converter_scope ||
|
3746
|
+
v = s.url_converter.call(s.url_converter_scope || self, v, n, e);
|
3744
3747
|
}
|
3745
3748
|
|
3746
|
-
|
3749
|
+
self.setAttrib(e, 'data-mce-' + n, v, 2);
|
3747
3750
|
}
|
3748
3751
|
|
3749
3752
|
break;
|
@@ -4312,7 +4315,7 @@ define("tinymce/dom/DOMUtils", [
|
|
4312
4315
|
newElement.innerHTML = '<br />' + html;
|
4313
4316
|
|
4314
4317
|
// Add all children from div to target
|
4315
|
-
each
|
4318
|
+
each(grep(newElement.childNodes), function(node, i) {
|
4316
4319
|
// Skip br element
|
4317
4320
|
if (i && element.canHaveHTML) {
|
4318
4321
|
element.appendChild(node);
|
@@ -4724,10 +4727,10 @@ define("tinymce/dom/DOMUtils", [
|
|
4724
4727
|
* @return {Number} Index of the specified node.
|
4725
4728
|
*/
|
4726
4729
|
nodeIndex: function(node, normalized) {
|
4727
|
-
var idx = 0, lastNodeType,
|
4730
|
+
var idx = 0, lastNodeType, nodeType;
|
4728
4731
|
|
4729
4732
|
if (node) {
|
4730
|
-
for (lastNodeType = node.nodeType, node = node.previousSibling
|
4733
|
+
for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
|
4731
4734
|
nodeType = node.nodeType;
|
4732
4735
|
|
4733
4736
|
// Normalize text nodes
|
@@ -5109,6 +5112,8 @@ define("tinymce/dom/ScriptLoader", [
|
|
5109
5112
|
}
|
5110
5113
|
|
5111
5114
|
function error() {
|
5115
|
+
/*eslint no-console:0 */
|
5116
|
+
|
5112
5117
|
// Report the error so it's easier for people to spot loading errors
|
5113
5118
|
if (typeof(console) !== "undefined" && console.log) {
|
5114
5119
|
console.log("Failed to load: " + url);
|
@@ -5421,10 +5426,10 @@ define("tinymce/AddOnManager", [
|
|
5421
5426
|
* Loads an add-on from a specific url.
|
5422
5427
|
*
|
5423
5428
|
* @method load
|
5424
|
-
* @param {String}
|
5425
|
-
* @param {String}
|
5426
|
-
* @param {function}
|
5427
|
-
* @param {Object}
|
5429
|
+
* @param {String} name Short name of the add-on that gets loaded.
|
5430
|
+
* @param {String} addOnUrl URL to the add-on that will get loaded.
|
5431
|
+
* @param {function} callback Optional callback to execute ones the add-on is loaded.
|
5432
|
+
* @param {Object} scope Optional scope to execute the callback in.
|
5428
5433
|
* @example
|
5429
5434
|
* // Loads a plugin from an external URL
|
5430
5435
|
* tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/plugin.js');
|
@@ -5435,45 +5440,45 @@ define("tinymce/AddOnManager", [
|
|
5435
5440
|
* plugins: '-myplugin' // Don't try to load it again
|
5436
5441
|
* });
|
5437
5442
|
*/
|
5438
|
-
load: function(
|
5439
|
-
var
|
5443
|
+
load: function(name, addOnUrl, callback, scope) {
|
5444
|
+
var self = this, url = addOnUrl;
|
5440
5445
|
|
5441
5446
|
function loadDependencies() {
|
5442
|
-
var dependencies =
|
5447
|
+
var dependencies = self.dependencies(name);
|
5443
5448
|
|
5444
5449
|
each(dependencies, function(dep) {
|
5445
|
-
var newUrl =
|
5450
|
+
var newUrl = self.createUrl(addOnUrl, dep);
|
5446
5451
|
|
5447
|
-
|
5452
|
+
self.load(newUrl.resource, newUrl, undefined, undefined);
|
5448
5453
|
});
|
5449
5454
|
|
5450
|
-
if (
|
5451
|
-
if (
|
5452
|
-
|
5455
|
+
if (callback) {
|
5456
|
+
if (scope) {
|
5457
|
+
callback.call(scope);
|
5453
5458
|
} else {
|
5454
|
-
|
5459
|
+
callback.call(ScriptLoader);
|
5455
5460
|
}
|
5456
5461
|
}
|
5457
5462
|
}
|
5458
5463
|
|
5459
|
-
if (
|
5464
|
+
if (self.urls[name]) {
|
5460
5465
|
return;
|
5461
5466
|
}
|
5462
5467
|
|
5463
|
-
if (typeof
|
5464
|
-
url =
|
5468
|
+
if (typeof addOnUrl === "object") {
|
5469
|
+
url = addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;
|
5465
5470
|
}
|
5466
5471
|
|
5467
5472
|
if (url.indexOf('/') !== 0 && url.indexOf('://') == -1) {
|
5468
5473
|
url = AddOnManager.baseURL + '/' + url;
|
5469
5474
|
}
|
5470
5475
|
|
5471
|
-
|
5476
|
+
self.urls[name] = url.substring(0, url.lastIndexOf('/'));
|
5472
5477
|
|
5473
|
-
if (
|
5478
|
+
if (self.lookup[name]) {
|
5474
5479
|
loadDependencies();
|
5475
5480
|
} else {
|
5476
|
-
ScriptLoader.ScriptLoader.add(url, loadDependencies,
|
5481
|
+
ScriptLoader.ScriptLoader.add(url, loadDependencies, scope);
|
5477
5482
|
}
|
5478
5483
|
}
|
5479
5484
|
};
|
@@ -6087,7 +6092,7 @@ define("tinymce/html/Schema", [
|
|
6087
6092
|
* @return {Object} Schema lookup table.
|
6088
6093
|
*/
|
6089
6094
|
function compileSchema(type) {
|
6090
|
-
var schema = {}, globalAttributes,
|
6095
|
+
var schema = {}, globalAttributes, blockContent;
|
6091
6096
|
var phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;
|
6092
6097
|
|
6093
6098
|
function add(name, attributes, children) {
|
@@ -6155,13 +6160,13 @@ define("tinymce/html/Schema", [
|
|
6155
6160
|
globalAttributes = split("id accesskey class dir lang style tabindex title");
|
6156
6161
|
|
6157
6162
|
// Event attributes can be opt-in/opt-out
|
6158
|
-
eventAttributes = split("onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange " +
|
6163
|
+
/*eventAttributes = split("onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange " +
|
6159
6164
|
"ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended " +
|
6160
6165
|
"onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart " +
|
6161
6166
|
"onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange " +
|
6162
6167
|
"onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange " +
|
6163
6168
|
"onwaiting"
|
6164
|
-
)
|
6169
|
+
);*/
|
6165
6170
|
|
6166
6171
|
// Block content elements
|
6167
6172
|
blockContent = split(
|
@@ -6988,6 +6993,8 @@ define("tinymce/html/Schema", [
|
|
6988
6993
|
* Contributing: http://www.tinymce.com/contributing
|
6989
6994
|
*/
|
6990
6995
|
|
6996
|
+
/*eslint max-depth:[2, 9] */
|
6997
|
+
|
6991
6998
|
/**
|
6992
6999
|
* This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will
|
6993
7000
|
* always execute the events in the right order for tag soup code like <b><p></b></p>. It will also remove elements
|
@@ -7044,7 +7051,9 @@ define("tinymce/html/SaxParser", [
|
|
7044
7051
|
* @param {tinymce.html.Schema} schema HTML Schema class to use when parsing.
|
7045
7052
|
*/
|
7046
7053
|
return function(settings, schema) {
|
7047
|
-
var self = this
|
7054
|
+
var self = this;
|
7055
|
+
|
7056
|
+
function noop() {}
|
7048
7057
|
|
7049
7058
|
settings = settings || {};
|
7050
7059
|
self.schema = schema = schema || new Schema();
|
@@ -8652,6 +8661,7 @@ define("tinymce/dom/Serializer", [
|
|
8652
8661
|
|
8653
8662
|
function trim(value) {
|
8654
8663
|
/*jshint maxlen:255 */
|
8664
|
+
/*eslint max-len:0 */
|
8655
8665
|
return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, '\n')
|
8656
8666
|
.replace(/^[\r\n]*|[\r\n]*$/g, '')
|
8657
8667
|
.replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, '')
|
@@ -9523,19 +9533,21 @@ define("tinymce/dom/ControlSelection", [
|
|
9523
9533
|
);
|
9524
9534
|
|
9525
9535
|
function isResizable(elm) {
|
9526
|
-
|
9536
|
+
var selector = editor.settings.object_resizing;
|
9537
|
+
|
9538
|
+
if (selector === false || Env.iOS) {
|
9527
9539
|
return false;
|
9528
9540
|
}
|
9529
9541
|
|
9530
|
-
if (
|
9531
|
-
|
9542
|
+
if (typeof selector != 'string') {
|
9543
|
+
selector = 'table,img,div';
|
9532
9544
|
}
|
9533
9545
|
|
9534
9546
|
if (elm.getAttribute('data-mce-resize') === 'false') {
|
9535
9547
|
return false;
|
9536
9548
|
}
|
9537
9549
|
|
9538
|
-
return
|
9550
|
+
return editor.dom.is(elm, selector);
|
9539
9551
|
}
|
9540
9552
|
|
9541
9553
|
function resizeGhostElement(e) {
|
@@ -9905,6 +9917,14 @@ define("tinymce/dom/ControlSelection", [
|
|
9905
9917
|
editor.dom.bind(editor.getBody(), 'mscontrolselect', function(e) {
|
9906
9918
|
if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {
|
9907
9919
|
e.preventDefault();
|
9920
|
+
|
9921
|
+
// This moves the selection from being a control selection to a text like selection like in WebKit #6753
|
9922
|
+
// TODO: Fix this the day IE works like other browsers without this nasty native ugly control selections.
|
9923
|
+
if (e.target.tagName == 'IMG') {
|
9924
|
+
window.setTimeout(function() {
|
9925
|
+
editor.selection.select(e.target);
|
9926
|
+
}, 0);
|
9927
|
+
}
|
9908
9928
|
}
|
9909
9929
|
});
|
9910
9930
|
}
|
@@ -10770,7 +10790,7 @@ define("tinymce/dom/Selection", [
|
|
10770
10790
|
* tinymce.activeEditor.selection.moveToBookmark(bm);
|
10771
10791
|
*/
|
10772
10792
|
getBookmark: function(type, normalized) {
|
10773
|
-
var
|
10793
|
+
var self = this, dom = self.dom, rng, rng2, id, collapsed, name, element, chr = '', styles;
|
10774
10794
|
|
10775
10795
|
function findIndex(name, element) {
|
10776
10796
|
var index = 0;
|
@@ -10808,7 +10828,7 @@ define("tinymce/dom/Selection", [
|
|
10808
10828
|
}
|
10809
10829
|
|
10810
10830
|
function getLocation() {
|
10811
|
-
var rng =
|
10831
|
+
var rng = self.getRng(true), root = dom.getRoot(), bookmark = {};
|
10812
10832
|
|
10813
10833
|
function getPoint(rng, start) {
|
10814
10834
|
var container = rng[start ? 'startContainer' : 'endContainer'],
|
@@ -10830,11 +10850,11 @@ define("tinymce/dom/Selection", [
|
|
10830
10850
|
offset = Math.max(0, childNodes.length - 1);
|
10831
10851
|
}
|
10832
10852
|
|
10833
|
-
point.push(
|
10853
|
+
point.push(self.dom.nodeIndex(childNodes[offset], normalized) + after);
|
10834
10854
|
}
|
10835
10855
|
|
10836
10856
|
for (; container && container != root; container = container.parentNode) {
|
10837
|
-
point.push(
|
10857
|
+
point.push(self.dom.nodeIndex(container, normalized));
|
10838
10858
|
}
|
10839
10859
|
|
10840
10860
|
return point;
|
@@ -10842,7 +10862,7 @@ define("tinymce/dom/Selection", [
|
|
10842
10862
|
|
10843
10863
|
bookmark.start = getPoint(rng, true);
|
10844
10864
|
|
10845
|
-
if (!
|
10865
|
+
if (!self.isCollapsed()) {
|
10846
10866
|
bookmark.end = getPoint(rng);
|
10847
10867
|
}
|
10848
10868
|
|
@@ -10850,15 +10870,15 @@ define("tinymce/dom/Selection", [
|
|
10850
10870
|
}
|
10851
10871
|
|
10852
10872
|
if (type == 2) {
|
10853
|
-
element =
|
10873
|
+
element = self.getNode();
|
10854
10874
|
name = element ? element.nodeName : null;
|
10855
10875
|
|
10856
10876
|
if (name == 'IMG') {
|
10857
10877
|
return {name: name, index: findIndex(name, element)};
|
10858
10878
|
}
|
10859
10879
|
|
10860
|
-
if (
|
10861
|
-
return
|
10880
|
+
if (self.tridentSel) {
|
10881
|
+
return self.tridentSel.getBookmark(type);
|
10862
10882
|
}
|
10863
10883
|
|
10864
10884
|
return getLocation();
|
@@ -10866,12 +10886,12 @@ define("tinymce/dom/Selection", [
|
|
10866
10886
|
|
10867
10887
|
// Handle simple range
|
10868
10888
|
if (type) {
|
10869
|
-
return {rng:
|
10889
|
+
return {rng: self.getRng()};
|
10870
10890
|
}
|
10871
10891
|
|
10872
|
-
rng =
|
10892
|
+
rng = self.getRng();
|
10873
10893
|
id = dom.uniqueId();
|
10874
|
-
collapsed =
|
10894
|
+
collapsed = self.isCollapsed();
|
10875
10895
|
styles = 'overflow:hidden;line-height:0px';
|
10876
10896
|
|
10877
10897
|
// Explorer method
|
@@ -10910,7 +10930,7 @@ define("tinymce/dom/Selection", [
|
|
10910
10930
|
return {name: name, index: findIndex(name, element)};
|
10911
10931
|
}
|
10912
10932
|
} else {
|
10913
|
-
element =
|
10933
|
+
element = self.getNode();
|
10914
10934
|
name = element.nodeName;
|
10915
10935
|
if (name == 'IMG') {
|
10916
10936
|
return {name: name, index: findIndex(name, element)};
|
@@ -10930,7 +10950,7 @@ define("tinymce/dom/Selection", [
|
|
10930
10950
|
rng.insertNode(dom.create('span', {'data-mce-type': "bookmark", id: id + '_start', style: styles}, chr));
|
10931
10951
|
}
|
10932
10952
|
|
10933
|
-
|
10953
|
+
self.moveToBookmark({id: id, keep: 1});
|
10934
10954
|
|
10935
10955
|
return {id: id};
|
10936
10956
|
},
|
@@ -10951,7 +10971,7 @@ define("tinymce/dom/Selection", [
|
|
10951
10971
|
* tinymce.activeEditor.selection.moveToBookmark(bm);
|
10952
10972
|
*/
|
10953
10973
|
moveToBookmark: function(bookmark) {
|
10954
|
-
var
|
10974
|
+
var self = this, dom = self.dom, rng, root, startContainer, endContainer, startOffset, endOffset;
|
10955
10975
|
|
10956
10976
|
function setEndPoint(start) {
|
10957
10977
|
var point = bookmark[start ? 'start' : 'end'], i, node, offset, children;
|
@@ -11071,12 +11091,12 @@ define("tinymce/dom/Selection", [
|
|
11071
11091
|
rng = dom.createRng();
|
11072
11092
|
root = dom.getRoot();
|
11073
11093
|
|
11074
|
-
if (
|
11075
|
-
return
|
11094
|
+
if (self.tridentSel) {
|
11095
|
+
return self.tridentSel.moveToBookmark(bookmark);
|
11076
11096
|
}
|
11077
11097
|
|
11078
11098
|
if (setEndPoint(true) && setEndPoint()) {
|
11079
|
-
|
11099
|
+
self.setRng(rng);
|
11080
11100
|
}
|
11081
11101
|
} else if (bookmark.id) {
|
11082
11102
|
// Restore start/end points
|
@@ -11087,12 +11107,12 @@ define("tinymce/dom/Selection", [
|
|
11087
11107
|
rng = dom.createRng();
|
11088
11108
|
rng.setStart(addBogus(startContainer), startOffset);
|
11089
11109
|
rng.setEnd(addBogus(endContainer), endOffset);
|
11090
|
-
|
11110
|
+
self.setRng(rng);
|
11091
11111
|
}
|
11092
11112
|
} else if (bookmark.name) {
|
11093
|
-
|
11113
|
+
self.select(dom.select(bookmark.name)[bookmark.index]);
|
11094
11114
|
} else if (bookmark.rng) {
|
11095
|
-
|
11115
|
+
self.setRng(bookmark.rng);
|
11096
11116
|
}
|
11097
11117
|
}
|
11098
11118
|
},
|
@@ -13063,7 +13083,8 @@ define("tinymce/Formatter", [
|
|
13063
13083
|
}
|
13064
13084
|
}
|
13065
13085
|
|
13066
|
-
|
13086
|
+
/*eslint no-constant-condition:0 */
|
13087
|
+
while (true) {
|
13067
13088
|
// Stop expanding on block elements
|
13068
13089
|
if (!format[0].block_expand && isBlock(parent)) {
|
13069
13090
|
return parent;
|
@@ -14142,7 +14163,7 @@ define("tinymce/UndoManager", [
|
|
14142
14163
|
].join('|'), 'gi');
|
14143
14164
|
|
14144
14165
|
return function(editor) {
|
14145
|
-
var self, index = 0, data = [], beforeBookmark, isFirstTypedCharacter, lock;
|
14166
|
+
var self = this, index = 0, data = [], beforeBookmark, isFirstTypedCharacter, lock;
|
14146
14167
|
|
14147
14168
|
// Returns a trimmed version of the current editor contents
|
14148
14169
|
function getContent() {
|
@@ -16050,6 +16071,7 @@ define("tinymce/util/URI", [
|
|
16050
16071
|
url = url.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something
|
16051
16072
|
|
16052
16073
|
/*jshint maxlen: 255 */
|
16074
|
+
/*eslint max-len: 0 */
|
16053
16075
|
url = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
|
16054
16076
|
|
16055
16077
|
each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) {
|
@@ -16383,16 +16405,14 @@ define("tinymce/util/Class", [
|
|
16383
16405
|
|
16384
16406
|
// Provides classical inheritance, based on code made by John Resig
|
16385
16407
|
Class.extend = extendClass = function(prop) {
|
16386
|
-
var
|
16408
|
+
var self = this, _super = self.prototype, prototype, name, member;
|
16387
16409
|
|
16388
16410
|
// The dummy class constructor
|
16389
16411
|
function Class() {
|
16390
|
-
var i, mixins, mixin, self;
|
16412
|
+
var i, mixins, mixin, self = this;
|
16391
16413
|
|
16392
16414
|
// All construction is actually done in the init method
|
16393
16415
|
if (!initializing) {
|
16394
|
-
self = this;
|
16395
|
-
|
16396
16416
|
// Run class constuctor
|
16397
16417
|
if (self.init) {
|
16398
16418
|
self.init.apply(self, arguments);
|
@@ -16434,7 +16454,7 @@ define("tinymce/util/Class", [
|
|
16434
16454
|
// Instantiate a base class (but only create the instance,
|
16435
16455
|
// don't run the init constructor)
|
16436
16456
|
initializing = true;
|
16437
|
-
prototype = new
|
16457
|
+
prototype = new self();
|
16438
16458
|
initializing = false;
|
16439
16459
|
|
16440
16460
|
// Add mixins
|
@@ -16532,6 +16552,8 @@ define("tinymce/util/Class", [
|
|
16532
16552
|
* Contributing: http://www.tinymce.com/contributing
|
16533
16553
|
*/
|
16534
16554
|
|
16555
|
+
/*eslint no-nested-ternary:0 */
|
16556
|
+
|
16535
16557
|
/**
|
16536
16558
|
* Selector engine, enables you to select controls by using CSS like expressions.
|
16537
16559
|
* We currently only support basic CSS expressions to reduce the size of the core
|
@@ -16596,6 +16618,7 @@ define("tinymce/ui/Selector", [
|
|
16596
16618
|
var expression = /^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i;
|
16597
16619
|
|
16598
16620
|
/*jshint maxlen:255 */
|
16621
|
+
/*eslint max-len:0 */
|
16599
16622
|
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
16600
16623
|
whiteSpace = /^\s*|\s*$/g,
|
16601
16624
|
Collection;
|
@@ -17432,6 +17455,8 @@ define("tinymce/ui/DomUtils", [
|
|
17432
17455
|
* Contributing: http://www.tinymce.com/contributing
|
17433
17456
|
*/
|
17434
17457
|
|
17458
|
+
/*eslint consistent-this:0 */
|
17459
|
+
|
17435
17460
|
/**
|
17436
17461
|
* This is the base class for all controls and containers. All UI control instances inherit
|
17437
17462
|
* from this one as it has the base logic needed by all of them.
|
@@ -18143,10 +18168,10 @@ define("tinymce/ui/Control", [
|
|
18143
18168
|
* @return {tinymce.ui.Collection} Collection with all parent controls.
|
18144
18169
|
*/
|
18145
18170
|
parents: function(selector) {
|
18146
|
-
var
|
18171
|
+
var self = this, ctrl, parents = new Collection();
|
18147
18172
|
|
18148
18173
|
// Add each parent to collection
|
18149
|
-
for (ctrl =
|
18174
|
+
for (ctrl = self.parent(); ctrl; ctrl = ctrl.parent()) {
|
18150
18175
|
parents.add(ctrl);
|
18151
18176
|
}
|
18152
18177
|
|
@@ -18791,10 +18816,10 @@ define("tinymce/ui/Control", [
|
|
18791
18816
|
e.preventDefault();
|
18792
18817
|
|
18793
18818
|
if (e.type == "mousewheel") {
|
18794
|
-
e.deltaY = -
|
18819
|
+
e.deltaY = -1 / 40 * e.wheelDelta;
|
18795
18820
|
|
18796
18821
|
if (e.wheelDeltaX) {
|
18797
|
-
e.deltaX = -1/40 * e.wheelDeltaX;
|
18822
|
+
e.deltaX = -1 / 40 * e.wheelDeltaX;
|
18798
18823
|
}
|
18799
18824
|
} else {
|
18800
18825
|
e.deltaX = 0;
|
@@ -19862,7 +19887,7 @@ define("tinymce/ui/Container", [
|
|
19862
19887
|
|
19863
19888
|
return (
|
19864
19889
|
'<div id="' + self._id + '" class="' + self.classes() + '"' + (role ? ' role="' + this.settings.role + '"' : '') + '>' +
|
19865
|
-
'<div id="' + self._id + '-body" class="' + self.classes('body') + '">'+
|
19890
|
+
'<div id="' + self._id + '-body" class="' + self.classes('body') + '">' +
|
19866
19891
|
(self.settings.html || '') + layout.renderHtml(self) +
|
19867
19892
|
'</div>' +
|
19868
19893
|
'</div>'
|
@@ -19953,13 +19978,13 @@ define("tinymce/ui/Container", [
|
|
19953
19978
|
* @return {tinymce.ui.Container} Current container instance.
|
19954
19979
|
*/
|
19955
19980
|
reflow: function() {
|
19956
|
-
var i
|
19981
|
+
var i;
|
19957
19982
|
|
19958
19983
|
if (this.visible()) {
|
19959
19984
|
Control.repaintControls = [];
|
19960
19985
|
Control.repaintControls.map = {};
|
19961
19986
|
|
19962
|
-
|
19987
|
+
this.recalc();
|
19963
19988
|
i = Control.repaintControls.length;
|
19964
19989
|
|
19965
19990
|
while (i--) {
|
@@ -21884,7 +21909,7 @@ define("tinymce/util/Quirks", [
|
|
21884
21909
|
* fix seemed like a huge task. I hope we can remove this before the year 2030.
|
21885
21910
|
*/
|
21886
21911
|
function cleanupStylesWhenDeleting() {
|
21887
|
-
var doc = editor.getDoc();
|
21912
|
+
var doc = editor.getDoc(), urlPrefix = 'data:text/mce-internal,';
|
21888
21913
|
|
21889
21914
|
if (!window.MutationObserver) {
|
21890
21915
|
return;
|
@@ -21999,14 +22024,20 @@ define("tinymce/util/Quirks", [
|
|
21999
22024
|
});
|
22000
22025
|
|
22001
22026
|
editor.on('dragstart', function(e) {
|
22002
|
-
|
22027
|
+
// Safari doesn't support custom dataTransfer items so we can only use URL and Text
|
22028
|
+
e.dataTransfer.setData('URL', 'data:text/mce-internal,' + escape(editor.selection.getContent()));
|
22003
22029
|
});
|
22004
22030
|
|
22005
22031
|
editor.on('drop', function(e) {
|
22006
22032
|
if (!isDefaultPrevented(e)) {
|
22007
|
-
var internalContent = e.dataTransfer.getData('
|
22033
|
+
var internalContent = e.dataTransfer.getData('URL');
|
22008
22034
|
|
22009
|
-
if (internalContent
|
22035
|
+
if (!internalContent || internalContent.indexOf(urlPrefix) == -1 || !doc.caretRangeFromPoint) {
|
22036
|
+
return;
|
22037
|
+
}
|
22038
|
+
|
22039
|
+
internalContent = unescape(internalContent.substr(urlPrefix.length));
|
22040
|
+
if (doc.caretRangeFromPoint) {
|
22010
22041
|
e.preventDefault();
|
22011
22042
|
customDelete();
|
22012
22043
|
editor.selection.setRng(doc.caretRangeFromPoint(e.x, e.y));
|
@@ -22792,16 +22823,20 @@ define("tinymce/util/Quirks", [
|
|
22792
22823
|
|
22793
22824
|
/**
|
22794
22825
|
* IE 11 has a fantastic bug where it will produce two trailing BR elements to iframe bodies when
|
22795
|
-
* the iframe is hidden by display: none.
|
22796
|
-
*
|
22826
|
+
* the iframe is hidden by display: none on a parent container. The DOM is actually out of sync
|
22827
|
+
* with innerHTML in this case. It's like IE adds shadow DOM BR elements that appears on innerHTML
|
22828
|
+
* but not as the lastChild of the body. However is we add a BR element to the body then remove it
|
22829
|
+
* it doesn't seem to add these BR elements makes sence right?!
|
22797
22830
|
*
|
22798
|
-
* Example
|
22831
|
+
* Example of what happens: <body>text</body> becomes <body>text<br><br></body>
|
22799
22832
|
*/
|
22800
22833
|
function doubleTrailingBrElements() {
|
22801
22834
|
if (!editor.inline) {
|
22802
|
-
editor.on('
|
22803
|
-
editor.
|
22804
|
-
|
22835
|
+
editor.on('focus blur', function() {
|
22836
|
+
var br = editor.dom.create('br');
|
22837
|
+
editor.getBody().appendChild(br);
|
22838
|
+
br.parentNode.removeChild(br);
|
22839
|
+
}, true);
|
22805
22840
|
}
|
22806
22841
|
}
|
22807
22842
|
|
@@ -22913,6 +22948,10 @@ define("tinymce/util/Observable", [
|
|
22913
22948
|
fire: function(name, args, bubble) {
|
22914
22949
|
var self = this, handlers, i, l, callback, parent;
|
22915
22950
|
|
22951
|
+
if (self.removed) {
|
22952
|
+
return;
|
22953
|
+
}
|
22954
|
+
|
22916
22955
|
name = name.toLowerCase();
|
22917
22956
|
args = args || {};
|
22918
22957
|
args.type = name;
|
@@ -22986,13 +23025,14 @@ define("tinymce/util/Observable", [
|
|
22986
23025
|
* @method on
|
22987
23026
|
* @param {String} name Event name or space separated list of events to bind.
|
22988
23027
|
* @param {callback} callback Callback to be executed when the event occurs.
|
23028
|
+
* @param {Boolean} first Optional flag if the event should be prepended. Use this with care.
|
22989
23029
|
* @return {Object} Current class instance.
|
22990
23030
|
* @example
|
22991
23031
|
* instance.on('event', function(e) {
|
22992
23032
|
* // Callback logic
|
22993
23033
|
* });
|
22994
23034
|
*/
|
22995
|
-
on: function(name, callback) {
|
23035
|
+
on: function(name, callback, prepend) {
|
22996
23036
|
var self = this, bindings, handlers, names, i;
|
22997
23037
|
|
22998
23038
|
if (callback === false) {
|
@@ -23020,7 +23060,11 @@ define("tinymce/util/Observable", [
|
|
23020
23060
|
}
|
23021
23061
|
}
|
23022
23062
|
|
23023
|
-
|
23063
|
+
if (prepend) {
|
23064
|
+
handlers.unshift(callback);
|
23065
|
+
} else {
|
23066
|
+
handlers.push(callback);
|
23067
|
+
}
|
23024
23068
|
}
|
23025
23069
|
}
|
23026
23070
|
|
@@ -23693,7 +23737,7 @@ define("tinymce/Editor", [
|
|
23693
23737
|
*/
|
23694
23738
|
init: function() {
|
23695
23739
|
var self = this, settings = self.settings, elm = self.getElement();
|
23696
|
-
var w, h, minHeight, n, o, url, bodyId, bodyClass, re, i, initializedPlugins = [];
|
23740
|
+
var w, h, minHeight, n, o, Theme, url, bodyId, bodyClass, re, i, initializedPlugins = [];
|
23697
23741
|
|
23698
23742
|
self.rtl = this.editorManager.i18n.rtl;
|
23699
23743
|
self.editorManager.add(self);
|
@@ -23712,8 +23756,8 @@ define("tinymce/Editor", [
|
|
23712
23756
|
if (settings.theme) {
|
23713
23757
|
if (typeof settings.theme != "function") {
|
23714
23758
|
settings.theme = settings.theme.replace(/-/, '');
|
23715
|
-
|
23716
|
-
self.theme = new
|
23759
|
+
Theme = ThemeManager.get(settings.theme);
|
23760
|
+
self.theme = new Theme(self, ThemeManager.urls[settings.theme]);
|
23717
23761
|
|
23718
23762
|
if (self.theme.init) {
|
23719
23763
|
self.theme.init(self, ThemeManager.urls[settings.theme] || self.documentBaseUrl.replace(/\/$/, ''));
|
@@ -23724,21 +23768,21 @@ define("tinymce/Editor", [
|
|
23724
23768
|
}
|
23725
23769
|
|
23726
23770
|
function initPlugin(plugin) {
|
23727
|
-
var
|
23771
|
+
var Plugin = PluginManager.get(plugin), pluginUrl, pluginInstance;
|
23728
23772
|
|
23729
|
-
|
23773
|
+
pluginUrl = PluginManager.urls[plugin] || self.documentBaseUrl.replace(/\/$/, '');
|
23730
23774
|
plugin = trim(plugin);
|
23731
|
-
if (
|
23775
|
+
if (Plugin && inArray(initializedPlugins, plugin) === -1) {
|
23732
23776
|
each(PluginManager.dependencies(plugin), function(dep){
|
23733
23777
|
initPlugin(dep);
|
23734
23778
|
});
|
23735
23779
|
|
23736
|
-
pluginInstance = new
|
23780
|
+
pluginInstance = new Plugin(self, pluginUrl);
|
23737
23781
|
|
23738
23782
|
self.plugins[plugin] = pluginInstance;
|
23739
23783
|
|
23740
23784
|
if (pluginInstance.init) {
|
23741
|
-
pluginInstance.init(self,
|
23785
|
+
pluginInstance.init(self, pluginUrl);
|
23742
23786
|
initializedPlugins.push(plugin);
|
23743
23787
|
}
|
23744
23788
|
}
|
@@ -23758,11 +23802,11 @@ define("tinymce/Editor", [
|
|
23758
23802
|
re = /^[0-9\.]+(|px)$/i;
|
23759
23803
|
|
23760
23804
|
if (re.test('' + w)) {
|
23761
|
-
w = Math.max(parseInt(w, 10)
|
23805
|
+
w = Math.max(parseInt(w, 10), 100);
|
23762
23806
|
}
|
23763
23807
|
|
23764
23808
|
if (re.test('' + h)) {
|
23765
|
-
h = Math.max(parseInt(h, 10)
|
23809
|
+
h = Math.max(parseInt(h, 10), minHeight);
|
23766
23810
|
}
|
23767
23811
|
|
23768
23812
|
// Render UI
|
@@ -23862,7 +23906,8 @@ define("tinymce/Editor", [
|
|
23862
23906
|
self.iframeHTML += '</head><body id="' + bodyId + '" class="mce-content-body ' + bodyClass + '" ' +
|
23863
23907
|
'onload="window.parent.tinymce.get(\'' + self.id + '\').fire(\'load\');"><br></body></html>';
|
23864
23908
|
|
23865
|
-
|
23909
|
+
/*eslint no-script-url:0 */
|
23910
|
+
var domainRelaxUrl = 'javascript:(function(){' +
|
23866
23911
|
'document.open();document.domain="' + document.domain + '";' +
|
23867
23912
|
'var ed = window.parent.tinymce.get("' + self.id + '");document.write(ed.iframeHTML);' +
|
23868
23913
|
'document.close();ed.initContentBody(true);})()';
|
@@ -23940,12 +23985,12 @@ define("tinymce/Editor", [
|
|
23940
23985
|
|
23941
23986
|
if (settings.content_editable) {
|
23942
23987
|
self.on('remove', function() {
|
23943
|
-
var
|
23988
|
+
var bodyEl = this.getBody();
|
23944
23989
|
|
23945
|
-
DOM.removeClass(
|
23946
|
-
DOM.removeClass(
|
23947
|
-
DOM.setAttrib(
|
23948
|
-
DOM.setAttrib(
|
23990
|
+
DOM.removeClass(bodyEl, 'mce-content-body');
|
23991
|
+
DOM.removeClass(bodyEl, 'mce-edit-focus');
|
23992
|
+
DOM.setAttrib(bodyEl, 'tabIndex', null);
|
23993
|
+
DOM.setAttrib(bodyEl, 'contentEditable', null);
|
23949
23994
|
});
|
23950
23995
|
|
23951
23996
|
DOM.addClass(targetElm, 'mce-content-body');
|
@@ -24405,7 +24450,7 @@ define("tinymce/Editor", [
|
|
24405
24450
|
var self = this, selection = self.selection, node, parents, root;
|
24406
24451
|
|
24407
24452
|
// Fix for bug #1896577 it seems that this can not be fired while the editor is loading
|
24408
|
-
if (self.initialized && !self.settings.disable_nodechange) {
|
24453
|
+
if (self.initialized && !self.settings.disable_nodechange && !self.settings.readonly) {
|
24409
24454
|
// Get start node
|
24410
24455
|
root = self.getBody();
|
24411
24456
|
node = selection.getStart() || root;
|
@@ -24937,7 +24982,7 @@ define("tinymce/Editor", [
|
|
24937
24982
|
// Padd with bogus BR elements on modern browsers and IE 7 and 8 since they don't render empty P tags properly
|
24938
24983
|
content = ie && ie < 11 ? '' : '<br data-mce-bogus="1">';
|
24939
24984
|
content = self.dom.createHTML(forcedRootBlockName, self.settings.forced_root_block_attrs, content);
|
24940
|
-
} else if (!ie
|
24985
|
+
} else if (!ie) {
|
24941
24986
|
// We need to add a BR when forced_root_block is disabled on non IE browsers to place the caret
|
24942
24987
|
content = '<br data-mce-bogus="1">';
|
24943
24988
|
}
|
@@ -25236,6 +25281,8 @@ define("tinymce/Editor", [
|
|
25236
25281
|
var self = this;
|
25237
25282
|
|
25238
25283
|
if (!self.removed) {
|
25284
|
+
self.fire('remove');
|
25285
|
+
self.off();
|
25239
25286
|
self.removed = 1; // Cancels post remove event execution
|
25240
25287
|
|
25241
25288
|
// Remove any hidden input
|
@@ -25243,12 +25290,6 @@ define("tinymce/Editor", [
|
|
25243
25290
|
DOM.remove(self.getElement().nextSibling);
|
25244
25291
|
}
|
25245
25292
|
|
25246
|
-
// Fixed bug where IE has a blinking cursor left from the editor
|
25247
|
-
var doc = self.getDoc();
|
25248
|
-
if (ie && doc && !self.inline) {
|
25249
|
-
doc.execCommand('SelectAll');
|
25250
|
-
}
|
25251
|
-
|
25252
25293
|
// We must save before we hide so Safari doesn't crash
|
25253
25294
|
self.save();
|
25254
25295
|
|
@@ -25265,8 +25306,6 @@ define("tinymce/Editor", [
|
|
25265
25306
|
Event.unbind(self.getBody());
|
25266
25307
|
Event.unbind(elm);
|
25267
25308
|
|
25268
|
-
self.fire('remove');
|
25269
|
-
|
25270
25309
|
self.editorManager.remove(self);
|
25271
25310
|
DOM.remove(elm);
|
25272
25311
|
self.destroy();
|
@@ -25355,7 +25394,7 @@ define("tinymce/Editor", [
|
|
25355
25394
|
DOM.unbind(form, 'submit reset', self.formEventDelegate);
|
25356
25395
|
}
|
25357
25396
|
|
25358
|
-
self.contentAreaContainer = self.formElement = self.container = null;
|
25397
|
+
self.contentAreaContainer = self.formElement = self.container = self.editorContainer = null;
|
25359
25398
|
self.settings.content_element = self.bodyElement = self.contentDocument = self.contentWindow = null;
|
25360
25399
|
|
25361
25400
|
if (self.selection) {
|
@@ -25508,6 +25547,8 @@ define("tinymce/FocusManager", [
|
|
25508
25547
|
"tinymce/dom/DOMUtils",
|
25509
25548
|
"tinymce/Env"
|
25510
25549
|
], function(DOMUtils, Env) {
|
25550
|
+
var selectionChangeHandler, documentFocusInHandler, DOM = DOMUtils.DOM;
|
25551
|
+
|
25511
25552
|
/**
|
25512
25553
|
* Constructs a new focus manager instance.
|
25513
25554
|
*
|
@@ -25555,7 +25596,7 @@ define("tinymce/FocusManager", [
|
|
25555
25596
|
}
|
25556
25597
|
|
25557
25598
|
function isUIElement(elm) {
|
25558
|
-
return !!
|
25599
|
+
return !!DOM.getParent(elm, FocusManager.isEditorUIElement);
|
25559
25600
|
}
|
25560
25601
|
|
25561
25602
|
function isNodeInBodyOfEditor(node, editor) {
|
@@ -25571,7 +25612,7 @@ define("tinymce/FocusManager", [
|
|
25571
25612
|
}
|
25572
25613
|
|
25573
25614
|
function registerEvents(e) {
|
25574
|
-
var editor = e.editor
|
25615
|
+
var editor = e.editor;
|
25575
25616
|
|
25576
25617
|
editor.on('init', function() {
|
25577
25618
|
// On IE take selection snapshot onbeforedeactivate
|
@@ -25611,25 +25652,22 @@ define("tinymce/FocusManager", [
|
|
25611
25652
|
});
|
25612
25653
|
|
25613
25654
|
// Handles the issue with WebKit not retaining selection within inline document
|
25614
|
-
// If the user releases the mouse out side the body
|
25615
|
-
|
25616
|
-
// TODO: Optimize this since we only need to bind these on the active editor
|
25617
|
-
if (Env.webkit) {
|
25655
|
+
// If the user releases the mouse out side the body since a mouse up event wont occur on the body
|
25656
|
+
if (Env.webkit && !selectionChangeHandler) {
|
25618
25657
|
selectionChangeHandler = function() {
|
25619
|
-
var
|
25658
|
+
var activeEditor = editorManager.activeEditor;
|
25659
|
+
|
25660
|
+
if (activeEditor && activeEditor.selection) {
|
25661
|
+
var rng = activeEditor.selection.getRng();
|
25620
25662
|
|
25621
|
-
|
25622
|
-
|
25623
|
-
|
25663
|
+
// Store when it's non collapsed
|
25664
|
+
if (rng && !rng.collapsed) {
|
25665
|
+
editor.lastRng = rng;
|
25666
|
+
}
|
25624
25667
|
}
|
25625
25668
|
};
|
25626
25669
|
|
25627
|
-
|
25628
|
-
DOMUtils.DOM.bind(document, 'selectionchange', selectionChangeHandler);
|
25629
|
-
|
25630
|
-
editor.on('remove', function() {
|
25631
|
-
DOMUtils.DOM.unbind(document, 'selectionchange', selectionChangeHandler);
|
25632
|
-
});
|
25670
|
+
DOM.bind(document, 'selectionchange', selectionChangeHandler);
|
25633
25671
|
}
|
25634
25672
|
}
|
25635
25673
|
});
|
@@ -25681,28 +25719,41 @@ define("tinymce/FocusManager", [
|
|
25681
25719
|
}
|
25682
25720
|
}, 0);
|
25683
25721
|
});
|
25684
|
-
}
|
25685
25722
|
|
25686
|
-
|
25687
|
-
|
25688
|
-
|
25689
|
-
var activeEditor = editorManager.activeEditor;
|
25723
|
+
if (!documentFocusInHandler) {
|
25724
|
+
documentFocusInHandler = function(e) {
|
25725
|
+
var activeEditor = editorManager.activeEditor;
|
25690
25726
|
|
25691
|
-
|
25692
|
-
|
25693
|
-
|
25694
|
-
|
25695
|
-
|
25727
|
+
if (activeEditor && e.target.ownerDocument == document) {
|
25728
|
+
// Check to make sure we have a valid selection
|
25729
|
+
if (activeEditor.selection) {
|
25730
|
+
activeEditor.selection.lastFocusBookmark = createBookmark(activeEditor.lastRng);
|
25731
|
+
}
|
25696
25732
|
|
25697
|
-
|
25698
|
-
|
25699
|
-
|
25700
|
-
|
25701
|
-
|
25733
|
+
// Fire a blur event if the element isn't a UI element
|
25734
|
+
if (!isUIElement(e.target) && editorManager.focusedEditor == activeEditor) {
|
25735
|
+
activeEditor.fire('blur', {focusedEditor: null});
|
25736
|
+
editorManager.focusedEditor = null;
|
25737
|
+
}
|
25738
|
+
}
|
25739
|
+
};
|
25740
|
+
|
25741
|
+
// Check if focus is moved to an element outside the active editor by checking if the target node
|
25742
|
+
// isn't within the body of the activeEditor nor a UI element such as a dialog child control
|
25743
|
+
DOM.bind(document, 'focusin', documentFocusInHandler);
|
25702
25744
|
}
|
25703
|
-
}
|
25745
|
+
}
|
25746
|
+
|
25747
|
+
function unregisterDocumentEvents() {
|
25748
|
+
if (!editorManager.activeEditor) {
|
25749
|
+
DOM.unbind(document, 'selectionchange', selectionChangeHandler);
|
25750
|
+
DOM.unbind(document, 'focusin', documentFocusInHandler);
|
25751
|
+
selectionChangeHandler = documentFocusInHandler = null;
|
25752
|
+
}
|
25753
|
+
}
|
25704
25754
|
|
25705
25755
|
editorManager.on('AddEditor', registerEvents);
|
25756
|
+
editorManager.on('RemoveEditor', unregisterDocumentEvents);
|
25706
25757
|
}
|
25707
25758
|
|
25708
25759
|
/**
|
@@ -25770,7 +25821,7 @@ define("tinymce/EditorManager", [
|
|
25770
25821
|
* @property minorVersion
|
25771
25822
|
* @type String
|
25772
25823
|
*/
|
25773
|
-
minorVersion : '0.
|
25824
|
+
minorVersion : '0.19',
|
25774
25825
|
|
25775
25826
|
/**
|
25776
25827
|
* Release date of TinyMCE build.
|
@@ -25778,7 +25829,7 @@ define("tinymce/EditorManager", [
|
|
25778
25829
|
* @property releaseDate
|
25779
25830
|
* @type String
|
25780
25831
|
*/
|
25781
|
-
releaseDate: '2014-
|
25832
|
+
releaseDate: '2014-03-11',
|
25782
25833
|
|
25783
25834
|
/**
|
25784
25835
|
* Collection of editor instances.
|
@@ -26518,7 +26569,7 @@ define("tinymce/util/JSON", [], function() {
|
|
26518
26569
|
|
26519
26570
|
if (t == 'object') {
|
26520
26571
|
if (o.hasOwnProperty && Object.prototype.toString.call(o) === '[object Array]') {
|
26521
|
-
for (i=0, v = '['; i<o.length; i++) {
|
26572
|
+
for (i = 0, v = '['; i < o.length; i++) {
|
26522
26573
|
v += (i > 0 ? ',' : '') + serialize(o[i], quote);
|
26523
26574
|
}
|
26524
26575
|
|
@@ -26530,7 +26581,7 @@ define("tinymce/util/JSON", [], function() {
|
|
26530
26581
|
for (name in o) {
|
26531
26582
|
if (o.hasOwnProperty(name)) {
|
26532
26583
|
v += typeof o[name] != 'function' ? (v.length > 1 ? ',' + quote : quote) + name +
|
26533
|
-
quote +':' + serialize(o[name], quote) : '';
|
26584
|
+
quote + ':' + serialize(o[name], quote) : '';
|
26534
26585
|
}
|
26535
26586
|
}
|
26536
26587
|
|
@@ -27658,8 +27709,8 @@ define("tinymce/ui/ButtonGroup", [
|
|
27658
27709
|
layout.preRender(self);
|
27659
27710
|
|
27660
27711
|
return (
|
27661
|
-
'<div id="' + self._id + '" class="' + self.classes() + '">'+
|
27662
|
-
'<div id="' + self._id + '-body">'+
|
27712
|
+
'<div id="' + self._id + '" class="' + self.classes() + '">' +
|
27713
|
+
'<div id="' + self._id + '-body">' +
|
27663
27714
|
(self.settings.html || '') + layout.renderHtml(self) +
|
27664
27715
|
'</div>' +
|
27665
27716
|
'</div>'
|
@@ -27783,7 +27834,7 @@ define("tinymce/ui/Checkbox", [
|
|
27783
27834
|
return (
|
27784
27835
|
'<div id="' + id + '" class="' + self.classes() + '" unselectable="on" aria-labelledby="' + id + '-al" tabindex="-1">' +
|
27785
27836
|
'<i class="' + prefix + 'ico ' + prefix + 'i-checkbox"></i>' +
|
27786
|
-
'<span id="' + id +'-al" class="' + prefix + 'label">' + self.encode(self._text) + '</span>' +
|
27837
|
+
'<span id="' + id + '-al" class="' + prefix + 'label">' + self.encode(self._text) + '</span>' +
|
27787
27838
|
'</div>'
|
27788
27839
|
);
|
27789
27840
|
}
|
@@ -28471,9 +28522,9 @@ define("tinymce/ui/Path", [
|
|
28471
28522
|
|
28472
28523
|
for (i = 0, l = parts.length; i < l; i++) {
|
28473
28524
|
html += (
|
28474
|
-
(i > 0 ? '<div class="'+ prefix + 'divider" aria-hidden="true"> ' + self.settings.delimiter + ' </div>' : '') +
|
28525
|
+
(i > 0 ? '<div class="' + prefix + 'divider" aria-hidden="true"> ' + self.settings.delimiter + ' </div>' : '') +
|
28475
28526
|
'<div role="button" class="' + prefix + 'path-item' + (i == l - 1 ? ' ' + prefix + 'last' : '') + '" data-index="' +
|
28476
|
-
i + '" tabindex="-1" id="' + self._id + '-' + i +'" aria-level="' + i + '">' + parts[i].name + '</div>'
|
28527
|
+
i + '" tabindex="-1" id="' + self._id + '-' + i + '" aria-level="' + i + '">' + parts[i].name + '</div>'
|
28477
28528
|
);
|
28478
28529
|
}
|
28479
28530
|
|
@@ -28996,8 +29047,8 @@ define("tinymce/ui/FlexLayout", [
|
|
28996
29047
|
// A ton of variables, needs to be in the same scope for performance
|
28997
29048
|
var i, l, items, contLayoutRect, contPaddingBox, contSettings, align, pack, spacing, totalFlex, availableSpace, direction;
|
28998
29049
|
var ctrl, ctrlLayoutRect, ctrlSettings, flex, maxSizeItems = [], size, maxSize, ratio, rect, pos, maxAlignEndPos;
|
28999
|
-
var sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName,
|
29000
|
-
var alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName,
|
29050
|
+
var sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName, deltaSizeName, contentSizeName;
|
29051
|
+
var alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName, alignBeforeName, alignAfterName;
|
29001
29052
|
var alignDeltaSizeName, alignContentSizeName;
|
29002
29053
|
var max = Math.max, min = Math.min;
|
29003
29054
|
|
@@ -29024,7 +29075,6 @@ define("tinymce/ui/FlexLayout", [
|
|
29024
29075
|
maxSizeName = "maxH";
|
29025
29076
|
innerSizeName = "innerH";
|
29026
29077
|
beforeName = 'top';
|
29027
|
-
afterName = 'bottom';
|
29028
29078
|
deltaSizeName = "deltaH";
|
29029
29079
|
contentSizeName = "contentH";
|
29030
29080
|
|
@@ -29033,7 +29083,6 @@ define("tinymce/ui/FlexLayout", [
|
|
29033
29083
|
alignAxisName = "x";
|
29034
29084
|
alignInnerSizeName = "innerW";
|
29035
29085
|
alignMinSizeName = "minW";
|
29036
|
-
alignMaxSizeName = "maxW";
|
29037
29086
|
alignAfterName = "right";
|
29038
29087
|
alignDeltaSizeName = "deltaW";
|
29039
29088
|
alignContentSizeName = "contentW";
|
@@ -29044,7 +29093,6 @@ define("tinymce/ui/FlexLayout", [
|
|
29044
29093
|
maxSizeName = "maxW";
|
29045
29094
|
innerSizeName = "innerW";
|
29046
29095
|
beforeName = 'left';
|
29047
|
-
afterName = 'right';
|
29048
29096
|
deltaSizeName = "deltaW";
|
29049
29097
|
contentSizeName = "contentW";
|
29050
29098
|
|
@@ -29053,7 +29101,6 @@ define("tinymce/ui/FlexLayout", [
|
|
29053
29101
|
alignAxisName = "y";
|
29054
29102
|
alignInnerSizeName = "innerH";
|
29055
29103
|
alignMinSizeName = "minH";
|
29056
|
-
alignMaxSizeName = "maxH";
|
29057
29104
|
alignAfterName = "bottom";
|
29058
29105
|
alignDeltaSizeName = "deltaH";
|
29059
29106
|
alignContentSizeName = "contentH";
|
@@ -29951,7 +29998,7 @@ define("tinymce/ui/GridLayout", [
|
|
29951
29998
|
recalc: function(container) {
|
29952
29999
|
var settings = container.settings, rows, cols, items, contLayoutRect, width, height, rect,
|
29953
30000
|
ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY,
|
29954
|
-
colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight,
|
30001
|
+
colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight;
|
29955
30002
|
|
29956
30003
|
// Get layout settings
|
29957
30004
|
settings = container.settings;
|
@@ -30101,7 +30148,6 @@ define("tinymce/ui/GridLayout", [
|
|
30101
30148
|
ctrlSettings = ctrl.settings;
|
30102
30149
|
ctrlLayoutRect = ctrl.layoutRect();
|
30103
30150
|
width = Math.max(colWidths[x], ctrlLayoutRect.startMinWidth);
|
30104
|
-
alignX = alignY = 0;
|
30105
30151
|
ctrlLayoutRect.x = posX;
|
30106
30152
|
ctrlLayoutRect.y = posY;
|
30107
30153
|
|
@@ -30346,7 +30392,7 @@ define("tinymce/ui/Label", [
|
|
30346
30392
|
var self = this, forId = self.settings.forId;
|
30347
30393
|
|
30348
30394
|
return (
|
30349
|
-
'<label id="' + self._id + '" class="' + self.classes() + '"' + (forId ? ' for="' + forId +'"' : '') + '>' +
|
30395
|
+
'<label id="' + self._id + '" class="' + self.classes() + '"' + (forId ? ' for="' + forId + '"' : '') + '>' +
|
30350
30396
|
self.encode(self._text) +
|
30351
30397
|
'</label>'
|
30352
30398
|
);
|
@@ -31664,7 +31710,7 @@ define("tinymce/ui/TabPanel", [
|
|
31664
31710
|
ctrl.aria('labelledby', id);
|
31665
31711
|
|
31666
31712
|
tabsHtml += (
|
31667
|
-
'<div id="' + id + '" class="' + prefix + 'tab" '+
|
31713
|
+
'<div id="' + id + '" class="' + prefix + 'tab" ' +
|
31668
31714
|
'unselectable="on" role="tab" aria-controls="' + ctrl._id + '" aria-selected="false" tabIndex="-1">' +
|
31669
31715
|
self.encode(ctrl.settings.title) +
|
31670
31716
|
'</div>'
|