jodit 4.17.6 → 4.18.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 +10 -0
- package/es2015/jodit.css +87 -3
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +789 -130
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +16 -16
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +8 -8
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +87 -3
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +14 -14
- package/es2021/jodit.js +769 -130
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +14 -14
- 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 +87 -3
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +12 -12
- package/es2021.en/jodit.js +769 -130
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +12 -12
- 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 +92 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1054 -190
- package/es5/jodit.min.css +3 -3
- 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 +65 -2
- package/esm/config.js +29 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +11 -5
- package/esm/core/helpers/utils/align.js +28 -8
- package/esm/core/helpers/utils/index.d.ts +1 -0
- package/esm/core/helpers/utils/index.js +1 -0
- package/esm/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/esm/core/helpers/utils/media-wrapper.js +63 -0
- package/esm/core/selection/selection.js +3 -3
- package/esm/modules/toolbar/button/button.d.ts +18 -0
- package/esm/modules/toolbar/button/button.js +75 -5
- package/esm/plugins/font/config.d.ts +12 -0
- package/esm/plugins/font/config.js +25 -10
- package/esm/plugins/font/font-picker.d.ts +51 -0
- package/esm/plugins/font/font-picker.js +238 -0
- package/esm/plugins/font/font.js +12 -0
- package/esm/plugins/font/google-fonts.d.ts +65 -0
- package/esm/plugins/font/google-fonts.js +143 -0
- package/esm/plugins/image-properties/readers/index.js +2 -1
- package/esm/plugins/image-properties/writers/index.js +2 -2
- package/esm/plugins/inline-popup/config/items/img.js +10 -8
- package/esm/plugins/inline-popup/inline-popup.js +13 -6
- package/esm/plugins/media/config.d.ts +26 -1
- package/esm/plugins/media/config.js +1 -3
- package/esm/plugins/media/media.js +12 -4
- package/esm/plugins/video/config.js +24 -4
- package/esm/types/toolbar.d.ts +2 -0
- package/esm/types/types.d.ts +13 -1
- package/package.json +1 -1
- package/types/config.d.ts +65 -2
- package/types/core/helpers/utils/align.d.ts +11 -5
- package/types/core/helpers/utils/index.d.ts +1 -0
- package/types/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/types/modules/toolbar/button/button.d.ts +18 -0
- package/types/plugins/font/config.d.ts +12 -0
- package/types/plugins/font/font-picker.d.ts +51 -0
- package/types/plugins/font/google-fonts.d.ts +65 -0
- package/types/plugins/media/config.d.ts +26 -1
- package/types/types/toolbar.d.ts +2 -0
- package/types/types/types.d.ts +13 -1
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.18.0
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -735,18 +735,43 @@ var ConfigPrototype = {};
|
|
|
735
735
|
/**
|
|
736
736
|
* Class names to align images with, instead of an inline `float` or
|
|
737
737
|
* `margin`. Aligning an image removes every class listed here and adds the
|
|
738
|
-
* chosen alignment's, which can be several separated by spaces.
|
|
738
|
+
* chosen alignment's, which can be several separated by spaces. An
|
|
739
|
+
* alignment can also list several such sets, to recognise each of them;
|
|
740
|
+
* aligning writes the first. `alignClasses.img` takes its place when set.
|
|
739
741
|
*
|
|
740
742
|
* ```javascript
|
|
741
743
|
* Jodit.make('#editor', {
|
|
742
744
|
* imageAlignClasses: {
|
|
743
745
|
* left: 'align-left',
|
|
744
746
|
* right: 'align-right',
|
|
745
|
-
* center: 'align-center'
|
|
747
|
+
* center: ['align-center', 'centered']
|
|
746
748
|
* }
|
|
747
749
|
* });
|
|
748
750
|
* ```
|
|
749
751
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "imageAlignClasses", null);
|
|
752
|
+
/**
|
|
753
|
+
* Class names to align elements with, by tag name, as `imageAlignClasses`
|
|
754
|
+
* does for images: `img`, and `video`, `audio` and `iframe` in the media
|
|
755
|
+
* popup. A media wrapper (see `mediaWrappers`), and Jodit's own `jodit` and
|
|
756
|
+
* `jodit-media` wrappers, are aligned with the classes for the media in
|
|
757
|
+
* them.
|
|
758
|
+
*
|
|
759
|
+
* ```javascript
|
|
760
|
+
* const media = {
|
|
761
|
+
* left: 'media-left',
|
|
762
|
+
* right: 'media-right',
|
|
763
|
+
* center: 'media-center'
|
|
764
|
+
* };
|
|
765
|
+
*
|
|
766
|
+
* Jodit.make('#editor', {
|
|
767
|
+
* alignClasses: { video: media, iframe: media }
|
|
768
|
+
* });
|
|
769
|
+
* ```
|
|
770
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "alignClasses", {});
|
|
771
|
+
/**
|
|
772
|
+
* Alignment given to the media the video popup inserts. `'normal'` leaves
|
|
773
|
+
* them unaligned
|
|
774
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "mediaDefaultAlign", 'normal');
|
|
750
775
|
/**
|
|
751
776
|
* Do not display these buttons that are on the list
|
|
752
777
|
*
|
|
@@ -2129,7 +2154,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2129
2154
|
* @packageDocumentation
|
|
2130
2155
|
* @module constants
|
|
2131
2156
|
*/
|
|
2132
|
-
var APP_VERSION = "4.
|
|
2157
|
+
var APP_VERSION = "4.18.0";
|
|
2133
2158
|
// prettier-ignore
|
|
2134
2159
|
var ES = "es5";
|
|
2135
2160
|
var IS_ES_MODERN = false;
|
|
@@ -8609,13 +8634,16 @@ function trimChars(value, chars) {
|
|
|
8609
8634
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8610
8635
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
8611
8636
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
8637
|
+
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
8612
8638
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
8613
8639
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
8614
8640
|
/* harmony export */ });
|
|
8615
8641
|
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
8616
8642
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
|
|
8617
|
-
/* harmony import */ var
|
|
8618
|
-
/* harmony import */ var
|
|
8643
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17312);
|
|
8644
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
8645
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
8646
|
+
/* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83314);
|
|
8619
8647
|
/*!
|
|
8620
8648
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8621
8649
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8626,37 +8654,66 @@ function trimChars(value, chars) {
|
|
|
8626
8654
|
|
|
8627
8655
|
|
|
8628
8656
|
|
|
8629
|
-
|
|
8630
|
-
|
|
8657
|
+
|
|
8658
|
+
|
|
8659
|
+
// The sets of class names an alignment lists, the first being the one to write
|
|
8660
|
+
var classSets = function classSets(value) {
|
|
8661
|
+
return ((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__.isArray)(value) ? value : [
|
|
8662
|
+
value !== null && value !== void 0 ? value : ''
|
|
8663
|
+
]).map(function(set) {
|
|
8664
|
+
return set.split(/\s+/).filter(Boolean);
|
|
8665
|
+
}).filter(function(set) {
|
|
8666
|
+
return set.length;
|
|
8667
|
+
});
|
|
8631
8668
|
};
|
|
8632
8669
|
/**
|
|
8633
|
-
*
|
|
8634
|
-
*
|
|
8670
|
+
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
8671
|
+
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
8672
|
+
* `jodit-media`), falling back to `imageAlignClasses` for an image
|
|
8673
|
+
*/ function getAlignClasses(jodit, elm) {
|
|
8674
|
+
var _ref;
|
|
8675
|
+
var _jodit_o_alignClasses;
|
|
8676
|
+
if (!elm) {
|
|
8677
|
+
return null;
|
|
8678
|
+
}
|
|
8679
|
+
var media = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
8680
|
+
'jodit',
|
|
8681
|
+
'jodit-media'
|
|
8682
|
+
])) ? elm.firstElementChild : (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm);
|
|
8683
|
+
var tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
|
|
8684
|
+
return (_ref = (_jodit_o_alignClasses = jodit.o.alignClasses) === null || _jodit_o_alignClasses === void 0 ? void 0 : _jodit_o_alignClasses[tag]) !== null && _ref !== void 0 ? _ref : tag === 'img' ? jodit.o.imageAlignClasses : null;
|
|
8685
|
+
}
|
|
8686
|
+
/**
|
|
8687
|
+
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
8688
|
+
* when they are given
|
|
8635
8689
|
*/ function hAlignElement(image, align, classes) {
|
|
8636
8690
|
if (classes) {
|
|
8637
8691
|
var _image_classList, _image_classList1;
|
|
8692
|
+
var _classSets_;
|
|
8638
8693
|
hAlignElement(image, 'normal');
|
|
8639
8694
|
Object.values(classes).forEach(function(value) {
|
|
8640
|
-
return (
|
|
8695
|
+
return classSets(value).forEach(function(set) {
|
|
8696
|
+
return (_image_classList = image.classList).remove.apply(_image_classList, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(set));
|
|
8697
|
+
});
|
|
8641
8698
|
});
|
|
8642
|
-
(_image_classList1 = image.classList).add.apply(_image_classList1, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(
|
|
8699
|
+
(_image_classList1 = image.classList).add.apply(_image_classList1, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)((_classSets_ = classSets(classes[align || 'normal'])[0]) !== null && _classSets_ !== void 0 ? _classSets_ : []));
|
|
8643
8700
|
[
|
|
8644
8701
|
'class',
|
|
8645
8702
|
'style'
|
|
8646
8703
|
].forEach(function(name) {
|
|
8647
8704
|
var _attr;
|
|
8648
|
-
if (!((_attr = (0,
|
|
8649
|
-
(0,
|
|
8705
|
+
if (!((_attr = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, name)) === null || _attr === void 0 ? void 0 : _attr.trim())) {
|
|
8706
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, name, null);
|
|
8650
8707
|
}
|
|
8651
8708
|
});
|
|
8652
8709
|
return;
|
|
8653
8710
|
}
|
|
8654
8711
|
if (align && align !== 'normal') {
|
|
8655
8712
|
if (align !== 'center') {
|
|
8656
|
-
(0,
|
|
8657
|
-
(0,
|
|
8713
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float', align);
|
|
8714
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.clearCenterAlign)(image);
|
|
8658
8715
|
} else {
|
|
8659
|
-
(0,
|
|
8716
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, {
|
|
8660
8717
|
float: '',
|
|
8661
8718
|
display: 'block',
|
|
8662
8719
|
marginLeft: 'auto',
|
|
@@ -8664,13 +8721,13 @@ var classNames = function classNames(value) {
|
|
|
8664
8721
|
});
|
|
8665
8722
|
}
|
|
8666
8723
|
} else {
|
|
8667
|
-
if ((0,
|
|
8724
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float') && [
|
|
8668
8725
|
'right',
|
|
8669
8726
|
'left'
|
|
8670
|
-
].indexOf((0,
|
|
8671
|
-
(0,
|
|
8727
|
+
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
8728
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float', '');
|
|
8672
8729
|
}
|
|
8673
|
-
;(0,
|
|
8730
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.clearCenterAlign)(image);
|
|
8674
8731
|
}
|
|
8675
8732
|
}
|
|
8676
8733
|
/**
|
|
@@ -8684,19 +8741,20 @@ var classNames = function classNames(value) {
|
|
|
8684
8741
|
'normal'
|
|
8685
8742
|
]; _i < _iter.length; _i++){
|
|
8686
8743
|
var align = _iter[_i];
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8744
|
+
if (classSets(classes[align]).some(function(set) {
|
|
8745
|
+
return set.every(function(name) {
|
|
8746
|
+
return elm.classList.contains(name);
|
|
8747
|
+
});
|
|
8690
8748
|
})) {
|
|
8691
8749
|
return align;
|
|
8692
8750
|
}
|
|
8693
8751
|
}
|
|
8694
8752
|
}
|
|
8695
|
-
var float = (0,
|
|
8753
|
+
var float = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'float').toLowerCase();
|
|
8696
8754
|
if (float === 'left' || float === 'right') {
|
|
8697
8755
|
return float;
|
|
8698
8756
|
}
|
|
8699
|
-
if ((0,
|
|
8757
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(elm, 'display') === 'block' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'margin-left') === 'auto' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
8700
8758
|
return 'center';
|
|
8701
8759
|
}
|
|
8702
8760
|
return 'normal';
|
|
@@ -8706,10 +8764,10 @@ var classNames = function classNames(value) {
|
|
|
8706
8764
|
*/ function clearAlign(node) {
|
|
8707
8765
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node, function(elm) {
|
|
8708
8766
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(elm)) {
|
|
8709
|
-
if ((0,
|
|
8710
|
-
(0,
|
|
8711
|
-
if (!((0,
|
|
8712
|
-
(0,
|
|
8767
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'textAlign')) {
|
|
8768
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(elm, 'textAlign', '');
|
|
8769
|
+
if (!((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(elm, 'style') || '').trim().length) {
|
|
8770
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(elm, 'style', null);
|
|
8713
8771
|
}
|
|
8714
8772
|
}
|
|
8715
8773
|
}
|
|
@@ -8740,7 +8798,7 @@ function alignElement(command, box) {
|
|
|
8740
8798
|
clearAlign(box);
|
|
8741
8799
|
var align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
8742
8800
|
if (align) {
|
|
8743
|
-
(0,
|
|
8801
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(box, 'textAlign', align);
|
|
8744
8802
|
}
|
|
8745
8803
|
}
|
|
8746
8804
|
}
|
|
@@ -9874,13 +9932,13 @@ var getClassName = function getClassName(obj) {
|
|
|
9874
9932
|
"use strict";
|
|
9875
9933
|
__webpack_require__.r(__webpack_exports__);
|
|
9876
9934
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9877
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
9935
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.$$; },
|
|
9878
9936
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
9879
9937
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
9880
9938
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
9881
9939
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
9882
9940
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
9883
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
9941
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
|
|
9884
9942
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
9885
9943
|
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
|
|
9886
9944
|
/* harmony export */ abort: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
@@ -9892,58 +9950,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9892
9950
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
9893
9951
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
9894
9952
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
9895
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
9896
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
9897
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
9953
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.call; },
|
|
9954
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
|
|
9955
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callThis; },
|
|
9898
9956
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
9899
9957
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
9900
9958
|
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.cns; },
|
|
9901
9959
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
9902
9960
|
/* harmony export */ connection: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
9903
9961
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
9962
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
|
|
9904
9963
|
/* harmony export */ css: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
9905
9964
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
9906
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
9965
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
|
|
9907
9966
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
9908
9967
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
9909
9968
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
9910
9969
|
/* harmony export */ error: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.error; },
|
|
9911
9970
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
9912
9971
|
/* harmony export */ get: function() { return /* reexport safe */ _get__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
9972
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
9913
9973
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
9914
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
9974
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
|
|
9915
9975
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
9916
|
-
/* harmony export */
|
|
9917
|
-
/* harmony export */
|
|
9976
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
|
|
9977
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
|
|
9978
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
|
|
9979
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
|
|
9918
9980
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
9919
9981
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
9920
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
9982
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.inView; },
|
|
9921
9983
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
9922
9984
|
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
|
|
9923
9985
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
9924
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
9925
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
9986
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.keys; },
|
|
9987
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
|
|
9926
9988
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
9927
9989
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
9928
9990
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
9929
9991
|
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
|
|
9930
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
9931
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
9992
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
|
|
9993
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
|
|
9932
9994
|
/* harmony export */ options: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
9933
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
9934
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
9935
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
9936
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
9937
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
9938
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
9939
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
9995
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
|
|
9996
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
|
|
9997
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.refs; },
|
|
9998
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_23__.reset; },
|
|
9999
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
|
|
10000
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
|
|
10001
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_26__.set; },
|
|
10002
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
|
|
9940
10003
|
/* harmony export */ });
|
|
9941
10004
|
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
|
|
9942
10005
|
/* harmony import */ var _append_script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47760);
|
|
9943
10006
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
9944
10007
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
9945
10008
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
9946
|
-
/* 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__)
|
|
10009
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _assert__WEBPACK_IMPORTED_MODULE_2__) if(["default","alignElement","clearAlign","getAlignClasses","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__)
|
|
9947
10010
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
9948
10011
|
/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
9949
10012
|
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26136);
|
|
@@ -9962,14 +10025,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9962
10025
|
/* harmony import */ var _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37427);
|
|
9963
10026
|
/* harmony import */ var _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(78048);
|
|
9964
10027
|
/* harmony import */ var _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49385);
|
|
9965
|
-
/* harmony import */ var
|
|
9966
|
-
/* harmony import */ var
|
|
9967
|
-
/* harmony import */ var
|
|
9968
|
-
/* harmony import */ var
|
|
9969
|
-
/* harmony import */ var
|
|
9970
|
-
/* harmony import */ var
|
|
9971
|
-
/* harmony import */ var
|
|
9972
|
-
/* harmony import */ var
|
|
10028
|
+
/* harmony import */ var _media_wrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(83314);
|
|
10029
|
+
/* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(36310);
|
|
10030
|
+
/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(57075);
|
|
10031
|
+
/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(43379);
|
|
10032
|
+
/* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(60898);
|
|
10033
|
+
/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(28723);
|
|
10034
|
+
/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(52144);
|
|
10035
|
+
/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(42820);
|
|
10036
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(71125);
|
|
9973
10037
|
/*!
|
|
9974
10038
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9975
10039
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10004,6 +10068,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10004
10068
|
|
|
10005
10069
|
|
|
10006
10070
|
|
|
10071
|
+
|
|
10007
10072
|
|
|
10008
10073
|
|
|
10009
10074
|
/***/ }),
|
|
@@ -10079,6 +10144,102 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10079
10144
|
}
|
|
10080
10145
|
|
|
10081
10146
|
|
|
10147
|
+
/***/ }),
|
|
10148
|
+
|
|
10149
|
+
/***/ 83314:
|
|
10150
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10151
|
+
|
|
10152
|
+
"use strict";
|
|
10153
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10154
|
+
/* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
|
|
10155
|
+
/* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
|
|
10156
|
+
/* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
|
|
10157
|
+
/* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
|
|
10158
|
+
/* harmony export */ });
|
|
10159
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
|
|
10160
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
10161
|
+
/*!
|
|
10162
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10163
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
10164
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
10165
|
+
*/ /**
|
|
10166
|
+
* @module helpers/utils
|
|
10167
|
+
*/
|
|
10168
|
+
|
|
10169
|
+
var isWrapper = function isWrapper(node, wrapper) {
|
|
10170
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
|
|
10171
|
+
};
|
|
10172
|
+
/**
|
|
10173
|
+
* The media in `elm` when `elm` is a wrapper media keep in the content (see
|
|
10174
|
+
* `mediaWrappers`): an element of a type `elm` is the wrapper for
|
|
10175
|
+
*/ function getWrappedMedia(jodit, elm) {
|
|
10176
|
+
var _jodit_o_mediaWrappers;
|
|
10177
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
10178
|
+
try {
|
|
10179
|
+
for(var _iterator = Object.entries((_jodit_o_mediaWrappers = jodit.o.mediaWrappers) !== null && _jodit_o_mediaWrappers !== void 0 ? _jodit_o_mediaWrappers : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
10180
|
+
var _step_value = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(_step.value, 2), tag = _step_value[0], wrapper = _step_value[1];
|
|
10181
|
+
if (isWrapper(elm, wrapper)) {
|
|
10182
|
+
var media = elm.querySelector(tag);
|
|
10183
|
+
if (media) {
|
|
10184
|
+
return media;
|
|
10185
|
+
}
|
|
10186
|
+
}
|
|
10187
|
+
}
|
|
10188
|
+
} catch (err) {
|
|
10189
|
+
_didIteratorError = true;
|
|
10190
|
+
_iteratorError = err;
|
|
10191
|
+
} finally{
|
|
10192
|
+
try {
|
|
10193
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
10194
|
+
_iterator.return();
|
|
10195
|
+
}
|
|
10196
|
+
} finally{
|
|
10197
|
+
if (_didIteratorError) {
|
|
10198
|
+
throw _iteratorError;
|
|
10199
|
+
}
|
|
10200
|
+
}
|
|
10201
|
+
}
|
|
10202
|
+
return null;
|
|
10203
|
+
}
|
|
10204
|
+
/**
|
|
10205
|
+
* The wrapper media keep in the content (see `mediaWrappers`) that is or
|
|
10206
|
+
* holds `node`
|
|
10207
|
+
*/ function getMediaWrapper(jodit, node) {
|
|
10208
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, function(elm) {
|
|
10209
|
+
return Boolean(getWrappedMedia(jodit, elm));
|
|
10210
|
+
}, jodit.editor);
|
|
10211
|
+
}
|
|
10212
|
+
/**
|
|
10213
|
+
* An empty wrapper for media of type `tag` to keep in the content (see
|
|
10214
|
+
* `mediaWrappers`), or null when there is none for it
|
|
10215
|
+
*/ function createMediaWrapper(jodit, tag) {
|
|
10216
|
+
var _jodit_o_mediaWrappers;
|
|
10217
|
+
var wrapper = (_jodit_o_mediaWrappers = jodit.o.mediaWrappers) === null || _jodit_o_mediaWrappers === void 0 ? void 0 : _jodit_o_mediaWrappers[tag.toLowerCase()];
|
|
10218
|
+
if (!wrapper) {
|
|
10219
|
+
return null;
|
|
10220
|
+
}
|
|
10221
|
+
return jodit.createInside.element(wrapper.tag, {
|
|
10222
|
+
class: wrapper.className,
|
|
10223
|
+
contenteditable: false,
|
|
10224
|
+
draggable: true
|
|
10225
|
+
});
|
|
10226
|
+
}
|
|
10227
|
+
/**
|
|
10228
|
+
* Puts `element` in the wrapper for its type (see `mediaWrappers`), and
|
|
10229
|
+
* returns the wrapper, or `element` when there is none for it
|
|
10230
|
+
*/ function wrapMedia(jodit, element) {
|
|
10231
|
+
var wrapper = createMediaWrapper(jodit, element.nodeName);
|
|
10232
|
+
if (!wrapper) {
|
|
10233
|
+
return element;
|
|
10234
|
+
}
|
|
10235
|
+
if (element.parentNode) {
|
|
10236
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.before(element, wrapper);
|
|
10237
|
+
}
|
|
10238
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
|
|
10239
|
+
return wrapper;
|
|
10240
|
+
}
|
|
10241
|
+
|
|
10242
|
+
|
|
10082
10243
|
/***/ }),
|
|
10083
10244
|
|
|
10084
10245
|
/***/ 36310:
|
|
@@ -13179,9 +13340,9 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13179
13340
|
if (styles && (typeof styles === "undefined" ? "undefined" : (0,_swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_7__._)(styles)) === 'object') {
|
|
13180
13341
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, styles);
|
|
13181
13342
|
}
|
|
13182
|
-
var
|
|
13343
|
+
var imageDefaultAlign = this.j.o.imageDefaultAlign;
|
|
13183
13344
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
13184
|
-
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.hAlignElement)(image, imageDefaultAlign,
|
|
13345
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.hAlignElement)(image, imageDefaultAlign, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.getAlignClasses)(this.j, image));
|
|
13185
13346
|
}
|
|
13186
13347
|
var onload = function onload1() {
|
|
13187
13348
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -29766,6 +29927,7 @@ var INPUT_TAGS = new Set([
|
|
|
29766
29927
|
'textarea',
|
|
29767
29928
|
'select'
|
|
29768
29929
|
]);
|
|
29930
|
+
var TYPE_AHEAD_TIMEOUT = 1000;
|
|
29769
29931
|
var FOCUSABLE_SELECTOR = [
|
|
29770
29932
|
'button:not([disabled])',
|
|
29771
29933
|
'a[href]',
|
|
@@ -29783,11 +29945,11 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
29783
29945
|
var _this;
|
|
29784
29946
|
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, ToolbarButton, [
|
|
29785
29947
|
jodit
|
|
29786
|
-
]), (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), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "trigger", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "openedPopup", void 0), _this.control = control, _this.target = target, _this.state = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_29__.UIButtonState)()), {
|
|
29948
|
+
]), (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), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "trigger", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typed", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typedAt", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typedTo", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "openedPopup", void 0), _this.control = control, _this.target = target, _this.state = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_29__.UIButtonState)()), {
|
|
29787
29949
|
theme: 'toolbar',
|
|
29788
29950
|
currentValue: '',
|
|
29789
29951
|
hasTrigger: false
|
|
29790
|
-
}), _this.openedPopup = null;
|
|
29952
|
+
}), _this.__typed = '', _this.__typedAt = 0, _this.__typedTo = null, _this.openedPopup = null;
|
|
29791
29953
|
var button = _this.getElm('button');
|
|
29792
29954
|
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_26__.assert)(button, 'Element button should exists');
|
|
29793
29955
|
_this.button = button;
|
|
@@ -30139,12 +30301,66 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30139
30301
|
items[(index + 1) % items.length].focus();
|
|
30140
30302
|
break;
|
|
30141
30303
|
default:
|
|
30142
|
-
|
|
30304
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
30305
|
+
return;
|
|
30306
|
+
}
|
|
30143
30307
|
}
|
|
30144
30308
|
e.preventDefault();
|
|
30145
30309
|
e.stopPropagation();
|
|
30146
30310
|
}
|
|
30147
30311
|
},
|
|
30312
|
+
{
|
|
30313
|
+
key: "__onEditorKeyDown",
|
|
30314
|
+
value: /**
|
|
30315
|
+
* The mouse opens a dropdown without taking the focus out of the editor.
|
|
30316
|
+
* While a dropdown list is open, typing there searches the list, as in an
|
|
30317
|
+
* open `<select>`, instead of writing into the content
|
|
30318
|
+
*/ function __onEditorKeyDown(e) {
|
|
30319
|
+
if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
|
|
30320
|
+
return;
|
|
30321
|
+
}
|
|
30322
|
+
e.preventDefault();
|
|
30323
|
+
return false;
|
|
30324
|
+
}
|
|
30325
|
+
},
|
|
30326
|
+
{
|
|
30327
|
+
key: "__typeAhead",
|
|
30328
|
+
value: /**
|
|
30329
|
+
* Typing in a dropdown list focuses the next item whose label starts with
|
|
30330
|
+
* the typed text, whatever their case and accents, and repeating one letter
|
|
30331
|
+
* cycles through the items that start with it, like the WAI-ARIA menu
|
|
30332
|
+
* pattern's type-ahead. The typed text starts again after a pause, or once
|
|
30333
|
+
* the focus has moved on
|
|
30334
|
+
*/ function __typeAhead(key, items, index) {
|
|
30335
|
+
var now = Date.now();
|
|
30336
|
+
if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
|
|
30337
|
+
this.__typed = '';
|
|
30338
|
+
}
|
|
30339
|
+
if (key.length !== 1 || key === ' ' && !this.__typed) {
|
|
30340
|
+
return false;
|
|
30341
|
+
}
|
|
30342
|
+
this.__typedAt = now;
|
|
30343
|
+
this.__typed += key;
|
|
30344
|
+
this.__typedTo = items[index];
|
|
30345
|
+
var compare = new Intl.Collator(undefined, {
|
|
30346
|
+
usage: 'search',
|
|
30347
|
+
sensitivity: 'base'
|
|
30348
|
+
}).compare, typed = this.__typed, cycle = Array.from(typed).every(function(char) {
|
|
30349
|
+
return compare(char, typed[0]) === 0;
|
|
30350
|
+
}), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
|
|
30351
|
+
for(var i = 0; i < items.length; i += 1){
|
|
30352
|
+
var _ref;
|
|
30353
|
+
var _item_textContent;
|
|
30354
|
+
var item = items[(start + i) % items.length], label = (_ref = (_item_textContent = item.textContent) === null || _item_textContent === void 0 ? void 0 : _item_textContent.trim()) !== null && _ref !== void 0 ? _ref : '';
|
|
30355
|
+
if (compare(label.slice(0, prefix.length), prefix) === 0) {
|
|
30356
|
+
item.focus();
|
|
30357
|
+
this.__typedTo = item;
|
|
30358
|
+
break;
|
|
30359
|
+
}
|
|
30360
|
+
}
|
|
30361
|
+
return true;
|
|
30362
|
+
}
|
|
30363
|
+
},
|
|
30148
30364
|
{
|
|
30149
30365
|
key: "__popupFocusables",
|
|
30150
30366
|
value: /**
|
|
@@ -30165,14 +30381,19 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30165
30381
|
* Create an open popup list
|
|
30166
30382
|
*/ function __openControlList(control) {
|
|
30167
30383
|
var _this = this;
|
|
30168
|
-
var _this_jodit_options_controls;
|
|
30384
|
+
var _this_jodit_options_controls, _ref, _ref1;
|
|
30385
|
+
var _this_toolbar, _control_popup;
|
|
30169
30386
|
var controls = (_this_jodit_options_controls = this.jodit.options.controls) !== null && _this_jodit_options_controls !== void 0 ? _this_jodit_options_controls : {}, getControl = function getControl(key) {
|
|
30170
30387
|
return (0,jodit_core_ui_helpers_get_control_type__WEBPACK_IMPORTED_MODULE_30__.findControlType)(key, controls);
|
|
30171
30388
|
};
|
|
30172
30389
|
var list = control.list;
|
|
30173
30390
|
var menu = this.openPopup();
|
|
30174
|
-
var toolbar = (0,_factory__WEBPACK_IMPORTED_MODULE_33__.makeCollection)(this.j);
|
|
30175
30391
|
menu.parentElement = this;
|
|
30392
|
+
var content = (_control_popup = control.popup) === null || _control_popup === void 0 ? void 0 : _control_popup.call(control, this.j, (_ref = (_ref1 = (_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.getTarget(this)) !== null && _ref1 !== void 0 ? _ref1 : this.target) !== null && _ref !== void 0 ? _ref : null, this.__closePopup, this);
|
|
30393
|
+
if (content) {
|
|
30394
|
+
return this.__openMenu(menu, content);
|
|
30395
|
+
}
|
|
30396
|
+
var toolbar = (0,_factory__WEBPACK_IMPORTED_MODULE_33__.makeCollection)(this.j);
|
|
30176
30397
|
toolbar.parentElement = menu;
|
|
30177
30398
|
toolbar.mode = 'vertical';
|
|
30178
30399
|
var isListItem = function isListItem(key) {
|
|
@@ -30224,7 +30445,14 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30224
30445
|
toolbar.build((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_19__.isArray)(list) ? list.map(getButton) : (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_28__.keys)(list, false).map(function(key) {
|
|
30225
30446
|
return getButton(key, list[key]);
|
|
30226
30447
|
}), this.target);
|
|
30227
|
-
|
|
30448
|
+
this.__openMenu(menu, toolbar);
|
|
30449
|
+
}
|
|
30450
|
+
},
|
|
30451
|
+
{
|
|
30452
|
+
key: "__openMenu",
|
|
30453
|
+
value: function __openMenu(menu, content) {
|
|
30454
|
+
var _this = this;
|
|
30455
|
+
menu.setContent(content).open(function() {
|
|
30228
30456
|
return (0,jodit_core_helpers_size__WEBPACK_IMPORTED_MODULE_24__.position)(_this.container);
|
|
30229
30457
|
}, false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
30230
30458
|
this.state.activated = true;
|
|
@@ -30246,7 +30474,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30246
30474
|
value: function openPopup() {
|
|
30247
30475
|
this.__closePopup();
|
|
30248
30476
|
this.openedPopup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_32__.Popup(this.j, false);
|
|
30249
|
-
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30477
|
+
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30250
30478
|
return this.openedPopup;
|
|
30251
30479
|
}
|
|
30252
30480
|
},
|
|
@@ -30264,7 +30492,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30264
30492
|
// popup while the outer `removeChild` is still running and Chrome
|
|
30265
30493
|
// throws NotFoundError. See #1458
|
|
30266
30494
|
this.openedPopup = null;
|
|
30267
|
-
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
|
|
30495
|
+
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
30268
30496
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
30269
30497
|
// the button, otherwise it would fall out to the document
|
|
30270
30498
|
var activeElement = this.od.activeElement, hadFocus = activeElement && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_18__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -30351,6 +30579,9 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30351
30579
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30352
30580
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30353
30581
|
], ToolbarButton.prototype, "__onPopupKeyDown", null);
|
|
30582
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30583
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30584
|
+
], ToolbarButton.prototype, "__onEditorKeyDown", null);
|
|
30354
30585
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30355
30586
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30356
30587
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -38669,14 +38900,16 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38669
38900
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15366);
|
|
38670
38901
|
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50684);
|
|
38671
38902
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27795);
|
|
38672
|
-
/* harmony import */ var
|
|
38673
|
-
/* harmony import */ var
|
|
38674
|
-
/* harmony import */ var
|
|
38675
|
-
/* harmony import */ var
|
|
38676
|
-
/* harmony import */ var
|
|
38677
|
-
/* harmony import */ var
|
|
38678
|
-
/* harmony import */ var
|
|
38679
|
-
/* harmony import */ var
|
|
38903
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17312);
|
|
38904
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4040);
|
|
38905
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80991);
|
|
38906
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29434);
|
|
38907
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5266);
|
|
38908
|
+
/* harmony import */ var _icons_font_svg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48842);
|
|
38909
|
+
/* harmony import */ var _icons_font_svg__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_icons_font_svg__WEBPACK_IMPORTED_MODULE_9__);
|
|
38910
|
+
/* harmony import */ var _icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(25501);
|
|
38911
|
+
/* harmony import */ var _icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10__);
|
|
38912
|
+
/* harmony import */ var _font_picker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80045);
|
|
38680
38913
|
/*!
|
|
38681
38914
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38682
38915
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38693,11 +38926,18 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38693
38926
|
|
|
38694
38927
|
|
|
38695
38928
|
|
|
38929
|
+
|
|
38930
|
+
|
|
38696
38931
|
/**
|
|
38697
38932
|
* Default font-size points
|
|
38698
|
-
*/
|
|
38699
|
-
|
|
38700
|
-
|
|
38933
|
+
*/ jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.defaultFontSizePoints = 'px';
|
|
38934
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.font = {
|
|
38935
|
+
googleFonts: {
|
|
38936
|
+
url: ''
|
|
38937
|
+
}
|
|
38938
|
+
};
|
|
38939
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_7__.Icon.set('font', (_icons_font_svg__WEBPACK_IMPORTED_MODULE_9___default())).set('fontsize', (_icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10___default()));
|
|
38940
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.fontsize = {
|
|
38701
38941
|
command: 'fontsize',
|
|
38702
38942
|
data: {
|
|
38703
38943
|
cssRule: 'font-size',
|
|
@@ -38743,7 +38983,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38743
38983
|
}
|
|
38744
38984
|
var control = button.control;
|
|
38745
38985
|
var cssKey = ((_control_data = control.data) === null || _control_data === void 0 ? void 0 : _control_data.cssRule) || 'font-size';
|
|
38746
|
-
var value = (0,
|
|
38986
|
+
var value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(box, cssKey);
|
|
38747
38987
|
if (cssKey === 'font-size') {
|
|
38748
38988
|
var numValue = parseFloat(value.toString());
|
|
38749
38989
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -38781,11 +39021,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38781
39021
|
return keySet.has(normalize(value.toString()));
|
|
38782
39022
|
}
|
|
38783
39023
|
};
|
|
38784
|
-
|
|
39024
|
+
var hadSelection = new WeakSet();
|
|
39025
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.font = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__._)({}, jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.fontsize), {
|
|
38785
39026
|
command: 'fontname',
|
|
38786
39027
|
textTemplate: function textTemplate(j, value) {
|
|
38787
39028
|
var _value_split = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__._)(value.split(','), 1), first = _value_split[0];
|
|
38788
|
-
return (0,
|
|
39029
|
+
return (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__.trimChars)(first, '"\'');
|
|
38789
39030
|
},
|
|
38790
39031
|
list: {
|
|
38791
39032
|
'': 'Default',
|
|
@@ -38807,6 +39048,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38807
39048
|
} catch (unused) {}
|
|
38808
39049
|
return '<span data-style="'.concat(key, '" style="').concat(isAvailable ? "font-family: ".concat(key, "!important;") : '', '">').concat(value, "</span>");
|
|
38809
39050
|
},
|
|
39051
|
+
popup: function popup(editor, current, close, button) {
|
|
39052
|
+
return editor.o.font.googleFonts.url ? new _font_picker__WEBPACK_IMPORTED_MODULE_11__.UIFontPicker(editor, button, close) : false;
|
|
39053
|
+
},
|
|
38810
39054
|
data: {
|
|
38811
39055
|
cssRule: 'font-family',
|
|
38812
39056
|
normalize: function normalize(v) {
|
|
@@ -38815,19 +39059,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38815
39059
|
},
|
|
38816
39060
|
// When no font is explicitly set, the computed font-family equals the
|
|
38817
39061
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
38818
|
-
// button shows the `Default`
|
|
38819
|
-
// See #1370
|
|
38820
|
-
value: function value(editor) {
|
|
38821
|
-
var current = editor.s.current();
|
|
38822
|
-
|
|
38823
|
-
|
|
38824
|
-
|
|
38825
|
-
|
|
38826
|
-
if (
|
|
39062
|
+
// button shows the list's `Default` entry, when it has one, instead of
|
|
39063
|
+
// that raw stack. See #1370
|
|
39064
|
+
value: function value(editor, button) {
|
|
39065
|
+
var current = editor.s.current(), box = current && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isElement, editor.editor);
|
|
39066
|
+
// Until there is a selection the button shows the editor's own font,
|
|
39067
|
+
// and afterwards the font of the last one
|
|
39068
|
+
if (box) {
|
|
39069
|
+
hadSelection.add(button);
|
|
39070
|
+
} else if (hadSelection.has(button)) {
|
|
38827
39071
|
return;
|
|
38828
39072
|
}
|
|
38829
|
-
var value = (0,
|
|
38830
|
-
if (value === (0,
|
|
39073
|
+
var value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(box || editor.editor, 'font-family').toString(), list = button.control.list;
|
|
39074
|
+
if (value === (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(editor.editor, 'font-family').toString() && ((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.includes('') : '' in (list !== null && list !== void 0 ? list : {}))) {
|
|
38831
39075
|
return '';
|
|
38832
39076
|
}
|
|
38833
39077
|
return value;
|
|
@@ -38836,6 +39080,334 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38836
39080
|
});
|
|
38837
39081
|
|
|
38838
39082
|
|
|
39083
|
+
/***/ }),
|
|
39084
|
+
|
|
39085
|
+
/***/ 80045:
|
|
39086
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39087
|
+
|
|
39088
|
+
"use strict";
|
|
39089
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39090
|
+
/* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
|
|
39091
|
+
/* harmony export */ });
|
|
39092
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
|
|
39093
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
39094
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
39095
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
39096
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
|
|
39097
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
|
|
39098
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
|
|
39099
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42395);
|
|
39100
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
39101
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91672);
|
|
39102
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(68616);
|
|
39103
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(23211);
|
|
39104
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28077);
|
|
39105
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(17312);
|
|
39106
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7909);
|
|
39107
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(80991);
|
|
39108
|
+
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(71125);
|
|
39109
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(96007);
|
|
39110
|
+
/* harmony import */ var _google_fonts__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(24939);
|
|
39111
|
+
/*!
|
|
39112
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39113
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
39114
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
39115
|
+
*/ /**
|
|
39116
|
+
* @module plugins/font
|
|
39117
|
+
*/
|
|
39118
|
+
|
|
39119
|
+
|
|
39120
|
+
|
|
39121
|
+
|
|
39122
|
+
|
|
39123
|
+
|
|
39124
|
+
|
|
39125
|
+
|
|
39126
|
+
|
|
39127
|
+
|
|
39128
|
+
|
|
39129
|
+
|
|
39130
|
+
|
|
39131
|
+
|
|
39132
|
+
|
|
39133
|
+
|
|
39134
|
+
|
|
39135
|
+
|
|
39136
|
+
|
|
39137
|
+
var HEADINGS = [
|
|
39138
|
+
'h1',
|
|
39139
|
+
'h2',
|
|
39140
|
+
'h3',
|
|
39141
|
+
'h4',
|
|
39142
|
+
'h5',
|
|
39143
|
+
'h6'
|
|
39144
|
+
];
|
|
39145
|
+
var GENERIC_FAMILIES = new Set([
|
|
39146
|
+
'serif',
|
|
39147
|
+
'sans-serif',
|
|
39148
|
+
'monospace',
|
|
39149
|
+
'cursive',
|
|
39150
|
+
'fantasy',
|
|
39151
|
+
'system-ui',
|
|
39152
|
+
'ui-serif',
|
|
39153
|
+
'ui-sans-serif',
|
|
39154
|
+
'ui-monospace',
|
|
39155
|
+
'ui-rounded'
|
|
39156
|
+
]);
|
|
39157
|
+
/**
|
|
39158
|
+
* A family that names a font, not a generic family or a vendor keyword such
|
|
39159
|
+
* as `-apple-system`
|
|
39160
|
+
*/ function isFontName(family) {
|
|
39161
|
+
return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
|
|
39162
|
+
}
|
|
39163
|
+
var UIFontPicker = /*#__PURE__*/ function(UIElement) {
|
|
39164
|
+
"use strict";
|
|
39165
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(UIFontPicker, UIElement);
|
|
39166
|
+
function UIFontPicker(jodit, __button, __close) {
|
|
39167
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UIFontPicker);
|
|
39168
|
+
var _this;
|
|
39169
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIFontPicker, [
|
|
39170
|
+
jodit
|
|
39171
|
+
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__button", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__close", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__googleFonts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__fonts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__observer", void 0), _this.__button = __button, _this.__close = __close, _this.__fonts = new Map(), _this.__observer = null;
|
|
39172
|
+
_this.__googleFonts = jodit.getInstance(_google_fonts__WEBPACK_IMPORTED_MODULE_18__.GoogleFonts);
|
|
39173
|
+
_this.__render();
|
|
39174
|
+
if (!_this.__googleFonts.fonts.size) {
|
|
39175
|
+
_this.__googleFonts.ready.then(function() {
|
|
39176
|
+
return !_this.isDestructed && _this.__render();
|
|
39177
|
+
});
|
|
39178
|
+
}
|
|
39179
|
+
return _this;
|
|
39180
|
+
}
|
|
39181
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIFontPicker, [
|
|
39182
|
+
{
|
|
39183
|
+
key: "className",
|
|
39184
|
+
value: function className() {
|
|
39185
|
+
return 'UIFontPicker';
|
|
39186
|
+
}
|
|
39187
|
+
},
|
|
39188
|
+
{
|
|
39189
|
+
key: "__render",
|
|
39190
|
+
value: function __render() {
|
|
39191
|
+
var _this = this;
|
|
39192
|
+
var _ref;
|
|
39193
|
+
var _control_value;
|
|
39194
|
+
var control = this.__button.control, _control_list = control.list, list = _control_list === void 0 ? {} : _control_list, listed = (0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_13__.isArray)(list) ? list.map(function(key) {
|
|
39195
|
+
return {
|
|
39196
|
+
value: key.toString(),
|
|
39197
|
+
title: key.toString()
|
|
39198
|
+
};
|
|
39199
|
+
}) : (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map(function(key) {
|
|
39200
|
+
return {
|
|
39201
|
+
value: key,
|
|
39202
|
+
title: list[key].toString()
|
|
39203
|
+
};
|
|
39204
|
+
}), google = Array.from(this.__googleFonts.fonts.values(), function(font) {
|
|
39205
|
+
return {
|
|
39206
|
+
value: _this.__googleFonts.value(font),
|
|
39207
|
+
title: font.family,
|
|
39208
|
+
font: font
|
|
39209
|
+
};
|
|
39210
|
+
}), byFamily = new Map();
|
|
39211
|
+
(0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(google).concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(listed)).forEach(function(entry) {
|
|
39212
|
+
return byFamily.set((0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(entry.value), entry);
|
|
39213
|
+
});
|
|
39214
|
+
var theme = new Map(), used = new Map();
|
|
39215
|
+
// The theme's own fonts are listed too, so its body font can be chosen
|
|
39216
|
+
// to take a font off
|
|
39217
|
+
this.__themeFonts().forEach(function(fontFamily) {
|
|
39218
|
+
var _byFamily_get;
|
|
39219
|
+
var family = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(fontFamily), title = fontFamily.split(',')[0].replace(/["']/g, '').trim(), entry = (_byFamily_get = byFamily.get(family)) !== null && _byFamily_get !== void 0 ? _byFamily_get : isFontName(family) ? {
|
|
39220
|
+
value: fontFamily,
|
|
39221
|
+
title: title
|
|
39222
|
+
} : undefined;
|
|
39223
|
+
entry && !theme.has(family) && theme.set(family, entry);
|
|
39224
|
+
});
|
|
39225
|
+
this.__usedFonts().forEach(function(fontFamily) {
|
|
39226
|
+
var family = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(fontFamily), entry = byFamily.get(family);
|
|
39227
|
+
entry && !theme.has(family) && used.set(family, entry);
|
|
39228
|
+
});
|
|
39229
|
+
var defaultEntry = listed.find(function(entry) {
|
|
39230
|
+
return entry.value === '';
|
|
39231
|
+
}), current = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)((_ref = (_control_value = control.value) === null || _control_value === void 0 ? void 0 : _control_value.call(control, this.j, this.__button)) !== null && _ref !== void 0 ? _ref : '');
|
|
39232
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.detach(this.container);
|
|
39233
|
+
this.__fonts.clear();
|
|
39234
|
+
defaultEntry && this.__append(current, [
|
|
39235
|
+
defaultEntry
|
|
39236
|
+
]);
|
|
39237
|
+
this.__append(current, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(theme.values()), 'Theme fonts');
|
|
39238
|
+
this.__append(current, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(used.values()), 'Used fonts');
|
|
39239
|
+
this.__append(current, listed.filter(function(entry) {
|
|
39240
|
+
return entry !== defaultEntry;
|
|
39241
|
+
}), 'System fonts');
|
|
39242
|
+
this.__append(current, google, 'Google Fonts');
|
|
39243
|
+
this.__observeGoogleFonts();
|
|
39244
|
+
}
|
|
39245
|
+
},
|
|
39246
|
+
{
|
|
39247
|
+
key: "__themeFonts",
|
|
39248
|
+
value: /**
|
|
39249
|
+
* The fonts the editor's styles give text and each heading
|
|
39250
|
+
*/ function __themeFonts() {
|
|
39251
|
+
var _this = this;
|
|
39252
|
+
var editor = this.j.editor, fonts = [
|
|
39253
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(editor, 'font-family').toString()
|
|
39254
|
+
];
|
|
39255
|
+
HEADINGS.forEach(function(tag) {
|
|
39256
|
+
var heading = _this.j.createInside.element(tag, {
|
|
39257
|
+
style: 'display: none'
|
|
39258
|
+
});
|
|
39259
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(editor, heading);
|
|
39260
|
+
fonts.push((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(heading, 'font-family').toString());
|
|
39261
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.safeRemove(heading);
|
|
39262
|
+
});
|
|
39263
|
+
return fonts;
|
|
39264
|
+
}
|
|
39265
|
+
},
|
|
39266
|
+
{
|
|
39267
|
+
key: "__usedFonts",
|
|
39268
|
+
value: /**
|
|
39269
|
+
* The fonts the content sets
|
|
39270
|
+
*/ function __usedFonts() {
|
|
39271
|
+
return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), function(element) {
|
|
39272
|
+
return element.style.fontFamily;
|
|
39273
|
+
});
|
|
39274
|
+
}
|
|
39275
|
+
},
|
|
39276
|
+
{
|
|
39277
|
+
key: "__append",
|
|
39278
|
+
value: function __append(current, entries, heading) {
|
|
39279
|
+
var _this = this;
|
|
39280
|
+
if (!entries.length) {
|
|
39281
|
+
return;
|
|
39282
|
+
}
|
|
39283
|
+
var control = this.__button.control, group = this.j.c.div(this.getFullElName('group'));
|
|
39284
|
+
if (heading) {
|
|
39285
|
+
var title = this.j.c.div(this.getFullElName('heading'), {
|
|
39286
|
+
id: "".concat(this.getFullElName('heading'), "-").concat((0,jodit_core_global__WEBPACK_IMPORTED_MODULE_12__.uniqueUid)())
|
|
39287
|
+
});
|
|
39288
|
+
title.textContent = this.i18n(heading);
|
|
39289
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(group, {
|
|
39290
|
+
role: 'group',
|
|
39291
|
+
'aria-labelledby': title.id
|
|
39292
|
+
});
|
|
39293
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(group, title);
|
|
39294
|
+
}
|
|
39295
|
+
entries.forEach(function(entry) {
|
|
39296
|
+
var item = _this.j.c.element('button', {
|
|
39297
|
+
type: 'button',
|
|
39298
|
+
class: _this.getFullElName('item'),
|
|
39299
|
+
'data-value': entry.value,
|
|
39300
|
+
'aria-pressed': (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(entry.value) === current
|
|
39301
|
+
});
|
|
39302
|
+
if (entry.font) {
|
|
39303
|
+
item.textContent = entry.title;
|
|
39304
|
+
_this.__fonts.set(item, entry.font);
|
|
39305
|
+
} else {
|
|
39306
|
+
var _ref;
|
|
39307
|
+
var _control_childTemplate;
|
|
39308
|
+
item.innerHTML = (_ref = (_control_childTemplate = control.childTemplate) === null || _control_childTemplate === void 0 ? void 0 : _control_childTemplate.call(control, _this.j, entry.value, entry.title, _this.__button)) !== null && _ref !== void 0 ? _ref : entry.title;
|
|
39309
|
+
}
|
|
39310
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(group, item);
|
|
39311
|
+
});
|
|
39312
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(this.container, group);
|
|
39313
|
+
}
|
|
39314
|
+
},
|
|
39315
|
+
{
|
|
39316
|
+
key: "__observeGoogleFonts",
|
|
39317
|
+
value: /**
|
|
39318
|
+
* Shows the names of the Google Fonts in view, and those just below it,
|
|
39319
|
+
* in their own fonts. Setting every item's font up front would have the
|
|
39320
|
+
* browser look for each of the library's families among the installed
|
|
39321
|
+
* fonts the first time the list opens
|
|
39322
|
+
*/ function __observeGoogleFonts() {
|
|
39323
|
+
var _this = this;
|
|
39324
|
+
this.j.async.requestAnimationFrame(function() {
|
|
39325
|
+
var _this___observer;
|
|
39326
|
+
(_this___observer = _this.__observer) === null || _this___observer === void 0 ? void 0 : _this___observer.disconnect();
|
|
39327
|
+
if (_this.isDestructed || !_this.__fonts.size) {
|
|
39328
|
+
return;
|
|
39329
|
+
}
|
|
39330
|
+
var observer = new IntersectionObserver(function(entries) {
|
|
39331
|
+
var fonts = [];
|
|
39332
|
+
entries.forEach(function(param) {
|
|
39333
|
+
var isIntersecting = param.isIntersecting, target = param.target;
|
|
39334
|
+
var font = _this.__fonts.get(target);
|
|
39335
|
+
if (isIntersecting && font) {
|
|
39336
|
+
fonts.push(font);
|
|
39337
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(target, {
|
|
39338
|
+
fontFamily: _this.__googleFonts.value(font)
|
|
39339
|
+
});
|
|
39340
|
+
observer.unobserve(target);
|
|
39341
|
+
}
|
|
39342
|
+
});
|
|
39343
|
+
_this.__googleFonts.preview(fonts);
|
|
39344
|
+
}, {
|
|
39345
|
+
root: _this.container.parentElement,
|
|
39346
|
+
rootMargin: '0px 0px 400px 0px'
|
|
39347
|
+
});
|
|
39348
|
+
_this.__fonts.forEach(function(_, item) {
|
|
39349
|
+
return observer.observe(item);
|
|
39350
|
+
});
|
|
39351
|
+
_this.__observer = observer;
|
|
39352
|
+
});
|
|
39353
|
+
}
|
|
39354
|
+
},
|
|
39355
|
+
{
|
|
39356
|
+
key: "onMouseDown",
|
|
39357
|
+
value: /**
|
|
39358
|
+
* Keeps the editor's selection, as the toolbar buttons do
|
|
39359
|
+
*/ function onMouseDown(e) {
|
|
39360
|
+
e.preventDefault();
|
|
39361
|
+
}
|
|
39362
|
+
},
|
|
39363
|
+
{
|
|
39364
|
+
key: "onClick",
|
|
39365
|
+
value: function onClick(e) {
|
|
39366
|
+
var _attr;
|
|
39367
|
+
var item = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.up(e.target, function(node) {
|
|
39368
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isHTMLElement(node) && node.hasAttribute('data-value');
|
|
39369
|
+
}, this.container);
|
|
39370
|
+
if (!item) {
|
|
39371
|
+
return;
|
|
39372
|
+
}
|
|
39373
|
+
var value = (_attr = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(item, 'data-value')) !== null && _attr !== void 0 ? _attr : '', font = this.__googleFonts.find(value), // The font the text has anyway is taken off rather than written
|
|
39374
|
+
inherited = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(value) === (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(this.__blockFont());
|
|
39375
|
+
font && !inherited && this.__googleFonts.load(font);
|
|
39376
|
+
this.j.execCommand('fontname', false, inherited ? '' : value);
|
|
39377
|
+
this.__close();
|
|
39378
|
+
}
|
|
39379
|
+
},
|
|
39380
|
+
{
|
|
39381
|
+
key: "__blockFont",
|
|
39382
|
+
value: /**
|
|
39383
|
+
* The font the selected text has without a font of its own: its block's
|
|
39384
|
+
*/ function __blockFont() {
|
|
39385
|
+
var block = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.up(this.j.s.current(), jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isBlock, this.j.editor);
|
|
39386
|
+
return (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
|
|
39387
|
+
}
|
|
39388
|
+
},
|
|
39389
|
+
{
|
|
39390
|
+
key: "destruct",
|
|
39391
|
+
value: function destruct() {
|
|
39392
|
+
var _this___observer;
|
|
39393
|
+
(_this___observer = this.__observer) === null || _this___observer === void 0 ? void 0 : _this___observer.disconnect();
|
|
39394
|
+
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(UIFontPicker.prototype), "destruct", this).call(this);
|
|
39395
|
+
}
|
|
39396
|
+
}
|
|
39397
|
+
]);
|
|
39398
|
+
return UIFontPicker;
|
|
39399
|
+
}(jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_17__.UIElement);
|
|
39400
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39401
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__.watch)('container:mousedown')
|
|
39402
|
+
], UIFontPicker.prototype, "onMouseDown", null);
|
|
39403
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39404
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__.watch)('container:click')
|
|
39405
|
+
], UIFontPicker.prototype, "onClick", null);
|
|
39406
|
+
UIFontPicker = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39407
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__.component
|
|
39408
|
+
], UIFontPicker);
|
|
39409
|
+
|
|
39410
|
+
|
|
38839
39411
|
/***/ }),
|
|
38840
39412
|
|
|
38841
39413
|
/***/ 50294:
|
|
@@ -38846,6 +39418,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38846
39418
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28077);
|
|
38847
39419
|
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65946);
|
|
38848
39420
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7433);
|
|
39421
|
+
/* harmony import */ var _google_fonts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24939);
|
|
38849
39422
|
/*!
|
|
38850
39423
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38851
39424
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38857,6 +39430,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38857
39430
|
*/
|
|
38858
39431
|
|
|
38859
39432
|
|
|
39433
|
+
|
|
38860
39434
|
/**
|
|
38861
39435
|
* Process commands `fontsize` and `fontname`
|
|
38862
39436
|
*/ function font(editor) {
|
|
@@ -38867,6 +39441,22 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38867
39441
|
name: 'fontsize',
|
|
38868
39442
|
group: 'font'
|
|
38869
39443
|
});
|
|
39444
|
+
if (editor.o.font.googleFonts.url) {
|
|
39445
|
+
var googleFonts = editor.getInstance(_google_fonts__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(function() {
|
|
39446
|
+
return googleFonts.loadUsed();
|
|
39447
|
+
}, editor.defaultTimeout);
|
|
39448
|
+
googleFonts.ready.then(loadUsed);
|
|
39449
|
+
editor.e.on('afterInit afterSetMode change', loadUsed);
|
|
39450
|
+
}
|
|
39451
|
+
// An iframe's stylesheets can arrive after the toolbar first shows the
|
|
39452
|
+
// editor's font
|
|
39453
|
+
editor.e.on('afterInit', function() {
|
|
39454
|
+
editor.iframe && editor.e.on(editor.ed, 'load', function() {
|
|
39455
|
+
return editor.e.fire('updateToolbar');
|
|
39456
|
+
}, {
|
|
39457
|
+
capture: true
|
|
39458
|
+
});
|
|
39459
|
+
});
|
|
38870
39460
|
var callback = function callback(command, second, third) {
|
|
38871
39461
|
switch(command){
|
|
38872
39462
|
case 'fontsize':
|
|
@@ -38896,6 +39486,245 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38896
39486
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
38897
39487
|
|
|
38898
39488
|
|
|
39489
|
+
/***/ }),
|
|
39490
|
+
|
|
39491
|
+
/***/ 24939:
|
|
39492
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39493
|
+
|
|
39494
|
+
"use strict";
|
|
39495
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39496
|
+
/* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
|
|
39497
|
+
/* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
|
|
39498
|
+
/* harmony export */ });
|
|
39499
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
|
|
39500
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
39501
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
39502
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
39503
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
|
|
39504
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
|
|
39505
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
|
|
39506
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50684);
|
|
39507
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(42395);
|
|
39508
|
+
/* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59609);
|
|
39509
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23211);
|
|
39510
|
+
/* harmony import */ var jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17338);
|
|
39511
|
+
/*!
|
|
39512
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39513
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
39514
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
39515
|
+
*/ /**
|
|
39516
|
+
* @module plugins/font
|
|
39517
|
+
*/
|
|
39518
|
+
|
|
39519
|
+
|
|
39520
|
+
|
|
39521
|
+
|
|
39522
|
+
|
|
39523
|
+
|
|
39524
|
+
|
|
39525
|
+
|
|
39526
|
+
|
|
39527
|
+
|
|
39528
|
+
|
|
39529
|
+
var CSS_URL = 'https://fonts.googleapis.com/css2';
|
|
39530
|
+
// `cursive` and `fantasy` stand in badly for a handwriting or display font
|
|
39531
|
+
var GENERIC_FAMILIES = {
|
|
39532
|
+
serif: 'serif',
|
|
39533
|
+
monospace: 'monospace'
|
|
39534
|
+
};
|
|
39535
|
+
var libraries = new Map();
|
|
39536
|
+
/**
|
|
39537
|
+
* The fonts of the library at `url`, fetched once for every editor on the page
|
|
39538
|
+
*/ function library(jodit, url) {
|
|
39539
|
+
var fonts = libraries.get(url);
|
|
39540
|
+
if (!fonts) {
|
|
39541
|
+
var ajax = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__.Ajax({
|
|
39542
|
+
url: url,
|
|
39543
|
+
method: 'GET'
|
|
39544
|
+
}, jodit.o.defaultAjaxOptions);
|
|
39545
|
+
fonts = ajax.send().then(function(response) {
|
|
39546
|
+
return response.json();
|
|
39547
|
+
})// A font without a regular style can't be asked for by its name alone
|
|
39548
|
+
.then(function(param) {
|
|
39549
|
+
var items = param.items;
|
|
39550
|
+
return items.filter(function(font) {
|
|
39551
|
+
return font.variants.includes('regular');
|
|
39552
|
+
});
|
|
39553
|
+
}).catch(function() {
|
|
39554
|
+
libraries.delete(url);
|
|
39555
|
+
return [];
|
|
39556
|
+
}).finally(function() {
|
|
39557
|
+
return ajax.destruct();
|
|
39558
|
+
});
|
|
39559
|
+
libraries.set(url, fonts);
|
|
39560
|
+
}
|
|
39561
|
+
return fonts;
|
|
39562
|
+
}
|
|
39563
|
+
/**
|
|
39564
|
+
* The first family of a `font-family` value, unquoted and in lower case for
|
|
39565
|
+
* comparing
|
|
39566
|
+
*/ function firstFamily(fontFamily) {
|
|
39567
|
+
return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
|
|
39568
|
+
}
|
|
39569
|
+
/**
|
|
39570
|
+
* Loads fonts from Google Fonts: the whole of each font the content uses into
|
|
39571
|
+
* the editor's document, and just the letters of its name for the font list
|
|
39572
|
+
*/ var GoogleFonts = /*#__PURE__*/ function(ViewComponent) {
|
|
39573
|
+
"use strict";
|
|
39574
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(GoogleFonts, ViewComponent);
|
|
39575
|
+
function GoogleFonts(jodit) {
|
|
39576
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, GoogleFonts);
|
|
39577
|
+
var _this;
|
|
39578
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, GoogleFonts, [
|
|
39579
|
+
jodit
|
|
39580
|
+
]), /**
|
|
39581
|
+
* The library by lower-case family, empty until it arrives
|
|
39582
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "fonts", new Map()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "ready", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__links", []), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__loaded", new WeakMap()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__previewed", new Set());
|
|
39583
|
+
_this.ready = library(jodit, jodit.o.font.googleFonts.url).then(function(fonts) {
|
|
39584
|
+
fonts.forEach(function(font) {
|
|
39585
|
+
return _this.fonts.set(font.family.toLowerCase(), font);
|
|
39586
|
+
});
|
|
39587
|
+
});
|
|
39588
|
+
return _this;
|
|
39589
|
+
}
|
|
39590
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(GoogleFonts, [
|
|
39591
|
+
{
|
|
39592
|
+
key: "className",
|
|
39593
|
+
value: function className() {
|
|
39594
|
+
return 'GoogleFonts';
|
|
39595
|
+
}
|
|
39596
|
+
},
|
|
39597
|
+
{
|
|
39598
|
+
/**
|
|
39599
|
+
* The library's font named first in a `font-family` value
|
|
39600
|
+
*/ key: "find",
|
|
39601
|
+
value: function find(fontFamily) {
|
|
39602
|
+
return this.fonts.get(firstFamily(fontFamily));
|
|
39603
|
+
}
|
|
39604
|
+
},
|
|
39605
|
+
{
|
|
39606
|
+
/**
|
|
39607
|
+
* The `font-family` value that applies a font
|
|
39608
|
+
*/ key: "value",
|
|
39609
|
+
value: function value(font) {
|
|
39610
|
+
var _GENERIC_FAMILIES_font_category;
|
|
39611
|
+
return "'".concat(font.family, "', ").concat((_GENERIC_FAMILIES_font_category = GENERIC_FAMILIES[font.category]) !== null && _GENERIC_FAMILIES_font_category !== void 0 ? _GENERIC_FAMILIES_font_category : 'sans-serif');
|
|
39612
|
+
}
|
|
39613
|
+
},
|
|
39614
|
+
{
|
|
39615
|
+
/**
|
|
39616
|
+
* Loads the regular, italic, bold and bold italic styles that a font has
|
|
39617
|
+
* into the editor's document
|
|
39618
|
+
*/ key: "load",
|
|
39619
|
+
value: function load(font) {
|
|
39620
|
+
var loaded = this.__loadedInto(this.j.ed);
|
|
39621
|
+
if (loaded.has(font.family)) {
|
|
39622
|
+
return;
|
|
39623
|
+
}
|
|
39624
|
+
loaded.add(font.family);
|
|
39625
|
+
var styles = [
|
|
39626
|
+
[
|
|
39627
|
+
'regular',
|
|
39628
|
+
'0,400'
|
|
39629
|
+
],
|
|
39630
|
+
[
|
|
39631
|
+
'700',
|
|
39632
|
+
'0,700'
|
|
39633
|
+
],
|
|
39634
|
+
[
|
|
39635
|
+
'italic',
|
|
39636
|
+
'1,400'
|
|
39637
|
+
],
|
|
39638
|
+
[
|
|
39639
|
+
'700italic',
|
|
39640
|
+
'1,700'
|
|
39641
|
+
]
|
|
39642
|
+
].filter(function(param) {
|
|
39643
|
+
var _param = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(param, 1), variant = _param[0];
|
|
39644
|
+
return font.variants.includes(variant);
|
|
39645
|
+
}).map(function(param) {
|
|
39646
|
+
var _param = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(param, 2), style = _param[1];
|
|
39647
|
+
return style;
|
|
39648
|
+
});
|
|
39649
|
+
this.__append(this.j.ed, "family=".concat(this.__family(font), ":ital,wght@").concat(styles.join(';')));
|
|
39650
|
+
}
|
|
39651
|
+
},
|
|
39652
|
+
{
|
|
39653
|
+
/**
|
|
39654
|
+
* Loads every font of the library that the content uses
|
|
39655
|
+
*/ key: "loadUsed",
|
|
39656
|
+
value: function loadUsed() {
|
|
39657
|
+
var _this = this;
|
|
39658
|
+
this.j.editor.querySelectorAll('[style*="font-family"]').forEach(function(element) {
|
|
39659
|
+
var font = _this.find(element.style.fontFamily);
|
|
39660
|
+
font && _this.load(font);
|
|
39661
|
+
});
|
|
39662
|
+
}
|
|
39663
|
+
},
|
|
39664
|
+
{
|
|
39665
|
+
/**
|
|
39666
|
+
* Loads into the page just the letters of each font's name, so the font
|
|
39667
|
+
* list can show the name in its font
|
|
39668
|
+
*/ key: "preview",
|
|
39669
|
+
value: function preview(fonts) {
|
|
39670
|
+
var _this = this;
|
|
39671
|
+
var loaded = this.__loadedInto(this.j.od);
|
|
39672
|
+
fonts = fonts.filter(function(font) {
|
|
39673
|
+
return !_this.__previewed.has(font.family) && !loaded.has(font.family);
|
|
39674
|
+
});
|
|
39675
|
+
if (!fonts.length) {
|
|
39676
|
+
return;
|
|
39677
|
+
}
|
|
39678
|
+
fonts.forEach(function(font) {
|
|
39679
|
+
return _this.__previewed.add(font.family);
|
|
39680
|
+
});
|
|
39681
|
+
var families = fonts.map(function(font) {
|
|
39682
|
+
return "family=".concat(_this.__family(font));
|
|
39683
|
+
}), letters = new Set(fonts.map(function(font) {
|
|
39684
|
+
return font.family;
|
|
39685
|
+
}).join(''));
|
|
39686
|
+
this.__append(this.j.od, "".concat(families.join('&'), "&text=").concat(encodeURIComponent((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__._)(letters).join(''))));
|
|
39687
|
+
}
|
|
39688
|
+
},
|
|
39689
|
+
{
|
|
39690
|
+
key: "__loadedInto",
|
|
39691
|
+
value: function __loadedInto(doc) {
|
|
39692
|
+
var _this___loaded_get;
|
|
39693
|
+
var loaded = (_this___loaded_get = this.__loaded.get(doc)) !== null && _this___loaded_get !== void 0 ? _this___loaded_get : new Set();
|
|
39694
|
+
this.__loaded.set(doc, loaded);
|
|
39695
|
+
return loaded;
|
|
39696
|
+
}
|
|
39697
|
+
},
|
|
39698
|
+
{
|
|
39699
|
+
key: "__family",
|
|
39700
|
+
value: function __family(font) {
|
|
39701
|
+
return encodeURIComponent(font.family).replace(/%20/g, '+');
|
|
39702
|
+
}
|
|
39703
|
+
},
|
|
39704
|
+
{
|
|
39705
|
+
key: "__append",
|
|
39706
|
+
value: function __append(doc, query) {
|
|
39707
|
+
var link = doc.createElement('link');
|
|
39708
|
+
link.rel = 'stylesheet';
|
|
39709
|
+
link.href = "".concat(CSS_URL, "?").concat(query, "&display=swap");
|
|
39710
|
+
doc.head.appendChild(link);
|
|
39711
|
+
this.__links.push(link);
|
|
39712
|
+
}
|
|
39713
|
+
},
|
|
39714
|
+
{
|
|
39715
|
+
key: "destruct",
|
|
39716
|
+
value: function destruct() {
|
|
39717
|
+
this.__links.forEach(function(link) {
|
|
39718
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(link);
|
|
39719
|
+
});
|
|
39720
|
+
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(GoogleFonts.prototype), "destruct", this).call(this);
|
|
39721
|
+
}
|
|
39722
|
+
}
|
|
39723
|
+
]);
|
|
39724
|
+
return GoogleFonts;
|
|
39725
|
+
}(jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_9__.ViewComponent);
|
|
39726
|
+
|
|
39727
|
+
|
|
38899
39728
|
/***/ }),
|
|
38900
39729
|
|
|
38901
39730
|
/***/ 96863:
|
|
@@ -40398,12 +41227,13 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40398
41227
|
/* harmony export */ });
|
|
40399
41228
|
/* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49376);
|
|
40400
41229
|
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3233);
|
|
40401
|
-
/* harmony import */ var
|
|
40402
|
-
/* harmony import */ var
|
|
40403
|
-
/* harmony import */ var
|
|
40404
|
-
/* harmony import */ var
|
|
40405
|
-
/* harmony import */ var
|
|
40406
|
-
/* harmony import */ var
|
|
41230
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16849);
|
|
41231
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
41232
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
41233
|
+
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26633);
|
|
41234
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79310);
|
|
41235
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18380);
|
|
41236
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(57339);
|
|
40407
41237
|
/*!
|
|
40408
41238
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
40409
41239
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -40418,6 +41248,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40418
41248
|
|
|
40419
41249
|
|
|
40420
41250
|
|
|
41251
|
+
|
|
40421
41252
|
/**
|
|
40422
41253
|
* Read values from image and set it to state
|
|
40423
41254
|
* @private
|
|
@@ -40426,29 +41257,29 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40426
41257
|
var image, values;
|
|
40427
41258
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__._)(this, function(_state) {
|
|
40428
41259
|
image = state.sourceImage, values = state.values;
|
|
40429
|
-
(0,
|
|
41260
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_5__.readAlign)(image, values, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(j, image));
|
|
40430
41261
|
// Border radius
|
|
40431
|
-
values.borderRadius = parseInt((0,
|
|
41262
|
+
values.borderRadius = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
40432
41263
|
// Id
|
|
40433
|
-
values.id = (0,
|
|
41264
|
+
values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'id') || '';
|
|
40434
41265
|
// Title
|
|
40435
|
-
values.imageTitle = (0,
|
|
41266
|
+
values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'title') || '';
|
|
40436
41267
|
// Alt
|
|
40437
|
-
values.imageAlt = (0,
|
|
41268
|
+
values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'alt') || '';
|
|
40438
41269
|
// Style
|
|
40439
|
-
values.style = (0,
|
|
41270
|
+
values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'style') || '';
|
|
40440
41271
|
// Classes
|
|
40441
|
-
values.classes = ((0,
|
|
41272
|
+
values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
40442
41273
|
// Margins
|
|
40443
|
-
(0,
|
|
41274
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_7__.readMargins)(image, values, state);
|
|
40444
41275
|
// Link
|
|
40445
|
-
(0,
|
|
41276
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_6__.readLink)(state, j, values);
|
|
40446
41277
|
// Src
|
|
40447
|
-
values.imageSrc = (0,
|
|
41278
|
+
values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'src') || '';
|
|
40448
41279
|
// Image size
|
|
40449
41280
|
return [
|
|
40450
41281
|
2,
|
|
40451
|
-
(0,
|
|
41282
|
+
(0,_size__WEBPACK_IMPORTED_MODULE_8__.readSizes)(image, values, state)
|
|
40452
41283
|
];
|
|
40453
41284
|
});
|
|
40454
41285
|
})();
|
|
@@ -41674,7 +42505,7 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41674
42505
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41675
42506
|
}
|
|
41676
42507
|
if (opt.image.editAlign) {
|
|
41677
|
-
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align,
|
|
42508
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
|
|
41678
42509
|
}
|
|
41679
42510
|
}
|
|
41680
42511
|
|
|
@@ -42548,6 +43379,7 @@ var cmd = function cmd(control) {
|
|
|
42548
43379
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85932);
|
|
42549
43380
|
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16849);
|
|
42550
43381
|
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
43382
|
+
/* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83314);
|
|
42551
43383
|
/*!
|
|
42552
43384
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42553
43385
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42559,11 +43391,7 @@ var cmd = function cmd(control) {
|
|
|
42559
43391
|
|
|
42560
43392
|
|
|
42561
43393
|
|
|
42562
|
-
|
|
42563
|
-
// keep inline styles
|
|
42564
|
-
var alignClasses = function alignClasses(editor, elm) {
|
|
42565
|
-
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42566
|
-
};
|
|
43394
|
+
|
|
42567
43395
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
42568
43396
|
var lineAlign = function lineAlign(editor, elm) {
|
|
42569
43397
|
var block = elm && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(elm, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor) || editor.editor;
|
|
@@ -42585,7 +43413,7 @@ var lineAlign = function lineAlign(editor, elm) {
|
|
|
42585
43413
|
}
|
|
42586
43414
|
};
|
|
42587
43415
|
var currentAlign = function currentAlign(editor, elm) {
|
|
42588
|
-
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm,
|
|
43416
|
+
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, elm)) : 'normal';
|
|
42589
43417
|
};
|
|
42590
43418
|
var align = {
|
|
42591
43419
|
name: 'left',
|
|
@@ -42612,23 +43440,25 @@ var align = {
|
|
|
42612
43440
|
},
|
|
42613
43441
|
exec: function exec(editor, elm, param) {
|
|
42614
43442
|
var control = param.control;
|
|
42615
|
-
|
|
43443
|
+
// A media wrapper kept in the content (`mediaWrappers`) is aligned itself
|
|
43444
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(elm) || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42616
43445
|
'img',
|
|
42617
43446
|
'jodit',
|
|
42618
43447
|
'jodit-media'
|
|
42619
|
-
]))) {
|
|
43448
|
+
])) && (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
|
|
42620
43449
|
return;
|
|
42621
43450
|
}
|
|
42622
43451
|
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42623
43452
|
if (!command) {
|
|
42624
43453
|
return false;
|
|
42625
43454
|
}
|
|
42626
|
-
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command,
|
|
43455
|
+
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, elm));
|
|
42627
43456
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42628
43457
|
'jodit',
|
|
42629
43458
|
'jodit-media'
|
|
42630
43459
|
])) && elm.firstElementChild) {
|
|
42631
|
-
|
|
43460
|
+
var media = elm.firstElementChild;
|
|
43461
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(media, command, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, media));
|
|
42632
43462
|
}
|
|
42633
43463
|
editor.synchronizeValues();
|
|
42634
43464
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -42741,17 +43571,18 @@ var align = {
|
|
|
42741
43571
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
42742
43572
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
42743
43573
|
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
|
|
42744
|
-
/* harmony import */ var
|
|
42745
|
-
/* harmony import */ var
|
|
42746
|
-
/* harmony import */ var
|
|
42747
|
-
/* harmony import */ var
|
|
42748
|
-
/* harmony import */ var
|
|
42749
|
-
/* harmony import */ var
|
|
42750
|
-
/* harmony import */ var
|
|
42751
|
-
/* harmony import */ var
|
|
42752
|
-
/* harmony import */ var
|
|
42753
|
-
/* harmony import */ var
|
|
42754
|
-
/* harmony import */ var
|
|
43574
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42395);
|
|
43575
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
|
|
43576
|
+
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38574);
|
|
43577
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84839);
|
|
43578
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27795);
|
|
43579
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28077);
|
|
43580
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
43581
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91206);
|
|
43582
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4099);
|
|
43583
|
+
/* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(56490);
|
|
43584
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4274);
|
|
43585
|
+
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(89873);
|
|
42755
43586
|
/*!
|
|
42756
43587
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42757
43588
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42777,6 +43608,7 @@ var align = {
|
|
|
42777
43608
|
|
|
42778
43609
|
|
|
42779
43610
|
|
|
43611
|
+
|
|
42780
43612
|
/**
|
|
42781
43613
|
* Plugin for show inline popup dialog
|
|
42782
43614
|
*/ var inlinePopup = /*#__PURE__*/ function(Plugin) {
|
|
@@ -42789,7 +43621,7 @@ var align = {
|
|
|
42789
43621
|
* The user pressed a button inside the selection toolbar — after the
|
|
42790
43622
|
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
42791
43623
|
* while the selection is still there. See #1238
|
|
42792
|
-
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "elmsList", (0,
|
|
43624
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "elmsList", (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.keys)(_this.j.o.popup, false).filter(function(s) {
|
|
42793
43625
|
return !_this.isExcludedTarget(s);
|
|
42794
43626
|
}));
|
|
42795
43627
|
return _this;
|
|
@@ -42798,24 +43630,26 @@ var align = {
|
|
|
42798
43630
|
{
|
|
42799
43631
|
key: "popup",
|
|
42800
43632
|
get: function get() {
|
|
42801
|
-
return new
|
|
43633
|
+
return new jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup(this.jodit, false);
|
|
42802
43634
|
}
|
|
42803
43635
|
},
|
|
42804
43636
|
{
|
|
42805
43637
|
key: "toolbar",
|
|
42806
43638
|
get: function get() {
|
|
42807
|
-
return (0,
|
|
43639
|
+
return (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_15__.makeCollection)(this.jodit, this.popup);
|
|
42808
43640
|
}
|
|
42809
43641
|
},
|
|
42810
43642
|
{
|
|
42811
43643
|
key: "onClick",
|
|
42812
43644
|
value: function onClick(node) {
|
|
42813
43645
|
var _this = this;
|
|
42814
|
-
var elements = this.elmsList, target =
|
|
42815
|
-
|
|
43646
|
+
var elements = this.elmsList, mediaWrapper = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isTag(node, 'img') ? node : jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.closest(node, elements, this.j.editor);
|
|
43647
|
+
// A media wrapper kept in the content gets the media popup
|
|
43648
|
+
var type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
|
|
43649
|
+
if (target && type && this.canShowPopupForType(type)) {
|
|
42816
43650
|
this.showPopup(function() {
|
|
42817
|
-
return (0,
|
|
42818
|
-
},
|
|
43651
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(target, _this.j);
|
|
43652
|
+
}, type, target);
|
|
42819
43653
|
return false;
|
|
42820
43654
|
}
|
|
42821
43655
|
}
|
|
@@ -42835,15 +43669,15 @@ var align = {
|
|
|
42835
43669
|
this.previousTarget = target;
|
|
42836
43670
|
var data = this.j.o.popup[type];
|
|
42837
43671
|
var content;
|
|
42838
|
-
if ((0,
|
|
43672
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isFunction)(data)) {
|
|
42839
43673
|
content = data(this.j, target, this.popup.close);
|
|
42840
43674
|
} else {
|
|
42841
43675
|
content = data;
|
|
42842
43676
|
}
|
|
42843
|
-
if ((0,
|
|
43677
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isArray)(content)) {
|
|
42844
43678
|
var disabled = this.j.o.toolbarInlineDisabledButtons;
|
|
42845
43679
|
this.toolbar.build(disabled.length ? content.filter(function(item) {
|
|
42846
|
-
var name = (0,
|
|
43680
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42847
43681
|
return !disabled.includes(name !== null && name !== void 0 ? name : '');
|
|
42848
43682
|
}) : content, target);
|
|
42849
43683
|
this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
|
|
@@ -42861,7 +43695,7 @@ var align = {
|
|
|
42861
43695
|
value: /**
|
|
42862
43696
|
* Hide opened popup
|
|
42863
43697
|
*/ function hidePopup(type) {
|
|
42864
|
-
if (this.popup.isOpened && (!(0,
|
|
43698
|
+
if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(type) || type === this.type)) {
|
|
42865
43699
|
this.popup.close();
|
|
42866
43700
|
}
|
|
42867
43701
|
}
|
|
@@ -42889,7 +43723,7 @@ var align = {
|
|
|
42889
43723
|
value: /**
|
|
42890
43724
|
* For some elements do not show popup
|
|
42891
43725
|
*/ function isExcludedTarget(type) {
|
|
42892
|
-
return (0,
|
|
43726
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.splitArray)(this.j.o.toolbarInlineDisableFor).map(function(a) {
|
|
42893
43727
|
return a.toLowerCase();
|
|
42894
43728
|
}).includes(type.toLowerCase());
|
|
42895
43729
|
}
|
|
@@ -42901,15 +43735,15 @@ var align = {
|
|
|
42901
43735
|
this.j.e.on('getDiffButtons.mobile', function(toolbar) {
|
|
42902
43736
|
if (_this.toolbar === toolbar) {
|
|
42903
43737
|
var names = _this.toolbar.getButtonsNames();
|
|
42904
|
-
return (0,
|
|
43738
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.toArray)(jodit.registeredButtons).filter(function(btn) {
|
|
42905
43739
|
return !_this.j.o.toolbarInlineDisabledButtons.includes(btn.name);
|
|
42906
43740
|
}).filter(function(item) {
|
|
42907
|
-
var name = (0,
|
|
43741
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42908
43742
|
return name && name !== '|' && name !== '\n' && !names.includes(name);
|
|
42909
43743
|
});
|
|
42910
43744
|
}
|
|
42911
43745
|
}).on('hidePopup', this.hidePopup).on('showInlineToolbar', this.showInlineToolbar).on('showPopup', function(elm, rect, type) {
|
|
42912
|
-
_this.showPopup(rect, type || ((0,
|
|
43746
|
+
_this.showPopup(rect, type || ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? elm : elm.nodeName), (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? undefined : elm);
|
|
42913
43747
|
}).on('mousedown keydown', this.onSelectionStart).on('change', function() {
|
|
42914
43748
|
if (_this.popup.isOpened && _this.previousTarget && !_this.previousTarget.parentNode) {
|
|
42915
43749
|
_this.hidePopup();
|
|
@@ -42928,7 +43762,7 @@ var align = {
|
|
|
42928
43762
|
{
|
|
42929
43763
|
key: "__onDocumentMouseDown",
|
|
42930
43764
|
value: function __onDocumentMouseDown(e) {
|
|
42931
|
-
if (this.popup.isOpened && this.type === 'selection' && e.target &&
|
|
43765
|
+
if (this.popup.isOpened && this.type === 'selection' && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup)) {
|
|
42932
43766
|
this.__reopenSelectionPopup = true;
|
|
42933
43767
|
}
|
|
42934
43768
|
}
|
|
@@ -42967,7 +43801,7 @@ var align = {
|
|
|
42967
43801
|
var rect = this.j.s.range.getBoundingClientRect();
|
|
42968
43802
|
var left = rect.left, top = rect.top;
|
|
42969
43803
|
if (this.j.iframe) {
|
|
42970
|
-
var offset = (0,
|
|
43804
|
+
var offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(this.j.iframe, this.j, true);
|
|
42971
43805
|
left += offset.left;
|
|
42972
43806
|
top += offset.top;
|
|
42973
43807
|
}
|
|
@@ -42988,7 +43822,7 @@ var align = {
|
|
|
42988
43822
|
{
|
|
42989
43823
|
key: "onSelectionEnd",
|
|
42990
43824
|
value: function onSelectionEnd(e) {
|
|
42991
|
-
if (e && e.target &&
|
|
43825
|
+
if (e && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup)) {
|
|
42992
43826
|
return;
|
|
42993
43827
|
}
|
|
42994
43828
|
var snapRange = this.snapRange, range = this.j.s.range;
|
|
@@ -43030,7 +43864,7 @@ var align = {
|
|
|
43030
43864
|
* In not collapsed selection - only one image
|
|
43031
43865
|
*/ function isSelectedTarget(r) {
|
|
43032
43866
|
var sc = r.startContainer;
|
|
43033
|
-
return
|
|
43867
|
+
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isElement(sc) && sc === r.endContainer && jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isTag(sc.childNodes[r.startOffset], new Set((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.keys)(this.j.o.popup, false))) && r.startOffset === r.endOffset - 1;
|
|
43034
43868
|
}
|
|
43035
43869
|
},
|
|
43036
43870
|
{
|
|
@@ -43054,11 +43888,17 @@ var align = {
|
|
|
43054
43888
|
{
|
|
43055
43889
|
key: "_eventsList",
|
|
43056
43890
|
value: function _eventsList() {
|
|
43057
|
-
var
|
|
43891
|
+
var _this_j_o_mediaWrappers;
|
|
43892
|
+
// Clicks on a media wrapper kept in the content (`mediaWrappers`)
|
|
43893
|
+
var wrapperTags = Object.values((_this_j_o_mediaWrappers = this.j.o.mediaWrappers) !== null && _this_j_o_mediaWrappers !== void 0 ? _this_j_o_mediaWrappers : {}).map(function(param) {
|
|
43894
|
+
var tag = param.tag;
|
|
43895
|
+
return tag.toLowerCase();
|
|
43896
|
+
});
|
|
43897
|
+
var el = (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_5__._)(new Set(this.elmsList.concat(wrapperTags)));
|
|
43058
43898
|
return el.map(function(e) {
|
|
43059
|
-
return (0,
|
|
43899
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("click_".concat(e));
|
|
43060
43900
|
}).concat(el.map(function(e) {
|
|
43061
|
-
return (0,
|
|
43901
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("touchstart_".concat(e));
|
|
43062
43902
|
})).join(' ');
|
|
43063
43903
|
}
|
|
43064
43904
|
},
|
|
@@ -43091,56 +43931,56 @@ var align = {
|
|
|
43091
43931
|
}
|
|
43092
43932
|
]);
|
|
43093
43933
|
return inlinePopup;
|
|
43094
|
-
}((0,
|
|
43934
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin));
|
|
43095
43935
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(inlinePopup, "requires", [
|
|
43096
43936
|
'select'
|
|
43097
43937
|
]);
|
|
43098
|
-
(0,
|
|
43099
|
-
|
|
43938
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43939
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43100
43940
|
], inlinePopup.prototype, "popup", null);
|
|
43101
|
-
(0,
|
|
43102
|
-
|
|
43941
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43942
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43103
43943
|
], inlinePopup.prototype, "toolbar", null);
|
|
43104
|
-
(0,
|
|
43105
|
-
|
|
43944
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43945
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43106
43946
|
], inlinePopup.prototype, "onClick", null);
|
|
43107
|
-
(0,
|
|
43108
|
-
(0,
|
|
43947
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43948
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.wait)(function(ctx) {
|
|
43109
43949
|
return !ctx.j.isLocked;
|
|
43110
43950
|
})
|
|
43111
43951
|
], inlinePopup.prototype, "showPopup", null);
|
|
43112
|
-
(0,
|
|
43113
|
-
(0,
|
|
43952
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43953
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)([
|
|
43114
43954
|
':clickEditor',
|
|
43115
43955
|
':beforeCommandDelete',
|
|
43116
43956
|
':backSpaceAfterDelete'
|
|
43117
43957
|
]),
|
|
43118
|
-
|
|
43958
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43119
43959
|
], inlinePopup.prototype, "hidePopup", null);
|
|
43120
|
-
(0,
|
|
43121
|
-
(0,
|
|
43960
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43961
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)(':outsideClick')
|
|
43122
43962
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
43123
|
-
(0,
|
|
43124
|
-
|
|
43963
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43964
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43125
43965
|
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
43126
|
-
(0,
|
|
43127
|
-
|
|
43966
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43967
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43128
43968
|
], inlinePopup.prototype, "__onCloseAllPopups", null);
|
|
43129
|
-
(0,
|
|
43130
|
-
|
|
43969
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43970
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43131
43971
|
], inlinePopup.prototype, "onSelectionStart", null);
|
|
43132
|
-
(0,
|
|
43133
|
-
|
|
43972
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43973
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43134
43974
|
], inlinePopup.prototype, "onSelectionEnd", null);
|
|
43135
|
-
(0,
|
|
43136
|
-
(0,
|
|
43975
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43976
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.debounce)(function(ctx) {
|
|
43137
43977
|
return ctx.defaultTimeout;
|
|
43138
43978
|
})
|
|
43139
43979
|
], inlinePopup.prototype, "onSelectionChange", null);
|
|
43140
|
-
(0,
|
|
43141
|
-
|
|
43980
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43981
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43142
43982
|
], inlinePopup.prototype, "showInlineToolbar", null);
|
|
43143
|
-
|
|
43983
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_10__.pluginSystem.add('inlinePopup', inlinePopup);
|
|
43144
43984
|
|
|
43145
43985
|
|
|
43146
43986
|
/***/ }),
|
|
@@ -44761,6 +45601,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44761
45601
|
'video',
|
|
44762
45602
|
'audio'
|
|
44763
45603
|
];
|
|
45604
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
44764
45605
|
|
|
44765
45606
|
|
|
44766
45607
|
/***/ }),
|
|
@@ -44796,11 +45637,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44796
45637
|
* Process `video` and `audio`
|
|
44797
45638
|
*/ function media(editor) {
|
|
44798
45639
|
var keyFake = 'jodit_fake_wrapper';
|
|
44799
|
-
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock;
|
|
45640
|
+
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock, mediaWrappers = _editor_options.mediaWrappers;
|
|
44800
45641
|
var wrap = function wrap(element) {
|
|
44801
45642
|
if (element.parentNode && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
44802
45643
|
element = element.parentNode;
|
|
44803
|
-
} else {
|
|
45644
|
+
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
45645
|
+
var _getMediaWrapper;
|
|
45646
|
+
element = (_getMediaWrapper = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, element)) !== null && _getMediaWrapper !== void 0 ? _getMediaWrapper : (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.wrapMedia)(editor, element);
|
|
45647
|
+
} else if (mediaInFakeBlock) {
|
|
44804
45648
|
var wrapper = editor.createInside.element(mediaFakeTag, (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)({
|
|
44805
45649
|
'data-jodit-temp': 1,
|
|
44806
45650
|
contenteditable: false,
|
|
@@ -44817,12 +45661,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44817
45661
|
}
|
|
44818
45662
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, element);
|
|
44819
45663
|
element = wrapper;
|
|
45664
|
+
} else {
|
|
45665
|
+
return;
|
|
44820
45666
|
}
|
|
44821
45667
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', function() {
|
|
44822
45668
|
editor.s.setCursorAfter(element);
|
|
44823
45669
|
});
|
|
44824
45670
|
};
|
|
44825
|
-
if (mediaInFakeBlock) {
|
|
45671
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
44826
45672
|
editor.e.on('afterGetValueFromEditor', function(data) {
|
|
44827
45673
|
var rxp = new RegExp("<".concat(mediaFakeTag, "[^>]+data-").concat(keyFake, "[^>]+>([^]+?)</").concat(mediaFakeTag, ">"), 'ig');
|
|
44828
45674
|
if (rxp.test(data.value)) {
|
|
@@ -54059,16 +54905,34 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('toolbarNavigat
|
|
|
54059
54905
|
|
|
54060
54906
|
|
|
54061
54907
|
|
|
54908
|
+
// Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
|
|
54909
|
+
// with `mediaDefaultAlign`
|
|
54910
|
+
function prepareMedia(jodit, element) {
|
|
54911
|
+
var media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
|
|
54912
|
+
var mediaDefaultAlign = jodit.o.mediaDefaultAlign;
|
|
54913
|
+
if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
|
|
54914
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
|
|
54915
|
+
}
|
|
54916
|
+
return media;
|
|
54917
|
+
}
|
|
54062
54918
|
function insertVideos(data) {
|
|
54063
54919
|
var _this = this;
|
|
54064
54920
|
var _data_files;
|
|
54065
54921
|
(_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach(function(file) {
|
|
54066
|
-
_this.s.insertNode(_this.createInside.element('video', {
|
|
54922
|
+
_this.s.insertNode(prepareMedia(_this, _this.createInside.element('video', {
|
|
54067
54923
|
controls: '',
|
|
54068
54924
|
src: data.baseurl + file
|
|
54069
|
-
}));
|
|
54925
|
+
})));
|
|
54070
54926
|
});
|
|
54071
54927
|
}
|
|
54928
|
+
// Embed code that is one element is prepared as media; other code goes in as
|
|
54929
|
+
// it is
|
|
54930
|
+
function prepareEmbedCode(jodit, code) {
|
|
54931
|
+
var box = jodit.createInside.div();
|
|
54932
|
+
box.innerHTML = code.trim();
|
|
54933
|
+
var element = box.firstElementChild;
|
|
54934
|
+
return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
|
|
54935
|
+
}
|
|
54072
54936
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
54073
54937
|
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
54074
54938
|
defaultWidth: 400,
|
|
@@ -54110,7 +54974,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
54110
54974
|
])
|
|
54111
54975
|
]), tabs = [], insertCode = function insertCode(code) {
|
|
54112
54976
|
jodit.s.restore();
|
|
54113
|
-
jodit.s.insertHTML(code);
|
|
54977
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
54114
54978
|
close();
|
|
54115
54979
|
};
|
|
54116
54980
|
jodit.s.save();
|