jodit 4.17.5 → 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 +20 -0
- package/es2015/jodit.css +87 -3
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +9 -9
- package/es2015/jodit.js +873 -163
- 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 +9 -9
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +9 -9
- 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 +16 -16
- package/es2021/jodit.js +851 -163
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +16 -16
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +87 -3
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +15 -15
- package/es2021.en/jodit.js +851 -163
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +15 -15
- 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 +1141 -223
- 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 +34 -8
- package/esm/modules/history/history.js +20 -12
- 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/line-height/line-height.js +1 -1
- 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/placeholder/placeholder.js +1 -1
- package/esm/plugins/source/editor/engines/ace.d.ts +2 -0
- package/esm/plugins/source/editor/engines/ace.js +35 -3
- 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/plugins/source/editor/engines/ace.d.ts +2 -0
- 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:
|
|
@@ -12309,6 +12470,12 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
12309
12470
|
|
|
12310
12471
|
|
|
12311
12472
|
|
|
12473
|
+
/**
|
|
12474
|
+
* A text node that is empty or holds only invisible caret placeholders.
|
|
12475
|
+
*/ function isBlankTextNode(node) {
|
|
12476
|
+
var _node_nodeValue;
|
|
12477
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node) && ((_node_nodeValue = node.nodeValue) !== null && _node_nodeValue !== void 0 ? _node_nodeValue : '').replace(jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__.INVISIBLE_SPACE_REG_EXP(), '').length === 0;
|
|
12478
|
+
}
|
|
12312
12479
|
var Selection = /*#__PURE__*/ function() {
|
|
12313
12480
|
"use strict";
|
|
12314
12481
|
function Selection(jodit) {
|
|
@@ -12641,10 +12808,22 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
12641
12808
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.append(marker, this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__.INVISIBLE_SPACE));
|
|
12642
12809
|
if (newRange) {
|
|
12643
12810
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isOrContains(this.area, atStart ? newRange.startContainer : newRange.endContainer)) {
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
//
|
|
12647
|
-
|
|
12811
|
+
var _node_nodeValue;
|
|
12812
|
+
var node = newRange.startContainer, offset = newRange.startOffset;
|
|
12813
|
+
// At either end of a text node the marker goes beside it. Splitting
|
|
12814
|
+
// the node there would leave the selection's boundary in an empty
|
|
12815
|
+
// text node, and WebKit neither repaints a selection that leaves one
|
|
12816
|
+
// nor moves a selection that follows one when it's removed.
|
|
12817
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node) && offset === 0) {
|
|
12818
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.before(node, marker);
|
|
12819
|
+
} else if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node) && offset === ((_node_nodeValue = node.nodeValue) === null || _node_nodeValue === void 0 ? void 0 : _node_nodeValue.length)) {
|
|
12820
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.after(node, marker);
|
|
12821
|
+
} else {
|
|
12822
|
+
// Here need do unsafe inserting
|
|
12823
|
+
// Deny Dom.safeInsertNode(newRange, marker);
|
|
12824
|
+
// Apply style -> Test Style module -> Base apply -> For selection <p><strong>|test|</strong></p> apply style {"element":"em","style":{"fontStyle":"italic"}}
|
|
12825
|
+
newRange.insertNode(marker);
|
|
12826
|
+
}
|
|
12648
12827
|
}
|
|
12649
12828
|
}
|
|
12650
12829
|
return marker;
|
|
@@ -13061,7 +13240,9 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13061
13240
|
}
|
|
13062
13241
|
].forEach(function(getChildNode) {
|
|
13063
13242
|
var childNode = getChildNode();
|
|
13064
|
-
|
|
13243
|
+
// Only a text node left with nothing in it by the split
|
|
13244
|
+
// goes; one holding a space is content (`<b>a</b> |`).
|
|
13245
|
+
if (childNode && isBlankTextNode(childNode)) {
|
|
13065
13246
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(childNode);
|
|
13066
13247
|
}
|
|
13067
13248
|
});
|
|
@@ -13159,9 +13340,9 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13159
13340
|
if (styles && (typeof styles === "undefined" ? "undefined" : (0,_swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_7__._)(styles)) === 'object') {
|
|
13160
13341
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, styles);
|
|
13161
13342
|
}
|
|
13162
|
-
var
|
|
13343
|
+
var imageDefaultAlign = this.j.o.imageDefaultAlign;
|
|
13163
13344
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
13164
|
-
(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));
|
|
13165
13346
|
}
|
|
13166
13347
|
var onload = function onload1() {
|
|
13167
13348
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -27105,19 +27286,27 @@ jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.prototype.history = {
|
|
|
27105
27286
|
*/ function updateStack() {
|
|
27106
27287
|
var replace = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
27107
27288
|
var newValue = this.snapshot.make();
|
|
27108
|
-
if (
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27115
|
-
} else {
|
|
27116
|
-
this.__stack.push(newCommand);
|
|
27117
|
-
}
|
|
27289
|
+
if (_snapshot__WEBPACK_IMPORTED_MODULE_12__.Snapshot.equal(newValue, this.startValue)) {
|
|
27290
|
+
return;
|
|
27291
|
+
}
|
|
27292
|
+
// Only the selection moved, for example when the selection markers
|
|
27293
|
+
// went in before a switch to the source view. There is nothing to
|
|
27294
|
+
// undo, but the next change has to start from this selection.
|
|
27295
|
+
if (newValue.html === this.startValue.html) {
|
|
27118
27296
|
this.startValue = newValue;
|
|
27119
|
-
|
|
27297
|
+
return;
|
|
27298
|
+
}
|
|
27299
|
+
var newCommand = new _command__WEBPACK_IMPORTED_MODULE_11__.Command(this.startValue, newValue, this, this.updateTick);
|
|
27300
|
+
if (replace) {
|
|
27301
|
+
var command = this.__stack.current();
|
|
27302
|
+
if (command && this.updateTick === command.tick) {
|
|
27303
|
+
this.__stack.replace(newCommand);
|
|
27304
|
+
}
|
|
27305
|
+
} else {
|
|
27306
|
+
this.__stack.push(newCommand);
|
|
27120
27307
|
}
|
|
27308
|
+
this.startValue = newValue;
|
|
27309
|
+
this.fireChangeStack();
|
|
27121
27310
|
}
|
|
27122
27311
|
},
|
|
27123
27312
|
{
|
|
@@ -29738,6 +29927,7 @@ var INPUT_TAGS = new Set([
|
|
|
29738
29927
|
'textarea',
|
|
29739
29928
|
'select'
|
|
29740
29929
|
]);
|
|
29930
|
+
var TYPE_AHEAD_TIMEOUT = 1000;
|
|
29741
29931
|
var FOCUSABLE_SELECTOR = [
|
|
29742
29932
|
'button:not([disabled])',
|
|
29743
29933
|
'a[href]',
|
|
@@ -29755,11 +29945,11 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
29755
29945
|
var _this;
|
|
29756
29946
|
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, ToolbarButton, [
|
|
29757
29947
|
jodit
|
|
29758
|
-
]), (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)()), {
|
|
29759
29949
|
theme: 'toolbar',
|
|
29760
29950
|
currentValue: '',
|
|
29761
29951
|
hasTrigger: false
|
|
29762
|
-
}), _this.openedPopup = null;
|
|
29952
|
+
}), _this.__typed = '', _this.__typedAt = 0, _this.__typedTo = null, _this.openedPopup = null;
|
|
29763
29953
|
var button = _this.getElm('button');
|
|
29764
29954
|
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_26__.assert)(button, 'Element button should exists');
|
|
29765
29955
|
_this.button = button;
|
|
@@ -30111,12 +30301,66 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30111
30301
|
items[(index + 1) % items.length].focus();
|
|
30112
30302
|
break;
|
|
30113
30303
|
default:
|
|
30114
|
-
|
|
30304
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
30305
|
+
return;
|
|
30306
|
+
}
|
|
30115
30307
|
}
|
|
30116
30308
|
e.preventDefault();
|
|
30117
30309
|
e.stopPropagation();
|
|
30118
30310
|
}
|
|
30119
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
|
+
},
|
|
30120
30364
|
{
|
|
30121
30365
|
key: "__popupFocusables",
|
|
30122
30366
|
value: /**
|
|
@@ -30137,14 +30381,19 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30137
30381
|
* Create an open popup list
|
|
30138
30382
|
*/ function __openControlList(control) {
|
|
30139
30383
|
var _this = this;
|
|
30140
|
-
var _this_jodit_options_controls;
|
|
30384
|
+
var _this_jodit_options_controls, _ref, _ref1;
|
|
30385
|
+
var _this_toolbar, _control_popup;
|
|
30141
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) {
|
|
30142
30387
|
return (0,jodit_core_ui_helpers_get_control_type__WEBPACK_IMPORTED_MODULE_30__.findControlType)(key, controls);
|
|
30143
30388
|
};
|
|
30144
30389
|
var list = control.list;
|
|
30145
30390
|
var menu = this.openPopup();
|
|
30146
|
-
var toolbar = (0,_factory__WEBPACK_IMPORTED_MODULE_33__.makeCollection)(this.j);
|
|
30147
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);
|
|
30148
30397
|
toolbar.parentElement = menu;
|
|
30149
30398
|
toolbar.mode = 'vertical';
|
|
30150
30399
|
var isListItem = function isListItem(key) {
|
|
@@ -30196,7 +30445,14 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30196
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) {
|
|
30197
30446
|
return getButton(key, list[key]);
|
|
30198
30447
|
}), this.target);
|
|
30199
|
-
|
|
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() {
|
|
30200
30456
|
return (0,jodit_core_helpers_size__WEBPACK_IMPORTED_MODULE_24__.position)(_this.container);
|
|
30201
30457
|
}, false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
30202
30458
|
this.state.activated = true;
|
|
@@ -30218,7 +30474,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30218
30474
|
value: function openPopup() {
|
|
30219
30475
|
this.__closePopup();
|
|
30220
30476
|
this.openedPopup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_32__.Popup(this.j, false);
|
|
30221
|
-
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);
|
|
30222
30478
|
return this.openedPopup;
|
|
30223
30479
|
}
|
|
30224
30480
|
},
|
|
@@ -30236,7 +30492,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30236
30492
|
// popup while the outer `removeChild` is still running and Chrome
|
|
30237
30493
|
// throws NotFoundError. See #1458
|
|
30238
30494
|
this.openedPopup = null;
|
|
30239
|
-
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);
|
|
30240
30496
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
30241
30497
|
// the button, otherwise it would fall out to the document
|
|
30242
30498
|
var activeElement = this.od.activeElement, hadFocus = activeElement && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_18__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -30323,6 +30579,9 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30323
30579
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30324
30580
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30325
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);
|
|
30326
30585
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30327
30586
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30328
30587
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -38641,14 +38900,16 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38641
38900
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15366);
|
|
38642
38901
|
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50684);
|
|
38643
38902
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27795);
|
|
38644
|
-
/* harmony import */ var
|
|
38645
|
-
/* harmony import */ var
|
|
38646
|
-
/* harmony import */ var
|
|
38647
|
-
/* harmony import */ var
|
|
38648
|
-
/* harmony import */ var
|
|
38649
|
-
/* harmony import */ var
|
|
38650
|
-
/* harmony import */ var
|
|
38651
|
-
/* 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);
|
|
38652
38913
|
/*!
|
|
38653
38914
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38654
38915
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38665,11 +38926,18 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38665
38926
|
|
|
38666
38927
|
|
|
38667
38928
|
|
|
38929
|
+
|
|
38930
|
+
|
|
38668
38931
|
/**
|
|
38669
38932
|
* Default font-size points
|
|
38670
|
-
*/
|
|
38671
|
-
|
|
38672
|
-
|
|
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 = {
|
|
38673
38941
|
command: 'fontsize',
|
|
38674
38942
|
data: {
|
|
38675
38943
|
cssRule: 'font-size',
|
|
@@ -38715,7 +38983,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38715
38983
|
}
|
|
38716
38984
|
var control = button.control;
|
|
38717
38985
|
var cssKey = ((_control_data = control.data) === null || _control_data === void 0 ? void 0 : _control_data.cssRule) || 'font-size';
|
|
38718
|
-
var value = (0,
|
|
38986
|
+
var value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(box, cssKey);
|
|
38719
38987
|
if (cssKey === 'font-size') {
|
|
38720
38988
|
var numValue = parseFloat(value.toString());
|
|
38721
38989
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -38753,11 +39021,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38753
39021
|
return keySet.has(normalize(value.toString()));
|
|
38754
39022
|
}
|
|
38755
39023
|
};
|
|
38756
|
-
|
|
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), {
|
|
38757
39026
|
command: 'fontname',
|
|
38758
39027
|
textTemplate: function textTemplate(j, value) {
|
|
38759
39028
|
var _value_split = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__._)(value.split(','), 1), first = _value_split[0];
|
|
38760
|
-
return (0,
|
|
39029
|
+
return (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__.trimChars)(first, '"\'');
|
|
38761
39030
|
},
|
|
38762
39031
|
list: {
|
|
38763
39032
|
'': 'Default',
|
|
@@ -38779,6 +39048,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38779
39048
|
} catch (unused) {}
|
|
38780
39049
|
return '<span data-style="'.concat(key, '" style="').concat(isAvailable ? "font-family: ".concat(key, "!important;") : '', '">').concat(value, "</span>");
|
|
38781
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
|
+
},
|
|
38782
39054
|
data: {
|
|
38783
39055
|
cssRule: 'font-family',
|
|
38784
39056
|
normalize: function normalize(v) {
|
|
@@ -38787,19 +39059,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38787
39059
|
},
|
|
38788
39060
|
// When no font is explicitly set, the computed font-family equals the
|
|
38789
39061
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
38790
|
-
// button shows the `Default`
|
|
38791
|
-
// See #1370
|
|
38792
|
-
value: function value(editor) {
|
|
38793
|
-
var current = editor.s.current();
|
|
38794
|
-
|
|
38795
|
-
|
|
38796
|
-
|
|
38797
|
-
|
|
38798
|
-
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)) {
|
|
38799
39071
|
return;
|
|
38800
39072
|
}
|
|
38801
|
-
var value = (0,
|
|
38802
|
-
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 : {}))) {
|
|
38803
39075
|
return '';
|
|
38804
39076
|
}
|
|
38805
39077
|
return value;
|
|
@@ -38808,6 +39080,334 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38808
39080
|
});
|
|
38809
39081
|
|
|
38810
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
|
+
|
|
38811
39411
|
/***/ }),
|
|
38812
39412
|
|
|
38813
39413
|
/***/ 50294:
|
|
@@ -38818,6 +39418,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38818
39418
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28077);
|
|
38819
39419
|
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65946);
|
|
38820
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);
|
|
38821
39422
|
/*!
|
|
38822
39423
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38823
39424
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38829,6 +39430,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38829
39430
|
*/
|
|
38830
39431
|
|
|
38831
39432
|
|
|
39433
|
+
|
|
38832
39434
|
/**
|
|
38833
39435
|
* Process commands `fontsize` and `fontname`
|
|
38834
39436
|
*/ function font(editor) {
|
|
@@ -38839,6 +39441,22 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38839
39441
|
name: 'fontsize',
|
|
38840
39442
|
group: 'font'
|
|
38841
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
|
+
});
|
|
38842
39460
|
var callback = function callback(command, second, third) {
|
|
38843
39461
|
switch(command){
|
|
38844
39462
|
case 'fontsize':
|
|
@@ -38868,6 +39486,245 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38868
39486
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
38869
39487
|
|
|
38870
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
|
+
|
|
38871
39728
|
/***/ }),
|
|
38872
39729
|
|
|
38873
39730
|
/***/ 96863:
|
|
@@ -40370,12 +41227,13 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40370
41227
|
/* harmony export */ });
|
|
40371
41228
|
/* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49376);
|
|
40372
41229
|
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3233);
|
|
40373
|
-
/* harmony import */ var
|
|
40374
|
-
/* harmony import */ var
|
|
40375
|
-
/* harmony import */ var
|
|
40376
|
-
/* harmony import */ var
|
|
40377
|
-
/* harmony import */ var
|
|
40378
|
-
/* 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);
|
|
40379
41237
|
/*!
|
|
40380
41238
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
40381
41239
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -40390,6 +41248,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40390
41248
|
|
|
40391
41249
|
|
|
40392
41250
|
|
|
41251
|
+
|
|
40393
41252
|
/**
|
|
40394
41253
|
* Read values from image and set it to state
|
|
40395
41254
|
* @private
|
|
@@ -40398,29 +41257,29 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40398
41257
|
var image, values;
|
|
40399
41258
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__._)(this, function(_state) {
|
|
40400
41259
|
image = state.sourceImage, values = state.values;
|
|
40401
|
-
(0,
|
|
41260
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_5__.readAlign)(image, values, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(j, image));
|
|
40402
41261
|
// Border radius
|
|
40403
|
-
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;
|
|
40404
41263
|
// Id
|
|
40405
|
-
values.id = (0,
|
|
41264
|
+
values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'id') || '';
|
|
40406
41265
|
// Title
|
|
40407
|
-
values.imageTitle = (0,
|
|
41266
|
+
values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'title') || '';
|
|
40408
41267
|
// Alt
|
|
40409
|
-
values.imageAlt = (0,
|
|
41268
|
+
values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'alt') || '';
|
|
40410
41269
|
// Style
|
|
40411
|
-
values.style = (0,
|
|
41270
|
+
values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'style') || '';
|
|
40412
41271
|
// Classes
|
|
40413
|
-
values.classes = ((0,
|
|
41272
|
+
values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
40414
41273
|
// Margins
|
|
40415
|
-
(0,
|
|
41274
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_7__.readMargins)(image, values, state);
|
|
40416
41275
|
// Link
|
|
40417
|
-
(0,
|
|
41276
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_6__.readLink)(state, j, values);
|
|
40418
41277
|
// Src
|
|
40419
|
-
values.imageSrc = (0,
|
|
41278
|
+
values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'src') || '';
|
|
40420
41279
|
// Image size
|
|
40421
41280
|
return [
|
|
40422
41281
|
2,
|
|
40423
|
-
(0,
|
|
41282
|
+
(0,_size__WEBPACK_IMPORTED_MODULE_8__.readSizes)(image, values, state)
|
|
40424
41283
|
];
|
|
40425
41284
|
});
|
|
40426
41285
|
})();
|
|
@@ -41646,7 +42505,7 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41646
42505
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41647
42506
|
}
|
|
41648
42507
|
if (opt.image.editAlign) {
|
|
41649
|
-
(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));
|
|
41650
42509
|
}
|
|
41651
42510
|
}
|
|
41652
42511
|
|
|
@@ -42520,6 +43379,7 @@ var cmd = function cmd(control) {
|
|
|
42520
43379
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85932);
|
|
42521
43380
|
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16849);
|
|
42522
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);
|
|
42523
43383
|
/*!
|
|
42524
43384
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42525
43385
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42531,11 +43391,7 @@ var cmd = function cmd(control) {
|
|
|
42531
43391
|
|
|
42532
43392
|
|
|
42533
43393
|
|
|
42534
|
-
|
|
42535
|
-
// keep inline styles
|
|
42536
|
-
var alignClasses = function alignClasses(editor, elm) {
|
|
42537
|
-
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42538
|
-
};
|
|
43394
|
+
|
|
42539
43395
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
42540
43396
|
var lineAlign = function lineAlign(editor, elm) {
|
|
42541
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;
|
|
@@ -42557,7 +43413,7 @@ var lineAlign = function lineAlign(editor, elm) {
|
|
|
42557
43413
|
}
|
|
42558
43414
|
};
|
|
42559
43415
|
var currentAlign = function currentAlign(editor, elm) {
|
|
42560
|
-
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';
|
|
42561
43417
|
};
|
|
42562
43418
|
var align = {
|
|
42563
43419
|
name: 'left',
|
|
@@ -42584,23 +43440,25 @@ var align = {
|
|
|
42584
43440
|
},
|
|
42585
43441
|
exec: function exec(editor, elm, param) {
|
|
42586
43442
|
var control = param.control;
|
|
42587
|
-
|
|
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([
|
|
42588
43445
|
'img',
|
|
42589
43446
|
'jodit',
|
|
42590
43447
|
'jodit-media'
|
|
42591
|
-
]))) {
|
|
43448
|
+
])) && (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
|
|
42592
43449
|
return;
|
|
42593
43450
|
}
|
|
42594
43451
|
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42595
43452
|
if (!command) {
|
|
42596
43453
|
return false;
|
|
42597
43454
|
}
|
|
42598
|
-
;(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));
|
|
42599
43456
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42600
43457
|
'jodit',
|
|
42601
43458
|
'jodit-media'
|
|
42602
43459
|
])) && elm.firstElementChild) {
|
|
42603
|
-
|
|
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));
|
|
42604
43462
|
}
|
|
42605
43463
|
editor.synchronizeValues();
|
|
42606
43464
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -42713,17 +43571,18 @@ var align = {
|
|
|
42713
43571
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
42714
43572
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
42715
43573
|
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
|
|
42716
|
-
/* harmony import */ var
|
|
42717
|
-
/* harmony import */ var
|
|
42718
|
-
/* harmony import */ var
|
|
42719
|
-
/* harmony import */ var
|
|
42720
|
-
/* harmony import */ var
|
|
42721
|
-
/* harmony import */ var
|
|
42722
|
-
/* harmony import */ var
|
|
42723
|
-
/* harmony import */ var
|
|
42724
|
-
/* harmony import */ var
|
|
42725
|
-
/* harmony import */ var
|
|
42726
|
-
/* 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);
|
|
42727
43586
|
/*!
|
|
42728
43587
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42729
43588
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42749,6 +43608,7 @@ var align = {
|
|
|
42749
43608
|
|
|
42750
43609
|
|
|
42751
43610
|
|
|
43611
|
+
|
|
42752
43612
|
/**
|
|
42753
43613
|
* Plugin for show inline popup dialog
|
|
42754
43614
|
*/ var inlinePopup = /*#__PURE__*/ function(Plugin) {
|
|
@@ -42761,7 +43621,7 @@ var align = {
|
|
|
42761
43621
|
* The user pressed a button inside the selection toolbar — after the
|
|
42762
43622
|
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
42763
43623
|
* while the selection is still there. See #1238
|
|
42764
|
-
*/ (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) {
|
|
42765
43625
|
return !_this.isExcludedTarget(s);
|
|
42766
43626
|
}));
|
|
42767
43627
|
return _this;
|
|
@@ -42770,24 +43630,26 @@ var align = {
|
|
|
42770
43630
|
{
|
|
42771
43631
|
key: "popup",
|
|
42772
43632
|
get: function get() {
|
|
42773
|
-
return new
|
|
43633
|
+
return new jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup(this.jodit, false);
|
|
42774
43634
|
}
|
|
42775
43635
|
},
|
|
42776
43636
|
{
|
|
42777
43637
|
key: "toolbar",
|
|
42778
43638
|
get: function get() {
|
|
42779
|
-
return (0,
|
|
43639
|
+
return (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_15__.makeCollection)(this.jodit, this.popup);
|
|
42780
43640
|
}
|
|
42781
43641
|
},
|
|
42782
43642
|
{
|
|
42783
43643
|
key: "onClick",
|
|
42784
43644
|
value: function onClick(node) {
|
|
42785
43645
|
var _this = this;
|
|
42786
|
-
var elements = this.elmsList, target =
|
|
42787
|
-
|
|
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)) {
|
|
42788
43650
|
this.showPopup(function() {
|
|
42789
|
-
return (0,
|
|
42790
|
-
},
|
|
43651
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(target, _this.j);
|
|
43652
|
+
}, type, target);
|
|
42791
43653
|
return false;
|
|
42792
43654
|
}
|
|
42793
43655
|
}
|
|
@@ -42807,15 +43669,15 @@ var align = {
|
|
|
42807
43669
|
this.previousTarget = target;
|
|
42808
43670
|
var data = this.j.o.popup[type];
|
|
42809
43671
|
var content;
|
|
42810
|
-
if ((0,
|
|
43672
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isFunction)(data)) {
|
|
42811
43673
|
content = data(this.j, target, this.popup.close);
|
|
42812
43674
|
} else {
|
|
42813
43675
|
content = data;
|
|
42814
43676
|
}
|
|
42815
|
-
if ((0,
|
|
43677
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isArray)(content)) {
|
|
42816
43678
|
var disabled = this.j.o.toolbarInlineDisabledButtons;
|
|
42817
43679
|
this.toolbar.build(disabled.length ? content.filter(function(item) {
|
|
42818
|
-
var name = (0,
|
|
43680
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42819
43681
|
return !disabled.includes(name !== null && name !== void 0 ? name : '');
|
|
42820
43682
|
}) : content, target);
|
|
42821
43683
|
this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
|
|
@@ -42833,7 +43695,7 @@ var align = {
|
|
|
42833
43695
|
value: /**
|
|
42834
43696
|
* Hide opened popup
|
|
42835
43697
|
*/ function hidePopup(type) {
|
|
42836
|
-
if (this.popup.isOpened && (!(0,
|
|
43698
|
+
if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(type) || type === this.type)) {
|
|
42837
43699
|
this.popup.close();
|
|
42838
43700
|
}
|
|
42839
43701
|
}
|
|
@@ -42861,7 +43723,7 @@ var align = {
|
|
|
42861
43723
|
value: /**
|
|
42862
43724
|
* For some elements do not show popup
|
|
42863
43725
|
*/ function isExcludedTarget(type) {
|
|
42864
|
-
return (0,
|
|
43726
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.splitArray)(this.j.o.toolbarInlineDisableFor).map(function(a) {
|
|
42865
43727
|
return a.toLowerCase();
|
|
42866
43728
|
}).includes(type.toLowerCase());
|
|
42867
43729
|
}
|
|
@@ -42873,15 +43735,15 @@ var align = {
|
|
|
42873
43735
|
this.j.e.on('getDiffButtons.mobile', function(toolbar) {
|
|
42874
43736
|
if (_this.toolbar === toolbar) {
|
|
42875
43737
|
var names = _this.toolbar.getButtonsNames();
|
|
42876
|
-
return (0,
|
|
43738
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.toArray)(jodit.registeredButtons).filter(function(btn) {
|
|
42877
43739
|
return !_this.j.o.toolbarInlineDisabledButtons.includes(btn.name);
|
|
42878
43740
|
}).filter(function(item) {
|
|
42879
|
-
var name = (0,
|
|
43741
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42880
43742
|
return name && name !== '|' && name !== '\n' && !names.includes(name);
|
|
42881
43743
|
});
|
|
42882
43744
|
}
|
|
42883
43745
|
}).on('hidePopup', this.hidePopup).on('showInlineToolbar', this.showInlineToolbar).on('showPopup', function(elm, rect, type) {
|
|
42884
|
-
_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);
|
|
42885
43747
|
}).on('mousedown keydown', this.onSelectionStart).on('change', function() {
|
|
42886
43748
|
if (_this.popup.isOpened && _this.previousTarget && !_this.previousTarget.parentNode) {
|
|
42887
43749
|
_this.hidePopup();
|
|
@@ -42900,7 +43762,7 @@ var align = {
|
|
|
42900
43762
|
{
|
|
42901
43763
|
key: "__onDocumentMouseDown",
|
|
42902
43764
|
value: function __onDocumentMouseDown(e) {
|
|
42903
|
-
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)) {
|
|
42904
43766
|
this.__reopenSelectionPopup = true;
|
|
42905
43767
|
}
|
|
42906
43768
|
}
|
|
@@ -42939,7 +43801,7 @@ var align = {
|
|
|
42939
43801
|
var rect = this.j.s.range.getBoundingClientRect();
|
|
42940
43802
|
var left = rect.left, top = rect.top;
|
|
42941
43803
|
if (this.j.iframe) {
|
|
42942
|
-
var offset = (0,
|
|
43804
|
+
var offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(this.j.iframe, this.j, true);
|
|
42943
43805
|
left += offset.left;
|
|
42944
43806
|
top += offset.top;
|
|
42945
43807
|
}
|
|
@@ -42960,7 +43822,7 @@ var align = {
|
|
|
42960
43822
|
{
|
|
42961
43823
|
key: "onSelectionEnd",
|
|
42962
43824
|
value: function onSelectionEnd(e) {
|
|
42963
|
-
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)) {
|
|
42964
43826
|
return;
|
|
42965
43827
|
}
|
|
42966
43828
|
var snapRange = this.snapRange, range = this.j.s.range;
|
|
@@ -43002,7 +43864,7 @@ var align = {
|
|
|
43002
43864
|
* In not collapsed selection - only one image
|
|
43003
43865
|
*/ function isSelectedTarget(r) {
|
|
43004
43866
|
var sc = r.startContainer;
|
|
43005
|
-
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;
|
|
43006
43868
|
}
|
|
43007
43869
|
},
|
|
43008
43870
|
{
|
|
@@ -43026,11 +43888,17 @@ var align = {
|
|
|
43026
43888
|
{
|
|
43027
43889
|
key: "_eventsList",
|
|
43028
43890
|
value: function _eventsList() {
|
|
43029
|
-
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)));
|
|
43030
43898
|
return el.map(function(e) {
|
|
43031
|
-
return (0,
|
|
43899
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("click_".concat(e));
|
|
43032
43900
|
}).concat(el.map(function(e) {
|
|
43033
|
-
return (0,
|
|
43901
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("touchstart_".concat(e));
|
|
43034
43902
|
})).join(' ');
|
|
43035
43903
|
}
|
|
43036
43904
|
},
|
|
@@ -43063,56 +43931,56 @@ var align = {
|
|
|
43063
43931
|
}
|
|
43064
43932
|
]);
|
|
43065
43933
|
return inlinePopup;
|
|
43066
|
-
}((0,
|
|
43934
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin));
|
|
43067
43935
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(inlinePopup, "requires", [
|
|
43068
43936
|
'select'
|
|
43069
43937
|
]);
|
|
43070
|
-
(0,
|
|
43071
|
-
|
|
43938
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43939
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43072
43940
|
], inlinePopup.prototype, "popup", null);
|
|
43073
|
-
(0,
|
|
43074
|
-
|
|
43941
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43942
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43075
43943
|
], inlinePopup.prototype, "toolbar", null);
|
|
43076
|
-
(0,
|
|
43077
|
-
|
|
43944
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43945
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43078
43946
|
], inlinePopup.prototype, "onClick", null);
|
|
43079
|
-
(0,
|
|
43080
|
-
(0,
|
|
43947
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43948
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.wait)(function(ctx) {
|
|
43081
43949
|
return !ctx.j.isLocked;
|
|
43082
43950
|
})
|
|
43083
43951
|
], inlinePopup.prototype, "showPopup", null);
|
|
43084
|
-
(0,
|
|
43085
|
-
(0,
|
|
43952
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43953
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)([
|
|
43086
43954
|
':clickEditor',
|
|
43087
43955
|
':beforeCommandDelete',
|
|
43088
43956
|
':backSpaceAfterDelete'
|
|
43089
43957
|
]),
|
|
43090
|
-
|
|
43958
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43091
43959
|
], inlinePopup.prototype, "hidePopup", null);
|
|
43092
|
-
(0,
|
|
43093
|
-
(0,
|
|
43960
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43961
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)(':outsideClick')
|
|
43094
43962
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
43095
|
-
(0,
|
|
43096
|
-
|
|
43963
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43964
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43097
43965
|
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
43098
|
-
(0,
|
|
43099
|
-
|
|
43966
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43967
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43100
43968
|
], inlinePopup.prototype, "__onCloseAllPopups", null);
|
|
43101
|
-
(0,
|
|
43102
|
-
|
|
43969
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43970
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43103
43971
|
], inlinePopup.prototype, "onSelectionStart", null);
|
|
43104
|
-
(0,
|
|
43105
|
-
|
|
43972
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43973
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43106
43974
|
], inlinePopup.prototype, "onSelectionEnd", null);
|
|
43107
|
-
(0,
|
|
43108
|
-
(0,
|
|
43975
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43976
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.debounce)(function(ctx) {
|
|
43109
43977
|
return ctx.defaultTimeout;
|
|
43110
43978
|
})
|
|
43111
43979
|
], inlinePopup.prototype, "onSelectionChange", null);
|
|
43112
|
-
(0,
|
|
43113
|
-
|
|
43980
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43981
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43114
43982
|
], inlinePopup.prototype, "showInlineToolbar", null);
|
|
43115
|
-
|
|
43983
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_10__.pluginSystem.add('inlinePopup', inlinePopup);
|
|
43116
43984
|
|
|
43117
43985
|
|
|
43118
43986
|
/***/ }),
|
|
@@ -44074,7 +44942,7 @@ var lineHeight = /*#__PURE__*/ function(Plugin) {
|
|
|
44074
44942
|
try {
|
|
44075
44943
|
if (s.isCollapsed()) {
|
|
44076
44944
|
var fake = c.fake();
|
|
44077
|
-
s.
|
|
44945
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.safeInsertNode(s.range, fake);
|
|
44078
44946
|
apply(fake);
|
|
44079
44947
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.safeRemove(fake);
|
|
44080
44948
|
} else {
|
|
@@ -44733,6 +45601,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44733
45601
|
'video',
|
|
44734
45602
|
'audio'
|
|
44735
45603
|
];
|
|
45604
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
44736
45605
|
|
|
44737
45606
|
|
|
44738
45607
|
/***/ }),
|
|
@@ -44768,11 +45637,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44768
45637
|
* Process `video` and `audio`
|
|
44769
45638
|
*/ function media(editor) {
|
|
44770
45639
|
var keyFake = 'jodit_fake_wrapper';
|
|
44771
|
-
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;
|
|
44772
45641
|
var wrap = function wrap(element) {
|
|
44773
45642
|
if (element.parentNode && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
44774
45643
|
element = element.parentNode;
|
|
44775
|
-
} 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) {
|
|
44776
45648
|
var wrapper = editor.createInside.element(mediaFakeTag, (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)({
|
|
44777
45649
|
'data-jodit-temp': 1,
|
|
44778
45650
|
contenteditable: false,
|
|
@@ -44789,12 +45661,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44789
45661
|
}
|
|
44790
45662
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, element);
|
|
44791
45663
|
element = wrapper;
|
|
45664
|
+
} else {
|
|
45665
|
+
return;
|
|
44792
45666
|
}
|
|
44793
45667
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', function() {
|
|
44794
45668
|
editor.s.setCursorAfter(element);
|
|
44795
45669
|
});
|
|
44796
45670
|
};
|
|
44797
|
-
if (mediaInFakeBlock) {
|
|
45671
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
44798
45672
|
editor.e.on('afterGetValueFromEditor', function(data) {
|
|
44799
45673
|
var rxp = new RegExp("<".concat(mediaFakeTag, "[^>]+data-").concat(keyFake, "[^>]+>([^]+?)</").concat(mediaFakeTag, ">"), 'ig');
|
|
44800
45674
|
if (rxp.test(data.value)) {
|
|
@@ -46374,7 +47248,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder
|
|
|
46374
47248
|
_this.placeholderElm.innerHTML = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_12__.attr)(editor.element, 'placeholder') || '';
|
|
46375
47249
|
}
|
|
46376
47250
|
editor.e.fire('placeholder', _this.placeholderElm.innerHTML);
|
|
46377
|
-
editor.e.off('.placeholder').on('changePlace.placeholder', _this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder', _this.toggle).on(window, 'load', _this.toggle);
|
|
47251
|
+
editor.e.off('.placeholder').on('changePlace.placeholder', _this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder afterCommand.placeholder', _this.toggle).on(window, 'load', _this.toggle);
|
|
46378
47252
|
_this.addNativeListeners();
|
|
46379
47253
|
_this.toggle();
|
|
46380
47254
|
});
|
|
@@ -50396,10 +51270,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.source = {
|
|
|
50396
51270
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
50397
51271
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
50398
51272
|
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
|
|
50399
|
-
/* harmony import */ var
|
|
50400
|
-
/* harmony import */ var
|
|
50401
|
-
/* harmony import */ var
|
|
50402
|
-
/* harmony import */ var
|
|
51273
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
|
|
51274
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81937);
|
|
51275
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49574);
|
|
51276
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23211);
|
|
51277
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65946);
|
|
51278
|
+
/* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(94193);
|
|
50403
51279
|
/*!
|
|
50404
51280
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
50405
51281
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -50415,6 +51291,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.source = {
|
|
|
50415
51291
|
|
|
50416
51292
|
|
|
50417
51293
|
|
|
51294
|
+
|
|
51295
|
+
|
|
50418
51296
|
var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
50419
51297
|
"use strict";
|
|
50420
51298
|
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(AceEditor, SourceEditor);
|
|
@@ -50429,7 +51307,7 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50429
51307
|
_this.j.e.fire('focus', e);
|
|
50430
51308
|
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "proxyOnMouseDown", function(e) {
|
|
50431
51309
|
_this.j.e.fire('mousedown', e);
|
|
50432
|
-
});
|
|
51310
|
+
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__settingValue", false);
|
|
50433
51311
|
return _this;
|
|
50434
51312
|
}
|
|
50435
51313
|
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(AceEditor, [
|
|
@@ -50511,7 +51389,7 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50511
51389
|
return;
|
|
50512
51390
|
}
|
|
50513
51391
|
var fakeMirror = _this.j.c.div('jodit-source__mirror-fake');
|
|
50514
|
-
|
|
51392
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.append(_this.container, fakeMirror);
|
|
50515
51393
|
var ace = editor.ow.ace;
|
|
50516
51394
|
_this.instance = ace.edit(fakeMirror);
|
|
50517
51395
|
if (editor.o.direction === 'rtl') {
|
|
@@ -50532,15 +51410,15 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50532
51410
|
_this.instance.setOption('wrap', editor.o.sourceEditorNativeOptions.wrap);
|
|
50533
51411
|
_this.instance.getSession().setUseWorker(false);
|
|
50534
51412
|
_this.instance.$blockScrolling = Infinity;
|
|
50535
|
-
_this.instance.on('change', _this.
|
|
51413
|
+
_this.instance.on('change', _this.__onChange);
|
|
50536
51414
|
_this.instance.on('focus', _this.proxyOnFocus);
|
|
50537
51415
|
_this.instance.on('mousedown', _this.proxyOnMouseDown);
|
|
50538
51416
|
_this.instance.on('blur', _this.proxyOnBlur);
|
|
50539
|
-
if (editor.getRealMode() !==
|
|
51417
|
+
if (editor.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.MODE_WYSIWYG) {
|
|
50540
51418
|
_this.setValue(_this.getValue());
|
|
50541
51419
|
}
|
|
50542
51420
|
var onResize = _this.j.async.throttle(function() {
|
|
50543
|
-
if (editor.isInDestruct || editor.getMode() ===
|
|
51421
|
+
if (editor.isInDestruct || editor.getMode() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.MODE_WYSIWYG) {
|
|
50544
51422
|
return;
|
|
50545
51423
|
}
|
|
50546
51424
|
var hasFocus = _this.instance.isFocused();
|
|
@@ -50558,7 +51436,7 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50558
51436
|
};
|
|
50559
51437
|
var loading = false;
|
|
50560
51438
|
var initAceEditor = function initAceEditor1() {
|
|
50561
|
-
if (editor.isInDestruct || editor.getRealMode() !==
|
|
51439
|
+
if (editor.isInDestruct || editor.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.MODE_SPLIT) {
|
|
50562
51440
|
return;
|
|
50563
51441
|
}
|
|
50564
51442
|
// ACE (~400 KiB from the CDN) is only needed once the source view
|
|
@@ -50567,7 +51445,7 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50567
51445
|
if (!_this.aceExists()) {
|
|
50568
51446
|
if (!loading) {
|
|
50569
51447
|
loading = true;
|
|
50570
|
-
(0,
|
|
51448
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_9__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50571
51449
|
return null;
|
|
50572
51450
|
});
|
|
50573
51451
|
}
|
|
@@ -50585,7 +51463,7 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50585
51463
|
key: "destruct",
|
|
50586
51464
|
value: function destruct() {
|
|
50587
51465
|
var _this_j_events, _this_j;
|
|
50588
|
-
this.instance.off('change', this.
|
|
51466
|
+
this.instance.off('change', this.__onChange);
|
|
50589
51467
|
this.instance.off('focus', this.proxyOnFocus);
|
|
50590
51468
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
50591
51469
|
this.instance.destroy();
|
|
@@ -50597,14 +51475,33 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50597
51475
|
value: function setValue(value) {
|
|
50598
51476
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
50599
51477
|
var html = this.j.e.fire('beautifyHTML', value);
|
|
50600
|
-
if ((0,
|
|
51478
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_9__.isString)(html)) {
|
|
50601
51479
|
value = html;
|
|
50602
51480
|
}
|
|
50603
51481
|
}
|
|
50604
|
-
|
|
51482
|
+
// ACE reports its own `setValue` as two changes, the removal of the
|
|
51483
|
+
// old text and the insertion of the new one. Fed back into the
|
|
51484
|
+
// editor they became two history entries, `content -> ''` and
|
|
51485
|
+
// `'' -> content`, so the first undo after a switch to the source
|
|
51486
|
+
// view and back emptied the editor. The text came from the editor
|
|
51487
|
+
// in the first place, so there is nothing to send back.
|
|
51488
|
+
this.__settingValue = true;
|
|
51489
|
+
try {
|
|
51490
|
+
this.instance.setValue(value);
|
|
51491
|
+
} finally{
|
|
51492
|
+
this.__settingValue = false;
|
|
51493
|
+
}
|
|
50605
51494
|
this.instance.clearSelection();
|
|
50606
51495
|
}
|
|
50607
51496
|
},
|
|
51497
|
+
{
|
|
51498
|
+
key: "__onChange",
|
|
51499
|
+
value: function __onChange() {
|
|
51500
|
+
if (!this.__settingValue) {
|
|
51501
|
+
this.toWYSIWYG();
|
|
51502
|
+
}
|
|
51503
|
+
}
|
|
51504
|
+
},
|
|
50608
51505
|
{
|
|
50609
51506
|
key: "getValue",
|
|
50610
51507
|
value: function getValue() {
|
|
@@ -50707,7 +51604,10 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50707
51604
|
}
|
|
50708
51605
|
]);
|
|
50709
51606
|
return AceEditor;
|
|
50710
|
-
}(
|
|
51607
|
+
}(jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_10__.SourceEditor);
|
|
51608
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
51609
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__.autobind
|
|
51610
|
+
], AceEditor.prototype, "__onChange", null);
|
|
50711
51611
|
|
|
50712
51612
|
|
|
50713
51613
|
/***/ }),
|
|
@@ -54005,16 +54905,34 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('toolbarNavigat
|
|
|
54005
54905
|
|
|
54006
54906
|
|
|
54007
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
|
+
}
|
|
54008
54918
|
function insertVideos(data) {
|
|
54009
54919
|
var _this = this;
|
|
54010
54920
|
var _data_files;
|
|
54011
54921
|
(_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach(function(file) {
|
|
54012
|
-
_this.s.insertNode(_this.createInside.element('video', {
|
|
54922
|
+
_this.s.insertNode(prepareMedia(_this, _this.createInside.element('video', {
|
|
54013
54923
|
controls: '',
|
|
54014
54924
|
src: data.baseurl + file
|
|
54015
|
-
}));
|
|
54925
|
+
})));
|
|
54016
54926
|
});
|
|
54017
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
|
+
}
|
|
54018
54936
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
54019
54937
|
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
54020
54938
|
defaultWidth: 400,
|
|
@@ -54056,7 +54974,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
54056
54974
|
])
|
|
54057
54975
|
]), tabs = [], insertCode = function insertCode(code) {
|
|
54058
54976
|
jodit.s.restore();
|
|
54059
|
-
jodit.s.insertHTML(code);
|
|
54977
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
54060
54978
|
close();
|
|
54061
54979
|
};
|
|
54062
54980
|
jodit.s.save();
|