jodit 4.15.17 → 4.16.0
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.
- package/CHANGELOG.md +18 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +12 -11
- package/es2015/jodit.js +198 -80
- package/es2015/jodit.min.js +12 -11
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +11 -10
- package/es2018/jodit.min.js +12 -11
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +15 -14
- package/es2021/jodit.js +196 -80
- package/es2021/jodit.min.js +17 -16
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +15 -14
- package/es2021.en/jodit.js +196 -80
- package/es2021.en/jodit.min.js +15 -14
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +258 -116
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +23 -0
- package/esm/config.js +21 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +8 -3
- package/esm/core/helpers/utils/align.js +40 -2
- package/esm/core/selection/selection.js +5 -0
- package/esm/core/ui/button/button/button.js +10 -4
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/group/group.d.ts +4 -0
- package/esm/core/ui/group/group.js +5 -1
- package/esm/core/ui/group/list.js +2 -2
- package/esm/modules/dialog/dialog.js +7 -0
- package/esm/modules/toolbar/button/content.d.ts +7 -0
- package/esm/modules/toolbar/button/content.js +9 -1
- package/esm/plugins/image-properties/readers/align.d.ts +5 -1
- package/esm/plugins/image-properties/readers/align.js +4 -18
- package/esm/plugins/image-properties/readers/index.js +1 -1
- package/esm/plugins/image-properties/writers/index.js +1 -1
- package/esm/plugins/inline-popup/config/items/img.js +17 -2
- package/esm/plugins/source/editor/engines/ace.js +13 -6
- package/esm/plugins/source/source.js +20 -1
- package/esm/types/types.d.ts +4 -0
- package/package.json +1 -1
- package/types/config.d.ts +23 -0
- package/types/core/helpers/utils/align.d.ts +8 -3
- package/types/core/ui/group/group.d.ts +4 -0
- package/types/modules/toolbar/button/content.d.ts +7 -0
- package/types/plugins/image-properties/readers/align.d.ts +5 -1
- package/types/types/types.d.ts +4 -0
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.
|
|
4
|
+
* Version: v4.16.0
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -728,6 +728,25 @@ var ConfigPrototype = {};
|
|
|
728
728
|
/**
|
|
729
729
|
* Default width (in pixels) applied to images inserted into the editor
|
|
730
730
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "imageDefaultWidth", 300);
|
|
731
|
+
/**
|
|
732
|
+
* Alignment given to images inserted into the editor. `'normal'` leaves
|
|
733
|
+
* them unaligned
|
|
734
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "imageDefaultAlign", 'normal');
|
|
735
|
+
/**
|
|
736
|
+
* Class names to align images with, instead of an inline `float` or
|
|
737
|
+
* `margin`. Aligning an image removes every class listed here and adds the
|
|
738
|
+
* chosen alignment's, which can be several separated by spaces.
|
|
739
|
+
*
|
|
740
|
+
* ```javascript
|
|
741
|
+
* Jodit.make('#editor', {
|
|
742
|
+
* imageAlignClasses: {
|
|
743
|
+
* left: 'align-left',
|
|
744
|
+
* right: 'align-right',
|
|
745
|
+
* center: 'align-center'
|
|
746
|
+
* }
|
|
747
|
+
* });
|
|
748
|
+
* ```
|
|
749
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "imageAlignClasses", null);
|
|
731
750
|
/**
|
|
732
751
|
* Do not display these buttons that are on the list
|
|
733
752
|
*
|
|
@@ -2110,7 +2129,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2110
2129
|
* @packageDocumentation
|
|
2111
2130
|
* @module constants
|
|
2112
2131
|
*/
|
|
2113
|
-
var APP_VERSION = "4.
|
|
2132
|
+
var APP_VERSION = "4.16.0";
|
|
2114
2133
|
// prettier-ignore
|
|
2115
2134
|
var ES = "es5";
|
|
2116
2135
|
var IS_ES_MODERN = false;
|
|
@@ -8551,11 +8570,13 @@ function trimChars(value, chars) {
|
|
|
8551
8570
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8552
8571
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
8553
8572
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
8573
|
+
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
8554
8574
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
8555
8575
|
/* harmony export */ });
|
|
8556
|
-
/* harmony import */ var
|
|
8557
|
-
/* harmony import */ var
|
|
8558
|
-
/* harmony import */ var
|
|
8576
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
8577
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
|
|
8578
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
|
|
8579
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80991);
|
|
8559
8580
|
/*!
|
|
8560
8581
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8561
8582
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8565,15 +8586,38 @@ function trimChars(value, chars) {
|
|
|
8565
8586
|
*/
|
|
8566
8587
|
|
|
8567
8588
|
|
|
8589
|
+
|
|
8590
|
+
var classNames = function classNames(value) {
|
|
8591
|
+
return (value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
|
|
8592
|
+
};
|
|
8568
8593
|
/**
|
|
8569
|
-
* Align image
|
|
8570
|
-
|
|
8594
|
+
* Align image, with `classes` (see `imageAlignClasses`) instead of inline
|
|
8595
|
+
* styles when they are given
|
|
8596
|
+
*/ function hAlignElement(image, align, classes) {
|
|
8597
|
+
if (classes) {
|
|
8598
|
+
var _image_classList, _image_classList1;
|
|
8599
|
+
hAlignElement(image, 'normal');
|
|
8600
|
+
Object.values(classes).forEach(function(value) {
|
|
8601
|
+
return (_image_classList = image.classList).remove.apply(_image_classList, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(classNames(value)));
|
|
8602
|
+
});
|
|
8603
|
+
(_image_classList1 = image.classList).add.apply(_image_classList1, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(classNames(classes[align || 'normal'])));
|
|
8604
|
+
[
|
|
8605
|
+
'class',
|
|
8606
|
+
'style'
|
|
8607
|
+
].forEach(function(name) {
|
|
8608
|
+
var _attr;
|
|
8609
|
+
if (!((_attr = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _attr === void 0 ? void 0 : _attr.trim())) {
|
|
8610
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
|
|
8611
|
+
}
|
|
8612
|
+
});
|
|
8613
|
+
return;
|
|
8614
|
+
}
|
|
8571
8615
|
if (align && align !== 'normal') {
|
|
8572
8616
|
if (align !== 'center') {
|
|
8573
|
-
(0,
|
|
8574
|
-
(0,
|
|
8617
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
|
|
8618
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
8575
8619
|
} else {
|
|
8576
|
-
(0,
|
|
8620
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
8577
8621
|
float: '',
|
|
8578
8622
|
display: 'block',
|
|
8579
8623
|
marginLeft: 'auto',
|
|
@@ -8581,24 +8625,52 @@ function trimChars(value, chars) {
|
|
|
8581
8625
|
});
|
|
8582
8626
|
}
|
|
8583
8627
|
} else {
|
|
8584
|
-
if ((0,
|
|
8628
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
|
|
8585
8629
|
'right',
|
|
8586
8630
|
'left'
|
|
8587
|
-
].indexOf((0,
|
|
8588
|
-
(0,
|
|
8631
|
+
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
8632
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
|
|
8589
8633
|
}
|
|
8590
|
-
;(0,
|
|
8634
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
8591
8635
|
}
|
|
8592
8636
|
}
|
|
8637
|
+
/**
|
|
8638
|
+
* The alignment `hAlignElement` has set on an element
|
|
8639
|
+
*/ function getHAlign(elm, classes) {
|
|
8640
|
+
if (classes) {
|
|
8641
|
+
for(var _i = 0, _iter = [
|
|
8642
|
+
'left',
|
|
8643
|
+
'right',
|
|
8644
|
+
'center',
|
|
8645
|
+
'normal'
|
|
8646
|
+
]; _i < _iter.length; _i++){
|
|
8647
|
+
var align = _iter[_i];
|
|
8648
|
+
var names = classNames(classes[align]);
|
|
8649
|
+
if (names.length && names.every(function(name) {
|
|
8650
|
+
return elm.classList.contains(name);
|
|
8651
|
+
})) {
|
|
8652
|
+
return align;
|
|
8653
|
+
}
|
|
8654
|
+
}
|
|
8655
|
+
}
|
|
8656
|
+
var float = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
|
|
8657
|
+
if (float === 'left' || float === 'right') {
|
|
8658
|
+
return float;
|
|
8659
|
+
}
|
|
8660
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'display') === 'block' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-left') === 'auto' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
8661
|
+
return 'center';
|
|
8662
|
+
}
|
|
8663
|
+
return 'normal';
|
|
8664
|
+
}
|
|
8593
8665
|
/**
|
|
8594
8666
|
* Remove text-align style for all selected children
|
|
8595
8667
|
*/ function clearAlign(node) {
|
|
8596
|
-
|
|
8597
|
-
if (
|
|
8598
|
-
if ((0,
|
|
8599
|
-
(0,
|
|
8600
|
-
if (!((0,
|
|
8601
|
-
(0,
|
|
8668
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node, function(elm) {
|
|
8669
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(elm)) {
|
|
8670
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
|
|
8671
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
|
|
8672
|
+
if (!((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
|
|
8673
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
|
|
8602
8674
|
}
|
|
8603
8675
|
}
|
|
8604
8676
|
}
|
|
@@ -8625,11 +8697,11 @@ function trimChars(value, chars) {
|
|
|
8625
8697
|
]
|
|
8626
8698
|
]);
|
|
8627
8699
|
function alignElement(command, box) {
|
|
8628
|
-
if (
|
|
8700
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(box) && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(box)) {
|
|
8629
8701
|
clearAlign(box);
|
|
8630
8702
|
var align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
8631
8703
|
if (align) {
|
|
8632
|
-
(0,
|
|
8704
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
|
|
8633
8705
|
}
|
|
8634
8706
|
}
|
|
8635
8707
|
}
|
|
@@ -9801,6 +9873,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9801
9873
|
/* harmony export */ get: function() { return /* reexport safe */ _get__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
9802
9874
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
9803
9875
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
|
|
9876
|
+
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
9804
9877
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
|
|
9805
9878
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
|
|
9806
9879
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
@@ -9831,7 +9904,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9831
9904
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
9832
9905
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
9833
9906
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
9834
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _assert__WEBPACK_IMPORTED_MODULE_2__) if(["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _assert__WEBPACK_IMPORTED_MODULE_2__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
9907
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _assert__WEBPACK_IMPORTED_MODULE_2__) if(["default","alignElement","clearAlign","getHAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _assert__WEBPACK_IMPORTED_MODULE_2__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
9835
9908
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
9836
9909
|
/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
9837
9910
|
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26136);
|
|
@@ -12093,11 +12166,12 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
12093
12166
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23211);
|
|
12094
12167
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
12095
12168
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28686);
|
|
12096
|
-
/* harmony import */ var
|
|
12097
|
-
/* harmony import */ var
|
|
12098
|
-
/* harmony import */ var
|
|
12099
|
-
/* harmony import */ var
|
|
12100
|
-
/* harmony import */ var
|
|
12169
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(16849);
|
|
12170
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28712);
|
|
12171
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__);
|
|
12172
|
+
/* harmony import */ var jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7470);
|
|
12173
|
+
/* harmony import */ var _style_commit_style__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(84578);
|
|
12174
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(42259);
|
|
12101
12175
|
/*!
|
|
12102
12176
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
12103
12177
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -12125,6 +12199,7 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
12125
12199
|
|
|
12126
12200
|
|
|
12127
12201
|
|
|
12202
|
+
|
|
12128
12203
|
var Selection = /*#__PURE__*/ function() {
|
|
12129
12204
|
"use strict";
|
|
12130
12205
|
function Selection(jodit) {
|
|
@@ -12709,7 +12784,7 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
12709
12784
|
return node;
|
|
12710
12785
|
}
|
|
12711
12786
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node)) {
|
|
12712
|
-
var ret = (0,
|
|
12787
|
+
var ret = (0,_helpers__WEBPACK_IMPORTED_MODULE_17__.findCorrectCurrentNode)(node, range, rightMode, sel.isCollapsed, checkChild, child);
|
|
12713
12788
|
node = ret.node;
|
|
12714
12789
|
rightMode = ret.rightMode;
|
|
12715
12790
|
}
|
|
@@ -12870,6 +12945,10 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
12870
12945
|
if (styles && (typeof styles === "undefined" ? "undefined" : (0,_swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_7__._)(styles)) === 'object') {
|
|
12871
12946
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, styles);
|
|
12872
12947
|
}
|
|
12948
|
+
var _this_j_o = this.j.o, imageDefaultAlign = _this_j_o.imageDefaultAlign, imageAlignClasses = _this_j_o.imageAlignClasses;
|
|
12949
|
+
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
12950
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
|
|
12951
|
+
}
|
|
12873
12952
|
var onload = function onload1() {
|
|
12874
12953
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
12875
12954
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, {
|
|
@@ -13025,7 +13104,7 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13025
13104
|
};
|
|
13026
13105
|
// check right offset
|
|
13027
13106
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(container)) {
|
|
13028
|
-
if ((0,
|
|
13107
|
+
if ((0,_helpers__WEBPACK_IMPORTED_MODULE_17__.cursorInTheEdgeOfString)(container, offset, start, end)) {
|
|
13029
13108
|
return false;
|
|
13030
13109
|
}
|
|
13031
13110
|
} else {
|
|
@@ -13639,8 +13718,8 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13639
13718
|
* ```
|
|
13640
13719
|
*/ key: "commitStyle",
|
|
13641
13720
|
value: function commitStyle(options) {
|
|
13642
|
-
;(0,
|
|
13643
|
-
var styleElm = new
|
|
13721
|
+
;(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.size)(options) > 0, 'Need to pass at least one option');
|
|
13722
|
+
var styleElm = new _style_commit_style__WEBPACK_IMPORTED_MODULE_16__.CommitStyle(options);
|
|
13644
13723
|
styleElm.apply(this.j);
|
|
13645
13724
|
}
|
|
13646
13725
|
},
|
|
@@ -13701,7 +13780,7 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13701
13780
|
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isEmptyTextNode(node) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(node);
|
|
13702
13781
|
});
|
|
13703
13782
|
};
|
|
13704
|
-
(0,
|
|
13783
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(currentBox.parentNode, 'Splitting fails');
|
|
13705
13784
|
try {
|
|
13706
13785
|
clearEmpties(fragment);
|
|
13707
13786
|
clearEmpties(currentBox);
|
|
@@ -13764,7 +13843,7 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13764
13843
|
var r = range.cloneRange();
|
|
13765
13844
|
r.collapse(start);
|
|
13766
13845
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeInsertNode(r, fake);
|
|
13767
|
-
(0,
|
|
13846
|
+
(0,jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_15__.moveTheNodeAlongTheEdgeOutward)(fake, start, _this.j.editor);
|
|
13768
13847
|
return fake;
|
|
13769
13848
|
};
|
|
13770
13849
|
var leftFake = moveMaxEdgeFake(true);
|
|
@@ -17046,6 +17125,7 @@ var UIButton = /*#__PURE__*/ function(UIElement) {
|
|
|
17046
17125
|
this.name = this.state.name;
|
|
17047
17126
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'data-ref', this.state.name);
|
|
17048
17127
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'ref', this.state.name);
|
|
17128
|
+
this.updateAriaLabel();
|
|
17049
17129
|
}
|
|
17050
17130
|
},
|
|
17051
17131
|
{
|
|
@@ -17063,9 +17143,12 @@ var UIButton = /*#__PURE__*/ function(UIElement) {
|
|
|
17063
17143
|
key: "updateAriaLabel",
|
|
17064
17144
|
value: function updateAriaLabel() {
|
|
17065
17145
|
var hasText = this.state.text.trim().length > 0;
|
|
17066
|
-
|
|
17067
|
-
(
|
|
17068
|
-
|
|
17146
|
+
// An icon-only button without a tooltip would have no accessible
|
|
17147
|
+
// name at all — fall back to its raw name (not translated: control
|
|
17148
|
+
// names are identifiers, not i18n keys).
|
|
17149
|
+
var label = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : !hasText && this.state.name ? this.state.name : null;
|
|
17150
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'aria-label', label);
|
|
17151
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.button, 'aria-label', !hasText ? label : null);
|
|
17069
17152
|
}
|
|
17070
17153
|
},
|
|
17071
17154
|
{
|
|
@@ -18473,7 +18556,7 @@ var UIFileInput = /*#__PURE__*/ function(UIInput1) {
|
|
|
18473
18556
|
{
|
|
18474
18557
|
key: "createNativeInput",
|
|
18475
18558
|
value: function createNativeInput(options) {
|
|
18476
|
-
return this.j.create.fromHTML('<input\n type="file"\n accept="'.concat(options.onlyImages ? 'image/*' : '*', '"\n tabindex="-1"\n dir="auto"\n multiple=""\n />'));
|
|
18559
|
+
return this.j.create.fromHTML('<input\n type="file"\n accept="'.concat(options.onlyImages ? 'image/*' : '*', '"\n aria-label="').concat(this.j.i18n(options.tooltip || 'Upload'), '"\n tabindex="-1"\n dir="auto"\n multiple=""\n />'));
|
|
18477
18560
|
}
|
|
18478
18561
|
}
|
|
18479
18562
|
]);
|
|
@@ -19118,9 +19201,12 @@ var UIGroup = /*#__PURE__*/ function(UIElement) {
|
|
|
19118
19201
|
},
|
|
19119
19202
|
{
|
|
19120
19203
|
key: "getRole",
|
|
19121
|
-
value:
|
|
19204
|
+
value: /**
|
|
19205
|
+
* A generic container: `group` allows any children. Toolbar button groups
|
|
19206
|
+
* are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
|
|
19207
|
+
*/ function getRole() {
|
|
19122
19208
|
var _this_options;
|
|
19123
|
-
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || '
|
|
19209
|
+
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || 'group';
|
|
19124
19210
|
}
|
|
19125
19211
|
},
|
|
19126
19212
|
{
|
|
@@ -19384,10 +19470,11 @@ var UIList = /*#__PURE__*/ function(UIGroup1) {
|
|
|
19384
19470
|
key: "makeGroup",
|
|
19385
19471
|
value: /**
|
|
19386
19472
|
* Make new group and append it in list of elements
|
|
19387
|
-
*/ function makeGroup(
|
|
19388
|
-
|
|
19473
|
+
*/ function makeGroup() {
|
|
19474
|
+
var role = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'list';
|
|
19475
|
+
return new jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_13__.UIGroup(this.jodit, [], {
|
|
19389
19476
|
role: role
|
|
19390
|
-
}
|
|
19477
|
+
});
|
|
19391
19478
|
}
|
|
19392
19479
|
},
|
|
19393
19480
|
{
|
|
@@ -23214,13 +23301,14 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorat
|
|
|
23214
23301
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28077);
|
|
23215
23302
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45664);
|
|
23216
23303
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(28686);
|
|
23217
|
-
/* harmony import */ var
|
|
23218
|
-
/* harmony import */ var
|
|
23219
|
-
/* harmony import */ var
|
|
23220
|
-
/* harmony import */ var
|
|
23221
|
-
/* harmony import */ var
|
|
23222
|
-
/* harmony import */ var
|
|
23223
|
-
/* harmony import */ var
|
|
23304
|
+
/* harmony import */ var jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(22852);
|
|
23305
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(93640);
|
|
23306
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28712);
|
|
23307
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__);
|
|
23308
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(4099);
|
|
23309
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(35099);
|
|
23310
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(2222);
|
|
23311
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(5266);
|
|
23224
23312
|
/*!
|
|
23225
23313
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
23226
23314
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -23251,7 +23339,8 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorat
|
|
|
23251
23339
|
|
|
23252
23340
|
|
|
23253
23341
|
|
|
23254
|
-
|
|
23342
|
+
|
|
23343
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.dialog = {
|
|
23255
23344
|
namespace: '',
|
|
23256
23345
|
extraButtons: [],
|
|
23257
23346
|
/**
|
|
@@ -23267,7 +23356,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_22__.Config.prototype.dialog = {
|
|
|
23267
23356
|
toolbarButtonSize: 'middle',
|
|
23268
23357
|
zIndex: 'inherit'
|
|
23269
23358
|
};
|
|
23270
|
-
|
|
23359
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.controls.dialog = {
|
|
23271
23360
|
close: {
|
|
23272
23361
|
icon: 'cancel',
|
|
23273
23362
|
exec: function exec(dialog) {
|
|
@@ -23307,7 +23396,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23307
23396
|
* True, if dialog was opened
|
|
23308
23397
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "isOpened", false);
|
|
23309
23398
|
var self1 = _this;
|
|
23310
|
-
self1.options = (0,
|
|
23399
|
+
self1.options = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.ConfigProto)(options, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.ConfigProto)(jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.dialog, Dialog.defaultOptions));
|
|
23311
23400
|
// Attach event handlers passed via `options.events` to the dialog's own
|
|
23312
23401
|
// emitter (as FileBrowser already does), so a consumer — e.g. a plugin
|
|
23313
23402
|
// forwarding the editor's `events` config — can observe `afterOpen` /
|
|
@@ -23316,38 +23405,38 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23316
23405
|
self1.attachEvents(self1.options);
|
|
23317
23406
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__.Dom.safeRemove(self1.container);
|
|
23318
23407
|
var n = _this.getFullElName.bind(_this);
|
|
23319
|
-
self1.container = _this.c.fromHTML('<div class="jodit jodit-dialog '.concat(_this.componentName, '">\n <div class="').concat(n('overlay'), '"></div>\n <div class="').concat(_this.getFullElName('panel'), '">\n <div class="').concat(n('header'), '">\n <div class="').concat(n('header-title'), '"></div>\n <div class="').concat(n('header-toolbar'), '"></div>\n </div>\n <div class="').concat(n('content'), '"></div>\n <div class="').concat(n('footer'), '"></div>\n <div class="').concat(n('resizer'), '">').concat(
|
|
23408
|
+
self1.container = _this.c.fromHTML('<div class="jodit jodit-dialog '.concat(_this.componentName, '">\n <div class="').concat(n('overlay'), '"></div>\n <div class="').concat(_this.getFullElName('panel'), '">\n <div class="').concat(n('header'), '">\n <div class="').concat(n('header-title'), '"></div>\n <div class="').concat(n('header-toolbar'), '"></div>\n </div>\n <div class="').concat(n('content'), '"></div>\n <div class="').concat(n('footer'), '"></div>\n <div class="').concat(n('resizer'), '">').concat(jodit_core_ui__WEBPACK_IMPORTED_MODULE_20__.Icon.get('resize_handler'), "</div>\n </div>\n </div>"));
|
|
23320
23409
|
if (self1.options.direction === 'rtl') {
|
|
23321
|
-
(0,
|
|
23322
|
-
(0,
|
|
23410
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(self1.container, 'direction', 'rtl');
|
|
23411
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(self1.container, 'dir', 'rtl');
|
|
23323
23412
|
}
|
|
23324
23413
|
if (_this.o.zIndex) {
|
|
23325
|
-
(0,
|
|
23414
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(_this.container, 'zIndex', _this.o.zIndex.toString());
|
|
23326
23415
|
}
|
|
23327
|
-
;(0,
|
|
23416
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(self1.container, 'role', 'dialog');
|
|
23328
23417
|
Object.defineProperty(self1.container, 'component', {
|
|
23329
23418
|
value: _this
|
|
23330
23419
|
});
|
|
23331
23420
|
self1.setMod('theme', self1.o.theme || 'default').setMod('resizable', Boolean(self1.o.resizable));
|
|
23332
23421
|
var dialog = self1.getElm('panel');
|
|
23333
|
-
(0,
|
|
23422
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialog != null, 'Panel element does not exist');
|
|
23334
23423
|
var resizer = self1.getElm('resizer');
|
|
23335
|
-
(0,
|
|
23424
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(resizer != null, 'Resizer element does not exist');
|
|
23336
23425
|
var dialogbox_header = self1.getElm('header-title');
|
|
23337
|
-
(0,
|
|
23426
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_header != null, 'header-title element does not exist');
|
|
23338
23427
|
var dialogbox_content = self1.getElm('content');
|
|
23339
|
-
(0,
|
|
23428
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_content != null, 'Content element does not exist');
|
|
23340
23429
|
var dialogbox_footer = self1.getElm('footer');
|
|
23341
|
-
(0,
|
|
23430
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_footer != null, 'Footer element does not exist');
|
|
23342
23431
|
var dialogbox_toolbar = self1.getElm('header-toolbar');
|
|
23343
|
-
(0,
|
|
23432
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
|
|
23344
23433
|
_this.dialog = dialog;
|
|
23345
23434
|
_this.resizer = resizer;
|
|
23346
23435
|
_this.dialogbox_header = dialogbox_header;
|
|
23347
23436
|
_this.dialogbox_content = dialogbox_content;
|
|
23348
23437
|
_this.dialogbox_footer = dialogbox_footer;
|
|
23349
23438
|
_this.dialogbox_toolbar = dialogbox_toolbar;
|
|
23350
|
-
(0,
|
|
23439
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(self1.dialog, {
|
|
23351
23440
|
maxWidth: self1.options.maxWidth,
|
|
23352
23441
|
minHeight: self1.options.minHeight,
|
|
23353
23442
|
minWidth: self1.options.minWidth
|
|
@@ -23360,7 +23449,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23360
23449
|
_this.e.on(self1.container, 'close_dialog', self1.close).on(_this.ow, 'keydown', _this.__onEsc).on(_this.ow, 'resize', _this.__onResize);
|
|
23361
23450
|
if (_this.o.closeOnClickOverlay) {
|
|
23362
23451
|
var overlay = self1.getElm('overlay');
|
|
23363
|
-
(0,
|
|
23452
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(overlay != null, 'Overlay element does not exist');
|
|
23364
23453
|
_this.e.on(overlay, 'click', self1.close);
|
|
23365
23454
|
}
|
|
23366
23455
|
return _this;
|
|
@@ -23444,8 +23533,8 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23444
23533
|
this.draggable = true;
|
|
23445
23534
|
this.startX = e.clientX;
|
|
23446
23535
|
this.startY = e.clientY;
|
|
23447
|
-
this.startPoint.x = (0,
|
|
23448
|
-
this.startPoint.y = (0,
|
|
23536
|
+
this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'left');
|
|
23537
|
+
this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'top');
|
|
23449
23538
|
this.setMaxZIndex();
|
|
23450
23539
|
if (e.cancelable) {
|
|
23451
23540
|
e.preventDefault();
|
|
@@ -23553,7 +23642,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23553
23642
|
if (h == null) {
|
|
23554
23643
|
h = this.dialog.offsetHeight;
|
|
23555
23644
|
}
|
|
23556
|
-
;(0,
|
|
23645
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, {
|
|
23557
23646
|
width: w,
|
|
23558
23647
|
height: h
|
|
23559
23648
|
});
|
|
@@ -23593,7 +23682,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23593
23682
|
this.moved = Math.abs(x - left) > 100 || Math.abs(y - top) > 100;
|
|
23594
23683
|
}
|
|
23595
23684
|
// strings on purpose: `css()` would truncate fractional pixels
|
|
23596
|
-
;(0,
|
|
23685
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, {
|
|
23597
23686
|
left: (x || left) + 'px',
|
|
23598
23687
|
top: (y || top) + 'px'
|
|
23599
23688
|
});
|
|
@@ -23616,6 +23705,12 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23616
23705
|
*/ key: "setHeader",
|
|
23617
23706
|
value: function setHeader(content) {
|
|
23618
23707
|
this.setElements(this.dialogbox_header, content);
|
|
23708
|
+
// `role="dialog"` needs an accessible name; a text title is the
|
|
23709
|
+
// natural one (element titles are left to the caller).
|
|
23710
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_16__.isString)(content)) {
|
|
23711
|
+
var name = (0,jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_17__.stripTags)(content, this.od).trim();
|
|
23712
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(this.container, 'aria-label', name || null);
|
|
23713
|
+
}
|
|
23619
23714
|
return this;
|
|
23620
23715
|
}
|
|
23621
23716
|
},
|
|
@@ -23682,7 +23777,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23682
23777
|
* Get zIndex from dialog
|
|
23683
23778
|
*/ key: "getZIndex",
|
|
23684
23779
|
value: function getZIndex() {
|
|
23685
|
-
return parseInt((0,
|
|
23780
|
+
return parseInt((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex'), 10) || 0;
|
|
23686
23781
|
}
|
|
23687
23782
|
},
|
|
23688
23783
|
{
|
|
@@ -23711,7 +23806,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23711
23806
|
this.__openedSiblings().forEach(function(dialog) {
|
|
23712
23807
|
maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
|
|
23713
23808
|
});
|
|
23714
|
-
(0,
|
|
23809
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
|
|
23715
23810
|
}
|
|
23716
23811
|
},
|
|
23717
23812
|
{
|
|
@@ -23767,7 +23862,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23767
23862
|
this.setPosition(this.offsetX, this.offsetY);
|
|
23768
23863
|
this.setMaxZIndex();
|
|
23769
23864
|
} else {
|
|
23770
|
-
(0,
|
|
23865
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex', null);
|
|
23771
23866
|
}
|
|
23772
23867
|
if (this.o.fullsize) {
|
|
23773
23868
|
this.toggleFullSize(true);
|
|
@@ -23872,12 +23967,12 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23872
23967
|
}
|
|
23873
23968
|
]);
|
|
23874
23969
|
return Dialog;
|
|
23875
|
-
}(
|
|
23970
|
+
}(jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_22__.ViewWithToolbar);
|
|
23876
23971
|
/**
|
|
23877
23972
|
* Registry of the currently opened dialogs. Replaces a DOM scan of the
|
|
23878
23973
|
* whole `destination` (usually `document.body`) for every z-index update.
|
|
23879
23974
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "__opened", new Set());
|
|
23880
|
-
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({},
|
|
23975
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, jodit_core_view_view__WEBPACK_IMPORTED_MODULE_21__.View.defaultOptions), {
|
|
23881
23976
|
closeOnClickOverlay: false,
|
|
23882
23977
|
closeOnEsc: true
|
|
23883
23978
|
}));
|
|
@@ -30046,7 +30141,6 @@ var ToolbarContent = /*#__PURE__*/ function(UIButton) {
|
|
|
30046
30141
|
jodit
|
|
30047
30142
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "control", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "target", void 0), _this.control = control, _this.target = target;
|
|
30048
30143
|
_this.container.classList.add("".concat(_this.componentName, "_").concat(_this.clearName(control.name)));
|
|
30049
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_this.container, 'role', 'content');
|
|
30050
30144
|
return _this;
|
|
30051
30145
|
}
|
|
30052
30146
|
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(ToolbarContent, [
|
|
@@ -30056,6 +30150,19 @@ var ToolbarContent = /*#__PURE__*/ function(UIButton) {
|
|
|
30056
30150
|
return 'ToolbarContent';
|
|
30057
30151
|
}
|
|
30058
30152
|
},
|
|
30153
|
+
{
|
|
30154
|
+
key: "getRole",
|
|
30155
|
+
value: /** A toolbar item like `ToolbarButton`: the parent group is a `list`. */ function getRole() {
|
|
30156
|
+
return 'listitem';
|
|
30157
|
+
}
|
|
30158
|
+
},
|
|
30159
|
+
{
|
|
30160
|
+
key: "onChangeActivated",
|
|
30161
|
+
value: /**
|
|
30162
|
+
* Arbitrary content is not a toggle button — `aria-pressed` is not
|
|
30163
|
+
* allowed on a `listitem`.
|
|
30164
|
+
*/ function onChangeActivated() {}
|
|
30165
|
+
},
|
|
30059
30166
|
{
|
|
30060
30167
|
key: "update",
|
|
30061
30168
|
value: /** @override */ function update() {
|
|
@@ -39899,7 +40006,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39899
40006
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39900
40007
|
/* harmony export */ readAlign: function() { return /* binding */ readAlign; }
|
|
39901
40008
|
/* harmony export */ });
|
|
39902
|
-
/* harmony import */ var
|
|
40009
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
|
|
39903
40010
|
/*!
|
|
39904
40011
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39905
40012
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39909,20 +40016,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39909
40016
|
*/
|
|
39910
40017
|
/**
|
|
39911
40018
|
* @private
|
|
39912
|
-
*/ function readAlign(image, values) {
|
|
39913
|
-
|
|
39914
|
-
|
|
39915
|
-
'left',
|
|
39916
|
-
'right'
|
|
39917
|
-
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float').toLowerCase()) !== -1) {
|
|
39918
|
-
values.align = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'float');
|
|
39919
|
-
} else {
|
|
39920
|
-
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'display') === 'block' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-left') === 'auto' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-right') === 'auto') {
|
|
39921
|
-
values.align = 'center';
|
|
39922
|
-
} else {
|
|
39923
|
-
values.align = '';
|
|
39924
|
-
}
|
|
39925
|
-
}
|
|
40019
|
+
*/ function readAlign(image, values, classes) {
|
|
40020
|
+
var align = (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__.getHAlign)(image, classes);
|
|
40021
|
+
values.align = align === 'normal' ? '' : align;
|
|
39926
40022
|
}
|
|
39927
40023
|
|
|
39928
40024
|
|
|
@@ -39965,7 +40061,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39965
40061
|
var image, values;
|
|
39966
40062
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__._)(this, function(_state) {
|
|
39967
40063
|
image = state.sourceImage, values = state.values;
|
|
39968
|
-
(0,_align__WEBPACK_IMPORTED_MODULE_4__.readAlign)(image, values);
|
|
40064
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_4__.readAlign)(image, values, j.o.imageAlignClasses);
|
|
39969
40065
|
// Border radius
|
|
39970
40066
|
values.borderRadius = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
39971
40067
|
// Id
|
|
@@ -41213,7 +41309,7 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41213
41309
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41214
41310
|
}
|
|
41215
41311
|
if (opt.image.editAlign) {
|
|
41216
|
-
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
41312
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
|
|
41217
41313
|
}
|
|
41218
41314
|
}
|
|
41219
41315
|
|
|
@@ -42082,10 +42178,11 @@ var cmd = function cmd(control) {
|
|
|
42082
42178
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
42083
42179
|
/* harmony export */ align: function() { return /* binding */ align; }
|
|
42084
42180
|
/* harmony export */ });
|
|
42085
|
-
/* harmony import */ var
|
|
42086
|
-
/* harmony import */ var
|
|
42087
|
-
/* harmony import */ var
|
|
42088
|
-
/* harmony import */ var
|
|
42181
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
|
|
42182
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
|
|
42183
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85932);
|
|
42184
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16849);
|
|
42185
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
42089
42186
|
/*!
|
|
42090
42187
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42091
42188
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42096,6 +42193,15 @@ var cmd = function cmd(control) {
|
|
|
42096
42193
|
|
|
42097
42194
|
|
|
42098
42195
|
|
|
42196
|
+
|
|
42197
|
+
// Images align with `imageAlignClasses`; the wrappers of iframes and media
|
|
42198
|
+
// keep inline styles
|
|
42199
|
+
var alignClasses = function alignClasses(editor, elm) {
|
|
42200
|
+
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42201
|
+
};
|
|
42202
|
+
var currentAlign = function currentAlign(editor, elm) {
|
|
42203
|
+
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
|
|
42204
|
+
};
|
|
42099
42205
|
var align = {
|
|
42100
42206
|
name: 'left',
|
|
42101
42207
|
childTemplate: function childTemplate(_, __, value) {
|
|
@@ -42107,25 +42213,37 @@ var align = {
|
|
|
42107
42213
|
'Center',
|
|
42108
42214
|
'Normal'
|
|
42109
42215
|
],
|
|
42216
|
+
update: function update(editor, button) {
|
|
42217
|
+
var current = currentAlign(editor, button.target);
|
|
42218
|
+
button.state.icon.name = current === 'normal' ? 'left' : current;
|
|
42219
|
+
},
|
|
42220
|
+
isActive: function isActive(editor, button) {
|
|
42221
|
+
return currentAlign(editor, button.target) !== 'normal';
|
|
42222
|
+
},
|
|
42223
|
+
isChildActive: function isChildActive(editor, button) {
|
|
42224
|
+
var _button_control_args;
|
|
42225
|
+
var _ref = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)((_button_control_args = button.control.args) !== null && _button_control_args !== void 0 ? _button_control_args : [], 1), value = _ref[0];
|
|
42226
|
+
return (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
42227
|
+
},
|
|
42110
42228
|
exec: function exec(editor, elm, param) {
|
|
42111
42229
|
var control = param.control;
|
|
42112
|
-
if (!
|
|
42230
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42113
42231
|
'img',
|
|
42114
42232
|
'jodit',
|
|
42115
42233
|
'jodit-media'
|
|
42116
42234
|
]))) {
|
|
42117
42235
|
return;
|
|
42118
42236
|
}
|
|
42119
|
-
var command = control.args && (0,
|
|
42237
|
+
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42120
42238
|
if (!command) {
|
|
42121
42239
|
return false;
|
|
42122
42240
|
}
|
|
42123
|
-
;(0,
|
|
42124
|
-
if (
|
|
42241
|
+
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command, alignClasses(editor, elm));
|
|
42242
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42125
42243
|
'jodit',
|
|
42126
42244
|
'jodit-media'
|
|
42127
42245
|
])) && elm.firstElementChild) {
|
|
42128
|
-
(0,
|
|
42246
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm.firstElementChild, command);
|
|
42129
42247
|
}
|
|
42130
42248
|
editor.synchronizeValues();
|
|
42131
42249
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -42166,18 +42284,18 @@ var align = {
|
|
|
42166
42284
|
return Boolean(image && ([
|
|
42167
42285
|
'left',
|
|
42168
42286
|
'right'
|
|
42169
|
-
].includes((0,
|
|
42287
|
+
].includes((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float')) || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'display') === 'block'));
|
|
42170
42288
|
},
|
|
42171
42289
|
exec: function exec(editor, image, param) {
|
|
42172
42290
|
var control = param.control;
|
|
42173
|
-
if (!
|
|
42291
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(image, 'img')) {
|
|
42174
42292
|
return;
|
|
42175
42293
|
}
|
|
42176
|
-
var command = control.args && (0,
|
|
42294
|
+
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42177
42295
|
if (!command) {
|
|
42178
42296
|
return false;
|
|
42179
42297
|
}
|
|
42180
|
-
;(0,
|
|
42298
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'vertical-align', command === 'normal' ? '' : command);
|
|
42181
42299
|
editor.e.fire('recalcPositionPopup');
|
|
42182
42300
|
}
|
|
42183
42301
|
},
|
|
@@ -50059,21 +50177,28 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50059
50177
|
onResize();
|
|
50060
50178
|
_this.onReady();
|
|
50061
50179
|
};
|
|
50062
|
-
var
|
|
50180
|
+
var loading = false;
|
|
50181
|
+
var initAceEditor = function initAceEditor1() {
|
|
50063
50182
|
if (editor.isInDestruct || editor.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.MODE_SPLIT) {
|
|
50064
50183
|
return;
|
|
50065
50184
|
}
|
|
50185
|
+
// ACE (~400 KiB from the CDN) is only needed once the source view
|
|
50186
|
+
// is actually shown — a page that stays in WYSIWYG must not
|
|
50187
|
+
// download it.
|
|
50188
|
+
if (!_this.aceExists()) {
|
|
50189
|
+
if (!loading) {
|
|
50190
|
+
loading = true;
|
|
50191
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50192
|
+
return null;
|
|
50193
|
+
});
|
|
50194
|
+
}
|
|
50195
|
+
return;
|
|
50196
|
+
}
|
|
50066
50197
|
_this.fromWYSIWYG();
|
|
50067
50198
|
tryInitAceEditor();
|
|
50068
50199
|
};
|
|
50069
50200
|
editor.e.on('afterSetMode', initAceEditor);
|
|
50070
50201
|
initAceEditor();
|
|
50071
|
-
// global add ace editor in browser
|
|
50072
|
-
if (!this.aceExists()) {
|
|
50073
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50074
|
-
return null;
|
|
50075
|
-
});
|
|
50076
|
-
}
|
|
50077
50202
|
}
|
|
50078
50203
|
},
|
|
50079
50204
|
{
|
|
@@ -50819,9 +50944,26 @@ var SourceEditor = /*#__PURE__*/ function() {
|
|
|
50819
50944
|
return false;
|
|
50820
50945
|
};
|
|
50821
50946
|
if (!addEventListener()) {
|
|
50822
|
-
|
|
50823
|
-
|
|
50824
|
-
|
|
50947
|
+
// js-beautify is only needed once the source view is shown —
|
|
50948
|
+
// do not download it for a page that stays in WYSIWYG.
|
|
50949
|
+
var loading = false;
|
|
50950
|
+
var loadBeautify = function loadBeautify() {
|
|
50951
|
+
if (loading || editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SPLIT) {
|
|
50952
|
+
return;
|
|
50953
|
+
}
|
|
50954
|
+
loading = true;
|
|
50955
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(function() {
|
|
50956
|
+
// The source view was filled before the
|
|
50957
|
+
// beautifier arrived — format it now.
|
|
50958
|
+
if (addEventListener()) {
|
|
50959
|
+
_this.syncValueFromWYSIWYG(true);
|
|
50960
|
+
}
|
|
50961
|
+
}, function() {
|
|
50962
|
+
return null;
|
|
50963
|
+
});
|
|
50964
|
+
};
|
|
50965
|
+
editor.e.on('afterSetMode.source', loadBeautify);
|
|
50966
|
+
loadBeautify();
|
|
50825
50967
|
}
|
|
50826
50968
|
}
|
|
50827
50969
|
this.syncValueFromWYSIWYG(true);
|