tinymce-rails 4.3.8 → 4.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/source/tinymce/tinymce.js +679 -374
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.js +13 -13
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5398fec14da6871a2fbc62b1523d6fbe42988ac
|
4
|
+
data.tar.gz: d6bbbfd2a8d3c2d20fd6795d589896dab8eeed4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ab1350552111c75a21d5e7ed164555b9a67d0ca6140ee6b5d77857df663363dc0f93a3f1542b3a30a54d066daf72340ccdeb8f17c8f0bf4304cd5f149213846
|
7
|
+
data.tar.gz: 42e1d8ec35f69a26b4a717be27c402f4abf008c4c937704adb1f75b3fb874f266bfebf688a814515ae1713e4bd690f3d830f25d8068be94e184150394b78b08b
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.3.
|
1
|
+
// 4.3.12 (2016-05-10)
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Compiled inline version. (Library mode)
|
@@ -713,6 +713,186 @@ define("tinymce/util/Delay", [
|
|
713
713
|
};
|
714
714
|
});
|
715
715
|
|
716
|
+
// Included from: js/tinymce/classes/Env.js
|
717
|
+
|
718
|
+
/**
|
719
|
+
* Env.js
|
720
|
+
*
|
721
|
+
* Released under LGPL License.
|
722
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
723
|
+
*
|
724
|
+
* License: http://www.tinymce.com/license
|
725
|
+
* Contributing: http://www.tinymce.com/contributing
|
726
|
+
*/
|
727
|
+
|
728
|
+
/**
|
729
|
+
* This class contains various environment constants like browser versions etc.
|
730
|
+
* Normally you don't want to sniff specific browser versions but sometimes you have
|
731
|
+
* to when it's impossible to feature detect. So use this with care.
|
732
|
+
*
|
733
|
+
* @class tinymce.Env
|
734
|
+
* @static
|
735
|
+
*/
|
736
|
+
define("tinymce/Env", [], function() {
|
737
|
+
var nav = navigator, userAgent = nav.userAgent;
|
738
|
+
var opera, webkit, ie, ie11, ie12, gecko, mac, iDevice, android, fileApi, phone, tablet, windowsPhone;
|
739
|
+
|
740
|
+
function matchMediaQuery(query) {
|
741
|
+
return "matchMedia" in window ? matchMedia(query).matches : false;
|
742
|
+
}
|
743
|
+
|
744
|
+
opera = window.opera && window.opera.buildNumber;
|
745
|
+
android = /Android/.test(userAgent);
|
746
|
+
webkit = /WebKit/.test(userAgent);
|
747
|
+
ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);
|
748
|
+
ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
|
749
|
+
ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;
|
750
|
+
ie12 = (userAgent.indexOf('Edge/') != -1 && !ie && !ie11) ? 12 : false;
|
751
|
+
ie = ie || ie11 || ie12;
|
752
|
+
gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
|
753
|
+
mac = userAgent.indexOf('Mac') != -1;
|
754
|
+
iDevice = /(iPad|iPhone)/.test(userAgent);
|
755
|
+
fileApi = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL;
|
756
|
+
phone = matchMediaQuery("only screen and (max-device-width: 480px)") && (android || iDevice);
|
757
|
+
tablet = matchMediaQuery("only screen and (min-width: 800px)") && (android || iDevice);
|
758
|
+
windowsPhone = userAgent.indexOf('Windows Phone') != -1;
|
759
|
+
|
760
|
+
if (ie12) {
|
761
|
+
webkit = false;
|
762
|
+
}
|
763
|
+
|
764
|
+
// Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions
|
765
|
+
// says it has contentEditable support but there is no visible caret.
|
766
|
+
var contentEditable = !iDevice || fileApi || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534;
|
767
|
+
|
768
|
+
return {
|
769
|
+
/**
|
770
|
+
* Constant that is true if the browser is Opera.
|
771
|
+
*
|
772
|
+
* @property opera
|
773
|
+
* @type Boolean
|
774
|
+
* @final
|
775
|
+
*/
|
776
|
+
opera: opera,
|
777
|
+
|
778
|
+
/**
|
779
|
+
* Constant that is true if the browser is WebKit (Safari/Chrome).
|
780
|
+
*
|
781
|
+
* @property webKit
|
782
|
+
* @type Boolean
|
783
|
+
* @final
|
784
|
+
*/
|
785
|
+
webkit: webkit,
|
786
|
+
|
787
|
+
/**
|
788
|
+
* Constant that is more than zero if the browser is IE.
|
789
|
+
*
|
790
|
+
* @property ie
|
791
|
+
* @type Boolean
|
792
|
+
* @final
|
793
|
+
*/
|
794
|
+
ie: ie,
|
795
|
+
|
796
|
+
/**
|
797
|
+
* Constant that is true if the browser is Gecko.
|
798
|
+
*
|
799
|
+
* @property gecko
|
800
|
+
* @type Boolean
|
801
|
+
* @final
|
802
|
+
*/
|
803
|
+
gecko: gecko,
|
804
|
+
|
805
|
+
/**
|
806
|
+
* Constant that is true if the os is Mac OS.
|
807
|
+
*
|
808
|
+
* @property mac
|
809
|
+
* @type Boolean
|
810
|
+
* @final
|
811
|
+
*/
|
812
|
+
mac: mac,
|
813
|
+
|
814
|
+
/**
|
815
|
+
* Constant that is true if the os is iOS.
|
816
|
+
*
|
817
|
+
* @property iOS
|
818
|
+
* @type Boolean
|
819
|
+
* @final
|
820
|
+
*/
|
821
|
+
iOS: iDevice,
|
822
|
+
|
823
|
+
/**
|
824
|
+
* Constant that is true if the os is android.
|
825
|
+
*
|
826
|
+
* @property android
|
827
|
+
* @type Boolean
|
828
|
+
* @final
|
829
|
+
*/
|
830
|
+
android: android,
|
831
|
+
|
832
|
+
/**
|
833
|
+
* Constant that is true if the browser supports editing.
|
834
|
+
*
|
835
|
+
* @property contentEditable
|
836
|
+
* @type Boolean
|
837
|
+
* @final
|
838
|
+
*/
|
839
|
+
contentEditable: contentEditable,
|
840
|
+
|
841
|
+
/**
|
842
|
+
* Transparent image data url.
|
843
|
+
*
|
844
|
+
* @property transparentSrc
|
845
|
+
* @type Boolean
|
846
|
+
* @final
|
847
|
+
*/
|
848
|
+
transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
849
|
+
|
850
|
+
/**
|
851
|
+
* Returns true/false if the browser can or can't place the caret after a inline block like an image.
|
852
|
+
*
|
853
|
+
* @property noCaretAfter
|
854
|
+
* @type Boolean
|
855
|
+
* @final
|
856
|
+
*/
|
857
|
+
caretAfter: ie != 8,
|
858
|
+
|
859
|
+
/**
|
860
|
+
* Constant that is true if the browser supports native DOM Ranges. IE 9+.
|
861
|
+
*
|
862
|
+
* @property range
|
863
|
+
* @type Boolean
|
864
|
+
*/
|
865
|
+
range: window.getSelection && "Range" in window,
|
866
|
+
|
867
|
+
/**
|
868
|
+
* Returns the IE document mode for non IE browsers this will fake IE 10.
|
869
|
+
*
|
870
|
+
* @property documentMode
|
871
|
+
* @type Number
|
872
|
+
*/
|
873
|
+
documentMode: ie && !ie12 ? (document.documentMode || 7) : 10,
|
874
|
+
|
875
|
+
/**
|
876
|
+
* Constant that is true if the browser has a modern file api.
|
877
|
+
*
|
878
|
+
* @property fileApi
|
879
|
+
* @type Boolean
|
880
|
+
*/
|
881
|
+
fileApi: fileApi,
|
882
|
+
|
883
|
+
/**
|
884
|
+
* Constant that is true if the browser supports contentEditable=false regions.
|
885
|
+
*
|
886
|
+
* @property ceFalse
|
887
|
+
* @type Boolean
|
888
|
+
*/
|
889
|
+
ceFalse: (ie === false || ie > 8),
|
890
|
+
|
891
|
+
desktop: !phone && !tablet,
|
892
|
+
windowsPhone: windowsPhone
|
893
|
+
};
|
894
|
+
});
|
895
|
+
|
716
896
|
// Included from: js/tinymce/classes/dom/EventUtils.js
|
717
897
|
|
718
898
|
/**
|
@@ -734,8 +914,9 @@ define("tinymce/util/Delay", [
|
|
734
914
|
* @class tinymce.dom.EventUtils
|
735
915
|
*/
|
736
916
|
define("tinymce/dom/EventUtils", [
|
737
|
-
"tinymce/util/Delay"
|
738
|
-
|
917
|
+
"tinymce/util/Delay",
|
918
|
+
"tinymce/Env"
|
919
|
+
], function(Delay, Env) {
|
739
920
|
"use strict";
|
740
921
|
|
741
922
|
var eventExpandoPrefix = "mce-data-";
|
@@ -764,6 +945,32 @@ define("tinymce/dom/EventUtils", [
|
|
764
945
|
}
|
765
946
|
}
|
766
947
|
|
948
|
+
/**
|
949
|
+
* Gets the event target based on shadow dom properties like path and deepPath.
|
950
|
+
*/
|
951
|
+
function getTargetFromShadowDom(event, defaultTarget) {
|
952
|
+
var path, target = defaultTarget;
|
953
|
+
|
954
|
+
// When target element is inside Shadow DOM we need to take first element from path
|
955
|
+
// otherwise we'll get Shadow Root parent, not actual target element
|
956
|
+
|
957
|
+
// Normalize target for WebComponents v0 implementation (in Chrome)
|
958
|
+
path = event.path;
|
959
|
+
if (path && path.length > 0) {
|
960
|
+
target = path[0];
|
961
|
+
}
|
962
|
+
|
963
|
+
// Normalize target for WebComponents v1 implementation (standard)
|
964
|
+
if (event.deepPath) {
|
965
|
+
path = event.deepPath();
|
966
|
+
if (path && path.length > 0) {
|
967
|
+
target = path[0];
|
968
|
+
}
|
969
|
+
}
|
970
|
+
|
971
|
+
return target;
|
972
|
+
}
|
973
|
+
|
767
974
|
/**
|
768
975
|
* Normalizes a native event object or just adds the event specific methods on a custom event.
|
769
976
|
*/
|
@@ -793,17 +1000,9 @@ define("tinymce/dom/EventUtils", [
|
|
793
1000
|
event.target = event.srcElement || document;
|
794
1001
|
}
|
795
1002
|
|
796
|
-
//
|
797
|
-
|
798
|
-
|
799
|
-
// Normalize target for WebComponents v0 implementation (in Chrome)
|
800
|
-
if (event.path) {
|
801
|
-
event.target = event.path[0];
|
802
|
-
}
|
803
|
-
|
804
|
-
// Normalize target for WebComponents v1 implementation (standard)
|
805
|
-
if (event.deepPath) {
|
806
|
-
event.target = event.deepPath[0];
|
1003
|
+
// Experimental shadow dom support
|
1004
|
+
if (Env.experimentalShadowDom) {
|
1005
|
+
event.target = getTargetFromShadowDom(originalEvent, event.target);
|
807
1006
|
}
|
808
1007
|
|
809
1008
|
// Calculate pageX/Y if missing and clientX/Y available
|
@@ -1778,6 +1977,17 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1778
1977
|
doc = node ? node.ownerDocument || node : preferredDoc,
|
1779
1978
|
parent = doc.defaultView;
|
1780
1979
|
|
1980
|
+
function getTop(win) {
|
1981
|
+
// Edge throws a lovely Object expected if you try to get top on a detached reference see #2642
|
1982
|
+
try {
|
1983
|
+
return win.top;
|
1984
|
+
} catch (ex) {
|
1985
|
+
// Ignore
|
1986
|
+
}
|
1987
|
+
|
1988
|
+
return null;
|
1989
|
+
}
|
1990
|
+
|
1781
1991
|
// If no document and documentElement is available, return
|
1782
1992
|
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
1783
1993
|
return document;
|
@@ -1794,7 +2004,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1794
2004
|
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
|
1795
2005
|
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
|
1796
2006
|
// IE6-8 do not support the defaultView property so parent will be undefined
|
1797
|
-
if ( parent && parent !== parent
|
2007
|
+
if ( parent && parent !== getTop(parent) ) {
|
1798
2008
|
// IE11 does not have attachEvent, so all must suffer
|
1799
2009
|
if ( parent.addEventListener ) {
|
1800
2010
|
parent.addEventListener( "unload", function() {
|
@@ -3341,186 +3551,6 @@ return Sizzle;
|
|
3341
3551
|
|
3342
3552
|
/*eslint-enable */
|
3343
3553
|
|
3344
|
-
// Included from: js/tinymce/classes/Env.js
|
3345
|
-
|
3346
|
-
/**
|
3347
|
-
* Env.js
|
3348
|
-
*
|
3349
|
-
* Released under LGPL License.
|
3350
|
-
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
3351
|
-
*
|
3352
|
-
* License: http://www.tinymce.com/license
|
3353
|
-
* Contributing: http://www.tinymce.com/contributing
|
3354
|
-
*/
|
3355
|
-
|
3356
|
-
/**
|
3357
|
-
* This class contains various environment constants like browser versions etc.
|
3358
|
-
* Normally you don't want to sniff specific browser versions but sometimes you have
|
3359
|
-
* to when it's impossible to feature detect. So use this with care.
|
3360
|
-
*
|
3361
|
-
* @class tinymce.Env
|
3362
|
-
* @static
|
3363
|
-
*/
|
3364
|
-
define("tinymce/Env", [], function() {
|
3365
|
-
var nav = navigator, userAgent = nav.userAgent;
|
3366
|
-
var opera, webkit, ie, ie11, ie12, gecko, mac, iDevice, android, fileApi, phone, tablet, windowsPhone;
|
3367
|
-
|
3368
|
-
function matchMediaQuery(query) {
|
3369
|
-
return "matchMedia" in window ? matchMedia(query).matches : false;
|
3370
|
-
}
|
3371
|
-
|
3372
|
-
opera = window.opera && window.opera.buildNumber;
|
3373
|
-
android = /Android/.test(userAgent);
|
3374
|
-
webkit = /WebKit/.test(userAgent);
|
3375
|
-
ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);
|
3376
|
-
ie = ie && /MSIE (\w+)\./.exec(userAgent)[1];
|
3377
|
-
ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;
|
3378
|
-
ie12 = (userAgent.indexOf('Edge/') != -1 && !ie && !ie11) ? 12 : false;
|
3379
|
-
ie = ie || ie11 || ie12;
|
3380
|
-
gecko = !webkit && !ie11 && /Gecko/.test(userAgent);
|
3381
|
-
mac = userAgent.indexOf('Mac') != -1;
|
3382
|
-
iDevice = /(iPad|iPhone)/.test(userAgent);
|
3383
|
-
fileApi = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL;
|
3384
|
-
phone = matchMediaQuery("only screen and (max-device-width: 480px)") && (android || iDevice);
|
3385
|
-
tablet = matchMediaQuery("only screen and (min-width: 800px)") && (android || iDevice);
|
3386
|
-
windowsPhone = userAgent.indexOf('Windows Phone') != -1;
|
3387
|
-
|
3388
|
-
if (ie12) {
|
3389
|
-
webkit = false;
|
3390
|
-
}
|
3391
|
-
|
3392
|
-
// Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions
|
3393
|
-
// says it has contentEditable support but there is no visible caret.
|
3394
|
-
var contentEditable = !iDevice || fileApi || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534;
|
3395
|
-
|
3396
|
-
return {
|
3397
|
-
/**
|
3398
|
-
* Constant that is true if the browser is Opera.
|
3399
|
-
*
|
3400
|
-
* @property opera
|
3401
|
-
* @type Boolean
|
3402
|
-
* @final
|
3403
|
-
*/
|
3404
|
-
opera: opera,
|
3405
|
-
|
3406
|
-
/**
|
3407
|
-
* Constant that is true if the browser is WebKit (Safari/Chrome).
|
3408
|
-
*
|
3409
|
-
* @property webKit
|
3410
|
-
* @type Boolean
|
3411
|
-
* @final
|
3412
|
-
*/
|
3413
|
-
webkit: webkit,
|
3414
|
-
|
3415
|
-
/**
|
3416
|
-
* Constant that is more than zero if the browser is IE.
|
3417
|
-
*
|
3418
|
-
* @property ie
|
3419
|
-
* @type Boolean
|
3420
|
-
* @final
|
3421
|
-
*/
|
3422
|
-
ie: ie,
|
3423
|
-
|
3424
|
-
/**
|
3425
|
-
* Constant that is true if the browser is Gecko.
|
3426
|
-
*
|
3427
|
-
* @property gecko
|
3428
|
-
* @type Boolean
|
3429
|
-
* @final
|
3430
|
-
*/
|
3431
|
-
gecko: gecko,
|
3432
|
-
|
3433
|
-
/**
|
3434
|
-
* Constant that is true if the os is Mac OS.
|
3435
|
-
*
|
3436
|
-
* @property mac
|
3437
|
-
* @type Boolean
|
3438
|
-
* @final
|
3439
|
-
*/
|
3440
|
-
mac: mac,
|
3441
|
-
|
3442
|
-
/**
|
3443
|
-
* Constant that is true if the os is iOS.
|
3444
|
-
*
|
3445
|
-
* @property iOS
|
3446
|
-
* @type Boolean
|
3447
|
-
* @final
|
3448
|
-
*/
|
3449
|
-
iOS: iDevice,
|
3450
|
-
|
3451
|
-
/**
|
3452
|
-
* Constant that is true if the os is android.
|
3453
|
-
*
|
3454
|
-
* @property android
|
3455
|
-
* @type Boolean
|
3456
|
-
* @final
|
3457
|
-
*/
|
3458
|
-
android: android,
|
3459
|
-
|
3460
|
-
/**
|
3461
|
-
* Constant that is true if the browser supports editing.
|
3462
|
-
*
|
3463
|
-
* @property contentEditable
|
3464
|
-
* @type Boolean
|
3465
|
-
* @final
|
3466
|
-
*/
|
3467
|
-
contentEditable: contentEditable,
|
3468
|
-
|
3469
|
-
/**
|
3470
|
-
* Transparent image data url.
|
3471
|
-
*
|
3472
|
-
* @property transparentSrc
|
3473
|
-
* @type Boolean
|
3474
|
-
* @final
|
3475
|
-
*/
|
3476
|
-
transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
3477
|
-
|
3478
|
-
/**
|
3479
|
-
* Returns true/false if the browser can or can't place the caret after a inline block like an image.
|
3480
|
-
*
|
3481
|
-
* @property noCaretAfter
|
3482
|
-
* @type Boolean
|
3483
|
-
* @final
|
3484
|
-
*/
|
3485
|
-
caretAfter: ie != 8,
|
3486
|
-
|
3487
|
-
/**
|
3488
|
-
* Constant that is true if the browser supports native DOM Ranges. IE 9+.
|
3489
|
-
*
|
3490
|
-
* @property range
|
3491
|
-
* @type Boolean
|
3492
|
-
*/
|
3493
|
-
range: window.getSelection && "Range" in window,
|
3494
|
-
|
3495
|
-
/**
|
3496
|
-
* Returns the IE document mode for non IE browsers this will fake IE 10.
|
3497
|
-
*
|
3498
|
-
* @property documentMode
|
3499
|
-
* @type Number
|
3500
|
-
*/
|
3501
|
-
documentMode: ie && !ie12 ? (document.documentMode || 7) : 10,
|
3502
|
-
|
3503
|
-
/**
|
3504
|
-
* Constant that is true if the browser has a modern file api.
|
3505
|
-
*
|
3506
|
-
* @property fileApi
|
3507
|
-
* @type Boolean
|
3508
|
-
*/
|
3509
|
-
fileApi: fileApi,
|
3510
|
-
|
3511
|
-
/**
|
3512
|
-
* Constant that is true if the browser supports contentEditable=false regions.
|
3513
|
-
*
|
3514
|
-
* @property ceFalse
|
3515
|
-
* @type Boolean
|
3516
|
-
*/
|
3517
|
-
ceFalse: (ie === false || ie > 8),
|
3518
|
-
|
3519
|
-
desktop: !phone && !tablet,
|
3520
|
-
windowsPhone: windowsPhone
|
3521
|
-
};
|
3522
|
-
});
|
3523
|
-
|
3524
3554
|
// Included from: js/tinymce/classes/util/Arr.js
|
3525
3555
|
|
3526
3556
|
/**
|
@@ -10899,7 +10929,11 @@ define("tinymce/NodeChange", [
|
|
10899
10929
|
// Get start node
|
10900
10930
|
root = editor.getBody();
|
10901
10931
|
node = selection.getStart() || root;
|
10902
|
-
|
10932
|
+
|
10933
|
+
// Make sure the node is within the editor root or is the editor root
|
10934
|
+
if (node.ownerDocument != editor.getDoc() || !editor.dom.isChildOf(node, root)) {
|
10935
|
+
node = root;
|
10936
|
+
}
|
10903
10937
|
|
10904
10938
|
// Edge case for <p>|<img></p>
|
10905
10939
|
if (node.nodeName == 'IMG' && selection.isCollapsed()) {
|
@@ -15751,18 +15785,18 @@ define("tinymce/dom/ControlSelection", [
|
|
15751
15785
|
}
|
15752
15786
|
}
|
15753
15787
|
|
15754
|
-
var throttledUpdateResizeRect = Delay.throttle(
|
15755
|
-
|
15756
|
-
editor.on('nodechange ResizeEditor ResizeWindow drop', function(e) {
|
15788
|
+
var throttledUpdateResizeRect = Delay.throttle(function(e) {
|
15757
15789
|
if (!editor.composing) {
|
15758
|
-
|
15790
|
+
updateResizeRect(e);
|
15759
15791
|
}
|
15760
15792
|
});
|
15761
15793
|
|
15794
|
+
editor.on('nodechange ResizeEditor ResizeWindow drop', throttledUpdateResizeRect);
|
15795
|
+
|
15762
15796
|
// Update resize rect while typing in a table
|
15763
|
-
editor.on('
|
15797
|
+
editor.on('keyup compositionend', function(e) {
|
15764
15798
|
// Don't update the resize rect while composing since it blows away the IME see: #2710
|
15765
|
-
if (selectedElm && selectedElm.nodeName == "TABLE"
|
15799
|
+
if (selectedElm && selectedElm.nodeName == "TABLE") {
|
15766
15800
|
throttledUpdateResizeRect(e);
|
15767
15801
|
}
|
15768
15802
|
});
|
@@ -16299,6 +16333,18 @@ define("tinymce/caret/CaretPosition", [
|
|
16299
16333
|
if (ExtendingChar.isExtendingChar(container.data[offset])) {
|
16300
16334
|
return clientRects;
|
16301
16335
|
}
|
16336
|
+
|
16337
|
+
// WebKit returns two client rects for a position after an extending
|
16338
|
+
// character a\uxxx|b so expand on "b" and collapse to start of "b" box
|
16339
|
+
if (ExtendingChar.isExtendingChar(container.data[offset - 1])) {
|
16340
|
+
range.setStart(container, offset);
|
16341
|
+
range.setEnd(container, offset + 1);
|
16342
|
+
|
16343
|
+
if (!isHiddenWhiteSpaceRange(range)) {
|
16344
|
+
addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), false));
|
16345
|
+
return clientRects;
|
16346
|
+
}
|
16347
|
+
}
|
16302
16348
|
}
|
16303
16349
|
|
16304
16350
|
if (offset > 0) {
|
@@ -17960,8 +18006,7 @@ define("tinymce/dom/Selection", [
|
|
17960
18006
|
*/
|
17961
18007
|
getNode: function() {
|
17962
18008
|
var self = this, rng = self.getRng(), elm;
|
17963
|
-
var startContainer
|
17964
|
-
var startOffset = rng.startOffset, endOffset = rng.endOffset, root = self.dom.getRoot();
|
18009
|
+
var startContainer, endContainer, startOffset, endOffset, root = self.dom.getRoot();
|
17965
18010
|
|
17966
18011
|
function skipEmptyTextNodes(node, forwards) {
|
17967
18012
|
var orig = node;
|
@@ -17978,6 +18023,11 @@ define("tinymce/dom/Selection", [
|
|
17978
18023
|
return root;
|
17979
18024
|
}
|
17980
18025
|
|
18026
|
+
startContainer = rng.startContainer;
|
18027
|
+
endContainer = rng.endContainer;
|
18028
|
+
startOffset = rng.startOffset;
|
18029
|
+
endOffset = rng.endOffset;
|
18030
|
+
|
17981
18031
|
if (rng.setStart) {
|
17982
18032
|
elm = rng.commonAncestorContainer;
|
17983
18033
|
|
@@ -18333,7 +18383,7 @@ define("tinymce/dom/ElementUtils", [
|
|
18333
18383
|
var name = attr.nodeName.toLowerCase();
|
18334
18384
|
|
18335
18385
|
// Don't compare internal attributes or style
|
18336
|
-
if (name.indexOf('_') !== 0 && name !== 'style' && name !== 'data-mce-style') {
|
18386
|
+
if (name.indexOf('_') !== 0 && name !== 'style' && name !== 'data-mce-style' && name != 'data-mce-fragment') {
|
18337
18387
|
attribs[name] = dom.getAttrib(node, name);
|
18338
18388
|
}
|
18339
18389
|
});
|
@@ -21644,7 +21694,7 @@ define("tinymce/EnterKey", [
|
|
21644
21694
|
block.appendChild(clonedNode);
|
21645
21695
|
}
|
21646
21696
|
}
|
21647
|
-
} while ((node = node.parentNode));
|
21697
|
+
} while ((node = node.parentNode) && node != editableRoot);
|
21648
21698
|
}
|
21649
21699
|
|
21650
21700
|
// BR is needed in empty blocks on non IE browsers
|
@@ -22570,6 +22620,7 @@ define("tinymce/caret/CaretWalker", [
|
|
22570
22620
|
var isContentEditableFalse = NodeType.isContentEditableFalse,
|
22571
22621
|
isText = NodeType.isText,
|
22572
22622
|
isElement = NodeType.isElement,
|
22623
|
+
isBr = NodeType.isBr,
|
22573
22624
|
isForwards = CaretUtils.isForwards,
|
22574
22625
|
isBackwards = CaretUtils.isBackwards,
|
22575
22626
|
isCaretCandidate = CaretCandidate.isCaretCandidate,
|
@@ -22617,12 +22668,32 @@ define("tinymce/caret/CaretWalker", [
|
|
22617
22668
|
}
|
22618
22669
|
|
22619
22670
|
if (isBackwards(direction)) {
|
22671
|
+
if (isBr(node)) {
|
22672
|
+
return CaretPosition.before(node);
|
22673
|
+
}
|
22674
|
+
|
22620
22675
|
return CaretPosition.after(node);
|
22621
22676
|
}
|
22622
22677
|
|
22623
22678
|
return CaretPosition.before(node);
|
22624
22679
|
}
|
22625
22680
|
|
22681
|
+
// Jumps over BR elements <p>|<br></p><p>a</p> -> <p><br></p><p>|a</p>
|
22682
|
+
function isBrBeforeBlock(node, rootNode) {
|
22683
|
+
var next;
|
22684
|
+
|
22685
|
+
if (!NodeType.isBr(node)) {
|
22686
|
+
return false;
|
22687
|
+
}
|
22688
|
+
|
22689
|
+
next = findCaretPosition(1, CaretPosition.after(node), rootNode);
|
22690
|
+
if (!next) {
|
22691
|
+
return false;
|
22692
|
+
}
|
22693
|
+
|
22694
|
+
return !CaretUtils.isInSameBlock(CaretPosition.before(node), CaretPosition.before(next), rootNode);
|
22695
|
+
}
|
22696
|
+
|
22626
22697
|
function findCaretPosition(direction, startCaretPosition, rootNode) {
|
22627
22698
|
var container, offset, node, nextNode, innerNode,
|
22628
22699
|
rootContentEditableFalseElm, caretPosition;
|
@@ -22671,6 +22742,10 @@ define("tinymce/caret/CaretWalker", [
|
|
22671
22742
|
if (isForwards(direction) && offset < container.childNodes.length) {
|
22672
22743
|
nextNode = nodeAtIndex(container, offset);
|
22673
22744
|
if (isCaretCandidate(nextNode)) {
|
22745
|
+
if (isBrBeforeBlock(nextNode, rootNode)) {
|
22746
|
+
return findCaretPosition(direction, CaretPosition.after(nextNode), rootNode);
|
22747
|
+
}
|
22748
|
+
|
22674
22749
|
if (!isAtomic(nextNode)) {
|
22675
22750
|
innerNode = CaretUtils.findNode(nextNode, direction, isEditableCaretCandidate, nextNode);
|
22676
22751
|
if (innerNode) {
|
@@ -22873,7 +22948,7 @@ define("tinymce/EditorCommands", [
|
|
22873
22948
|
var func;
|
22874
22949
|
|
22875
22950
|
// Is hidden then return undefined
|
22876
|
-
if (editor.
|
22951
|
+
if (editor.quirks.isHidden()) {
|
22877
22952
|
return;
|
22878
22953
|
}
|
22879
22954
|
|
@@ -22903,7 +22978,7 @@ define("tinymce/EditorCommands", [
|
|
22903
22978
|
var func;
|
22904
22979
|
|
22905
22980
|
// Is hidden then return undefined
|
22906
|
-
if (editor.
|
22981
|
+
if (editor.quirks.isHidden()) {
|
22907
22982
|
return;
|
22908
22983
|
}
|
22909
22984
|
|
@@ -23052,6 +23127,11 @@ define("tinymce/EditorCommands", [
|
|
23052
23127
|
failed = TRUE;
|
23053
23128
|
}
|
23054
23129
|
|
23130
|
+
// Chrome reports the paste command as supported however older IE:s will return false for cut/paste
|
23131
|
+
if (command === 'paste' && !doc.queryCommandEnabled(command)) {
|
23132
|
+
failed = true;
|
23133
|
+
}
|
23134
|
+
|
23055
23135
|
// Present alert message about clipboard access not being available
|
23056
23136
|
if (failed || !doc.queryCommandSupported(command)) {
|
23057
23137
|
var msg = editor.translate(
|
@@ -23281,12 +23361,32 @@ define("tinymce/EditorCommands", [
|
|
23281
23361
|
}
|
23282
23362
|
}
|
23283
23363
|
|
23364
|
+
function markFragmentElements(fragment) {
|
23365
|
+
var node = fragment;
|
23366
|
+
|
23367
|
+
while ((node = node.walk())) {
|
23368
|
+
if (node.type === 1) {
|
23369
|
+
node.attr('data-mce-fragment', '1');
|
23370
|
+
}
|
23371
|
+
}
|
23372
|
+
}
|
23373
|
+
|
23374
|
+
function umarkFragmentElements(elm) {
|
23375
|
+
Tools.each(elm.getElementsByTagName('*'), function(elm) {
|
23376
|
+
elm.removeAttribute('data-mce-fragment');
|
23377
|
+
});
|
23378
|
+
}
|
23379
|
+
|
23380
|
+
function isPartOfFragment(node) {
|
23381
|
+
return !!node.getAttribute('data-mce-fragment');
|
23382
|
+
}
|
23383
|
+
|
23284
23384
|
function canHaveChildren(node) {
|
23285
23385
|
return node && !editor.schema.getShortEndedElements()[node.nodeName];
|
23286
23386
|
}
|
23287
23387
|
|
23288
23388
|
function moveSelectionToMarker(marker) {
|
23289
|
-
var parentEditableFalseElm,
|
23389
|
+
var parentEditableFalseElm, parentBlock, nextRng;
|
23290
23390
|
|
23291
23391
|
function getContentEditableFalseParent(node) {
|
23292
23392
|
var root = editor.getBody();
|
@@ -23347,20 +23447,20 @@ define("tinymce/EditorCommands", [
|
|
23347
23447
|
}
|
23348
23448
|
|
23349
23449
|
// Remove the marker node and set the new range
|
23350
|
-
|
23450
|
+
parentBlock = dom.getParent(marker, dom.isBlock);
|
23351
23451
|
dom.remove(marker);
|
23352
23452
|
|
23353
|
-
if (
|
23354
|
-
editor.$(
|
23453
|
+
if (parentBlock && dom.isEmpty(parentBlock)) {
|
23454
|
+
editor.$(parentBlock).empty();
|
23355
23455
|
|
23356
|
-
rng.setStart(
|
23357
|
-
rng.setEnd(
|
23456
|
+
rng.setStart(parentBlock, 0);
|
23457
|
+
rng.setEnd(parentBlock, 0);
|
23358
23458
|
|
23359
|
-
if (!isTableCell(
|
23459
|
+
if (!isTableCell(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {
|
23360
23460
|
rng = nextRng;
|
23361
|
-
dom.remove(
|
23461
|
+
dom.remove(parentBlock);
|
23362
23462
|
} else {
|
23363
|
-
dom.add(
|
23463
|
+
dom.add(parentBlock, dom.create('br', {'data-mce-bogus': '1'}));
|
23364
23464
|
}
|
23365
23465
|
}
|
23366
23466
|
|
@@ -23425,6 +23525,7 @@ define("tinymce/EditorCommands", [
|
|
23425
23525
|
// Parse the fragment within the context of the parent node
|
23426
23526
|
var parserArgs = {context: parentNode.nodeName.toLowerCase(), data: data};
|
23427
23527
|
fragment = parser.parse(value, parserArgs);
|
23528
|
+
markFragmentElements(fragment);
|
23428
23529
|
|
23429
23530
|
markInlineFormatElements(fragment);
|
23430
23531
|
|
@@ -23500,6 +23601,7 @@ define("tinymce/EditorCommands", [
|
|
23500
23601
|
|
23501
23602
|
reduceInlineTextElements();
|
23502
23603
|
moveSelectionToMarker(dom.get('mce_marker'));
|
23604
|
+
umarkFragmentElements(editor.getBody());
|
23503
23605
|
editor.fire('SetContent', args);
|
23504
23606
|
editor.addVisual();
|
23505
23607
|
},
|
@@ -24222,6 +24324,27 @@ define("tinymce/util/URI", [
|
|
24222
24324
|
};
|
24223
24325
|
};
|
24224
24326
|
|
24327
|
+
URI.getDocumentBaseUrl = function(loc) {
|
24328
|
+
var baseUrl;
|
24329
|
+
|
24330
|
+
// Pass applewebdata:// and other non web protocols though
|
24331
|
+
if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {
|
24332
|
+
baseUrl = loc.href;
|
24333
|
+
} else {
|
24334
|
+
baseUrl = loc.protocol + '//' + loc.host + loc.pathname;
|
24335
|
+
}
|
24336
|
+
|
24337
|
+
if (/^[^:]+:\/\/\/?[^\/]+\//.test(baseUrl)) {
|
24338
|
+
baseUrl = baseUrl.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
|
24339
|
+
|
24340
|
+
if (!/[\/\\]$/.test(baseUrl)) {
|
24341
|
+
baseUrl += '/';
|
24342
|
+
}
|
24343
|
+
}
|
24344
|
+
|
24345
|
+
return baseUrl;
|
24346
|
+
};
|
24347
|
+
|
24225
24348
|
return URI;
|
24226
24349
|
});
|
24227
24350
|
|
@@ -25947,6 +26070,24 @@ define("tinymce/ui/DomUtils", [
|
|
25947
26070
|
return 'mceu_' + (count++);
|
25948
26071
|
},
|
25949
26072
|
|
26073
|
+
create: function(name, attrs, children) {
|
26074
|
+
var elm = document.createElement(name);
|
26075
|
+
|
26076
|
+
DOMUtils.DOM.setAttribs(elm, attrs);
|
26077
|
+
|
26078
|
+
if (typeof children === 'string') {
|
26079
|
+
elm.innerHTML = children;
|
26080
|
+
} else {
|
26081
|
+
Tools.each(children, function(child) {
|
26082
|
+
if (child.nodeType) {
|
26083
|
+
elm.appendChild(child);
|
26084
|
+
}
|
26085
|
+
});
|
26086
|
+
}
|
26087
|
+
|
26088
|
+
return elm;
|
26089
|
+
},
|
26090
|
+
|
25950
26091
|
createFragment: function(html) {
|
25951
26092
|
return DOMUtils.DOM.createFragment(html);
|
25952
26093
|
},
|
@@ -27894,7 +28035,7 @@ define("tinymce/ui/KeyboardNavigation", [
|
|
27894
28035
|
return true;
|
27895
28036
|
}
|
27896
28037
|
|
27897
|
-
if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(getRole(elm))) {
|
28038
|
+
if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(getRole(elm))) {
|
27898
28039
|
return true;
|
27899
28040
|
}
|
27900
28041
|
|
@@ -28127,6 +28268,10 @@ define("tinymce/ui/KeyboardNavigation", [
|
|
28127
28268
|
return;
|
28128
28269
|
}
|
28129
28270
|
|
28271
|
+
if (getRole(focusedElement) === 'slider') {
|
28272
|
+
return;
|
28273
|
+
}
|
28274
|
+
|
28130
28275
|
if (handler(e) !== false) {
|
28131
28276
|
e.preventDefault();
|
28132
28277
|
}
|
@@ -29591,6 +29736,10 @@ define("tinymce/ui/FloatPanel", [
|
|
29591
29736
|
self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
|
29592
29737
|
self.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start');
|
29593
29738
|
}
|
29739
|
+
|
29740
|
+
self.aria('label', settings.ariaLabel);
|
29741
|
+
self.aria('labelledby', self._id);
|
29742
|
+
self.aria('describedby', self.describedBy || self._id + '-none');
|
29594
29743
|
},
|
29595
29744
|
|
29596
29745
|
fixed: function(state) {
|
@@ -29805,24 +29954,26 @@ define("tinymce/ui/Window", [
|
|
29805
29954
|
}
|
29806
29955
|
|
29807
29956
|
function handleWindowResize() {
|
29808
|
-
|
29809
|
-
|
29810
|
-
|
29811
|
-
|
29957
|
+
if (!Env.desktop) {
|
29958
|
+
var lastSize = {
|
29959
|
+
w: window.innerWidth,
|
29960
|
+
h: window.innerHeight
|
29961
|
+
};
|
29812
29962
|
|
29813
|
-
|
29814
|
-
|
29815
|
-
|
29963
|
+
Delay.setInterval(function() {
|
29964
|
+
var w = window.innerWidth,
|
29965
|
+
h = window.innerHeight;
|
29816
29966
|
|
29817
|
-
|
29818
|
-
|
29819
|
-
|
29820
|
-
|
29821
|
-
|
29967
|
+
if (lastSize.w != w || lastSize.h != h) {
|
29968
|
+
lastSize = {
|
29969
|
+
w: w,
|
29970
|
+
h: h
|
29971
|
+
};
|
29822
29972
|
|
29823
|
-
|
29824
|
-
|
29825
|
-
|
29973
|
+
$(window).trigger('resize');
|
29974
|
+
}
|
29975
|
+
}, 100);
|
29976
|
+
}
|
29826
29977
|
|
29827
29978
|
function reposition() {
|
29828
29979
|
var i, rect = DomUtils.getWindowSize(), layoutRect;
|
@@ -29900,7 +30051,7 @@ define("tinymce/ui/Window", [
|
|
29900
30051
|
self.on('click', function(e) {
|
29901
30052
|
var closeClass = self.classPrefix + 'close';
|
29902
30053
|
|
29903
|
-
if (e.target
|
30054
|
+
if (DomUtils.hasClass(e.target, closeClass) || DomUtils.hasClass(e.target.parentNode, closeClass)) {
|
29904
30055
|
self.close();
|
29905
30056
|
}
|
29906
30057
|
});
|
@@ -30209,9 +30360,7 @@ define("tinymce/ui/Window", [
|
|
30209
30360
|
}
|
30210
30361
|
});
|
30211
30362
|
|
30212
|
-
|
30213
|
-
handleWindowResize();
|
30214
|
-
}
|
30363
|
+
handleWindowResize();
|
30215
30364
|
|
30216
30365
|
return Window;
|
30217
30366
|
});
|
@@ -31464,7 +31613,7 @@ define("tinymce/util/Quirks", [
|
|
31464
31613
|
* @private
|
31465
31614
|
* @param {DragEvent} e Event object
|
31466
31615
|
*/
|
31467
|
-
function
|
31616
|
+
function setMceInternalContent(e) {
|
31468
31617
|
var selectionHtml, internalContent;
|
31469
31618
|
|
31470
31619
|
if (e.dataTransfer) {
|
@@ -32084,7 +32233,7 @@ define("tinymce/util/Quirks", [
|
|
32084
32233
|
|
32085
32234
|
editor.on('dragstart', function(e) {
|
32086
32235
|
dragStartRng = selection.getRng();
|
32087
|
-
|
32236
|
+
setMceInternalContent(e);
|
32088
32237
|
});
|
32089
32238
|
|
32090
32239
|
editor.on('drop', function(e) {
|
@@ -32555,7 +32704,7 @@ define("tinymce/util/Quirks", [
|
|
32555
32704
|
*/
|
32556
32705
|
function setGeckoEditingOptions() {
|
32557
32706
|
function setOpts() {
|
32558
|
-
|
32707
|
+
refreshContentEditable();
|
32559
32708
|
|
32560
32709
|
setEditorCommandState("StyleWithCSS", false);
|
32561
32710
|
setEditorCommandState("enableInlineTableEditing", false);
|
@@ -33003,7 +33152,7 @@ define("tinymce/util/Quirks", [
|
|
33003
33152
|
*/
|
33004
33153
|
function ieInternalDragAndDrop() {
|
33005
33154
|
editor.on('dragstart', function(e) {
|
33006
|
-
|
33155
|
+
setMceInternalContent(e);
|
33007
33156
|
});
|
33008
33157
|
|
33009
33158
|
editor.on('drop', function(e) {
|
@@ -33021,6 +33170,33 @@ define("tinymce/util/Quirks", [
|
|
33021
33170
|
});
|
33022
33171
|
}
|
33023
33172
|
|
33173
|
+
function refreshContentEditable() {
|
33174
|
+
var body, parent;
|
33175
|
+
|
33176
|
+
// Check if the editor was hidden and the re-initialize contentEditable mode by removing and adding the body again
|
33177
|
+
if (isHidden()) {
|
33178
|
+
body = editor.getBody();
|
33179
|
+
parent = body.parentNode;
|
33180
|
+
|
33181
|
+
parent.removeChild(body);
|
33182
|
+
parent.appendChild(body);
|
33183
|
+
|
33184
|
+
body.focus();
|
33185
|
+
}
|
33186
|
+
}
|
33187
|
+
|
33188
|
+
function isHidden() {
|
33189
|
+
var sel;
|
33190
|
+
|
33191
|
+
if (!isGecko) {
|
33192
|
+
return 0;
|
33193
|
+
}
|
33194
|
+
|
33195
|
+
// Weird, wheres that cursor selection?
|
33196
|
+
sel = editor.selection.getSel();
|
33197
|
+
return (!sel || !sel.rangeCount || sel.rangeCount === 0);
|
33198
|
+
}
|
33199
|
+
|
33024
33200
|
// All browsers
|
33025
33201
|
removeBlockQuoteOnBackSpace();
|
33026
33202
|
emptyEditorWhenDeleting();
|
@@ -33086,6 +33262,11 @@ define("tinymce/util/Quirks", [
|
|
33086
33262
|
blockCmdArrowNavigation();
|
33087
33263
|
disableBackspaceIntoATable();
|
33088
33264
|
}
|
33265
|
+
|
33266
|
+
return {
|
33267
|
+
refreshContentEditable: refreshContentEditable,
|
33268
|
+
isHidden: isHidden
|
33269
|
+
};
|
33089
33270
|
};
|
33090
33271
|
});
|
33091
33272
|
|
@@ -33426,16 +33607,10 @@ define("tinymce/Shortcuts", [
|
|
33426
33607
|
var modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access');
|
33427
33608
|
|
33428
33609
|
return function(editor) {
|
33429
|
-
var self = this, shortcuts = {};
|
33430
|
-
|
33431
|
-
function createShortcut(pattern, desc, cmdFunc, scope) {
|
33432
|
-
var id, key, shortcut;
|
33610
|
+
var self = this, shortcuts = {}, pendingPatterns = [];
|
33433
33611
|
|
33434
|
-
|
33435
|
-
|
33436
|
-
scope: scope || editor,
|
33437
|
-
desc: editor.translate(desc)
|
33438
|
-
};
|
33612
|
+
function parseShortcut(pattern) {
|
33613
|
+
var id, key, shortcut = {};
|
33439
33614
|
|
33440
33615
|
// Parse modifiers and keys ctrl+alt+b for example
|
33441
33616
|
each(explode(pattern, '+'), function(value) {
|
@@ -33487,27 +33662,77 @@ define("tinymce/Shortcuts", [
|
|
33487
33662
|
return shortcut;
|
33488
33663
|
}
|
33489
33664
|
|
33490
|
-
|
33491
|
-
|
33492
|
-
each(shortcuts, function(shortcut) {
|
33493
|
-
if (shortcut.ctrl != e.ctrlKey || shortcut.meta != e.metaKey) {
|
33494
|
-
return;
|
33495
|
-
}
|
33665
|
+
function createShortcut(pattern, desc, cmdFunc, scope) {
|
33666
|
+
var shortcuts;
|
33496
33667
|
|
33497
|
-
|
33498
|
-
|
33499
|
-
|
33668
|
+
shortcuts = Tools.map(explode(pattern, '>'), parseShortcut);
|
33669
|
+
shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], {
|
33670
|
+
func: cmdFunc,
|
33671
|
+
scope: scope || editor
|
33672
|
+
});
|
33500
33673
|
|
33501
|
-
|
33502
|
-
|
33674
|
+
return Tools.extend(shortcuts[0], {
|
33675
|
+
desc: editor.translate(desc),
|
33676
|
+
subpatterns: shortcuts.slice(1)
|
33677
|
+
});
|
33678
|
+
}
|
33679
|
+
|
33680
|
+
function hasModifier(e) {
|
33681
|
+
return e.altKey || e.ctrlKey || e.metaKey;
|
33682
|
+
}
|
33683
|
+
|
33684
|
+
function isFunctionKey(e) {
|
33685
|
+
return e.keyCode >= 112 && e.keyCode <= 123;
|
33686
|
+
}
|
33687
|
+
|
33688
|
+
function matchShortcut(e, shortcut) {
|
33689
|
+
if (!shortcut) {
|
33690
|
+
return false;
|
33691
|
+
}
|
33692
|
+
|
33693
|
+
if (shortcut.ctrl != e.ctrlKey || shortcut.meta != e.metaKey) {
|
33694
|
+
return false;
|
33695
|
+
}
|
33696
|
+
|
33697
|
+
if (shortcut.alt != e.altKey || shortcut.shift != e.shiftKey) {
|
33698
|
+
return false;
|
33699
|
+
}
|
33700
|
+
|
33701
|
+
if (e.keyCode == shortcut.keyCode || (e.charCode && e.charCode == shortcut.charCode)) {
|
33702
|
+
e.preventDefault();
|
33703
|
+
return true;
|
33704
|
+
}
|
33705
|
+
|
33706
|
+
return false;
|
33707
|
+
}
|
33708
|
+
|
33709
|
+
function executeShortcutAction(shortcut) {
|
33710
|
+
return shortcut.func ? shortcut.func.call(shortcut.scope) : null;
|
33711
|
+
}
|
33712
|
+
|
33713
|
+
editor.on('keyup keypress keydown', function(e) {
|
33714
|
+
if ((hasModifier(e) || isFunctionKey(e)) && !e.isDefaultPrevented()) {
|
33715
|
+
each(shortcuts, function(shortcut) {
|
33716
|
+
if (matchShortcut(e, shortcut)) {
|
33717
|
+
pendingPatterns = shortcut.subpatterns.slice(0);
|
33503
33718
|
|
33504
33719
|
if (e.type == "keydown") {
|
33505
|
-
|
33720
|
+
executeShortcutAction(shortcut);
|
33506
33721
|
}
|
33507
33722
|
|
33508
33723
|
return true;
|
33509
33724
|
}
|
33510
33725
|
});
|
33726
|
+
|
33727
|
+
if (matchShortcut(e, pendingPatterns[0])) {
|
33728
|
+
if (pendingPatterns.length === 1) {
|
33729
|
+
if (e.type == "keydown") {
|
33730
|
+
executeShortcutAction(pendingPatterns[0]);
|
33731
|
+
}
|
33732
|
+
}
|
33733
|
+
|
33734
|
+
pendingPatterns.shift();
|
33735
|
+
}
|
33511
33736
|
}
|
33512
33737
|
});
|
33513
33738
|
|
@@ -33536,7 +33761,7 @@ define("tinymce/Shortcuts", [
|
|
33536
33761
|
};
|
33537
33762
|
}
|
33538
33763
|
|
33539
|
-
each(explode(pattern.toLowerCase()), function(pattern) {
|
33764
|
+
each(explode(Tools.trim(pattern.toLowerCase())), function(pattern) {
|
33540
33765
|
var shortcut = createShortcut(pattern, desc, cmdFunc, scope);
|
33541
33766
|
shortcuts[shortcut.id] = shortcut;
|
33542
33767
|
});
|
@@ -35514,8 +35739,39 @@ define("tinymce/SelectionOverrides", [
|
|
35514
35739
|
return null;
|
35515
35740
|
}
|
35516
35741
|
|
35742
|
+
function mergeTextBlocks(direction, fromCaretPosition, toCaretPosition) {
|
35743
|
+
var dom = editor.dom, fromBlock, toBlock, node, textBlocks;
|
35744
|
+
|
35745
|
+
if (direction === -1) {
|
35746
|
+
if (isAfterContentEditableFalse(toCaretPosition) && isBlock(toCaretPosition.getNode(true))) {
|
35747
|
+
return deleteContentEditableNode(toCaretPosition.getNode(true));
|
35748
|
+
}
|
35749
|
+
} else {
|
35750
|
+
if (isBeforeContentEditableFalse(fromCaretPosition) && isBlock(fromCaretPosition.getNode())) {
|
35751
|
+
return deleteContentEditableNode(fromCaretPosition.getNode());
|
35752
|
+
}
|
35753
|
+
}
|
35754
|
+
|
35755
|
+
textBlocks = editor.schema.getTextBlockElements();
|
35756
|
+
fromBlock = dom.getParent(fromCaretPosition.getNode(), dom.isBlock);
|
35757
|
+
toBlock = dom.getParent(toCaretPosition.getNode(), dom.isBlock);
|
35758
|
+
|
35759
|
+
// Verify that both blocks are text blocks
|
35760
|
+
if (fromBlock === toBlock || !textBlocks[fromBlock.nodeName] || !textBlocks[toBlock.nodeName]) {
|
35761
|
+
return null;
|
35762
|
+
}
|
35763
|
+
|
35764
|
+
while ((node = fromBlock.firstChild)) {
|
35765
|
+
toBlock.appendChild(node);
|
35766
|
+
}
|
35767
|
+
|
35768
|
+
editor.dom.remove(fromBlock);
|
35769
|
+
|
35770
|
+
return toCaretPosition.toRange();
|
35771
|
+
}
|
35772
|
+
|
35517
35773
|
function backspaceDelete(direction, beforeFn, range) {
|
35518
|
-
var node, caretPosition;
|
35774
|
+
var node, caretPosition, peekCaretPosition;
|
35519
35775
|
|
35520
35776
|
if (!range.collapsed) {
|
35521
35777
|
node = getSelectedNode(range);
|
@@ -35529,6 +35785,15 @@ define("tinymce/SelectionOverrides", [
|
|
35529
35785
|
if (beforeFn(caretPosition)) {
|
35530
35786
|
return renderRangeCaret(deleteContentEditableNode(caretPosition.getNode(direction == -1)));
|
35531
35787
|
}
|
35788
|
+
|
35789
|
+
peekCaretPosition = direction == -1 ? caretWalker.prev(caretPosition) : caretWalker.next(caretPosition);
|
35790
|
+
if (beforeFn(peekCaretPosition)) {
|
35791
|
+
if (direction === -1) {
|
35792
|
+
return mergeTextBlocks(direction, caretPosition, peekCaretPosition);
|
35793
|
+
}
|
35794
|
+
|
35795
|
+
return mergeTextBlocks(direction, peekCaretPosition, caretPosition);
|
35796
|
+
}
|
35532
35797
|
}
|
35533
35798
|
|
35534
35799
|
function registerEvents() {
|
@@ -35582,6 +35847,18 @@ define("tinymce/SelectionOverrides", [
|
|
35582
35847
|
}
|
35583
35848
|
});
|
35584
35849
|
|
35850
|
+
editor.on('click', function(e) {
|
35851
|
+
var contentEditableRoot;
|
35852
|
+
|
35853
|
+
// Prevent clicks on links in a cE=false element
|
35854
|
+
contentEditableRoot = getContentEditableRoot(e.target);
|
35855
|
+
if (contentEditableRoot) {
|
35856
|
+
if (isContentEditableFalse(contentEditableRoot)) {
|
35857
|
+
e.preventDefault();
|
35858
|
+
}
|
35859
|
+
}
|
35860
|
+
});
|
35861
|
+
|
35585
35862
|
editor.on('mousedown', function(e) {
|
35586
35863
|
var contentEditableRoot;
|
35587
35864
|
|
@@ -35753,8 +36030,8 @@ define("tinymce/SelectionOverrides", [
|
|
35753
36030
|
rootClass + ' .mce-offscreen-selection {' +
|
35754
36031
|
'position: absolute;' +
|
35755
36032
|
'left: -9999999999px;' +
|
35756
|
-
'width: 100px' +
|
35757
|
-
'height: 100px' +
|
36033
|
+
'width: 100px;' +
|
36034
|
+
'height: 100px;' +
|
35758
36035
|
'}' +
|
35759
36036
|
rootClass + ' *[contentEditable=false] {' +
|
35760
36037
|
'cursor: default;' +
|
@@ -36871,9 +37148,8 @@ define("tinymce/Editor", [
|
|
36871
37148
|
DOM.setAttrib(body, "spellcheck", "false");
|
36872
37149
|
}
|
36873
37150
|
|
36874
|
-
self.fire('PostRender');
|
36875
|
-
|
36876
37151
|
self.quirks = new Quirks(self);
|
37152
|
+
self.fire('PostRender');
|
36877
37153
|
|
36878
37154
|
if (settings.directionality) {
|
36879
37155
|
body.dir = settings.directionality;
|
@@ -36993,7 +37269,7 @@ define("tinymce/Editor", [
|
|
36993
37269
|
controlElm = rng.item(0);
|
36994
37270
|
}
|
36995
37271
|
|
36996
|
-
self.
|
37272
|
+
self.quirks.refreshContentEditable();
|
36997
37273
|
|
36998
37274
|
// Move focus to contentEditable=true child if needed
|
36999
37275
|
contentEditableHost = getContentEditableHost(selection.getNode());
|
@@ -37081,7 +37357,7 @@ define("tinymce/Editor", [
|
|
37081
37357
|
|
37082
37358
|
/**
|
37083
37359
|
* Translates the specified string by replacing variables with language pack items it will also check if there is
|
37084
|
-
* a key
|
37360
|
+
* a key matching the input.
|
37085
37361
|
*
|
37086
37362
|
* @method translate
|
37087
37363
|
* @param {String} text String to translate by the language pack data.
|
@@ -37094,9 +37370,11 @@ define("tinymce/Editor", [
|
|
37094
37370
|
return '';
|
37095
37371
|
}
|
37096
37372
|
|
37097
|
-
|
37373
|
+
text = i18n.data[lang + '.' + text] || text.replace(/\{\#([^\}]+)\}/g, function(a, b) {
|
37098
37374
|
return i18n.data[lang + '.' + b] || '{#' + b + '}';
|
37099
37375
|
});
|
37376
|
+
|
37377
|
+
return this.editorManager.translate(text);
|
37100
37378
|
},
|
37101
37379
|
|
37102
37380
|
/**
|
@@ -37104,7 +37382,7 @@ define("tinymce/Editor", [
|
|
37104
37382
|
*
|
37105
37383
|
* @method getLang
|
37106
37384
|
* @param {String} name Name/key to get from the language pack.
|
37107
|
-
* @param {String} defaultVal Optional default value to
|
37385
|
+
* @param {String} defaultVal Optional default value to retrieve.
|
37108
37386
|
*/
|
37109
37387
|
getLang: function(name, defaultVal) {
|
37110
37388
|
return (
|
@@ -37117,7 +37395,7 @@ define("tinymce/Editor", [
|
|
37117
37395
|
* Returns a configuration parameter by name.
|
37118
37396
|
*
|
37119
37397
|
* @method getParam
|
37120
|
-
* @param {String} name Configruation parameter to
|
37398
|
+
* @param {String} name Configruation parameter to retrieve.
|
37121
37399
|
* @param {String} defaultVal Optional default value to return.
|
37122
37400
|
* @param {String} type Optional type parameter.
|
37123
37401
|
* @return {String} Configuration parameter value or default value.
|
@@ -38090,33 +38368,6 @@ define("tinymce/Editor", [
|
|
38090
38368
|
|
38091
38369
|
_scanForImages: function() {
|
38092
38370
|
return this.editorUpload.scanForImages();
|
38093
|
-
},
|
38094
|
-
|
38095
|
-
_refreshContentEditable: function() {
|
38096
|
-
var self = this, body, parent;
|
38097
|
-
|
38098
|
-
// Check if the editor was hidden and the re-initialize contentEditable mode by removing and adding the body again
|
38099
|
-
if (self._isHidden()) {
|
38100
|
-
body = self.getBody();
|
38101
|
-
parent = body.parentNode;
|
38102
|
-
|
38103
|
-
parent.removeChild(body);
|
38104
|
-
parent.appendChild(body);
|
38105
|
-
|
38106
|
-
body.focus();
|
38107
|
-
}
|
38108
|
-
},
|
38109
|
-
|
38110
|
-
_isHidden: function() {
|
38111
|
-
var sel;
|
38112
|
-
|
38113
|
-
if (!isGecko) {
|
38114
|
-
return 0;
|
38115
|
-
}
|
38116
|
-
|
38117
|
-
// Weird, wheres that cursor selection?
|
38118
|
-
sel = this.selection.getSel();
|
38119
|
-
return (!sel || !sel.rangeCount || sel.rangeCount === 0);
|
38120
38371
|
}
|
38121
38372
|
};
|
38122
38373
|
|
@@ -38441,17 +38692,19 @@ define("tinymce/FocusManager", [
|
|
38441
38692
|
// isn't within the body of the activeEditor nor a UI element such as a dialog child control
|
38442
38693
|
if (!documentFocusInHandler) {
|
38443
38694
|
documentFocusInHandler = function(e) {
|
38444
|
-
var activeEditor = editorManager.activeEditor;
|
38695
|
+
var activeEditor = editorManager.activeEditor, target;
|
38445
38696
|
|
38446
|
-
|
38697
|
+
target = e.target;
|
38698
|
+
|
38699
|
+
if (activeEditor && target.ownerDocument == document) {
|
38447
38700
|
// Check to make sure we have a valid selection don't update the bookmark if it's
|
38448
38701
|
// a focusin to the body of the editor see #7025
|
38449
|
-
if (activeEditor.selection &&
|
38702
|
+
if (activeEditor.selection && target != activeEditor.getBody()) {
|
38450
38703
|
activeEditor.selection.lastFocusBookmark = createBookmark(activeEditor.dom, activeEditor.lastRng);
|
38451
38704
|
}
|
38452
38705
|
|
38453
38706
|
// Fire a blur event if the element isn't a UI element
|
38454
|
-
if (
|
38707
|
+
if (target != document.body && !isUIElement(target) && editorManager.focusedEditor == activeEditor) {
|
38455
38708
|
activeEditor.fire('blur', {focusedEditor: null});
|
38456
38709
|
editorManager.focusedEditor = null;
|
38457
38710
|
}
|
@@ -38605,6 +38858,7 @@ define("tinymce/EditorManager", [
|
|
38605
38858
|
removeEditorFromList(editor);
|
38606
38859
|
editor.unbindAllNativeEvents();
|
38607
38860
|
editor.destroy(true);
|
38861
|
+
editor.removed = true;
|
38608
38862
|
editor = null;
|
38609
38863
|
}
|
38610
38864
|
|
@@ -38634,7 +38888,7 @@ define("tinymce/EditorManager", [
|
|
38634
38888
|
* @property minorVersion
|
38635
38889
|
* @type String
|
38636
38890
|
*/
|
38637
|
-
minorVersion: '3.
|
38891
|
+
minorVersion: '3.12',
|
38638
38892
|
|
38639
38893
|
/**
|
38640
38894
|
* Release date of TinyMCE build.
|
@@ -38642,7 +38896,7 @@ define("tinymce/EditorManager", [
|
|
38642
38896
|
* @property releaseDate
|
38643
38897
|
* @type String
|
38644
38898
|
*/
|
38645
|
-
releaseDate: '2016-
|
38899
|
+
releaseDate: '2016-05-10',
|
38646
38900
|
|
38647
38901
|
/**
|
38648
38902
|
* Collection of editor instances.
|
@@ -38678,7 +38932,7 @@ define("tinymce/EditorManager", [
|
|
38678
38932
|
var self = this, baseURL, documentBaseURL, suffix = "", preInit, src;
|
38679
38933
|
|
38680
38934
|
// Get base URL for the current document
|
38681
|
-
documentBaseURL = document.location
|
38935
|
+
documentBaseURL = URI.getDocumentBaseUrl(document.location);
|
38682
38936
|
|
38683
38937
|
// Check if the URL is a document based format like: http://site/dir/file and file:///
|
38684
38938
|
// leave other formats like applewebdata://... intact
|
@@ -39472,6 +39726,7 @@ define("tinymce/util/JSON", [], function() {
|
|
39472
39726
|
if (t == 'string') {
|
39473
39727
|
v = '\bb\tt\nn\ff\rr\""\'\'\\\\';
|
39474
39728
|
|
39729
|
+
/*eslint no-control-regex:0 */
|
39475
39730
|
return quote + o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(a, b) {
|
39476
39731
|
// Make sure single quotes never get encoded inside double quotes for JSON compatibility
|
39477
39732
|
if (quote === '"' && a === "'") {
|
@@ -39869,7 +40124,7 @@ define("tinymce/util/LocalStorage", [], function() {
|
|
39869
40124
|
* Returns the value if the specified key or null if it wasn't found.
|
39870
40125
|
*
|
39871
40126
|
* @method getItem
|
39872
|
-
* @param {String} key Key of item to
|
40127
|
+
* @param {String} key Key of item to retrieve.
|
39873
40128
|
* @return {String} Value of the specified item or null if it wasn't found.
|
39874
40129
|
*/
|
39875
40130
|
getItem: function(key) {
|
@@ -41003,7 +41258,7 @@ define("tinymce/ui/ColorBox", [
|
|
41003
41258
|
var self = this;
|
41004
41259
|
|
41005
41260
|
self.state.on('change:value', function(e) {
|
41006
|
-
if (self.
|
41261
|
+
if (self.state.get('rendered')) {
|
41007
41262
|
self.repaintColor(e.value);
|
41008
41263
|
}
|
41009
41264
|
});
|
@@ -45172,8 +45427,12 @@ define("tinymce/ui/Slider", [
|
|
45172
45427
|
return value;
|
45173
45428
|
}
|
45174
45429
|
|
45430
|
+
function setAriaProp(el, name, value) {
|
45431
|
+
el.setAttribute('aria-' + name, value);
|
45432
|
+
}
|
45433
|
+
|
45175
45434
|
function updateSliderHandle(ctrl, value) {
|
45176
|
-
var maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue;
|
45435
|
+
var maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue, handleEl;
|
45177
45436
|
|
45178
45437
|
if (ctrl.settings.orientation == "v") {
|
45179
45438
|
stylePosName = "top";
|
@@ -45185,11 +45444,17 @@ define("tinymce/ui/Slider", [
|
|
45185
45444
|
shortSizeName = "w";
|
45186
45445
|
}
|
45187
45446
|
|
45188
|
-
|
45447
|
+
handleEl = ctrl.getEl('handle');
|
45448
|
+
maxHandlePos = (ctrl.layoutRect()[shortSizeName] || 100) - DomUtils.getSize(handleEl)[sizeName];
|
45189
45449
|
|
45190
45450
|
styleValue = (maxHandlePos * ((value - ctrl._minValue) / (ctrl._maxValue - ctrl._minValue))) + 'px';
|
45191
|
-
|
45192
|
-
|
45451
|
+
handleEl.style[stylePosName] = styleValue;
|
45452
|
+
handleEl.style.height = ctrl.layoutRect().h + 'px';
|
45453
|
+
|
45454
|
+
setAriaProp(handleEl, 'valuenow', value);
|
45455
|
+
setAriaProp(handleEl, 'valuetext', '' + ctrl.settings.previewFilter(value));
|
45456
|
+
setAriaProp(handleEl, 'valuemin', ctrl._minValue);
|
45457
|
+
setAriaProp(handleEl, 'valuemax', ctrl._maxValue);
|
45193
45458
|
}
|
45194
45459
|
|
45195
45460
|
return Widget.extend({
|
@@ -45219,7 +45484,7 @@ define("tinymce/ui/Slider", [
|
|
45219
45484
|
|
45220
45485
|
return (
|
45221
45486
|
'<div id="' + id + '" class="' + self.classes + '">' +
|
45222
|
-
'<div id="' + id + '-handle" class="' + prefix + 'slider-handle"></div>' +
|
45487
|
+
'<div id="' + id + '-handle" class="' + prefix + 'slider-handle" role="slider" tabindex="-1"></div>' +
|
45223
45488
|
'</div>'
|
45224
45489
|
);
|
45225
45490
|
},
|
@@ -45229,12 +45494,83 @@ define("tinymce/ui/Slider", [
|
|
45229
45494
|
},
|
45230
45495
|
|
45231
45496
|
postRender: function() {
|
45232
|
-
var self = this,
|
45233
|
-
|
45497
|
+
var self = this, minValue, maxValue, screenCordName,
|
45498
|
+
stylePosName, sizeName, shortSizeName;
|
45499
|
+
|
45500
|
+
function toFraction(min, max, val) {
|
45501
|
+
return (val + min) / (max - min);
|
45502
|
+
}
|
45503
|
+
|
45504
|
+
function fromFraction(min, max, val) {
|
45505
|
+
return (val * (max - min)) - min;
|
45506
|
+
}
|
45507
|
+
|
45508
|
+
function handleKeyboard(minValue, maxValue) {
|
45509
|
+
function alter(delta) {
|
45510
|
+
var value;
|
45511
|
+
|
45512
|
+
value = self.value();
|
45513
|
+
value = fromFraction(minValue, maxValue, toFraction(minValue, maxValue, value) + (delta * 0.05));
|
45514
|
+
value = constrain(value, minValue, maxValue);
|
45515
|
+
|
45516
|
+
self.value(value);
|
45517
|
+
|
45518
|
+
self.fire('dragstart', {value: value});
|
45519
|
+
self.fire('drag', {value: value});
|
45520
|
+
self.fire('dragend', {value: value});
|
45521
|
+
}
|
45522
|
+
|
45523
|
+
self.on('keydown', function(e) {
|
45524
|
+
switch (e.keyCode) {
|
45525
|
+
case 37:
|
45526
|
+
case 38:
|
45527
|
+
alter(-1);
|
45528
|
+
break;
|
45529
|
+
|
45530
|
+
case 39:
|
45531
|
+
case 40:
|
45532
|
+
alter(1);
|
45533
|
+
break;
|
45534
|
+
}
|
45535
|
+
});
|
45536
|
+
}
|
45537
|
+
|
45538
|
+
function handleDrag(minValue, maxValue, handleEl) {
|
45539
|
+
var startPos, startHandlePos, maxHandlePos, handlePos, value;
|
45540
|
+
|
45541
|
+
self._dragHelper = new DragHelper(self._id, {
|
45542
|
+
handle: self._id + "-handle",
|
45543
|
+
|
45544
|
+
start: function(e) {
|
45545
|
+
startPos = e[screenCordName];
|
45546
|
+
startHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);
|
45547
|
+
maxHandlePos = (self.layoutRect()[shortSizeName] || 100) - DomUtils.getSize(handleEl)[sizeName];
|
45548
|
+
self.fire('dragstart', {value: value});
|
45549
|
+
},
|
45550
|
+
|
45551
|
+
drag: function(e) {
|
45552
|
+
var delta = e[screenCordName] - startPos;
|
45553
|
+
|
45554
|
+
handlePos = constrain(startHandlePos + delta, 0, maxHandlePos);
|
45555
|
+
handleEl.style[stylePosName] = handlePos + 'px';
|
45556
|
+
|
45557
|
+
value = minValue + (handlePos / maxHandlePos) * (maxValue - minValue);
|
45558
|
+
self.value(value);
|
45559
|
+
|
45560
|
+
self.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');
|
45561
|
+
|
45562
|
+
self.fire('drag', {value: value});
|
45563
|
+
},
|
45564
|
+
|
45565
|
+
stop: function() {
|
45566
|
+
self.tooltip().hide();
|
45567
|
+
self.fire('dragend', {value: value});
|
45568
|
+
}
|
45569
|
+
});
|
45570
|
+
}
|
45234
45571
|
|
45235
45572
|
minValue = self._minValue;
|
45236
45573
|
maxValue = self._maxValue;
|
45237
|
-
value = self.value();
|
45238
45574
|
|
45239
45575
|
if (self.settings.orientation == "v") {
|
45240
45576
|
screenCordName = "screenY";
|
@@ -45250,35 +45586,8 @@ define("tinymce/ui/Slider", [
|
|
45250
45586
|
|
45251
45587
|
self._super();
|
45252
45588
|
|
45253
|
-
|
45254
|
-
|
45255
|
-
|
45256
|
-
start: function(e) {
|
45257
|
-
startPos = e[screenCordName];
|
45258
|
-
startHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);
|
45259
|
-
maxHandlePos = (self.layoutRect()[shortSizeName] || 100) - DomUtils.getSize(self.getEl('handle'))[sizeName];
|
45260
|
-
self.fire('dragstart', {value: value});
|
45261
|
-
},
|
45262
|
-
|
45263
|
-
drag: function(e) {
|
45264
|
-
var delta = e[screenCordName] - startPos, handleEl = self.getEl('handle');
|
45265
|
-
|
45266
|
-
handlePos = constrain(startHandlePos + delta, 0, maxHandlePos);
|
45267
|
-
handleEl.style[stylePosName] = handlePos + 'px';
|
45268
|
-
|
45269
|
-
value = minValue + (handlePos / maxHandlePos) * (maxValue - minValue);
|
45270
|
-
self.value(value);
|
45271
|
-
|
45272
|
-
self.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');
|
45273
|
-
|
45274
|
-
self.fire('drag', {value: value});
|
45275
|
-
},
|
45276
|
-
|
45277
|
-
stop: function() {
|
45278
|
-
self.tooltip().hide();
|
45279
|
-
self.fire('dragend', {value: value});
|
45280
|
-
}
|
45281
|
-
});
|
45589
|
+
handleKeyboard(minValue, maxValue, self.getEl('handle'));
|
45590
|
+
handleDrag(minValue, maxValue, self.getEl('handle'));
|
45282
45591
|
},
|
45283
45592
|
|
45284
45593
|
repaint: function() {
|
@@ -45727,10 +46036,10 @@ define("tinymce/ui/TabPanel", [
|
|
45727
46036
|
* @extends tinymce.ui.Widget
|
45728
46037
|
*/
|
45729
46038
|
define("tinymce/ui/TextBox", [
|
45730
|
-
"tinymce/ui/Widget"
|
45731
|
-
|
45732
|
-
"
|
45733
|
-
|
46039
|
+
"tinymce/ui/Widget",
|
46040
|
+
"tinymce/util/Tools",
|
46041
|
+
"tinymce/ui/DomUtils"
|
46042
|
+
], function(Widget, Tools, DomUtils) {
|
45734
46043
|
return Widget.extend({
|
45735
46044
|
/**
|
45736
46045
|
* Constructs a instance with the specified settings.
|
@@ -45831,38 +46140,33 @@ define("tinymce/ui/TextBox", [
|
|
45831
46140
|
* @return {String} HTML representing the control.
|
45832
46141
|
*/
|
45833
46142
|
renderHtml: function() {
|
45834
|
-
var self = this,
|
46143
|
+
var self = this, settings = self.settings, attrs, elm;
|
45835
46144
|
|
45836
|
-
|
45837
|
-
|
45838
|
-
|
46145
|
+
attrs = {
|
46146
|
+
id: self._id,
|
46147
|
+
hidefocus: '1'
|
46148
|
+
};
|
45839
46149
|
|
45840
|
-
|
45841
|
-
|
45842
|
-
|
46150
|
+
Tools.each([
|
46151
|
+
'rows', 'spellcheck', 'maxLength', 'size', 'readonly', 'min',
|
46152
|
+
'max', 'step', 'list', 'pattern', 'placeholder', 'required', 'multiple'
|
46153
|
+
], function(name) {
|
46154
|
+
attrs[name] = settings[name];
|
46155
|
+
});
|
45843
46156
|
|
45844
|
-
if (
|
45845
|
-
|
46157
|
+
if (self.disabled()) {
|
46158
|
+
attrs.disabled = 'disabled';
|
45846
46159
|
}
|
45847
46160
|
|
45848
46161
|
if (settings.subtype) {
|
45849
|
-
|
46162
|
+
attrs.type = settings.subtype;
|
45850
46163
|
}
|
45851
46164
|
|
45852
|
-
|
45853
|
-
|
45854
|
-
|
45855
|
-
|
45856
|
-
if (settings.multiline) {
|
45857
|
-
return (
|
45858
|
-
'<textarea id="' + id + '" class="' + self.classes + '" ' +
|
45859
|
-
(settings.rows ? ' rows="' + settings.rows + '"' : '') +
|
45860
|
-
' hidefocus="1"' + extraAttrs + '>' + value +
|
45861
|
-
'</textarea>'
|
45862
|
-
);
|
45863
|
-
}
|
46165
|
+
elm = DomUtils.create(settings.multiline ? 'textarea' : 'input', attrs);
|
46166
|
+
elm.value = self.state.get('value');
|
46167
|
+
elm.className = self.classes;
|
45864
46168
|
|
45865
|
-
return
|
46169
|
+
return elm.outerHTML;
|
45866
46170
|
},
|
45867
46171
|
|
45868
46172
|
value: function(value) {
|
@@ -45887,6 +46191,7 @@ define("tinymce/ui/TextBox", [
|
|
45887
46191
|
postRender: function() {
|
45888
46192
|
var self = this;
|
45889
46193
|
|
46194
|
+
self.getEl().value = self.state.get('value');
|
45890
46195
|
self._super();
|
45891
46196
|
|
45892
46197
|
self.$el.on('change', function(e) {
|
@@ -45955,5 +46260,5 @@ define("tinymce/Register", [
|
|
45955
46260
|
return {};
|
45956
46261
|
});
|
45957
46262
|
|
45958
|
-
expose(["tinymce/geom/Rect","tinymce/util/Promise","tinymce/util/Delay","tinymce/
|
46263
|
+
expose(["tinymce/geom/Rect","tinymce/util/Promise","tinymce/util/Delay","tinymce/Env","tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/dom/RangeUtils","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/util/Observable","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/ReflowQueue","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Progress","tinymce/ui/Notification","tinymce/NotificationManager","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","tinymce/util/XHR","tinymce/util/JSON","tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/InfoBox","tinymce/ui/Label","tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/ui/Menu","tinymce/ui/ListBox","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/SelectBox","tinymce/ui/Slider","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox"]);
|
45959
46264
|
})(this);
|