jodit 4.15.16 → 4.15.18
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 +16 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +7 -7
- package/es2015/jodit.js +165 -48
- package/es2015/jodit.min.js +7 -7
- 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 +4 -4
- package/es2018/jodit.min.js +7 -7
- 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 +8 -8
- package/es2021/jodit.js +162 -48
- package/es2021/jodit.min.js +12 -12
- 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 +8 -8
- package/es2021.en/jodit.js +162 -48
- package/es2021.en/jodit.min.js +8 -8
- 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 +213 -77
- 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/plugins/focus/focus.js +17 -1
- package/esm/plugins/image-processor/image-processor.js +20 -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/image-properties/writers/margin.js +5 -3
- package/esm/plugins/inline-popup/config/items/img.js +24 -2
- 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/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.15.
|
|
4
|
+
* Version: v4.15.18
|
|
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.15.
|
|
2132
|
+
var APP_VERSION = "4.15.18";
|
|
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);
|
|
@@ -38147,14 +38226,28 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
|
|
|
38147
38226
|
*/ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
|
|
38148
38227
|
function focus(editor) {
|
|
38149
38228
|
if (editor.o.saveSelectionOnBlur) {
|
|
38229
|
+
// A click that brings focus back places the caret itself, and Chrome
|
|
38230
|
+
// has already placed it when focus fires, so restoring would move it
|
|
38231
|
+
// back to the old selection. The saved markers are dropped instead.
|
|
38232
|
+
var focusByPointer = false;
|
|
38150
38233
|
editor.e.on('blur', function() {
|
|
38234
|
+
// A press that never brought the focus back must not decide
|
|
38235
|
+
// what the next focus does
|
|
38236
|
+
focusByPointer = false;
|
|
38151
38237
|
if (editor.isEditorMode()) {
|
|
38152
38238
|
editor.s.save(true);
|
|
38153
38239
|
}
|
|
38240
|
+
}).on('mousedown touchstart', function() {
|
|
38241
|
+
focusByPointer = !editor.editorIsActive;
|
|
38154
38242
|
}).on('focus', function() {
|
|
38155
38243
|
if (editor.isEditorMode()) {
|
|
38156
|
-
|
|
38244
|
+
if (focusByPointer) {
|
|
38245
|
+
editor.s.removeMarkers();
|
|
38246
|
+
} else {
|
|
38247
|
+
editor.s.restore();
|
|
38248
|
+
}
|
|
38157
38249
|
}
|
|
38250
|
+
focusByPointer = false;
|
|
38158
38251
|
});
|
|
38159
38252
|
}
|
|
38160
38253
|
var _$focus = function focus() {
|
|
@@ -39243,11 +39336,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39243
39336
|
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38574);
|
|
39244
39337
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(81937);
|
|
39245
39338
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84839);
|
|
39246
|
-
/* harmony import */ var
|
|
39247
|
-
/* harmony import */ var
|
|
39248
|
-
/* harmony import */ var
|
|
39249
|
-
/* harmony import */ var
|
|
39250
|
-
/* harmony import */ var
|
|
39339
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23211);
|
|
39340
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28077);
|
|
39341
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65946);
|
|
39342
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(91206);
|
|
39343
|
+
/* harmony import */ var jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(23112);
|
|
39344
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(51034);
|
|
39251
39345
|
/*!
|
|
39252
39346
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39253
39347
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39271,6 +39365,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39271
39365
|
|
|
39272
39366
|
|
|
39273
39367
|
|
|
39368
|
+
|
|
39274
39369
|
var JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
39275
39370
|
var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
39276
39371
|
/**
|
|
@@ -39373,9 +39468,9 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39373
39468
|
2
|
|
39374
39469
|
];
|
|
39375
39470
|
}
|
|
39376
|
-
;(0,
|
|
39377
|
-
if (!(0,
|
|
39378
|
-
(0,
|
|
39471
|
+
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.$$)('img', editor.editor).forEach(function(elm) {
|
|
39472
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
|
|
39473
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
39379
39474
|
if (!elm.complete) {
|
|
39380
39475
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
39381
39476
|
var _editor_e;
|
|
@@ -39387,6 +39482,7 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39387
39482
|
replaceDataURIToBlobUUID(editor, elm);
|
|
39388
39483
|
}
|
|
39389
39484
|
editor.e.on(elm, 'mousedown touchstart', function() {
|
|
39485
|
+
removeCaretText(elm);
|
|
39390
39486
|
editor.s.select(elm);
|
|
39391
39487
|
});
|
|
39392
39488
|
}
|
|
@@ -39400,7 +39496,7 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39400
39496
|
}
|
|
39401
39497
|
]);
|
|
39402
39498
|
return imageProcessor;
|
|
39403
|
-
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(
|
|
39499
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_13__.Plugin));
|
|
39404
39500
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
39405
39501
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.watch)(':afterGetValueFromEditor')
|
|
39406
39502
|
], imageProcessor.prototype, "onAfterGetValueFromEditor", null);
|
|
@@ -39415,6 +39511,25 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39415
39511
|
]),
|
|
39416
39512
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
39417
39513
|
], imageProcessor.prototype, "afterChange", null);
|
|
39514
|
+
/**
|
|
39515
|
+
* Remove the invisible-space text beside an image, which only held a caret.
|
|
39516
|
+
* Selecting the image replaces the caret, and with the text still after a
|
|
39517
|
+
* block image, Safari highlights the rest of the image's line. See #1512
|
|
39518
|
+
*/ function removeCaretText(elm) {
|
|
39519
|
+
for(var _i = 0, _iter = [
|
|
39520
|
+
'previousSibling',
|
|
39521
|
+
'nextSibling'
|
|
39522
|
+
]; _i < _iter.length; _i++){
|
|
39523
|
+
var side = _iter[_i];
|
|
39524
|
+
var _node_nodeValue;
|
|
39525
|
+
var node = elm[side];
|
|
39526
|
+
while(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node) && !((_node_nodeValue = node.nodeValue) === null || _node_nodeValue === void 0 ? void 0 : _node_nodeValue.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__.INVISIBLE_SPACE_REG_EXP)(), ''))){
|
|
39527
|
+
var next = node[side];
|
|
39528
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(node);
|
|
39529
|
+
node = next;
|
|
39530
|
+
}
|
|
39531
|
+
}
|
|
39532
|
+
}
|
|
39418
39533
|
function replaceDataURIToBlobUUID(editor, elm) {
|
|
39419
39534
|
if (!editor.o.imageProcessor.replaceDataURIToBlobIdInView) {
|
|
39420
39535
|
return;
|
|
@@ -39425,7 +39540,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
39425
39540
|
var dataUri = elm.src;
|
|
39426
39541
|
var blob;
|
|
39427
39542
|
try {
|
|
39428
|
-
blob = (0,
|
|
39543
|
+
blob = (0,jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_14__.dataURItoBlob)(dataUri);
|
|
39429
39544
|
} catch (unused) {
|
|
39430
39545
|
// A data URI the browser accepts but we cannot decode is not worth
|
|
39431
39546
|
// breaking the editor over — keep the image as it is
|
|
@@ -39438,7 +39553,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
39438
39553
|
list[elm.src] = dataUri;
|
|
39439
39554
|
editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
|
|
39440
39555
|
}
|
|
39441
|
-
|
|
39556
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imageProcessor', imageProcessor);
|
|
39442
39557
|
|
|
39443
39558
|
|
|
39444
39559
|
/***/ }),
|
|
@@ -39863,7 +39978,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39863
39978
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39864
39979
|
/* harmony export */ readAlign: function() { return /* binding */ readAlign; }
|
|
39865
39980
|
/* harmony export */ });
|
|
39866
|
-
/* harmony import */ var
|
|
39981
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
|
|
39867
39982
|
/*!
|
|
39868
39983
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39869
39984
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39873,20 +39988,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39873
39988
|
*/
|
|
39874
39989
|
/**
|
|
39875
39990
|
* @private
|
|
39876
|
-
*/ function readAlign(image, values) {
|
|
39877
|
-
|
|
39878
|
-
|
|
39879
|
-
'left',
|
|
39880
|
-
'right'
|
|
39881
|
-
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float').toLowerCase()) !== -1) {
|
|
39882
|
-
values.align = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'float');
|
|
39883
|
-
} else {
|
|
39884
|
-
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') {
|
|
39885
|
-
values.align = 'center';
|
|
39886
|
-
} else {
|
|
39887
|
-
values.align = '';
|
|
39888
|
-
}
|
|
39889
|
-
}
|
|
39991
|
+
*/ function readAlign(image, values, classes) {
|
|
39992
|
+
var align = (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_0__.getHAlign)(image, classes);
|
|
39993
|
+
values.align = align === 'normal' ? '' : align;
|
|
39890
39994
|
}
|
|
39891
39995
|
|
|
39892
39996
|
|
|
@@ -39929,7 +40033,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
39929
40033
|
var image, values;
|
|
39930
40034
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__._)(this, function(_state) {
|
|
39931
40035
|
image = state.sourceImage, values = state.values;
|
|
39932
|
-
(0,_align__WEBPACK_IMPORTED_MODULE_4__.readAlign)(image, values);
|
|
40036
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_4__.readAlign)(image, values, j.o.imageAlignClasses);
|
|
39933
40037
|
// Border radius
|
|
39934
40038
|
values.borderRadius = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
39935
40039
|
// Id
|
|
@@ -41177,7 +41281,7 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41177
41281
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41178
41282
|
}
|
|
41179
41283
|
if (opt.image.editAlign) {
|
|
41180
|
-
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
41284
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
|
|
41181
41285
|
}
|
|
41182
41286
|
}
|
|
41183
41287
|
|
|
@@ -41250,10 +41354,12 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41250
41354
|
marginBottom,
|
|
41251
41355
|
marginLeft
|
|
41252
41356
|
];
|
|
41357
|
+
// Compared with the inline value, which is what `readMargins` showed, so a
|
|
41358
|
+
// margin from a stylesheet is not overwritten when the field is unchanged
|
|
41253
41359
|
var applyMargin = function applyMargin(key, value) {
|
|
41254
|
-
var oldValue = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.
|
|
41360
|
+
var oldValue = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, key) || 0);
|
|
41255
41361
|
var v = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)(value);
|
|
41256
|
-
if (oldValue
|
|
41362
|
+
if (oldValue !== v) {
|
|
41257
41363
|
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.css)(image, key, v);
|
|
41258
41364
|
}
|
|
41259
41365
|
};
|
|
@@ -42044,10 +42150,11 @@ var cmd = function cmd(control) {
|
|
|
42044
42150
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
42045
42151
|
/* harmony export */ align: function() { return /* binding */ align; }
|
|
42046
42152
|
/* harmony export */ });
|
|
42047
|
-
/* harmony import */ var
|
|
42048
|
-
/* harmony import */ var
|
|
42049
|
-
/* harmony import */ var
|
|
42050
|
-
/* harmony import */ var
|
|
42153
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
|
|
42154
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
|
|
42155
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85932);
|
|
42156
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16849);
|
|
42157
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
42051
42158
|
/*!
|
|
42052
42159
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42053
42160
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42058,6 +42165,15 @@ var cmd = function cmd(control) {
|
|
|
42058
42165
|
|
|
42059
42166
|
|
|
42060
42167
|
|
|
42168
|
+
|
|
42169
|
+
// Images align with `imageAlignClasses`; the wrappers of iframes and media
|
|
42170
|
+
// keep inline styles
|
|
42171
|
+
var alignClasses = function alignClasses(editor, elm) {
|
|
42172
|
+
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42173
|
+
};
|
|
42174
|
+
var currentAlign = function currentAlign(editor, elm) {
|
|
42175
|
+
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
|
|
42176
|
+
};
|
|
42061
42177
|
var align = {
|
|
42062
42178
|
name: 'left',
|
|
42063
42179
|
childTemplate: function childTemplate(_, __, value) {
|
|
@@ -42069,25 +42185,37 @@ var align = {
|
|
|
42069
42185
|
'Center',
|
|
42070
42186
|
'Normal'
|
|
42071
42187
|
],
|
|
42188
|
+
update: function update(editor, button) {
|
|
42189
|
+
var current = currentAlign(editor, button.target);
|
|
42190
|
+
button.state.icon.name = current === 'normal' ? 'left' : current;
|
|
42191
|
+
},
|
|
42192
|
+
isActive: function isActive(editor, button) {
|
|
42193
|
+
return currentAlign(editor, button.target) !== 'normal';
|
|
42194
|
+
},
|
|
42195
|
+
isChildActive: function isChildActive(editor, button) {
|
|
42196
|
+
var _button_control_args;
|
|
42197
|
+
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];
|
|
42198
|
+
return (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
42199
|
+
},
|
|
42072
42200
|
exec: function exec(editor, elm, param) {
|
|
42073
42201
|
var control = param.control;
|
|
42074
|
-
if (!
|
|
42202
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42075
42203
|
'img',
|
|
42076
42204
|
'jodit',
|
|
42077
42205
|
'jodit-media'
|
|
42078
42206
|
]))) {
|
|
42079
42207
|
return;
|
|
42080
42208
|
}
|
|
42081
|
-
var command = control.args && (0,
|
|
42209
|
+
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42082
42210
|
if (!command) {
|
|
42083
42211
|
return false;
|
|
42084
42212
|
}
|
|
42085
|
-
;(0,
|
|
42086
|
-
if (
|
|
42213
|
+
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command, alignClasses(editor, elm));
|
|
42214
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42087
42215
|
'jodit',
|
|
42088
42216
|
'jodit-media'
|
|
42089
42217
|
])) && elm.firstElementChild) {
|
|
42090
|
-
(0,
|
|
42218
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm.firstElementChild, command);
|
|
42091
42219
|
}
|
|
42092
42220
|
editor.synchronizeValues();
|
|
42093
42221
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -42122,16 +42250,24 @@ var align = {
|
|
|
42122
42250
|
'Normal'
|
|
42123
42251
|
],
|
|
42124
42252
|
tooltip: 'Vertical align',
|
|
42253
|
+
// `vertical-align` only moves an image in the line, not a floated or block one
|
|
42254
|
+
isDisabled: function isDisabled(editor, button) {
|
|
42255
|
+
var image = button.target;
|
|
42256
|
+
return Boolean(image && ([
|
|
42257
|
+
'left',
|
|
42258
|
+
'right'
|
|
42259
|
+
].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'));
|
|
42260
|
+
},
|
|
42125
42261
|
exec: function exec(editor, image, param) {
|
|
42126
42262
|
var control = param.control;
|
|
42127
|
-
if (!
|
|
42263
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(image, 'img')) {
|
|
42128
42264
|
return;
|
|
42129
42265
|
}
|
|
42130
|
-
var command = control.args && (0,
|
|
42266
|
+
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42131
42267
|
if (!command) {
|
|
42132
42268
|
return false;
|
|
42133
42269
|
}
|
|
42134
|
-
;(0,
|
|
42270
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'vertical-align', command === 'normal' ? '' : command);
|
|
42135
42271
|
editor.e.fire('recalcPositionPopup');
|
|
42136
42272
|
}
|
|
42137
42273
|
},
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.15.
|
|
4
|
+
* Version: v4.15.18
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.15.
|
|
11
|
+
* Version: v4.15.18
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|