tinymce-rails 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +4 -1
- data/app/assets/source/tinymce/tinymce.js +338 -252
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +2 -2
- 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/quickbars/plugin.js +2 -2
- 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/tabfocus/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/toc/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/plugins/wordcount/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/content/default/content.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/content/document/content.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/content/document/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/content/writer/content.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.mobile.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +7 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.mobile.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.mobile.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4aaea61d27c1c0bb6704630afddb19d3f14145212d5f5e848108673bc3511273
|
|
4
|
+
data.tar.gz: 9b9dfe324d9f7c99d4ef29db48dfec6172b9cdd6649e8e22aa2ed0233eab2e30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5d1a31159b1762107c8880adc91a2fe7edca515742f50ca5965e98f79e1cee261c40446c4b213b40d42276a27d8f0b1c2885ab5d5a51079c2b0d4296e92b5a8
|
|
7
|
+
data.tar.gz: a2718ce136b40b2ef653783f88b6a1580d45393c52c6349be6302cf6e9ac73a0d0ac15728285c7c559bd326d4ef8e87e162e269cf19968563f63cb127a0010a4
|
data/Rakefile
CHANGED
|
@@ -43,10 +43,13 @@ task :rename do
|
|
|
43
43
|
Dir["vendor/assets/javascripts/tinymce/**/*.min.js"].each do |file|
|
|
44
44
|
FileUtils.mv(file, file.sub(/\.min\.js$/, '.js'))
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
Dir["vendor/assets/javascripts/tinymce/**/*.min.css"].each do |file|
|
|
48
|
+
FileUtils.cp(file, file.sub(/\.min\.css$/, '.css'))
|
|
49
|
+
end
|
|
46
50
|
end
|
|
47
51
|
end
|
|
48
52
|
|
|
49
|
-
|
|
50
53
|
require 'rspec/core/rake_task'
|
|
51
54
|
RSpec::Core::RakeTask.new(:spec)
|
|
52
55
|
task :default => :spec
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.0.
|
|
7
|
+
* Version: 5.0.3 (2019-03-19)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
(function (domGlobals) {
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
return slice.call(x);
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
var Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
|
378
|
+
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
|
|
379
379
|
|
|
380
380
|
var path = function (parts, scope) {
|
|
381
381
|
var o = scope !== undefined && scope !== null ? scope : Global;
|
|
@@ -482,8 +482,8 @@
|
|
|
482
482
|
this._deferreds = [];
|
|
483
483
|
doResolve(fn, bind(resolve, this), bind(reject, this));
|
|
484
484
|
};
|
|
485
|
-
var asap = Promise.immediateFn || typeof setImmediate === 'function' && setImmediate || function (fn) {
|
|
486
|
-
setTimeout(fn, 1);
|
|
485
|
+
var asap = Promise.immediateFn || typeof domGlobals.setImmediate === 'function' && domGlobals.setImmediate || function (fn) {
|
|
486
|
+
domGlobals.setTimeout(fn, 1);
|
|
487
487
|
};
|
|
488
488
|
function handle(deferred) {
|
|
489
489
|
var me = this;
|
|
@@ -654,31 +654,31 @@
|
|
|
654
654
|
if (typeof time !== 'number') {
|
|
655
655
|
time = 0;
|
|
656
656
|
}
|
|
657
|
-
return setTimeout(callback, time);
|
|
657
|
+
return domGlobals.setTimeout(callback, time);
|
|
658
658
|
};
|
|
659
659
|
var wrappedSetInterval = function (callback, time) {
|
|
660
660
|
if (typeof time !== 'number') {
|
|
661
661
|
time = 1;
|
|
662
662
|
}
|
|
663
|
-
return setInterval(callback, time);
|
|
663
|
+
return domGlobals.setInterval(callback, time);
|
|
664
664
|
};
|
|
665
665
|
var wrappedClearTimeout = function (id) {
|
|
666
|
-
return clearTimeout(id);
|
|
666
|
+
return domGlobals.clearTimeout(id);
|
|
667
667
|
};
|
|
668
668
|
var wrappedClearInterval = function (id) {
|
|
669
|
-
return clearInterval(id);
|
|
669
|
+
return domGlobals.clearInterval(id);
|
|
670
670
|
};
|
|
671
671
|
var debounce = function (callback, time) {
|
|
672
672
|
var timer, func;
|
|
673
673
|
func = function () {
|
|
674
674
|
var args = arguments;
|
|
675
|
-
clearTimeout(timer);
|
|
675
|
+
domGlobals.clearTimeout(timer);
|
|
676
676
|
timer = wrappedSetTimeout(function () {
|
|
677
677
|
callback.apply(this, args);
|
|
678
678
|
}, time);
|
|
679
679
|
};
|
|
680
680
|
func.stop = function () {
|
|
681
|
-
clearTimeout(timer);
|
|
681
|
+
domGlobals.clearTimeout(timer);
|
|
682
682
|
};
|
|
683
683
|
return func;
|
|
684
684
|
};
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
if (!editor.removed) {
|
|
711
711
|
callback();
|
|
712
712
|
} else {
|
|
713
|
-
clearInterval(timer);
|
|
713
|
+
domGlobals.clearInterval(timer);
|
|
714
714
|
}
|
|
715
715
|
}, time);
|
|
716
716
|
return timer;
|
|
@@ -3681,7 +3681,7 @@
|
|
|
3681
3681
|
};
|
|
3682
3682
|
};
|
|
3683
3683
|
var get = function (obj, key) {
|
|
3684
|
-
return has(obj, key) ? Option.
|
|
3684
|
+
return has(obj, key) ? Option.from(obj[key]) : Option.none();
|
|
3685
3685
|
};
|
|
3686
3686
|
var has = function (obj, key) {
|
|
3687
3687
|
return hasOwnProperty$1.call(obj, key);
|
|
@@ -3989,7 +3989,7 @@
|
|
|
3989
3989
|
};
|
|
3990
3990
|
var call = function (cb) {
|
|
3991
3991
|
data.each(function (x) {
|
|
3992
|
-
setTimeout(function () {
|
|
3992
|
+
domGlobals.setTimeout(function () {
|
|
3993
3993
|
cb(x);
|
|
3994
3994
|
}, 0);
|
|
3995
3995
|
});
|
|
@@ -4018,7 +4018,7 @@
|
|
|
4018
4018
|
args[_i] = arguments[_i];
|
|
4019
4019
|
}
|
|
4020
4020
|
var me = this;
|
|
4021
|
-
setTimeout(function () {
|
|
4021
|
+
domGlobals.setTimeout(function () {
|
|
4022
4022
|
f.apply(me, args);
|
|
4023
4023
|
}, 0);
|
|
4024
4024
|
};
|
|
@@ -6652,8 +6652,8 @@
|
|
|
6652
6652
|
if (isFunction$1(failure)) {
|
|
6653
6653
|
failure();
|
|
6654
6654
|
} else {
|
|
6655
|
-
if (typeof console !== 'undefined' && console.log) {
|
|
6656
|
-
console.log('Failed to load script: ' + url);
|
|
6655
|
+
if (typeof domGlobals.console !== 'undefined' && domGlobals.console.log) {
|
|
6656
|
+
domGlobals.console.log('Failed to load script: ' + url);
|
|
6657
6657
|
}
|
|
6658
6658
|
}
|
|
6659
6659
|
};
|
|
@@ -6764,6 +6764,30 @@
|
|
|
6764
6764
|
};
|
|
6765
6765
|
ScriptLoader.ScriptLoader = new ScriptLoader();
|
|
6766
6766
|
|
|
6767
|
+
var __assign = function () {
|
|
6768
|
+
__assign = Object.assign || function __assign(t) {
|
|
6769
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6770
|
+
s = arguments[i];
|
|
6771
|
+
for (var p in s)
|
|
6772
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6773
|
+
t[p] = s[p];
|
|
6774
|
+
}
|
|
6775
|
+
return t;
|
|
6776
|
+
};
|
|
6777
|
+
return __assign.apply(this, arguments);
|
|
6778
|
+
};
|
|
6779
|
+
function __rest(s, e) {
|
|
6780
|
+
var t = {};
|
|
6781
|
+
for (var p in s)
|
|
6782
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
6783
|
+
t[p] = s[p];
|
|
6784
|
+
if (s != null && typeof Object.getOwnPropertySymbols === 'function')
|
|
6785
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
6786
|
+
if (e.indexOf(p[i]) < 0)
|
|
6787
|
+
t[p[i]] = s[p[i]];
|
|
6788
|
+
return t;
|
|
6789
|
+
}
|
|
6790
|
+
|
|
6767
6791
|
var Cell = function (initial) {
|
|
6768
6792
|
var value = initial;
|
|
6769
6793
|
var get = function () {
|
|
@@ -6790,6 +6814,11 @@
|
|
|
6790
6814
|
};
|
|
6791
6815
|
var data = {};
|
|
6792
6816
|
var currentCode = Cell('en');
|
|
6817
|
+
var getData = function () {
|
|
6818
|
+
return map$2(data, function (value) {
|
|
6819
|
+
return __assign({}, value);
|
|
6820
|
+
});
|
|
6821
|
+
};
|
|
6793
6822
|
var setCode = function (newCode) {
|
|
6794
6823
|
if (newCode) {
|
|
6795
6824
|
currentCode.set(newCode);
|
|
@@ -6855,6 +6884,7 @@
|
|
|
6855
6884
|
return has(data, code);
|
|
6856
6885
|
};
|
|
6857
6886
|
var I18n = {
|
|
6887
|
+
getData: getData,
|
|
6858
6888
|
setCode: setCode,
|
|
6859
6889
|
getCode: getCode,
|
|
6860
6890
|
add: add,
|
|
@@ -7066,7 +7096,7 @@
|
|
|
7066
7096
|
var timer = null;
|
|
7067
7097
|
var cancel = function () {
|
|
7068
7098
|
if (timer !== null) {
|
|
7069
|
-
clearTimeout(timer);
|
|
7099
|
+
domGlobals.clearTimeout(timer);
|
|
7070
7100
|
timer = null;
|
|
7071
7101
|
}
|
|
7072
7102
|
};
|
|
@@ -7076,7 +7106,7 @@
|
|
|
7076
7106
|
args[_i] = arguments[_i];
|
|
7077
7107
|
}
|
|
7078
7108
|
if (timer === null) {
|
|
7079
|
-
timer = setTimeout(function () {
|
|
7109
|
+
timer = domGlobals.setTimeout(function () {
|
|
7080
7110
|
fn.apply(null, args);
|
|
7081
7111
|
timer = null;
|
|
7082
7112
|
}, rate);
|
|
@@ -7091,7 +7121,7 @@
|
|
|
7091
7121
|
var timer = null;
|
|
7092
7122
|
var cancel = function () {
|
|
7093
7123
|
if (timer !== null) {
|
|
7094
|
-
clearTimeout(timer);
|
|
7124
|
+
domGlobals.clearTimeout(timer);
|
|
7095
7125
|
timer = null;
|
|
7096
7126
|
}
|
|
7097
7127
|
};
|
|
@@ -7101,8 +7131,8 @@
|
|
|
7101
7131
|
args[_i] = arguments[_i];
|
|
7102
7132
|
}
|
|
7103
7133
|
if (timer !== null)
|
|
7104
|
-
clearTimeout(timer);
|
|
7105
|
-
timer = setTimeout(function () {
|
|
7134
|
+
domGlobals.clearTimeout(timer);
|
|
7135
|
+
timer = domGlobals.setTimeout(function () {
|
|
7106
7136
|
fn.apply(null, args);
|
|
7107
7137
|
timer = null;
|
|
7108
7138
|
}, rate);
|
|
@@ -7401,30 +7431,6 @@
|
|
|
7401
7431
|
};
|
|
7402
7432
|
};
|
|
7403
7433
|
|
|
7404
|
-
var __assign = function () {
|
|
7405
|
-
__assign = Object.assign || function __assign(t) {
|
|
7406
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7407
|
-
s = arguments[i];
|
|
7408
|
-
for (var p in s)
|
|
7409
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7410
|
-
t[p] = s[p];
|
|
7411
|
-
}
|
|
7412
|
-
return t;
|
|
7413
|
-
};
|
|
7414
|
-
return __assign.apply(this, arguments);
|
|
7415
|
-
};
|
|
7416
|
-
function __rest(s, e) {
|
|
7417
|
-
var t = {};
|
|
7418
|
-
for (var p in s)
|
|
7419
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7420
|
-
t[p] = s[p];
|
|
7421
|
-
if (s != null && typeof Object.getOwnPropertySymbols === 'function')
|
|
7422
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
7423
|
-
if (e.indexOf(p[i]) < 0)
|
|
7424
|
-
t[p[i]] = s[p[i]];
|
|
7425
|
-
return t;
|
|
7426
|
-
}
|
|
7427
|
-
|
|
7428
7434
|
var unique = 0;
|
|
7429
7435
|
var generate = function (prefix) {
|
|
7430
7436
|
var date = new Date();
|
|
@@ -8619,7 +8625,7 @@
|
|
|
8619
8625
|
DomQuery(caretState.caret).remove();
|
|
8620
8626
|
lastVisualCaret.set(Option.none());
|
|
8621
8627
|
});
|
|
8622
|
-
clearInterval(cursorInterval);
|
|
8628
|
+
Delay.clearInterval(cursorInterval);
|
|
8623
8629
|
};
|
|
8624
8630
|
var startBlink = function () {
|
|
8625
8631
|
cursorInterval = Delay.setInterval(function () {
|
|
@@ -10037,74 +10043,6 @@
|
|
|
10037
10043
|
};
|
|
10038
10044
|
}
|
|
10039
10045
|
|
|
10040
|
-
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
10041
|
-
var shallow$1 = function (old, nu) {
|
|
10042
|
-
return nu;
|
|
10043
|
-
};
|
|
10044
|
-
var baseMerge = function (merger) {
|
|
10045
|
-
return function () {
|
|
10046
|
-
var objects = new Array(arguments.length);
|
|
10047
|
-
for (var i = 0; i < objects.length; i++)
|
|
10048
|
-
objects[i] = arguments[i];
|
|
10049
|
-
if (objects.length === 0)
|
|
10050
|
-
throw new Error('Can\'t merge zero objects');
|
|
10051
|
-
var ret = {};
|
|
10052
|
-
for (var j = 0; j < objects.length; j++) {
|
|
10053
|
-
var curObject = objects[j];
|
|
10054
|
-
for (var key in curObject)
|
|
10055
|
-
if (hasOwnProperty$2.call(curObject, key)) {
|
|
10056
|
-
ret[key] = merger(ret[key], curObject[key]);
|
|
10057
|
-
}
|
|
10058
|
-
}
|
|
10059
|
-
return ret;
|
|
10060
|
-
};
|
|
10061
|
-
};
|
|
10062
|
-
var merge = baseMerge(shallow$1);
|
|
10063
|
-
|
|
10064
|
-
var create$3 = function () {
|
|
10065
|
-
var buttons = {};
|
|
10066
|
-
var menuItems = {};
|
|
10067
|
-
var popups = {};
|
|
10068
|
-
var icons = {};
|
|
10069
|
-
var contextMenus = {};
|
|
10070
|
-
var contextToolbars = {};
|
|
10071
|
-
var sidebars = {};
|
|
10072
|
-
var add = function (collection, type) {
|
|
10073
|
-
return function (name, spec) {
|
|
10074
|
-
return collection[name.toLowerCase()] = merge({ type: type }, spec);
|
|
10075
|
-
};
|
|
10076
|
-
};
|
|
10077
|
-
var addIcon = function (name, svgData) {
|
|
10078
|
-
return icons[name.toLowerCase()] = svgData;
|
|
10079
|
-
};
|
|
10080
|
-
return {
|
|
10081
|
-
addButton: add(buttons, 'button'),
|
|
10082
|
-
addToggleButton: add(buttons, 'togglebutton'),
|
|
10083
|
-
addMenuButton: add(buttons, 'menubutton'),
|
|
10084
|
-
addSplitButton: add(buttons, 'splitbutton'),
|
|
10085
|
-
addMenuItem: add(menuItems, 'menuitem'),
|
|
10086
|
-
addNestedMenuItem: add(menuItems, 'nestedmenuitem'),
|
|
10087
|
-
addToggleMenuItem: add(menuItems, 'togglemenuitem'),
|
|
10088
|
-
addAutocompleter: add(popups, 'autocompleter'),
|
|
10089
|
-
addContextMenu: add(contextMenus, 'contextmenu'),
|
|
10090
|
-
addContextToolbar: add(contextToolbars, 'contexttoolbar'),
|
|
10091
|
-
addContextForm: add(contextToolbars, 'contextform'),
|
|
10092
|
-
addSidebar: add(sidebars, 'sidebar'),
|
|
10093
|
-
addIcon: addIcon,
|
|
10094
|
-
getAll: function () {
|
|
10095
|
-
return {
|
|
10096
|
-
buttons: buttons,
|
|
10097
|
-
menuItems: menuItems,
|
|
10098
|
-
icons: icons,
|
|
10099
|
-
popups: popups,
|
|
10100
|
-
contextMenus: contextMenus,
|
|
10101
|
-
contextToolbars: contextToolbars,
|
|
10102
|
-
sidebars: sidebars
|
|
10103
|
-
};
|
|
10104
|
-
}
|
|
10105
|
-
};
|
|
10106
|
-
};
|
|
10107
|
-
|
|
10108
10046
|
var whiteSpaceRegExp$3 = /^[ \t\r\n]*$/;
|
|
10109
10047
|
var typeLookup = {
|
|
10110
10048
|
'#text': 3,
|
|
@@ -11245,7 +11183,7 @@
|
|
|
11245
11183
|
},
|
|
11246
11184
|
match: match,
|
|
11247
11185
|
log: function (label) {
|
|
11248
|
-
console.log(label, {
|
|
11186
|
+
domGlobals.console.log(label, {
|
|
11249
11187
|
constructors: constructors,
|
|
11250
11188
|
constructor: key,
|
|
11251
11189
|
params: args
|
|
@@ -11621,11 +11559,11 @@
|
|
|
11621
11559
|
if (editor.hasHiddenInput && element) {
|
|
11622
11560
|
DOM$1.remove(element.nextSibling);
|
|
11623
11561
|
}
|
|
11562
|
+
Events.fireRemove(editor);
|
|
11563
|
+
editor.editorManager.remove(editor);
|
|
11624
11564
|
if (!editor.inline && body) {
|
|
11625
11565
|
restoreOriginalStyles(editor);
|
|
11626
11566
|
}
|
|
11627
|
-
Events.fireRemove(editor);
|
|
11628
|
-
editor.editorManager.remove(editor);
|
|
11629
11567
|
Events.fireDetach(editor);
|
|
11630
11568
|
DOM$1.remove(editor.getContainer());
|
|
11631
11569
|
safeDestroy(_selectionOverrides);
|
|
@@ -12112,9 +12050,13 @@
|
|
|
12112
12050
|
}
|
|
12113
12051
|
return { icons: {} };
|
|
12114
12052
|
};
|
|
12053
|
+
var has$1 = function (id) {
|
|
12054
|
+
return has(lookup, id);
|
|
12055
|
+
};
|
|
12115
12056
|
return {
|
|
12116
12057
|
add: add,
|
|
12117
|
-
get: get
|
|
12058
|
+
get: get,
|
|
12059
|
+
has: has$1
|
|
12118
12060
|
};
|
|
12119
12061
|
};
|
|
12120
12062
|
var IconManager = CreateIconManager();
|
|
@@ -13662,6 +13604,8 @@
|
|
|
13662
13604
|
SPACEBAR: 32,
|
|
13663
13605
|
TAB: 9,
|
|
13664
13606
|
UP: 38,
|
|
13607
|
+
END: 35,
|
|
13608
|
+
HOME: 36,
|
|
13665
13609
|
modifierPressed: function (e) {
|
|
13666
13610
|
return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e);
|
|
13667
13611
|
},
|
|
@@ -16823,6 +16767,30 @@
|
|
|
16823
16767
|
};
|
|
16824
16768
|
}
|
|
16825
16769
|
|
|
16770
|
+
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
16771
|
+
var shallow$1 = function (old, nu) {
|
|
16772
|
+
return nu;
|
|
16773
|
+
};
|
|
16774
|
+
var baseMerge = function (merger) {
|
|
16775
|
+
return function () {
|
|
16776
|
+
var objects = new Array(arguments.length);
|
|
16777
|
+
for (var i = 0; i < objects.length; i++)
|
|
16778
|
+
objects[i] = arguments[i];
|
|
16779
|
+
if (objects.length === 0)
|
|
16780
|
+
throw new Error('Can\'t merge zero objects');
|
|
16781
|
+
var ret = {};
|
|
16782
|
+
for (var j = 0; j < objects.length; j++) {
|
|
16783
|
+
var curObject = objects[j];
|
|
16784
|
+
for (var key in curObject)
|
|
16785
|
+
if (hasOwnProperty$2.call(curObject, key)) {
|
|
16786
|
+
ret[key] = merger(ret[key], curObject[key]);
|
|
16787
|
+
}
|
|
16788
|
+
}
|
|
16789
|
+
return ret;
|
|
16790
|
+
};
|
|
16791
|
+
};
|
|
16792
|
+
var merge = baseMerge(shallow$1);
|
|
16793
|
+
|
|
16826
16794
|
var register = function (htmlParser, settings, dom) {
|
|
16827
16795
|
htmlParser.addAttributeFilter('data-mce-tabindex', function (nodes, name) {
|
|
16828
16796
|
var i = nodes.length, node;
|
|
@@ -16870,7 +16838,10 @@
|
|
|
16870
16838
|
while (i--) {
|
|
16871
16839
|
node = nodes[i];
|
|
16872
16840
|
if (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup) {
|
|
16873
|
-
|
|
16841
|
+
var hasChildren = Option.from(node.firstChild).exists(function (firstChild) {
|
|
16842
|
+
return !Zwsp.isZwsp(firstChild.value);
|
|
16843
|
+
});
|
|
16844
|
+
if (hasChildren) {
|
|
16874
16845
|
node.unwrap();
|
|
16875
16846
|
} else {
|
|
16876
16847
|
node.remove();
|
|
@@ -19784,6 +19755,121 @@
|
|
|
19784
19755
|
setCaretPosition: setCaretPosition
|
|
19785
19756
|
};
|
|
19786
19757
|
|
|
19758
|
+
var BreakType;
|
|
19759
|
+
(function (BreakType) {
|
|
19760
|
+
BreakType[BreakType['Br'] = 0] = 'Br';
|
|
19761
|
+
BreakType[BreakType['Block'] = 1] = 'Block';
|
|
19762
|
+
BreakType[BreakType['Wrap'] = 2] = 'Wrap';
|
|
19763
|
+
BreakType[BreakType['Eol'] = 3] = 'Eol';
|
|
19764
|
+
}(BreakType || (BreakType = {})));
|
|
19765
|
+
var flip = function (direction, positions) {
|
|
19766
|
+
return direction === HDirection.Backwards ? positions.reverse() : positions;
|
|
19767
|
+
};
|
|
19768
|
+
var walk$3 = function (direction, caretWalker, pos) {
|
|
19769
|
+
return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos);
|
|
19770
|
+
};
|
|
19771
|
+
var getBreakType = function (scope, direction, currentPos, nextPos) {
|
|
19772
|
+
if (NodeType.isBr(nextPos.getNode(direction === HDirection.Forwards))) {
|
|
19773
|
+
return BreakType.Br;
|
|
19774
|
+
} else if (isInSameBlock(currentPos, nextPos) === false) {
|
|
19775
|
+
return BreakType.Block;
|
|
19776
|
+
} else {
|
|
19777
|
+
return BreakType.Wrap;
|
|
19778
|
+
}
|
|
19779
|
+
};
|
|
19780
|
+
var getPositionsUntil = function (predicate, direction, scope, start) {
|
|
19781
|
+
var caretWalker = CaretWalker(scope);
|
|
19782
|
+
var currentPos = start, nextPos;
|
|
19783
|
+
var positions = [];
|
|
19784
|
+
while (currentPos) {
|
|
19785
|
+
nextPos = walk$3(direction, caretWalker, currentPos);
|
|
19786
|
+
if (!nextPos) {
|
|
19787
|
+
break;
|
|
19788
|
+
}
|
|
19789
|
+
if (NodeType.isBr(nextPos.getNode(false))) {
|
|
19790
|
+
if (direction === HDirection.Forwards) {
|
|
19791
|
+
return {
|
|
19792
|
+
positions: flip(direction, positions).concat([nextPos]),
|
|
19793
|
+
breakType: BreakType.Br,
|
|
19794
|
+
breakAt: Option.some(nextPos)
|
|
19795
|
+
};
|
|
19796
|
+
} else {
|
|
19797
|
+
return {
|
|
19798
|
+
positions: flip(direction, positions),
|
|
19799
|
+
breakType: BreakType.Br,
|
|
19800
|
+
breakAt: Option.some(nextPos)
|
|
19801
|
+
};
|
|
19802
|
+
}
|
|
19803
|
+
}
|
|
19804
|
+
if (!nextPos.isVisible()) {
|
|
19805
|
+
currentPos = nextPos;
|
|
19806
|
+
continue;
|
|
19807
|
+
}
|
|
19808
|
+
if (predicate(currentPos, nextPos)) {
|
|
19809
|
+
var breakType = getBreakType(scope, direction, currentPos, nextPos);
|
|
19810
|
+
return {
|
|
19811
|
+
positions: flip(direction, positions),
|
|
19812
|
+
breakType: breakType,
|
|
19813
|
+
breakAt: Option.some(nextPos)
|
|
19814
|
+
};
|
|
19815
|
+
}
|
|
19816
|
+
positions.push(nextPos);
|
|
19817
|
+
currentPos = nextPos;
|
|
19818
|
+
}
|
|
19819
|
+
return {
|
|
19820
|
+
positions: flip(direction, positions),
|
|
19821
|
+
breakType: BreakType.Eol,
|
|
19822
|
+
breakAt: Option.none()
|
|
19823
|
+
};
|
|
19824
|
+
};
|
|
19825
|
+
var getAdjacentLinePositions = function (direction, getPositionsUntilBreak, scope, start) {
|
|
19826
|
+
return getPositionsUntilBreak(scope, start).breakAt.map(function (pos) {
|
|
19827
|
+
var positions = getPositionsUntilBreak(scope, pos).positions;
|
|
19828
|
+
return direction === HDirection.Backwards ? positions.concat(pos) : [pos].concat(positions);
|
|
19829
|
+
}).getOr([]);
|
|
19830
|
+
};
|
|
19831
|
+
var findClosestHorizontalPositionFromPoint = function (positions, x) {
|
|
19832
|
+
return foldl(positions, function (acc, newPos) {
|
|
19833
|
+
return acc.fold(function () {
|
|
19834
|
+
return Option.some(newPos);
|
|
19835
|
+
}, function (lastPos) {
|
|
19836
|
+
return liftN([
|
|
19837
|
+
head(lastPos.getClientRects()),
|
|
19838
|
+
head(newPos.getClientRects())
|
|
19839
|
+
], function (lastRect, newRect) {
|
|
19840
|
+
var lastDist = Math.abs(x - lastRect.left);
|
|
19841
|
+
var newDist = Math.abs(x - newRect.left);
|
|
19842
|
+
return newDist <= lastDist ? newPos : lastPos;
|
|
19843
|
+
}).or(acc);
|
|
19844
|
+
});
|
|
19845
|
+
}, Option.none());
|
|
19846
|
+
};
|
|
19847
|
+
var findClosestHorizontalPosition = function (positions, pos) {
|
|
19848
|
+
return head(pos.getClientRects()).bind(function (targetRect) {
|
|
19849
|
+
return findClosestHorizontalPositionFromPoint(positions, targetRect.left);
|
|
19850
|
+
});
|
|
19851
|
+
};
|
|
19852
|
+
var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
|
|
19853
|
+
var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
|
|
19854
|
+
var isAtFirstLine = function (scope, pos) {
|
|
19855
|
+
return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
|
|
19856
|
+
};
|
|
19857
|
+
var isAtLastLine = function (scope, pos) {
|
|
19858
|
+
return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
|
|
19859
|
+
};
|
|
19860
|
+
var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
|
|
19861
|
+
var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
|
|
19862
|
+
var getFirstLinePositions = function (scope) {
|
|
19863
|
+
return CaretFinder.firstPositionIn(scope).map(function (pos) {
|
|
19864
|
+
return [pos].concat(getPositionsUntilNextLine(scope, pos).positions);
|
|
19865
|
+
}).getOr([]);
|
|
19866
|
+
};
|
|
19867
|
+
var getLastLinePositions = function (scope) {
|
|
19868
|
+
return CaretFinder.lastPositionIn(scope).map(function (pos) {
|
|
19869
|
+
return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos);
|
|
19870
|
+
}).getOr([]);
|
|
19871
|
+
};
|
|
19872
|
+
|
|
19787
19873
|
var isContentEditableFalse$b = NodeType.isContentEditableFalse;
|
|
19788
19874
|
var getSelectedNode$1 = getSelectedNode;
|
|
19789
19875
|
var moveToCeFalseHorizontally = function (direction, editor, getNextPosFn, range) {
|
|
@@ -19949,120 +20035,21 @@
|
|
|
19949
20035
|
}
|
|
19950
20036
|
};
|
|
19951
20037
|
};
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
|
|
19955
|
-
BreakType[BreakType['Br'] = 0] = 'Br';
|
|
19956
|
-
BreakType[BreakType['Block'] = 1] = 'Block';
|
|
19957
|
-
BreakType[BreakType['Wrap'] = 2] = 'Wrap';
|
|
19958
|
-
BreakType[BreakType['Eol'] = 3] = 'Eol';
|
|
19959
|
-
}(BreakType || (BreakType = {})));
|
|
19960
|
-
var flip = function (direction, positions) {
|
|
19961
|
-
return direction === HDirection.Backwards ? positions.reverse() : positions;
|
|
19962
|
-
};
|
|
19963
|
-
var walk$3 = function (direction, caretWalker, pos) {
|
|
19964
|
-
return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos);
|
|
19965
|
-
};
|
|
19966
|
-
var getBreakType = function (scope, direction, currentPos, nextPos) {
|
|
19967
|
-
if (NodeType.isBr(nextPos.getNode(direction === HDirection.Forwards))) {
|
|
19968
|
-
return BreakType.Br;
|
|
19969
|
-
} else if (isInSameBlock(currentPos, nextPos) === false) {
|
|
19970
|
-
return BreakType.Block;
|
|
19971
|
-
} else {
|
|
19972
|
-
return BreakType.Wrap;
|
|
19973
|
-
}
|
|
19974
|
-
};
|
|
19975
|
-
var getPositionsUntil = function (predicate, direction, scope, start) {
|
|
19976
|
-
var caretWalker = CaretWalker(scope);
|
|
19977
|
-
var currentPos = start, nextPos;
|
|
19978
|
-
var positions = [];
|
|
19979
|
-
while (currentPos) {
|
|
19980
|
-
nextPos = walk$3(direction, caretWalker, currentPos);
|
|
19981
|
-
if (!nextPos) {
|
|
19982
|
-
break;
|
|
19983
|
-
}
|
|
19984
|
-
if (NodeType.isBr(nextPos.getNode(false))) {
|
|
19985
|
-
if (direction === HDirection.Forwards) {
|
|
19986
|
-
return {
|
|
19987
|
-
positions: flip(direction, positions).concat([nextPos]),
|
|
19988
|
-
breakType: BreakType.Br,
|
|
19989
|
-
breakAt: Option.some(nextPos)
|
|
19990
|
-
};
|
|
19991
|
-
} else {
|
|
19992
|
-
return {
|
|
19993
|
-
positions: flip(direction, positions),
|
|
19994
|
-
breakType: BreakType.Br,
|
|
19995
|
-
breakAt: Option.some(nextPos)
|
|
19996
|
-
};
|
|
19997
|
-
}
|
|
19998
|
-
}
|
|
19999
|
-
if (!nextPos.isVisible()) {
|
|
20000
|
-
currentPos = nextPos;
|
|
20001
|
-
continue;
|
|
20002
|
-
}
|
|
20003
|
-
if (predicate(currentPos, nextPos)) {
|
|
20004
|
-
var breakType = getBreakType(scope, direction, currentPos, nextPos);
|
|
20005
|
-
return {
|
|
20006
|
-
positions: flip(direction, positions),
|
|
20007
|
-
breakType: breakType,
|
|
20008
|
-
breakAt: Option.some(nextPos)
|
|
20009
|
-
};
|
|
20010
|
-
}
|
|
20011
|
-
positions.push(nextPos);
|
|
20012
|
-
currentPos = nextPos;
|
|
20013
|
-
}
|
|
20014
|
-
return {
|
|
20015
|
-
positions: flip(direction, positions),
|
|
20016
|
-
breakType: BreakType.Eol,
|
|
20017
|
-
breakAt: Option.none()
|
|
20038
|
+
var isCefPosition = function (forward) {
|
|
20039
|
+
return function (pos) {
|
|
20040
|
+
return forward ? isAfterContentEditableFalse(pos) : isBeforeContentEditableFalse(pos);
|
|
20018
20041
|
};
|
|
20019
20042
|
};
|
|
20020
|
-
var
|
|
20021
|
-
return
|
|
20022
|
-
var
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
return acc.fold(function () {
|
|
20029
|
-
return Option.some(newPos);
|
|
20030
|
-
}, function (lastPos) {
|
|
20031
|
-
return liftN([
|
|
20032
|
-
head(lastPos.getClientRects()),
|
|
20033
|
-
head(newPos.getClientRects())
|
|
20034
|
-
], function (lastRect, newRect) {
|
|
20035
|
-
var lastDist = Math.abs(x - lastRect.left);
|
|
20036
|
-
var newDist = Math.abs(x - newRect.left);
|
|
20037
|
-
return newDist <= lastDist ? newPos : lastPos;
|
|
20038
|
-
}).or(acc);
|
|
20043
|
+
var moveToLineEndPoint = function (editor, forward) {
|
|
20044
|
+
return function () {
|
|
20045
|
+
var from = forward ? CaretPosition$1.fromRangeEnd(editor.selection.getRng()) : CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
|
20046
|
+
var result = forward ? getPositionsUntilNextLine(editor.getBody(), from) : getPositionsUntilPreviousLine(editor.getBody(), from);
|
|
20047
|
+
var to = forward ? last(result.positions) : head(result.positions);
|
|
20048
|
+
return to.filter(isCefPosition(forward)).fold(constant(false), function (pos) {
|
|
20049
|
+
editor.selection.setRng(pos.toRange());
|
|
20050
|
+
return true;
|
|
20039
20051
|
});
|
|
20040
|
-
}
|
|
20041
|
-
};
|
|
20042
|
-
var findClosestHorizontalPosition = function (positions, pos) {
|
|
20043
|
-
return head(pos.getClientRects()).bind(function (targetRect) {
|
|
20044
|
-
return findClosestHorizontalPositionFromPoint(positions, targetRect.left);
|
|
20045
|
-
});
|
|
20046
|
-
};
|
|
20047
|
-
var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
|
|
20048
|
-
var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
|
|
20049
|
-
var isAtFirstLine = function (scope, pos) {
|
|
20050
|
-
return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
|
|
20051
|
-
};
|
|
20052
|
-
var isAtLastLine = function (scope, pos) {
|
|
20053
|
-
return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
|
|
20054
|
-
};
|
|
20055
|
-
var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
|
|
20056
|
-
var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
|
|
20057
|
-
var getFirstLinePositions = function (scope) {
|
|
20058
|
-
return CaretFinder.firstPositionIn(scope).map(function (pos) {
|
|
20059
|
-
return [pos].concat(getPositionsUntilNextLine(scope, pos).positions);
|
|
20060
|
-
}).getOr([]);
|
|
20061
|
-
};
|
|
20062
|
-
var getLastLinePositions = function (scope) {
|
|
20063
|
-
return CaretFinder.lastPositionIn(scope).map(function (pos) {
|
|
20064
|
-
return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos);
|
|
20065
|
-
}).getOr([]);
|
|
20052
|
+
};
|
|
20066
20053
|
};
|
|
20067
20054
|
|
|
20068
20055
|
var deflate = function (rect, delta) {
|
|
@@ -21259,19 +21246,28 @@
|
|
|
21259
21246
|
var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
|
21260
21247
|
return getParentCell(rootElm, startElm).bind(function (fromCell) {
|
|
21261
21248
|
return Empty.isEmpty(fromCell) ? emptyElement(editor, fromCell) : deleteBetweenCells(editor, rootElm, forward, fromCell, from);
|
|
21262
|
-
});
|
|
21249
|
+
}).getOr(false);
|
|
21263
21250
|
};
|
|
21264
21251
|
var deleteCaretCaption = function (editor, forward, rootElm, fromCaption) {
|
|
21265
21252
|
var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
|
21266
21253
|
return Empty.isEmpty(fromCaption) ? emptyElement(editor, fromCaption) : deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from);
|
|
21267
21254
|
};
|
|
21255
|
+
var isNearTable = function (forward, pos) {
|
|
21256
|
+
return forward ? isBeforeTable(pos) : isAfterTable(pos);
|
|
21257
|
+
};
|
|
21258
|
+
var isBeforeOrAfterTable = function (editor, forward) {
|
|
21259
|
+
var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
|
21260
|
+
return isNearTable(forward, fromPos) || CaretFinder.fromPosition(forward, editor.getBody(), fromPos).map(function (pos) {
|
|
21261
|
+
return isNearTable(forward, pos);
|
|
21262
|
+
}).getOr(false);
|
|
21263
|
+
};
|
|
21268
21264
|
var deleteCaret$1 = function (editor, forward, startElm) {
|
|
21269
21265
|
var rootElm = Element.fromDom(editor.getBody());
|
|
21270
21266
|
return getParentCaption(rootElm, startElm).fold(function () {
|
|
21271
|
-
return deleteCaretCells(editor, forward, rootElm, startElm);
|
|
21267
|
+
return deleteCaretCells(editor, forward, rootElm, startElm) || isBeforeOrAfterTable(editor, forward);
|
|
21272
21268
|
}, function (fromCaption) {
|
|
21273
|
-
return deleteCaretCaption(editor, forward, rootElm, fromCaption);
|
|
21274
|
-
})
|
|
21269
|
+
return deleteCaretCaption(editor, forward, rootElm, fromCaption).getOr(false);
|
|
21270
|
+
});
|
|
21275
21271
|
};
|
|
21276
21272
|
var backspaceDelete$6 = function (editor, forward) {
|
|
21277
21273
|
var startElm = Element.fromDom(editor.selection.getStart(true));
|
|
@@ -22445,7 +22441,30 @@
|
|
|
22445
22441
|
});
|
|
22446
22442
|
};
|
|
22447
22443
|
|
|
22444
|
+
var executeKeydownOverride$3 = function (editor, evt) {
|
|
22445
|
+
MatchKeys.execute([
|
|
22446
|
+
{
|
|
22447
|
+
keyCode: VK.END,
|
|
22448
|
+
action: moveToLineEndPoint(editor, true)
|
|
22449
|
+
},
|
|
22450
|
+
{
|
|
22451
|
+
keyCode: VK.HOME,
|
|
22452
|
+
action: moveToLineEndPoint(editor, false)
|
|
22453
|
+
}
|
|
22454
|
+
], evt).each(function (_) {
|
|
22455
|
+
evt.preventDefault();
|
|
22456
|
+
});
|
|
22457
|
+
};
|
|
22448
22458
|
var setup$d = function (editor) {
|
|
22459
|
+
editor.on('keydown', function (evt) {
|
|
22460
|
+
if (evt.isDefaultPrevented() === false) {
|
|
22461
|
+
executeKeydownOverride$3(editor, evt);
|
|
22462
|
+
}
|
|
22463
|
+
});
|
|
22464
|
+
};
|
|
22465
|
+
var HomeEndKeys = { setup: setup$d };
|
|
22466
|
+
|
|
22467
|
+
var setup$e = function (editor) {
|
|
22449
22468
|
var caret = BoundarySelection.setupSelectedState(editor);
|
|
22450
22469
|
CaretContainerInput.setup(editor);
|
|
22451
22470
|
ArrowKeys.setup(editor, caret);
|
|
@@ -22453,8 +22472,9 @@
|
|
|
22453
22472
|
EnterKey.setup(editor);
|
|
22454
22473
|
SpaceKey.setup(editor);
|
|
22455
22474
|
setup$c(editor);
|
|
22475
|
+
HomeEndKeys.setup(editor);
|
|
22456
22476
|
};
|
|
22457
|
-
var KeyboardOverrides = { setup: setup$
|
|
22477
|
+
var KeyboardOverrides = { setup: setup$e };
|
|
22458
22478
|
|
|
22459
22479
|
function Quirks (editor) {
|
|
22460
22480
|
var each = Tools.each;
|
|
@@ -22908,7 +22928,7 @@
|
|
|
22908
22928
|
}
|
|
22909
22929
|
editor.selection.setRng(RangeNormalizer.normalize(rng));
|
|
22910
22930
|
};
|
|
22911
|
-
var setup$
|
|
22931
|
+
var setup$f = function (editor) {
|
|
22912
22932
|
editor.on('click', function (e) {
|
|
22913
22933
|
if (e.detail >= 3) {
|
|
22914
22934
|
normalizeSelection$1(editor);
|
|
@@ -22938,7 +22958,7 @@
|
|
|
22938
22958
|
});
|
|
22939
22959
|
});
|
|
22940
22960
|
};
|
|
22941
|
-
var setup$
|
|
22961
|
+
var setup$g = function (editor) {
|
|
22942
22962
|
preventSummaryToggle(editor);
|
|
22943
22963
|
filterDetails(editor);
|
|
22944
22964
|
};
|
|
@@ -23103,8 +23123,8 @@
|
|
|
23103
23123
|
editor.undoManager = UndoManager(editor);
|
|
23104
23124
|
editor._nodeChangeDispatcher = new NodeChange(editor);
|
|
23105
23125
|
editor._selectionOverrides = SelectionOverrides(editor);
|
|
23126
|
+
setup$g(editor);
|
|
23106
23127
|
setup$f(editor);
|
|
23107
|
-
setup$e(editor);
|
|
23108
23128
|
KeyboardOverrides.setup(editor);
|
|
23109
23129
|
ForceBlocks.setup(editor);
|
|
23110
23130
|
editor.fire('PreInit');
|
|
@@ -23427,10 +23447,13 @@
|
|
|
23427
23447
|
};
|
|
23428
23448
|
var initIcons = function (editor) {
|
|
23429
23449
|
var iconPackName = Tools.trim(editor.settings.icons);
|
|
23450
|
+
var currentIcons = editor.ui.registry.getAll().icons;
|
|
23430
23451
|
var defaultIcons = getAll();
|
|
23431
23452
|
var loadIcons = __assign({}, defaultIcons, IconManager.get(iconPackName).icons);
|
|
23432
23453
|
each$3(loadIcons, function (svgData, icon) {
|
|
23433
|
-
|
|
23454
|
+
if (!has(currentIcons, icon)) {
|
|
23455
|
+
editor.ui.registry.addIcon(icon, svgData);
|
|
23456
|
+
}
|
|
23434
23457
|
});
|
|
23435
23458
|
};
|
|
23436
23459
|
var initTheme = function (editor) {
|
|
@@ -23536,10 +23559,10 @@
|
|
|
23536
23559
|
callback();
|
|
23537
23560
|
}
|
|
23538
23561
|
};
|
|
23539
|
-
var loadIcons = function (
|
|
23540
|
-
var iconPackName =
|
|
23541
|
-
if (
|
|
23542
|
-
var urlString = editor.editorManager.baseURL + '/icons/' +
|
|
23562
|
+
var loadIcons = function (editor) {
|
|
23563
|
+
var iconPackName = Tools.trim(editor.getParam('icons', '', 'string'));
|
|
23564
|
+
if (iconPackName.length > 0 && !IconManager.has(iconPackName)) {
|
|
23565
|
+
var urlString = editor.editorManager.baseURL + '/icons/' + iconPackName + '/icons.js';
|
|
23543
23566
|
ScriptLoader.ScriptLoader.add(urlString);
|
|
23544
23567
|
}
|
|
23545
23568
|
};
|
|
@@ -23580,7 +23603,7 @@
|
|
|
23580
23603
|
var scriptLoader = ScriptLoader.ScriptLoader;
|
|
23581
23604
|
loadTheme(scriptLoader, editor, suffix, function () {
|
|
23582
23605
|
loadLanguage(scriptLoader, editor);
|
|
23583
|
-
loadIcons(editor
|
|
23606
|
+
loadIcons(editor);
|
|
23584
23607
|
loadPlugins(editor.settings, suffix);
|
|
23585
23608
|
scriptLoader.loadQueue(function () {
|
|
23586
23609
|
if (!editor.removed) {
|
|
@@ -25493,6 +25516,70 @@
|
|
|
25493
25516
|
return baseUrl;
|
|
25494
25517
|
};
|
|
25495
25518
|
|
|
25519
|
+
var create$3 = function () {
|
|
25520
|
+
var buttons = {};
|
|
25521
|
+
var menuItems = {};
|
|
25522
|
+
var popups = {};
|
|
25523
|
+
var icons = {};
|
|
25524
|
+
var contextMenus = {};
|
|
25525
|
+
var contextToolbars = {};
|
|
25526
|
+
var sidebars = {};
|
|
25527
|
+
var add = function (collection, type) {
|
|
25528
|
+
return function (name, spec) {
|
|
25529
|
+
return collection[name.toLowerCase()] = merge({ type: type }, spec);
|
|
25530
|
+
};
|
|
25531
|
+
};
|
|
25532
|
+
var addIcon = function (name, svgData) {
|
|
25533
|
+
return icons[name.toLowerCase()] = svgData;
|
|
25534
|
+
};
|
|
25535
|
+
return {
|
|
25536
|
+
addButton: add(buttons, 'button'),
|
|
25537
|
+
addToggleButton: add(buttons, 'togglebutton'),
|
|
25538
|
+
addMenuButton: add(buttons, 'menubutton'),
|
|
25539
|
+
addSplitButton: add(buttons, 'splitbutton'),
|
|
25540
|
+
addMenuItem: add(menuItems, 'menuitem'),
|
|
25541
|
+
addNestedMenuItem: add(menuItems, 'nestedmenuitem'),
|
|
25542
|
+
addToggleMenuItem: add(menuItems, 'togglemenuitem'),
|
|
25543
|
+
addAutocompleter: add(popups, 'autocompleter'),
|
|
25544
|
+
addContextMenu: add(contextMenus, 'contextmenu'),
|
|
25545
|
+
addContextToolbar: add(contextToolbars, 'contexttoolbar'),
|
|
25546
|
+
addContextForm: add(contextToolbars, 'contextform'),
|
|
25547
|
+
addSidebar: add(sidebars, 'sidebar'),
|
|
25548
|
+
addIcon: addIcon,
|
|
25549
|
+
getAll: function () {
|
|
25550
|
+
return {
|
|
25551
|
+
buttons: buttons,
|
|
25552
|
+
menuItems: menuItems,
|
|
25553
|
+
icons: icons,
|
|
25554
|
+
popups: popups,
|
|
25555
|
+
contextMenus: contextMenus,
|
|
25556
|
+
contextToolbars: contextToolbars,
|
|
25557
|
+
sidebars: sidebars
|
|
25558
|
+
};
|
|
25559
|
+
}
|
|
25560
|
+
};
|
|
25561
|
+
};
|
|
25562
|
+
|
|
25563
|
+
var registry = function () {
|
|
25564
|
+
var bridge = create$3();
|
|
25565
|
+
return {
|
|
25566
|
+
addAutocompleter: bridge.addAutocompleter,
|
|
25567
|
+
addButton: bridge.addButton,
|
|
25568
|
+
addContextForm: bridge.addContextForm,
|
|
25569
|
+
addContextMenu: bridge.addContextMenu,
|
|
25570
|
+
addContextToolbar: bridge.addContextToolbar,
|
|
25571
|
+
addIcon: bridge.addIcon,
|
|
25572
|
+
addMenuButton: bridge.addMenuButton,
|
|
25573
|
+
addMenuItem: bridge.addMenuItem,
|
|
25574
|
+
addNestedMenuItem: bridge.addNestedMenuItem,
|
|
25575
|
+
addSidebar: bridge.addSidebar,
|
|
25576
|
+
addSplitButton: bridge.addSplitButton,
|
|
25577
|
+
addToggleButton: bridge.addToggleButton,
|
|
25578
|
+
addToggleMenuItem: bridge.addToggleMenuItem,
|
|
25579
|
+
getAll: bridge.getAll
|
|
25580
|
+
};
|
|
25581
|
+
};
|
|
25582
|
+
|
|
25496
25583
|
var DOM$7 = DOMUtils$1.DOM;
|
|
25497
25584
|
var extend$4 = Tools.extend, each$j = Tools.each;
|
|
25498
25585
|
var resolve$4 = Tools.resolve;
|
|
@@ -25526,8 +25613,7 @@
|
|
|
25526
25613
|
if (settings.override_viewport === false) {
|
|
25527
25614
|
Env.overrideViewPort = false;
|
|
25528
25615
|
}
|
|
25529
|
-
|
|
25530
|
-
self.ui = { registry: registry };
|
|
25616
|
+
self.ui = { registry: registry() };
|
|
25531
25617
|
editorManager.fire('SetupEditor', { editor: self });
|
|
25532
25618
|
self.execCallback('setup', self);
|
|
25533
25619
|
self.$ = DomQuery.overrideDefaults(function () {
|
|
@@ -25977,12 +26063,12 @@
|
|
|
25977
26063
|
documentFocusInHandler = null;
|
|
25978
26064
|
}
|
|
25979
26065
|
};
|
|
25980
|
-
var setup$
|
|
26066
|
+
var setup$h = function (editorManager) {
|
|
25981
26067
|
editorManager.on('AddEditor', curry(registerEvents, editorManager));
|
|
25982
26068
|
editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager));
|
|
25983
26069
|
};
|
|
25984
26070
|
var FocusController = {
|
|
25985
|
-
setup: setup$
|
|
26071
|
+
setup: setup$h,
|
|
25986
26072
|
isEditorUIElement: isEditorUIElement$1,
|
|
25987
26073
|
isUIElement: isUIElement
|
|
25988
26074
|
};
|
|
@@ -26052,8 +26138,8 @@
|
|
|
26052
26138
|
defaultSettings: {},
|
|
26053
26139
|
$: DomQuery,
|
|
26054
26140
|
majorVersion: '5',
|
|
26055
|
-
minorVersion: '0.
|
|
26056
|
-
releaseDate: '2019-03-
|
|
26141
|
+
minorVersion: '0.3',
|
|
26142
|
+
releaseDate: '2019-03-19',
|
|
26057
26143
|
editors: legacyEditors,
|
|
26058
26144
|
i18n: I18n,
|
|
26059
26145
|
activeEditor: null,
|
|
@@ -26812,7 +26898,7 @@
|
|
|
26812
26898
|
}
|
|
26813
26899
|
xhr = null;
|
|
26814
26900
|
} else {
|
|
26815
|
-
setTimeout(ready, 10);
|
|
26901
|
+
Delay.setTimeout(ready, 10);
|
|
26816
26902
|
}
|
|
26817
26903
|
};
|
|
26818
26904
|
settings.scope = settings.scope || this;
|
|
@@ -26847,7 +26933,7 @@
|
|
|
26847
26933
|
if (!settings.async) {
|
|
26848
26934
|
return ready();
|
|
26849
26935
|
}
|
|
26850
|
-
setTimeout(ready, 10);
|
|
26936
|
+
Delay.setTimeout(ready, 10);
|
|
26851
26937
|
}
|
|
26852
26938
|
}
|
|
26853
26939
|
};
|