jodit 4.17.6 → 4.18.1
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 +17 -0
- package/es2015/jodit.css +87 -3
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +808 -132
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +16 -16
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +8 -8
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +87 -3
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +14 -14
- package/es2021/jodit.js +788 -132
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +14 -14
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +87 -3
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +26 -26
- package/es2021.en/jodit.js +788 -132
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +12 -12
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +92 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1073 -192
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +65 -2
- package/esm/config.js +29 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +11 -5
- package/esm/core/helpers/utils/align.js +28 -8
- package/esm/core/helpers/utils/index.d.ts +1 -0
- package/esm/core/helpers/utils/index.js +1 -0
- package/esm/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/esm/core/helpers/utils/media-wrapper.js +63 -0
- package/esm/core/selection/selection.js +3 -3
- package/esm/modules/toolbar/button/button.d.ts +18 -0
- package/esm/modules/toolbar/button/button.js +75 -5
- package/esm/plugins/dtd/after-insert/remove-extra-br.js +6 -1
- package/esm/plugins/dtd/before-insert/check-block-nesting.js +16 -1
- package/esm/plugins/dtd/config.js +3 -0
- package/esm/plugins/font/config.d.ts +12 -0
- package/esm/plugins/font/config.js +25 -10
- package/esm/plugins/font/font-picker.d.ts +51 -0
- package/esm/plugins/font/font-picker.js +238 -0
- package/esm/plugins/font/font.js +12 -0
- package/esm/plugins/font/google-fonts.d.ts +65 -0
- package/esm/plugins/font/google-fonts.js +143 -0
- package/esm/plugins/image-properties/readers/index.js +2 -1
- package/esm/plugins/image-properties/writers/index.js +2 -2
- package/esm/plugins/inline-popup/config/items/img.js +10 -8
- package/esm/plugins/inline-popup/inline-popup.js +13 -6
- package/esm/plugins/media/config.d.ts +26 -1
- package/esm/plugins/media/config.js +1 -3
- package/esm/plugins/media/media.js +12 -4
- package/esm/plugins/video/config.js +24 -4
- package/esm/types/toolbar.d.ts +2 -0
- package/esm/types/types.d.ts +13 -1
- package/package.json +1 -1
- package/types/config.d.ts +65 -2
- package/types/core/helpers/utils/align.d.ts +11 -5
- package/types/core/helpers/utils/index.d.ts +1 -0
- package/types/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/types/modules/toolbar/button/button.d.ts +18 -0
- package/types/plugins/font/config.d.ts +12 -0
- package/types/plugins/font/font-picker.d.ts +51 -0
- package/types/plugins/font/google-fonts.d.ts +65 -0
- package/types/plugins/media/config.d.ts +26 -1
- package/types/types/toolbar.d.ts +2 -0
- package/types/types/types.d.ts +13 -1
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.
|
|
4
|
+
* Version: v4.18.1
|
|
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.1";
|
|
2133
2158
|
// prettier-ignore
|
|
2134
2159
|
var ES = "es5";
|
|
2135
2160
|
var IS_ES_MODERN = false;
|
|
@@ -8609,13 +8634,16 @@ function trimChars(value, chars) {
|
|
|
8609
8634
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8610
8635
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
8611
8636
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
8637
|
+
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
8612
8638
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
8613
8639
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
8614
8640
|
/* harmony export */ });
|
|
8615
8641
|
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
8616
8642
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
|
|
8617
|
-
/* harmony import */ var
|
|
8618
|
-
/* harmony import */ var
|
|
8643
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17312);
|
|
8644
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
8645
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
8646
|
+
/* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83314);
|
|
8619
8647
|
/*!
|
|
8620
8648
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8621
8649
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8626,37 +8654,66 @@ function trimChars(value, chars) {
|
|
|
8626
8654
|
|
|
8627
8655
|
|
|
8628
8656
|
|
|
8629
|
-
|
|
8630
|
-
|
|
8657
|
+
|
|
8658
|
+
|
|
8659
|
+
// The sets of class names an alignment lists, the first being the one to write
|
|
8660
|
+
var classSets = function classSets(value) {
|
|
8661
|
+
return ((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__.isArray)(value) ? value : [
|
|
8662
|
+
value !== null && value !== void 0 ? value : ''
|
|
8663
|
+
]).map(function(set) {
|
|
8664
|
+
return set.split(/\s+/).filter(Boolean);
|
|
8665
|
+
}).filter(function(set) {
|
|
8666
|
+
return set.length;
|
|
8667
|
+
});
|
|
8631
8668
|
};
|
|
8632
8669
|
/**
|
|
8633
|
-
*
|
|
8634
|
-
*
|
|
8670
|
+
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
8671
|
+
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
8672
|
+
* `jodit-media`), falling back to `imageAlignClasses` for an image
|
|
8673
|
+
*/ function getAlignClasses(jodit, elm) {
|
|
8674
|
+
var _ref;
|
|
8675
|
+
var _jodit_o_alignClasses;
|
|
8676
|
+
if (!elm) {
|
|
8677
|
+
return null;
|
|
8678
|
+
}
|
|
8679
|
+
var media = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
8680
|
+
'jodit',
|
|
8681
|
+
'jodit-media'
|
|
8682
|
+
])) ? elm.firstElementChild : (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm);
|
|
8683
|
+
var tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
|
|
8684
|
+
return (_ref = (_jodit_o_alignClasses = jodit.o.alignClasses) === null || _jodit_o_alignClasses === void 0 ? void 0 : _jodit_o_alignClasses[tag]) !== null && _ref !== void 0 ? _ref : tag === 'img' ? jodit.o.imageAlignClasses : null;
|
|
8685
|
+
}
|
|
8686
|
+
/**
|
|
8687
|
+
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
8688
|
+
* when they are given
|
|
8635
8689
|
*/ function hAlignElement(image, align, classes) {
|
|
8636
8690
|
if (classes) {
|
|
8637
8691
|
var _image_classList, _image_classList1;
|
|
8692
|
+
var _classSets_;
|
|
8638
8693
|
hAlignElement(image, 'normal');
|
|
8639
8694
|
Object.values(classes).forEach(function(value) {
|
|
8640
|
-
return (
|
|
8695
|
+
return classSets(value).forEach(function(set) {
|
|
8696
|
+
return (_image_classList = image.classList).remove.apply(_image_classList, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(set));
|
|
8697
|
+
});
|
|
8641
8698
|
});
|
|
8642
|
-
(_image_classList1 = image.classList).add.apply(_image_classList1, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(
|
|
8699
|
+
(_image_classList1 = image.classList).add.apply(_image_classList1, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)((_classSets_ = classSets(classes[align || 'normal'])[0]) !== null && _classSets_ !== void 0 ? _classSets_ : []));
|
|
8643
8700
|
[
|
|
8644
8701
|
'class',
|
|
8645
8702
|
'style'
|
|
8646
8703
|
].forEach(function(name) {
|
|
8647
8704
|
var _attr;
|
|
8648
|
-
if (!((_attr = (0,
|
|
8649
|
-
(0,
|
|
8705
|
+
if (!((_attr = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, name)) === null || _attr === void 0 ? void 0 : _attr.trim())) {
|
|
8706
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, name, null);
|
|
8650
8707
|
}
|
|
8651
8708
|
});
|
|
8652
8709
|
return;
|
|
8653
8710
|
}
|
|
8654
8711
|
if (align && align !== 'normal') {
|
|
8655
8712
|
if (align !== 'center') {
|
|
8656
|
-
(0,
|
|
8657
|
-
(0,
|
|
8713
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float', align);
|
|
8714
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.clearCenterAlign)(image);
|
|
8658
8715
|
} else {
|
|
8659
|
-
(0,
|
|
8716
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, {
|
|
8660
8717
|
float: '',
|
|
8661
8718
|
display: 'block',
|
|
8662
8719
|
marginLeft: 'auto',
|
|
@@ -8664,13 +8721,13 @@ var classNames = function classNames(value) {
|
|
|
8664
8721
|
});
|
|
8665
8722
|
}
|
|
8666
8723
|
} else {
|
|
8667
|
-
if ((0,
|
|
8724
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float') && [
|
|
8668
8725
|
'right',
|
|
8669
8726
|
'left'
|
|
8670
|
-
].indexOf((0,
|
|
8671
|
-
(0,
|
|
8727
|
+
].indexOf((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
8728
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'float', '');
|
|
8672
8729
|
}
|
|
8673
|
-
;(0,
|
|
8730
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.clearCenterAlign)(image);
|
|
8674
8731
|
}
|
|
8675
8732
|
}
|
|
8676
8733
|
/**
|
|
@@ -8684,19 +8741,20 @@ var classNames = function classNames(value) {
|
|
|
8684
8741
|
'normal'
|
|
8685
8742
|
]; _i < _iter.length; _i++){
|
|
8686
8743
|
var align = _iter[_i];
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8744
|
+
if (classSets(classes[align]).some(function(set) {
|
|
8745
|
+
return set.every(function(name) {
|
|
8746
|
+
return elm.classList.contains(name);
|
|
8747
|
+
});
|
|
8690
8748
|
})) {
|
|
8691
8749
|
return align;
|
|
8692
8750
|
}
|
|
8693
8751
|
}
|
|
8694
8752
|
}
|
|
8695
|
-
var float = (0,
|
|
8753
|
+
var float = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'float').toLowerCase();
|
|
8696
8754
|
if (float === 'left' || float === 'right') {
|
|
8697
8755
|
return float;
|
|
8698
8756
|
}
|
|
8699
|
-
if ((0,
|
|
8757
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(elm, 'display') === 'block' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'margin-left') === 'auto' && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
8700
8758
|
return 'center';
|
|
8701
8759
|
}
|
|
8702
8760
|
return 'normal';
|
|
@@ -8706,10 +8764,10 @@ var classNames = function classNames(value) {
|
|
|
8706
8764
|
*/ function clearAlign(node) {
|
|
8707
8765
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node, function(elm) {
|
|
8708
8766
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(elm)) {
|
|
8709
|
-
if ((0,
|
|
8710
|
-
(0,
|
|
8711
|
-
if (!((0,
|
|
8712
|
-
(0,
|
|
8767
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(elm, 'textAlign')) {
|
|
8768
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(elm, 'textAlign', '');
|
|
8769
|
+
if (!((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(elm, 'style') || '').trim().length) {
|
|
8770
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(elm, 'style', null);
|
|
8713
8771
|
}
|
|
8714
8772
|
}
|
|
8715
8773
|
}
|
|
@@ -8740,7 +8798,7 @@ function alignElement(command, box) {
|
|
|
8740
8798
|
clearAlign(box);
|
|
8741
8799
|
var align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
8742
8800
|
if (align) {
|
|
8743
|
-
(0,
|
|
8801
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(box, 'textAlign', align);
|
|
8744
8802
|
}
|
|
8745
8803
|
}
|
|
8746
8804
|
}
|
|
@@ -9874,13 +9932,13 @@ var getClassName = function getClassName(obj) {
|
|
|
9874
9932
|
"use strict";
|
|
9875
9933
|
__webpack_require__.r(__webpack_exports__);
|
|
9876
9934
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9877
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
9935
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.$$; },
|
|
9878
9936
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
9879
9937
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
9880
9938
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
9881
9939
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
9882
9940
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
9883
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
9941
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
|
|
9884
9942
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
9885
9943
|
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
|
|
9886
9944
|
/* harmony export */ abort: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
@@ -9892,58 +9950,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9892
9950
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
9893
9951
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
9894
9952
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
9895
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
9896
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
9897
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
9953
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.call; },
|
|
9954
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
|
|
9955
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.callThis; },
|
|
9898
9956
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
9899
9957
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
9900
9958
|
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.cns; },
|
|
9901
9959
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
9902
9960
|
/* harmony export */ connection: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
9903
9961
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
9962
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
|
|
9904
9963
|
/* harmony export */ css: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
9905
9964
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
9906
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
9965
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
|
|
9907
9966
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
9908
9967
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
9909
9968
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
9910
9969
|
/* harmony export */ error: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.error; },
|
|
9911
9970
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
9912
9971
|
/* harmony export */ get: function() { return /* reexport safe */ _get__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
9972
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
9913
9973
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
9914
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
9974
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
|
|
9915
9975
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
9916
|
-
/* harmony export */
|
|
9917
|
-
/* harmony export */
|
|
9976
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
|
|
9977
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
|
|
9978
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
|
|
9979
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
|
|
9918
9980
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
9919
9981
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
9920
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
9982
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.inView; },
|
|
9921
9983
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
9922
9984
|
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
|
|
9923
9985
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
9924
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
9925
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
9986
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.keys; },
|
|
9987
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
|
|
9926
9988
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
9927
9989
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
9928
9990
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
9929
9991
|
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
|
|
9930
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
9931
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
9992
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
|
|
9993
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
|
|
9932
9994
|
/* harmony export */ options: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
9933
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
9934
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
9935
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
9936
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
9937
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
9938
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
9939
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
9995
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
|
|
9996
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
|
|
9997
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.refs; },
|
|
9998
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_23__.reset; },
|
|
9999
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
|
|
10000
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
|
|
10001
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_26__.set; },
|
|
10002
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
|
|
9940
10003
|
/* harmony export */ });
|
|
9941
10004
|
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16849);
|
|
9942
10005
|
/* harmony import */ var _append_script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47760);
|
|
9943
10006
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
9944
10007
|
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
9945
10008
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
9946
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _assert__WEBPACK_IMPORTED_MODULE_2__) if(["default","alignElement","clearAlign","getHAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _assert__WEBPACK_IMPORTED_MODULE_2__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
10009
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _assert__WEBPACK_IMPORTED_MODULE_2__) if(["default","alignElement","clearAlign","getAlignClasses","getHAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _assert__WEBPACK_IMPORTED_MODULE_2__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
9947
10010
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
9948
10011
|
/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
9949
10012
|
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26136);
|
|
@@ -9962,14 +10025,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9962
10025
|
/* harmony import */ var _human_size_to_bytes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37427);
|
|
9963
10026
|
/* harmony import */ var _is_unsafe_proto_key__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(78048);
|
|
9964
10027
|
/* harmony import */ var _mark_deprecated__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49385);
|
|
9965
|
-
/* harmony import */ var
|
|
9966
|
-
/* harmony import */ var
|
|
9967
|
-
/* harmony import */ var
|
|
9968
|
-
/* harmony import */ var
|
|
9969
|
-
/* harmony import */ var
|
|
9970
|
-
/* harmony import */ var
|
|
9971
|
-
/* harmony import */ var
|
|
9972
|
-
/* harmony import */ var
|
|
10028
|
+
/* harmony import */ var _media_wrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(83314);
|
|
10029
|
+
/* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(36310);
|
|
10030
|
+
/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(57075);
|
|
10031
|
+
/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(43379);
|
|
10032
|
+
/* harmony import */ var _scroll_into_view__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(60898);
|
|
10033
|
+
/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(28723);
|
|
10034
|
+
/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(52144);
|
|
10035
|
+
/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(42820);
|
|
10036
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(71125);
|
|
9973
10037
|
/*!
|
|
9974
10038
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9975
10039
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10004,6 +10068,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10004
10068
|
|
|
10005
10069
|
|
|
10006
10070
|
|
|
10071
|
+
|
|
10007
10072
|
|
|
10008
10073
|
|
|
10009
10074
|
/***/ }),
|
|
@@ -10079,6 +10144,102 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10079
10144
|
}
|
|
10080
10145
|
|
|
10081
10146
|
|
|
10147
|
+
/***/ }),
|
|
10148
|
+
|
|
10149
|
+
/***/ 83314:
|
|
10150
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10151
|
+
|
|
10152
|
+
"use strict";
|
|
10153
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10154
|
+
/* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
|
|
10155
|
+
/* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
|
|
10156
|
+
/* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
|
|
10157
|
+
/* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
|
|
10158
|
+
/* harmony export */ });
|
|
10159
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
|
|
10160
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
10161
|
+
/*!
|
|
10162
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10163
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
10164
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
10165
|
+
*/ /**
|
|
10166
|
+
* @module helpers/utils
|
|
10167
|
+
*/
|
|
10168
|
+
|
|
10169
|
+
var isWrapper = function isWrapper(node, wrapper) {
|
|
10170
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
|
|
10171
|
+
};
|
|
10172
|
+
/**
|
|
10173
|
+
* The media in `elm` when `elm` is a wrapper media keep in the content (see
|
|
10174
|
+
* `mediaWrappers`): an element of a type `elm` is the wrapper for
|
|
10175
|
+
*/ function getWrappedMedia(jodit, elm) {
|
|
10176
|
+
var _jodit_o_mediaWrappers;
|
|
10177
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
10178
|
+
try {
|
|
10179
|
+
for(var _iterator = Object.entries((_jodit_o_mediaWrappers = jodit.o.mediaWrappers) !== null && _jodit_o_mediaWrappers !== void 0 ? _jodit_o_mediaWrappers : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
10180
|
+
var _step_value = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(_step.value, 2), tag = _step_value[0], wrapper = _step_value[1];
|
|
10181
|
+
if (isWrapper(elm, wrapper)) {
|
|
10182
|
+
var media = elm.querySelector(tag);
|
|
10183
|
+
if (media) {
|
|
10184
|
+
return media;
|
|
10185
|
+
}
|
|
10186
|
+
}
|
|
10187
|
+
}
|
|
10188
|
+
} catch (err) {
|
|
10189
|
+
_didIteratorError = true;
|
|
10190
|
+
_iteratorError = err;
|
|
10191
|
+
} finally{
|
|
10192
|
+
try {
|
|
10193
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
10194
|
+
_iterator.return();
|
|
10195
|
+
}
|
|
10196
|
+
} finally{
|
|
10197
|
+
if (_didIteratorError) {
|
|
10198
|
+
throw _iteratorError;
|
|
10199
|
+
}
|
|
10200
|
+
}
|
|
10201
|
+
}
|
|
10202
|
+
return null;
|
|
10203
|
+
}
|
|
10204
|
+
/**
|
|
10205
|
+
* The wrapper media keep in the content (see `mediaWrappers`) that is or
|
|
10206
|
+
* holds `node`
|
|
10207
|
+
*/ function getMediaWrapper(jodit, node) {
|
|
10208
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, function(elm) {
|
|
10209
|
+
return Boolean(getWrappedMedia(jodit, elm));
|
|
10210
|
+
}, jodit.editor);
|
|
10211
|
+
}
|
|
10212
|
+
/**
|
|
10213
|
+
* An empty wrapper for media of type `tag` to keep in the content (see
|
|
10214
|
+
* `mediaWrappers`), or null when there is none for it
|
|
10215
|
+
*/ function createMediaWrapper(jodit, tag) {
|
|
10216
|
+
var _jodit_o_mediaWrappers;
|
|
10217
|
+
var wrapper = (_jodit_o_mediaWrappers = jodit.o.mediaWrappers) === null || _jodit_o_mediaWrappers === void 0 ? void 0 : _jodit_o_mediaWrappers[tag.toLowerCase()];
|
|
10218
|
+
if (!wrapper) {
|
|
10219
|
+
return null;
|
|
10220
|
+
}
|
|
10221
|
+
return jodit.createInside.element(wrapper.tag, {
|
|
10222
|
+
class: wrapper.className,
|
|
10223
|
+
contenteditable: false,
|
|
10224
|
+
draggable: true
|
|
10225
|
+
});
|
|
10226
|
+
}
|
|
10227
|
+
/**
|
|
10228
|
+
* Puts `element` in the wrapper for its type (see `mediaWrappers`), and
|
|
10229
|
+
* returns the wrapper, or `element` when there is none for it
|
|
10230
|
+
*/ function wrapMedia(jodit, element) {
|
|
10231
|
+
var wrapper = createMediaWrapper(jodit, element.nodeName);
|
|
10232
|
+
if (!wrapper) {
|
|
10233
|
+
return element;
|
|
10234
|
+
}
|
|
10235
|
+
if (element.parentNode) {
|
|
10236
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.before(element, wrapper);
|
|
10237
|
+
}
|
|
10238
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
|
|
10239
|
+
return wrapper;
|
|
10240
|
+
}
|
|
10241
|
+
|
|
10242
|
+
|
|
10082
10243
|
/***/ }),
|
|
10083
10244
|
|
|
10084
10245
|
/***/ 36310:
|
|
@@ -13179,9 +13340,9 @@ var Selection = /*#__PURE__*/ function() {
|
|
|
13179
13340
|
if (styles && (typeof styles === "undefined" ? "undefined" : (0,_swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_7__._)(styles)) === 'object') {
|
|
13180
13341
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(image, styles);
|
|
13181
13342
|
}
|
|
13182
|
-
var
|
|
13343
|
+
var imageDefaultAlign = this.j.o.imageDefaultAlign;
|
|
13183
13344
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
13184
|
-
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.hAlignElement)(image, imageDefaultAlign,
|
|
13345
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.hAlignElement)(image, imageDefaultAlign, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_13__.getAlignClasses)(this.j, image));
|
|
13185
13346
|
}
|
|
13186
13347
|
var onload = function onload1() {
|
|
13187
13348
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -29766,6 +29927,7 @@ var INPUT_TAGS = new Set([
|
|
|
29766
29927
|
'textarea',
|
|
29767
29928
|
'select'
|
|
29768
29929
|
]);
|
|
29930
|
+
var TYPE_AHEAD_TIMEOUT = 1000;
|
|
29769
29931
|
var FOCUSABLE_SELECTOR = [
|
|
29770
29932
|
'button:not([disabled])',
|
|
29771
29933
|
'a[href]',
|
|
@@ -29783,11 +29945,11 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
29783
29945
|
var _this;
|
|
29784
29946
|
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, ToolbarButton, [
|
|
29785
29947
|
jodit
|
|
29786
|
-
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "control", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "target", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "trigger", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "openedPopup", void 0), _this.control = control, _this.target = target, _this.state = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_29__.UIButtonState)()), {
|
|
29948
|
+
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "control", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "target", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "trigger", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typed", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typedAt", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__typedTo", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "openedPopup", void 0), _this.control = control, _this.target = target, _this.state = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_29__.UIButtonState)()), {
|
|
29787
29949
|
theme: 'toolbar',
|
|
29788
29950
|
currentValue: '',
|
|
29789
29951
|
hasTrigger: false
|
|
29790
|
-
}), _this.openedPopup = null;
|
|
29952
|
+
}), _this.__typed = '', _this.__typedAt = 0, _this.__typedTo = null, _this.openedPopup = null;
|
|
29791
29953
|
var button = _this.getElm('button');
|
|
29792
29954
|
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_26__.assert)(button, 'Element button should exists');
|
|
29793
29955
|
_this.button = button;
|
|
@@ -30139,12 +30301,66 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30139
30301
|
items[(index + 1) % items.length].focus();
|
|
30140
30302
|
break;
|
|
30141
30303
|
default:
|
|
30142
|
-
|
|
30304
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
30305
|
+
return;
|
|
30306
|
+
}
|
|
30143
30307
|
}
|
|
30144
30308
|
e.preventDefault();
|
|
30145
30309
|
e.stopPropagation();
|
|
30146
30310
|
}
|
|
30147
30311
|
},
|
|
30312
|
+
{
|
|
30313
|
+
key: "__onEditorKeyDown",
|
|
30314
|
+
value: /**
|
|
30315
|
+
* The mouse opens a dropdown without taking the focus out of the editor.
|
|
30316
|
+
* While a dropdown list is open, typing there searches the list, as in an
|
|
30317
|
+
* open `<select>`, instead of writing into the content
|
|
30318
|
+
*/ function __onEditorKeyDown(e) {
|
|
30319
|
+
if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
|
|
30320
|
+
return;
|
|
30321
|
+
}
|
|
30322
|
+
e.preventDefault();
|
|
30323
|
+
return false;
|
|
30324
|
+
}
|
|
30325
|
+
},
|
|
30326
|
+
{
|
|
30327
|
+
key: "__typeAhead",
|
|
30328
|
+
value: /**
|
|
30329
|
+
* Typing in a dropdown list focuses the next item whose label starts with
|
|
30330
|
+
* the typed text, whatever their case and accents, and repeating one letter
|
|
30331
|
+
* cycles through the items that start with it, like the WAI-ARIA menu
|
|
30332
|
+
* pattern's type-ahead. The typed text starts again after a pause, or once
|
|
30333
|
+
* the focus has moved on
|
|
30334
|
+
*/ function __typeAhead(key, items, index) {
|
|
30335
|
+
var now = Date.now();
|
|
30336
|
+
if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
|
|
30337
|
+
this.__typed = '';
|
|
30338
|
+
}
|
|
30339
|
+
if (key.length !== 1 || key === ' ' && !this.__typed) {
|
|
30340
|
+
return false;
|
|
30341
|
+
}
|
|
30342
|
+
this.__typedAt = now;
|
|
30343
|
+
this.__typed += key;
|
|
30344
|
+
this.__typedTo = items[index];
|
|
30345
|
+
var compare = new Intl.Collator(undefined, {
|
|
30346
|
+
usage: 'search',
|
|
30347
|
+
sensitivity: 'base'
|
|
30348
|
+
}).compare, typed = this.__typed, cycle = Array.from(typed).every(function(char) {
|
|
30349
|
+
return compare(char, typed[0]) === 0;
|
|
30350
|
+
}), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
|
|
30351
|
+
for(var i = 0; i < items.length; i += 1){
|
|
30352
|
+
var _ref;
|
|
30353
|
+
var _item_textContent;
|
|
30354
|
+
var item = items[(start + i) % items.length], label = (_ref = (_item_textContent = item.textContent) === null || _item_textContent === void 0 ? void 0 : _item_textContent.trim()) !== null && _ref !== void 0 ? _ref : '';
|
|
30355
|
+
if (compare(label.slice(0, prefix.length), prefix) === 0) {
|
|
30356
|
+
item.focus();
|
|
30357
|
+
this.__typedTo = item;
|
|
30358
|
+
break;
|
|
30359
|
+
}
|
|
30360
|
+
}
|
|
30361
|
+
return true;
|
|
30362
|
+
}
|
|
30363
|
+
},
|
|
30148
30364
|
{
|
|
30149
30365
|
key: "__popupFocusables",
|
|
30150
30366
|
value: /**
|
|
@@ -30165,14 +30381,19 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30165
30381
|
* Create an open popup list
|
|
30166
30382
|
*/ function __openControlList(control) {
|
|
30167
30383
|
var _this = this;
|
|
30168
|
-
var _this_jodit_options_controls;
|
|
30384
|
+
var _this_jodit_options_controls, _ref, _ref1;
|
|
30385
|
+
var _this_toolbar, _control_popup;
|
|
30169
30386
|
var controls = (_this_jodit_options_controls = this.jodit.options.controls) !== null && _this_jodit_options_controls !== void 0 ? _this_jodit_options_controls : {}, getControl = function getControl(key) {
|
|
30170
30387
|
return (0,jodit_core_ui_helpers_get_control_type__WEBPACK_IMPORTED_MODULE_30__.findControlType)(key, controls);
|
|
30171
30388
|
};
|
|
30172
30389
|
var list = control.list;
|
|
30173
30390
|
var menu = this.openPopup();
|
|
30174
|
-
var toolbar = (0,_factory__WEBPACK_IMPORTED_MODULE_33__.makeCollection)(this.j);
|
|
30175
30391
|
menu.parentElement = this;
|
|
30392
|
+
var content = (_control_popup = control.popup) === null || _control_popup === void 0 ? void 0 : _control_popup.call(control, this.j, (_ref = (_ref1 = (_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.getTarget(this)) !== null && _ref1 !== void 0 ? _ref1 : this.target) !== null && _ref !== void 0 ? _ref : null, this.__closePopup, this);
|
|
30393
|
+
if (content) {
|
|
30394
|
+
return this.__openMenu(menu, content);
|
|
30395
|
+
}
|
|
30396
|
+
var toolbar = (0,_factory__WEBPACK_IMPORTED_MODULE_33__.makeCollection)(this.j);
|
|
30176
30397
|
toolbar.parentElement = menu;
|
|
30177
30398
|
toolbar.mode = 'vertical';
|
|
30178
30399
|
var isListItem = function isListItem(key) {
|
|
@@ -30224,7 +30445,14 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30224
30445
|
toolbar.build((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_19__.isArray)(list) ? list.map(getButton) : (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_28__.keys)(list, false).map(function(key) {
|
|
30225
30446
|
return getButton(key, list[key]);
|
|
30226
30447
|
}), this.target);
|
|
30227
|
-
|
|
30448
|
+
this.__openMenu(menu, toolbar);
|
|
30449
|
+
}
|
|
30450
|
+
},
|
|
30451
|
+
{
|
|
30452
|
+
key: "__openMenu",
|
|
30453
|
+
value: function __openMenu(menu, content) {
|
|
30454
|
+
var _this = this;
|
|
30455
|
+
menu.setContent(content).open(function() {
|
|
30228
30456
|
return (0,jodit_core_helpers_size__WEBPACK_IMPORTED_MODULE_24__.position)(_this.container);
|
|
30229
30457
|
}, false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
30230
30458
|
this.state.activated = true;
|
|
@@ -30246,7 +30474,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30246
30474
|
value: function openPopup() {
|
|
30247
30475
|
this.__closePopup();
|
|
30248
30476
|
this.openedPopup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_32__.Popup(this.j, false);
|
|
30249
|
-
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30477
|
+
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30250
30478
|
return this.openedPopup;
|
|
30251
30479
|
}
|
|
30252
30480
|
},
|
|
@@ -30264,7 +30492,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30264
30492
|
// popup while the outer `removeChild` is still running and Chrome
|
|
30265
30493
|
// throws NotFoundError. See #1458
|
|
30266
30494
|
this.openedPopup = null;
|
|
30267
|
-
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
|
|
30495
|
+
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
30268
30496
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
30269
30497
|
// the button, otherwise it would fall out to the document
|
|
30270
30498
|
var activeElement = this.od.activeElement, hadFocus = activeElement && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_18__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -30351,6 +30579,9 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
30351
30579
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30352
30580
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30353
30581
|
], ToolbarButton.prototype, "__onPopupKeyDown", null);
|
|
30582
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30583
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30584
|
+
], ToolbarButton.prototype, "__onEditorKeyDown", null);
|
|
30354
30585
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_10__.__decorate)([
|
|
30355
30586
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_14__.autobind
|
|
30356
30587
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -37663,7 +37894,12 @@ var brBoxes = new Set([
|
|
|
37663
37894
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(br, false)) {
|
|
37664
37895
|
return;
|
|
37665
37896
|
}
|
|
37666
|
-
|
|
37897
|
+
// After a block is inserted the caret is already at the end of its
|
|
37898
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
37899
|
+
// below the block (#1315)
|
|
37900
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
37901
|
+
jodit.s.setCursorBefore(br);
|
|
37902
|
+
}
|
|
37667
37903
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(br);
|
|
37668
37904
|
}
|
|
37669
37905
|
}
|
|
@@ -37702,13 +37938,22 @@ var brBoxes = new Set([
|
|
|
37702
37938
|
var current = (_ref = (_jodit_s_current = jodit.s.current()) === null || _jodit_s_current === void 0 ? void 0 : _jodit_s_current.parentElement) !== null && _ref !== void 0 ? _ref : null;
|
|
37703
37939
|
while(current && current !== jodit.editor){
|
|
37704
37940
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(current)) {
|
|
37705
|
-
|
|
37941
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
37942
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
37943
|
+
var isEmptyLine = !parent && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, jodit.o.enter) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(current);
|
|
37944
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] && !isEmptyLine) {
|
|
37706
37945
|
break;
|
|
37707
37946
|
}
|
|
37708
37947
|
parent = current;
|
|
37709
37948
|
}
|
|
37710
37949
|
current = current.parentElement;
|
|
37711
37950
|
}
|
|
37951
|
+
// A list that is all of the inserted content adds its items to the
|
|
37952
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
37953
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(current) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(node) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(node.parentNode) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(node, false)) {
|
|
37954
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(node);
|
|
37955
|
+
parent = current;
|
|
37956
|
+
}
|
|
37712
37957
|
if (parent) {
|
|
37713
37958
|
jodit.s.setCursorAfter(parent);
|
|
37714
37959
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
|
|
@@ -37763,10 +38008,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
37763
38008
|
audio: 1,
|
|
37764
38009
|
body: 1,
|
|
37765
38010
|
caption: 1,
|
|
38011
|
+
dd: 1,
|
|
37766
38012
|
details: 1,
|
|
37767
38013
|
dir: 1,
|
|
37768
38014
|
div: 1,
|
|
37769
38015
|
dl: 1,
|
|
38016
|
+
dt: 1,
|
|
37770
38017
|
fieldset: 1,
|
|
37771
38018
|
figcaption: 1,
|
|
37772
38019
|
figure: 1,
|
|
@@ -37774,6 +38021,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
37774
38021
|
form: 1,
|
|
37775
38022
|
header: 1,
|
|
37776
38023
|
hgroup: 1,
|
|
38024
|
+
li: 1,
|
|
37777
38025
|
main: 1,
|
|
37778
38026
|
menu: 1,
|
|
37779
38027
|
nav: 1,
|
|
@@ -38669,14 +38917,16 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38669
38917
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15366);
|
|
38670
38918
|
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50684);
|
|
38671
38919
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27795);
|
|
38672
|
-
/* harmony import */ var
|
|
38673
|
-
/* harmony import */ var
|
|
38674
|
-
/* harmony import */ var
|
|
38675
|
-
/* harmony import */ var
|
|
38676
|
-
/* harmony import */ var
|
|
38677
|
-
/* harmony import */ var
|
|
38678
|
-
/* harmony import */ var
|
|
38679
|
-
/* harmony import */ var
|
|
38920
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17312);
|
|
38921
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4040);
|
|
38922
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80991);
|
|
38923
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29434);
|
|
38924
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5266);
|
|
38925
|
+
/* harmony import */ var _icons_font_svg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48842);
|
|
38926
|
+
/* harmony import */ var _icons_font_svg__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_icons_font_svg__WEBPACK_IMPORTED_MODULE_9__);
|
|
38927
|
+
/* harmony import */ var _icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(25501);
|
|
38928
|
+
/* harmony import */ var _icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_fontsize_svg__WEBPACK_IMPORTED_MODULE_10__);
|
|
38929
|
+
/* harmony import */ var _font_picker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80045);
|
|
38680
38930
|
/*!
|
|
38681
38931
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38682
38932
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38693,11 +38943,18 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38693
38943
|
|
|
38694
38944
|
|
|
38695
38945
|
|
|
38946
|
+
|
|
38947
|
+
|
|
38696
38948
|
/**
|
|
38697
38949
|
* Default font-size points
|
|
38698
|
-
*/
|
|
38699
|
-
|
|
38700
|
-
|
|
38950
|
+
*/ jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.defaultFontSizePoints = 'px';
|
|
38951
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.font = {
|
|
38952
|
+
googleFonts: {
|
|
38953
|
+
url: ''
|
|
38954
|
+
}
|
|
38955
|
+
};
|
|
38956
|
+
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()));
|
|
38957
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.fontsize = {
|
|
38701
38958
|
command: 'fontsize',
|
|
38702
38959
|
data: {
|
|
38703
38960
|
cssRule: 'font-size',
|
|
@@ -38743,7 +39000,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38743
39000
|
}
|
|
38744
39001
|
var control = button.control;
|
|
38745
39002
|
var cssKey = ((_control_data = control.data) === null || _control_data === void 0 ? void 0 : _control_data.cssRule) || 'font-size';
|
|
38746
|
-
var value = (0,
|
|
39003
|
+
var value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(box, cssKey);
|
|
38747
39004
|
if (cssKey === 'font-size') {
|
|
38748
39005
|
var numValue = parseFloat(value.toString());
|
|
38749
39006
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -38781,11 +39038,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.fontsize = {
|
|
|
38781
39038
|
return keySet.has(normalize(value.toString()));
|
|
38782
39039
|
}
|
|
38783
39040
|
};
|
|
38784
|
-
|
|
39041
|
+
var hadSelection = new WeakSet();
|
|
39042
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.font = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__._)({}, jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.fontsize), {
|
|
38785
39043
|
command: 'fontname',
|
|
38786
39044
|
textTemplate: function textTemplate(j, value) {
|
|
38787
39045
|
var _value_split = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_2__._)(value.split(','), 1), first = _value_split[0];
|
|
38788
|
-
return (0,
|
|
39046
|
+
return (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_5__.trimChars)(first, '"\'');
|
|
38789
39047
|
},
|
|
38790
39048
|
list: {
|
|
38791
39049
|
'': 'Default',
|
|
@@ -38807,6 +39065,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38807
39065
|
} catch (unused) {}
|
|
38808
39066
|
return '<span data-style="'.concat(key, '" style="').concat(isAvailable ? "font-family: ".concat(key, "!important;") : '', '">').concat(value, "</span>");
|
|
38809
39067
|
},
|
|
39068
|
+
popup: function popup(editor, current, close, button) {
|
|
39069
|
+
return editor.o.font.googleFonts.url ? new _font_picker__WEBPACK_IMPORTED_MODULE_11__.UIFontPicker(editor, button, close) : false;
|
|
39070
|
+
},
|
|
38810
39071
|
data: {
|
|
38811
39072
|
cssRule: 'font-family',
|
|
38812
39073
|
normalize: function normalize(v) {
|
|
@@ -38815,19 +39076,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38815
39076
|
},
|
|
38816
39077
|
// When no font is explicitly set, the computed font-family equals the
|
|
38817
39078
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
38818
|
-
// button shows the `Default`
|
|
38819
|
-
// See #1370
|
|
38820
|
-
value: function value(editor) {
|
|
38821
|
-
var current = editor.s.current();
|
|
38822
|
-
|
|
38823
|
-
|
|
38824
|
-
|
|
38825
|
-
|
|
38826
|
-
if (
|
|
39079
|
+
// button shows the list's `Default` entry, when it has one, instead of
|
|
39080
|
+
// that raw stack. See #1370
|
|
39081
|
+
value: function value(editor, button) {
|
|
39082
|
+
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);
|
|
39083
|
+
// Until there is a selection the button shows the editor's own font,
|
|
39084
|
+
// and afterwards the font of the last one
|
|
39085
|
+
if (box) {
|
|
39086
|
+
hadSelection.add(button);
|
|
39087
|
+
} else if (hadSelection.has(button)) {
|
|
38827
39088
|
return;
|
|
38828
39089
|
}
|
|
38829
|
-
var value = (0,
|
|
38830
|
-
if (value === (0,
|
|
39090
|
+
var value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(box || editor.editor, 'font-family').toString(), list = button.control.list;
|
|
39091
|
+
if (value === (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_6__.css)(editor.editor, 'font-family').toString() && ((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.includes('') : '' in (list !== null && list !== void 0 ? list : {}))) {
|
|
38831
39092
|
return '';
|
|
38832
39093
|
}
|
|
38833
39094
|
return value;
|
|
@@ -38836,6 +39097,334 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38836
39097
|
});
|
|
38837
39098
|
|
|
38838
39099
|
|
|
39100
|
+
/***/ }),
|
|
39101
|
+
|
|
39102
|
+
/***/ 80045:
|
|
39103
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39104
|
+
|
|
39105
|
+
"use strict";
|
|
39106
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39107
|
+
/* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
|
|
39108
|
+
/* harmony export */ });
|
|
39109
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
|
|
39110
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
39111
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
39112
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
39113
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
|
|
39114
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
|
|
39115
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
|
|
39116
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(42395);
|
|
39117
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
39118
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91672);
|
|
39119
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(68616);
|
|
39120
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(23211);
|
|
39121
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28077);
|
|
39122
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(17312);
|
|
39123
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7909);
|
|
39124
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(80991);
|
|
39125
|
+
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(71125);
|
|
39126
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(96007);
|
|
39127
|
+
/* harmony import */ var _google_fonts__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(24939);
|
|
39128
|
+
/*!
|
|
39129
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39130
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
39131
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
39132
|
+
*/ /**
|
|
39133
|
+
* @module plugins/font
|
|
39134
|
+
*/
|
|
39135
|
+
|
|
39136
|
+
|
|
39137
|
+
|
|
39138
|
+
|
|
39139
|
+
|
|
39140
|
+
|
|
39141
|
+
|
|
39142
|
+
|
|
39143
|
+
|
|
39144
|
+
|
|
39145
|
+
|
|
39146
|
+
|
|
39147
|
+
|
|
39148
|
+
|
|
39149
|
+
|
|
39150
|
+
|
|
39151
|
+
|
|
39152
|
+
|
|
39153
|
+
|
|
39154
|
+
var HEADINGS = [
|
|
39155
|
+
'h1',
|
|
39156
|
+
'h2',
|
|
39157
|
+
'h3',
|
|
39158
|
+
'h4',
|
|
39159
|
+
'h5',
|
|
39160
|
+
'h6'
|
|
39161
|
+
];
|
|
39162
|
+
var GENERIC_FAMILIES = new Set([
|
|
39163
|
+
'serif',
|
|
39164
|
+
'sans-serif',
|
|
39165
|
+
'monospace',
|
|
39166
|
+
'cursive',
|
|
39167
|
+
'fantasy',
|
|
39168
|
+
'system-ui',
|
|
39169
|
+
'ui-serif',
|
|
39170
|
+
'ui-sans-serif',
|
|
39171
|
+
'ui-monospace',
|
|
39172
|
+
'ui-rounded'
|
|
39173
|
+
]);
|
|
39174
|
+
/**
|
|
39175
|
+
* A family that names a font, not a generic family or a vendor keyword such
|
|
39176
|
+
* as `-apple-system`
|
|
39177
|
+
*/ function isFontName(family) {
|
|
39178
|
+
return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
|
|
39179
|
+
}
|
|
39180
|
+
var UIFontPicker = /*#__PURE__*/ function(UIElement) {
|
|
39181
|
+
"use strict";
|
|
39182
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(UIFontPicker, UIElement);
|
|
39183
|
+
function UIFontPicker(jodit, __button, __close) {
|
|
39184
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UIFontPicker);
|
|
39185
|
+
var _this;
|
|
39186
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIFontPicker, [
|
|
39187
|
+
jodit
|
|
39188
|
+
]), (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;
|
|
39189
|
+
_this.__googleFonts = jodit.getInstance(_google_fonts__WEBPACK_IMPORTED_MODULE_18__.GoogleFonts);
|
|
39190
|
+
_this.__render();
|
|
39191
|
+
if (!_this.__googleFonts.fonts.size) {
|
|
39192
|
+
_this.__googleFonts.ready.then(function() {
|
|
39193
|
+
return !_this.isDestructed && _this.__render();
|
|
39194
|
+
});
|
|
39195
|
+
}
|
|
39196
|
+
return _this;
|
|
39197
|
+
}
|
|
39198
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIFontPicker, [
|
|
39199
|
+
{
|
|
39200
|
+
key: "className",
|
|
39201
|
+
value: function className() {
|
|
39202
|
+
return 'UIFontPicker';
|
|
39203
|
+
}
|
|
39204
|
+
},
|
|
39205
|
+
{
|
|
39206
|
+
key: "__render",
|
|
39207
|
+
value: function __render() {
|
|
39208
|
+
var _this = this;
|
|
39209
|
+
var _ref;
|
|
39210
|
+
var _control_value;
|
|
39211
|
+
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) {
|
|
39212
|
+
return {
|
|
39213
|
+
value: key.toString(),
|
|
39214
|
+
title: key.toString()
|
|
39215
|
+
};
|
|
39216
|
+
}) : (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map(function(key) {
|
|
39217
|
+
return {
|
|
39218
|
+
value: key,
|
|
39219
|
+
title: list[key].toString()
|
|
39220
|
+
};
|
|
39221
|
+
}), google = Array.from(this.__googleFonts.fonts.values(), function(font) {
|
|
39222
|
+
return {
|
|
39223
|
+
value: _this.__googleFonts.value(font),
|
|
39224
|
+
title: font.family,
|
|
39225
|
+
font: font
|
|
39226
|
+
};
|
|
39227
|
+
}), byFamily = new Map();
|
|
39228
|
+
(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) {
|
|
39229
|
+
return byFamily.set((0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(entry.value), entry);
|
|
39230
|
+
});
|
|
39231
|
+
var theme = new Map(), used = new Map();
|
|
39232
|
+
// The theme's own fonts are listed too, so its body font can be chosen
|
|
39233
|
+
// to take a font off
|
|
39234
|
+
this.__themeFonts().forEach(function(fontFamily) {
|
|
39235
|
+
var _byFamily_get;
|
|
39236
|
+
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) ? {
|
|
39237
|
+
value: fontFamily,
|
|
39238
|
+
title: title
|
|
39239
|
+
} : undefined;
|
|
39240
|
+
entry && !theme.has(family) && theme.set(family, entry);
|
|
39241
|
+
});
|
|
39242
|
+
this.__usedFonts().forEach(function(fontFamily) {
|
|
39243
|
+
var family = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(fontFamily), entry = byFamily.get(family);
|
|
39244
|
+
entry && !theme.has(family) && used.set(family, entry);
|
|
39245
|
+
});
|
|
39246
|
+
var defaultEntry = listed.find(function(entry) {
|
|
39247
|
+
return entry.value === '';
|
|
39248
|
+
}), 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 : '');
|
|
39249
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.detach(this.container);
|
|
39250
|
+
this.__fonts.clear();
|
|
39251
|
+
defaultEntry && this.__append(current, [
|
|
39252
|
+
defaultEntry
|
|
39253
|
+
]);
|
|
39254
|
+
this.__append(current, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(theme.values()), 'Theme fonts');
|
|
39255
|
+
this.__append(current, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(used.values()), 'Used fonts');
|
|
39256
|
+
this.__append(current, listed.filter(function(entry) {
|
|
39257
|
+
return entry !== defaultEntry;
|
|
39258
|
+
}), 'System fonts');
|
|
39259
|
+
this.__append(current, google, 'Google Fonts');
|
|
39260
|
+
this.__observeGoogleFonts();
|
|
39261
|
+
}
|
|
39262
|
+
},
|
|
39263
|
+
{
|
|
39264
|
+
key: "__themeFonts",
|
|
39265
|
+
value: /**
|
|
39266
|
+
* The fonts the editor's styles give text and each heading
|
|
39267
|
+
*/ function __themeFonts() {
|
|
39268
|
+
var _this = this;
|
|
39269
|
+
var editor = this.j.editor, fonts = [
|
|
39270
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(editor, 'font-family').toString()
|
|
39271
|
+
];
|
|
39272
|
+
HEADINGS.forEach(function(tag) {
|
|
39273
|
+
var heading = _this.j.createInside.element(tag, {
|
|
39274
|
+
style: 'display: none'
|
|
39275
|
+
});
|
|
39276
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(editor, heading);
|
|
39277
|
+
fonts.push((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(heading, 'font-family').toString());
|
|
39278
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.safeRemove(heading);
|
|
39279
|
+
});
|
|
39280
|
+
return fonts;
|
|
39281
|
+
}
|
|
39282
|
+
},
|
|
39283
|
+
{
|
|
39284
|
+
key: "__usedFonts",
|
|
39285
|
+
value: /**
|
|
39286
|
+
* The fonts the content sets
|
|
39287
|
+
*/ function __usedFonts() {
|
|
39288
|
+
return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), function(element) {
|
|
39289
|
+
return element.style.fontFamily;
|
|
39290
|
+
});
|
|
39291
|
+
}
|
|
39292
|
+
},
|
|
39293
|
+
{
|
|
39294
|
+
key: "__append",
|
|
39295
|
+
value: function __append(current, entries, heading) {
|
|
39296
|
+
var _this = this;
|
|
39297
|
+
if (!entries.length) {
|
|
39298
|
+
return;
|
|
39299
|
+
}
|
|
39300
|
+
var control = this.__button.control, group = this.j.c.div(this.getFullElName('group'));
|
|
39301
|
+
if (heading) {
|
|
39302
|
+
var title = this.j.c.div(this.getFullElName('heading'), {
|
|
39303
|
+
id: "".concat(this.getFullElName('heading'), "-").concat((0,jodit_core_global__WEBPACK_IMPORTED_MODULE_12__.uniqueUid)())
|
|
39304
|
+
});
|
|
39305
|
+
title.textContent = this.i18n(heading);
|
|
39306
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(group, {
|
|
39307
|
+
role: 'group',
|
|
39308
|
+
'aria-labelledby': title.id
|
|
39309
|
+
});
|
|
39310
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(group, title);
|
|
39311
|
+
}
|
|
39312
|
+
entries.forEach(function(entry) {
|
|
39313
|
+
var item = _this.j.c.element('button', {
|
|
39314
|
+
type: 'button',
|
|
39315
|
+
class: _this.getFullElName('item'),
|
|
39316
|
+
'data-value': entry.value,
|
|
39317
|
+
'aria-pressed': (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(entry.value) === current
|
|
39318
|
+
});
|
|
39319
|
+
if (entry.font) {
|
|
39320
|
+
item.textContent = entry.title;
|
|
39321
|
+
_this.__fonts.set(item, entry.font);
|
|
39322
|
+
} else {
|
|
39323
|
+
var _ref;
|
|
39324
|
+
var _control_childTemplate;
|
|
39325
|
+
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;
|
|
39326
|
+
}
|
|
39327
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(group, item);
|
|
39328
|
+
});
|
|
39329
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.append(this.container, group);
|
|
39330
|
+
}
|
|
39331
|
+
},
|
|
39332
|
+
{
|
|
39333
|
+
key: "__observeGoogleFonts",
|
|
39334
|
+
value: /**
|
|
39335
|
+
* Shows the names of the Google Fonts in view, and those just below it,
|
|
39336
|
+
* in their own fonts. Setting every item's font up front would have the
|
|
39337
|
+
* browser look for each of the library's families among the installed
|
|
39338
|
+
* fonts the first time the list opens
|
|
39339
|
+
*/ function __observeGoogleFonts() {
|
|
39340
|
+
var _this = this;
|
|
39341
|
+
this.j.async.requestAnimationFrame(function() {
|
|
39342
|
+
var _this___observer;
|
|
39343
|
+
(_this___observer = _this.__observer) === null || _this___observer === void 0 ? void 0 : _this___observer.disconnect();
|
|
39344
|
+
if (_this.isDestructed || !_this.__fonts.size) {
|
|
39345
|
+
return;
|
|
39346
|
+
}
|
|
39347
|
+
var observer = new IntersectionObserver(function(entries) {
|
|
39348
|
+
var fonts = [];
|
|
39349
|
+
entries.forEach(function(param) {
|
|
39350
|
+
var isIntersecting = param.isIntersecting, target = param.target;
|
|
39351
|
+
var font = _this.__fonts.get(target);
|
|
39352
|
+
if (isIntersecting && font) {
|
|
39353
|
+
fonts.push(font);
|
|
39354
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(target, {
|
|
39355
|
+
fontFamily: _this.__googleFonts.value(font)
|
|
39356
|
+
});
|
|
39357
|
+
observer.unobserve(target);
|
|
39358
|
+
}
|
|
39359
|
+
});
|
|
39360
|
+
_this.__googleFonts.preview(fonts);
|
|
39361
|
+
}, {
|
|
39362
|
+
root: _this.container.parentElement,
|
|
39363
|
+
rootMargin: '0px 0px 400px 0px'
|
|
39364
|
+
});
|
|
39365
|
+
_this.__fonts.forEach(function(_, item) {
|
|
39366
|
+
return observer.observe(item);
|
|
39367
|
+
});
|
|
39368
|
+
_this.__observer = observer;
|
|
39369
|
+
});
|
|
39370
|
+
}
|
|
39371
|
+
},
|
|
39372
|
+
{
|
|
39373
|
+
key: "onMouseDown",
|
|
39374
|
+
value: /**
|
|
39375
|
+
* Keeps the editor's selection, as the toolbar buttons do
|
|
39376
|
+
*/ function onMouseDown(e) {
|
|
39377
|
+
e.preventDefault();
|
|
39378
|
+
}
|
|
39379
|
+
},
|
|
39380
|
+
{
|
|
39381
|
+
key: "onClick",
|
|
39382
|
+
value: function onClick(e) {
|
|
39383
|
+
var _attr;
|
|
39384
|
+
var item = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.up(e.target, function(node) {
|
|
39385
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isHTMLElement(node) && node.hasAttribute('data-value');
|
|
39386
|
+
}, this.container);
|
|
39387
|
+
if (!item) {
|
|
39388
|
+
return;
|
|
39389
|
+
}
|
|
39390
|
+
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
|
|
39391
|
+
inherited = (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(value) === (0,_google_fonts__WEBPACK_IMPORTED_MODULE_18__.firstFamily)(this.__blockFont());
|
|
39392
|
+
font && !inherited && this.__googleFonts.load(font);
|
|
39393
|
+
this.j.execCommand('fontname', false, inherited ? '' : value);
|
|
39394
|
+
this.__close();
|
|
39395
|
+
}
|
|
39396
|
+
},
|
|
39397
|
+
{
|
|
39398
|
+
key: "__blockFont",
|
|
39399
|
+
value: /**
|
|
39400
|
+
* The font the selected text has without a font of its own: its block's
|
|
39401
|
+
*/ function __blockFont() {
|
|
39402
|
+
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);
|
|
39403
|
+
return (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
|
|
39404
|
+
}
|
|
39405
|
+
},
|
|
39406
|
+
{
|
|
39407
|
+
key: "destruct",
|
|
39408
|
+
value: function destruct() {
|
|
39409
|
+
var _this___observer;
|
|
39410
|
+
(_this___observer = this.__observer) === null || _this___observer === void 0 ? void 0 : _this___observer.disconnect();
|
|
39411
|
+
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(UIFontPicker.prototype), "destruct", this).call(this);
|
|
39412
|
+
}
|
|
39413
|
+
}
|
|
39414
|
+
]);
|
|
39415
|
+
return UIFontPicker;
|
|
39416
|
+
}(jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_17__.UIElement);
|
|
39417
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39418
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__.watch)('container:mousedown')
|
|
39419
|
+
], UIFontPicker.prototype, "onMouseDown", null);
|
|
39420
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39421
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_10__.watch)('container:click')
|
|
39422
|
+
], UIFontPicker.prototype, "onClick", null);
|
|
39423
|
+
UIFontPicker = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
39424
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__.component
|
|
39425
|
+
], UIFontPicker);
|
|
39426
|
+
|
|
39427
|
+
|
|
38839
39428
|
/***/ }),
|
|
38840
39429
|
|
|
38841
39430
|
/***/ 50294:
|
|
@@ -38846,6 +39435,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38846
39435
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28077);
|
|
38847
39436
|
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65946);
|
|
38848
39437
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7433);
|
|
39438
|
+
/* harmony import */ var _google_fonts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24939);
|
|
38849
39439
|
/*!
|
|
38850
39440
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38851
39441
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38857,6 +39447,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38857
39447
|
*/
|
|
38858
39448
|
|
|
38859
39449
|
|
|
39450
|
+
|
|
38860
39451
|
/**
|
|
38861
39452
|
* Process commands `fontsize` and `fontname`
|
|
38862
39453
|
*/ function font(editor) {
|
|
@@ -38867,6 +39458,22 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38867
39458
|
name: 'fontsize',
|
|
38868
39459
|
group: 'font'
|
|
38869
39460
|
});
|
|
39461
|
+
if (editor.o.font.googleFonts.url) {
|
|
39462
|
+
var googleFonts = editor.getInstance(_google_fonts__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(function() {
|
|
39463
|
+
return googleFonts.loadUsed();
|
|
39464
|
+
}, editor.defaultTimeout);
|
|
39465
|
+
googleFonts.ready.then(loadUsed);
|
|
39466
|
+
editor.e.on('afterInit afterSetMode change', loadUsed);
|
|
39467
|
+
}
|
|
39468
|
+
// An iframe's stylesheets can arrive after the toolbar first shows the
|
|
39469
|
+
// editor's font
|
|
39470
|
+
editor.e.on('afterInit', function() {
|
|
39471
|
+
editor.iframe && editor.e.on(editor.ed, 'load', function() {
|
|
39472
|
+
return editor.e.fire('updateToolbar');
|
|
39473
|
+
}, {
|
|
39474
|
+
capture: true
|
|
39475
|
+
});
|
|
39476
|
+
});
|
|
38870
39477
|
var callback = function callback(command, second, third) {
|
|
38871
39478
|
switch(command){
|
|
38872
39479
|
case 'fontsize':
|
|
@@ -38896,6 +39503,245 @@ jodit_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.font = (0,_s
|
|
|
38896
39503
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
38897
39504
|
|
|
38898
39505
|
|
|
39506
|
+
/***/ }),
|
|
39507
|
+
|
|
39508
|
+
/***/ 24939:
|
|
39509
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39510
|
+
|
|
39511
|
+
"use strict";
|
|
39512
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39513
|
+
/* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
|
|
39514
|
+
/* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
|
|
39515
|
+
/* harmony export */ });
|
|
39516
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
|
|
39517
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
39518
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
39519
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
39520
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
|
|
39521
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
|
|
39522
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
|
|
39523
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50684);
|
|
39524
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(42395);
|
|
39525
|
+
/* harmony import */ var jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59609);
|
|
39526
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23211);
|
|
39527
|
+
/* harmony import */ var jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17338);
|
|
39528
|
+
/*!
|
|
39529
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39530
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
39531
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
39532
|
+
*/ /**
|
|
39533
|
+
* @module plugins/font
|
|
39534
|
+
*/
|
|
39535
|
+
|
|
39536
|
+
|
|
39537
|
+
|
|
39538
|
+
|
|
39539
|
+
|
|
39540
|
+
|
|
39541
|
+
|
|
39542
|
+
|
|
39543
|
+
|
|
39544
|
+
|
|
39545
|
+
|
|
39546
|
+
var CSS_URL = 'https://fonts.googleapis.com/css2';
|
|
39547
|
+
// `cursive` and `fantasy` stand in badly for a handwriting or display font
|
|
39548
|
+
var GENERIC_FAMILIES = {
|
|
39549
|
+
serif: 'serif',
|
|
39550
|
+
monospace: 'monospace'
|
|
39551
|
+
};
|
|
39552
|
+
var libraries = new Map();
|
|
39553
|
+
/**
|
|
39554
|
+
* The fonts of the library at `url`, fetched once for every editor on the page
|
|
39555
|
+
*/ function library(jodit, url) {
|
|
39556
|
+
var fonts = libraries.get(url);
|
|
39557
|
+
if (!fonts) {
|
|
39558
|
+
var ajax = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__.Ajax({
|
|
39559
|
+
url: url,
|
|
39560
|
+
method: 'GET'
|
|
39561
|
+
}, jodit.o.defaultAjaxOptions);
|
|
39562
|
+
fonts = ajax.send().then(function(response) {
|
|
39563
|
+
return response.json();
|
|
39564
|
+
})// A font without a regular style can't be asked for by its name alone
|
|
39565
|
+
.then(function(param) {
|
|
39566
|
+
var items = param.items;
|
|
39567
|
+
return items.filter(function(font) {
|
|
39568
|
+
return font.variants.includes('regular');
|
|
39569
|
+
});
|
|
39570
|
+
}).catch(function() {
|
|
39571
|
+
libraries.delete(url);
|
|
39572
|
+
return [];
|
|
39573
|
+
}).finally(function() {
|
|
39574
|
+
return ajax.destruct();
|
|
39575
|
+
});
|
|
39576
|
+
libraries.set(url, fonts);
|
|
39577
|
+
}
|
|
39578
|
+
return fonts;
|
|
39579
|
+
}
|
|
39580
|
+
/**
|
|
39581
|
+
* The first family of a `font-family` value, unquoted and in lower case for
|
|
39582
|
+
* comparing
|
|
39583
|
+
*/ function firstFamily(fontFamily) {
|
|
39584
|
+
return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
|
|
39585
|
+
}
|
|
39586
|
+
/**
|
|
39587
|
+
* Loads fonts from Google Fonts: the whole of each font the content uses into
|
|
39588
|
+
* the editor's document, and just the letters of its name for the font list
|
|
39589
|
+
*/ var GoogleFonts = /*#__PURE__*/ function(ViewComponent) {
|
|
39590
|
+
"use strict";
|
|
39591
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(GoogleFonts, ViewComponent);
|
|
39592
|
+
function GoogleFonts(jodit) {
|
|
39593
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, GoogleFonts);
|
|
39594
|
+
var _this;
|
|
39595
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, GoogleFonts, [
|
|
39596
|
+
jodit
|
|
39597
|
+
]), /**
|
|
39598
|
+
* The library by lower-case family, empty until it arrives
|
|
39599
|
+
*/ (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());
|
|
39600
|
+
_this.ready = library(jodit, jodit.o.font.googleFonts.url).then(function(fonts) {
|
|
39601
|
+
fonts.forEach(function(font) {
|
|
39602
|
+
return _this.fonts.set(font.family.toLowerCase(), font);
|
|
39603
|
+
});
|
|
39604
|
+
});
|
|
39605
|
+
return _this;
|
|
39606
|
+
}
|
|
39607
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(GoogleFonts, [
|
|
39608
|
+
{
|
|
39609
|
+
key: "className",
|
|
39610
|
+
value: function className() {
|
|
39611
|
+
return 'GoogleFonts';
|
|
39612
|
+
}
|
|
39613
|
+
},
|
|
39614
|
+
{
|
|
39615
|
+
/**
|
|
39616
|
+
* The library's font named first in a `font-family` value
|
|
39617
|
+
*/ key: "find",
|
|
39618
|
+
value: function find(fontFamily) {
|
|
39619
|
+
return this.fonts.get(firstFamily(fontFamily));
|
|
39620
|
+
}
|
|
39621
|
+
},
|
|
39622
|
+
{
|
|
39623
|
+
/**
|
|
39624
|
+
* The `font-family` value that applies a font
|
|
39625
|
+
*/ key: "value",
|
|
39626
|
+
value: function value(font) {
|
|
39627
|
+
var _GENERIC_FAMILIES_font_category;
|
|
39628
|
+
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');
|
|
39629
|
+
}
|
|
39630
|
+
},
|
|
39631
|
+
{
|
|
39632
|
+
/**
|
|
39633
|
+
* Loads the regular, italic, bold and bold italic styles that a font has
|
|
39634
|
+
* into the editor's document
|
|
39635
|
+
*/ key: "load",
|
|
39636
|
+
value: function load(font) {
|
|
39637
|
+
var loaded = this.__loadedInto(this.j.ed);
|
|
39638
|
+
if (loaded.has(font.family)) {
|
|
39639
|
+
return;
|
|
39640
|
+
}
|
|
39641
|
+
loaded.add(font.family);
|
|
39642
|
+
var styles = [
|
|
39643
|
+
[
|
|
39644
|
+
'regular',
|
|
39645
|
+
'0,400'
|
|
39646
|
+
],
|
|
39647
|
+
[
|
|
39648
|
+
'700',
|
|
39649
|
+
'0,700'
|
|
39650
|
+
],
|
|
39651
|
+
[
|
|
39652
|
+
'italic',
|
|
39653
|
+
'1,400'
|
|
39654
|
+
],
|
|
39655
|
+
[
|
|
39656
|
+
'700italic',
|
|
39657
|
+
'1,700'
|
|
39658
|
+
]
|
|
39659
|
+
].filter(function(param) {
|
|
39660
|
+
var _param = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(param, 1), variant = _param[0];
|
|
39661
|
+
return font.variants.includes(variant);
|
|
39662
|
+
}).map(function(param) {
|
|
39663
|
+
var _param = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(param, 2), style = _param[1];
|
|
39664
|
+
return style;
|
|
39665
|
+
});
|
|
39666
|
+
this.__append(this.j.ed, "family=".concat(this.__family(font), ":ital,wght@").concat(styles.join(';')));
|
|
39667
|
+
}
|
|
39668
|
+
},
|
|
39669
|
+
{
|
|
39670
|
+
/**
|
|
39671
|
+
* Loads every font of the library that the content uses
|
|
39672
|
+
*/ key: "loadUsed",
|
|
39673
|
+
value: function loadUsed() {
|
|
39674
|
+
var _this = this;
|
|
39675
|
+
this.j.editor.querySelectorAll('[style*="font-family"]').forEach(function(element) {
|
|
39676
|
+
var font = _this.find(element.style.fontFamily);
|
|
39677
|
+
font && _this.load(font);
|
|
39678
|
+
});
|
|
39679
|
+
}
|
|
39680
|
+
},
|
|
39681
|
+
{
|
|
39682
|
+
/**
|
|
39683
|
+
* Loads into the page just the letters of each font's name, so the font
|
|
39684
|
+
* list can show the name in its font
|
|
39685
|
+
*/ key: "preview",
|
|
39686
|
+
value: function preview(fonts) {
|
|
39687
|
+
var _this = this;
|
|
39688
|
+
var loaded = this.__loadedInto(this.j.od);
|
|
39689
|
+
fonts = fonts.filter(function(font) {
|
|
39690
|
+
return !_this.__previewed.has(font.family) && !loaded.has(font.family);
|
|
39691
|
+
});
|
|
39692
|
+
if (!fonts.length) {
|
|
39693
|
+
return;
|
|
39694
|
+
}
|
|
39695
|
+
fonts.forEach(function(font) {
|
|
39696
|
+
return _this.__previewed.add(font.family);
|
|
39697
|
+
});
|
|
39698
|
+
var families = fonts.map(function(font) {
|
|
39699
|
+
return "family=".concat(_this.__family(font));
|
|
39700
|
+
}), letters = new Set(fonts.map(function(font) {
|
|
39701
|
+
return font.family;
|
|
39702
|
+
}).join(''));
|
|
39703
|
+
this.__append(this.j.od, "".concat(families.join('&'), "&text=").concat(encodeURIComponent((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__._)(letters).join(''))));
|
|
39704
|
+
}
|
|
39705
|
+
},
|
|
39706
|
+
{
|
|
39707
|
+
key: "__loadedInto",
|
|
39708
|
+
value: function __loadedInto(doc) {
|
|
39709
|
+
var _this___loaded_get;
|
|
39710
|
+
var loaded = (_this___loaded_get = this.__loaded.get(doc)) !== null && _this___loaded_get !== void 0 ? _this___loaded_get : new Set();
|
|
39711
|
+
this.__loaded.set(doc, loaded);
|
|
39712
|
+
return loaded;
|
|
39713
|
+
}
|
|
39714
|
+
},
|
|
39715
|
+
{
|
|
39716
|
+
key: "__family",
|
|
39717
|
+
value: function __family(font) {
|
|
39718
|
+
return encodeURIComponent(font.family).replace(/%20/g, '+');
|
|
39719
|
+
}
|
|
39720
|
+
},
|
|
39721
|
+
{
|
|
39722
|
+
key: "__append",
|
|
39723
|
+
value: function __append(doc, query) {
|
|
39724
|
+
var link = doc.createElement('link');
|
|
39725
|
+
link.rel = 'stylesheet';
|
|
39726
|
+
link.href = "".concat(CSS_URL, "?").concat(query, "&display=swap");
|
|
39727
|
+
doc.head.appendChild(link);
|
|
39728
|
+
this.__links.push(link);
|
|
39729
|
+
}
|
|
39730
|
+
},
|
|
39731
|
+
{
|
|
39732
|
+
key: "destruct",
|
|
39733
|
+
value: function destruct() {
|
|
39734
|
+
this.__links.forEach(function(link) {
|
|
39735
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(link);
|
|
39736
|
+
});
|
|
39737
|
+
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(GoogleFonts.prototype), "destruct", this).call(this);
|
|
39738
|
+
}
|
|
39739
|
+
}
|
|
39740
|
+
]);
|
|
39741
|
+
return GoogleFonts;
|
|
39742
|
+
}(jodit_core_component_view_component__WEBPACK_IMPORTED_MODULE_9__.ViewComponent);
|
|
39743
|
+
|
|
39744
|
+
|
|
38899
39745
|
/***/ }),
|
|
38900
39746
|
|
|
38901
39747
|
/***/ 96863:
|
|
@@ -40398,12 +41244,13 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40398
41244
|
/* harmony export */ });
|
|
40399
41245
|
/* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49376);
|
|
40400
41246
|
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3233);
|
|
40401
|
-
/* harmony import */ var
|
|
40402
|
-
/* harmony import */ var
|
|
40403
|
-
/* harmony import */ var
|
|
40404
|
-
/* harmony import */ var
|
|
40405
|
-
/* harmony import */ var
|
|
40406
|
-
/* harmony import */ var
|
|
41247
|
+
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16849);
|
|
41248
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
41249
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
41250
|
+
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26633);
|
|
41251
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79310);
|
|
41252
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18380);
|
|
41253
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(57339);
|
|
40407
41254
|
/*!
|
|
40408
41255
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
40409
41256
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -40418,6 +41265,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40418
41265
|
|
|
40419
41266
|
|
|
40420
41267
|
|
|
41268
|
+
|
|
40421
41269
|
/**
|
|
40422
41270
|
* Read values from image and set it to state
|
|
40423
41271
|
* @private
|
|
@@ -40426,29 +41274,29 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imagePropertie
|
|
|
40426
41274
|
var image, values;
|
|
40427
41275
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_1__._)(this, function(_state) {
|
|
40428
41276
|
image = state.sourceImage, values = state.values;
|
|
40429
|
-
(0,
|
|
41277
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_5__.readAlign)(image, values, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(j, image));
|
|
40430
41278
|
// Border radius
|
|
40431
|
-
values.borderRadius = parseInt((0,
|
|
41279
|
+
values.borderRadius = parseInt((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
40432
41280
|
// Id
|
|
40433
|
-
values.id = (0,
|
|
41281
|
+
values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'id') || '';
|
|
40434
41282
|
// Title
|
|
40435
|
-
values.imageTitle = (0,
|
|
41283
|
+
values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'title') || '';
|
|
40436
41284
|
// Alt
|
|
40437
|
-
values.imageAlt = (0,
|
|
41285
|
+
values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'alt') || '';
|
|
40438
41286
|
// Style
|
|
40439
|
-
values.style = (0,
|
|
41287
|
+
values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'style') || '';
|
|
40440
41288
|
// Classes
|
|
40441
|
-
values.classes = ((0,
|
|
41289
|
+
values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
40442
41290
|
// Margins
|
|
40443
|
-
(0,
|
|
41291
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_7__.readMargins)(image, values, state);
|
|
40444
41292
|
// Link
|
|
40445
|
-
(0,
|
|
41293
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_6__.readLink)(state, j, values);
|
|
40446
41294
|
// Src
|
|
40447
|
-
values.imageSrc = (0,
|
|
41295
|
+
values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'src') || '';
|
|
40448
41296
|
// Image size
|
|
40449
41297
|
return [
|
|
40450
41298
|
2,
|
|
40451
|
-
(0,
|
|
41299
|
+
(0,_size__WEBPACK_IMPORTED_MODULE_8__.readSizes)(image, values, state)
|
|
40452
41300
|
];
|
|
40453
41301
|
});
|
|
40454
41302
|
})();
|
|
@@ -41674,7 +42522,7 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41674
42522
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41675
42523
|
}
|
|
41676
42524
|
if (opt.image.editAlign) {
|
|
41677
|
-
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align,
|
|
42525
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
|
|
41678
42526
|
}
|
|
41679
42527
|
}
|
|
41680
42528
|
|
|
@@ -42548,6 +43396,7 @@ var cmd = function cmd(control) {
|
|
|
42548
43396
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85932);
|
|
42549
43397
|
/* harmony import */ var jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16849);
|
|
42550
43398
|
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80991);
|
|
43399
|
+
/* harmony import */ var jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83314);
|
|
42551
43400
|
/*!
|
|
42552
43401
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42553
43402
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42559,11 +43408,7 @@ var cmd = function cmd(control) {
|
|
|
42559
43408
|
|
|
42560
43409
|
|
|
42561
43410
|
|
|
42562
|
-
|
|
42563
|
-
// keep inline styles
|
|
42564
|
-
var alignClasses = function alignClasses(editor, elm) {
|
|
42565
|
-
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42566
|
-
};
|
|
43411
|
+
|
|
42567
43412
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
42568
43413
|
var lineAlign = function lineAlign(editor, elm) {
|
|
42569
43414
|
var block = elm && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(elm, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor) || editor.editor;
|
|
@@ -42585,7 +43430,7 @@ var lineAlign = function lineAlign(editor, elm) {
|
|
|
42585
43430
|
}
|
|
42586
43431
|
};
|
|
42587
43432
|
var currentAlign = function currentAlign(editor, elm) {
|
|
42588
|
-
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm,
|
|
43433
|
+
return elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getHAlign)(elm, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, elm)) : 'normal';
|
|
42589
43434
|
};
|
|
42590
43435
|
var align = {
|
|
42591
43436
|
name: 'left',
|
|
@@ -42612,23 +43457,25 @@ var align = {
|
|
|
42612
43457
|
},
|
|
42613
43458
|
exec: function exec(editor, elm, param) {
|
|
42614
43459
|
var control = param.control;
|
|
42615
|
-
|
|
43460
|
+
// A media wrapper kept in the content (`mediaWrappers`) is aligned itself
|
|
43461
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(elm) || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42616
43462
|
'img',
|
|
42617
43463
|
'jodit',
|
|
42618
43464
|
'jodit-media'
|
|
42619
|
-
]))) {
|
|
43465
|
+
])) && (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
|
|
42620
43466
|
return;
|
|
42621
43467
|
}
|
|
42622
43468
|
var command = control.args && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42623
43469
|
if (!command) {
|
|
42624
43470
|
return false;
|
|
42625
43471
|
}
|
|
42626
|
-
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command,
|
|
43472
|
+
;(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(elm, command, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, elm));
|
|
42627
43473
|
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(elm, new Set([
|
|
42628
43474
|
'jodit',
|
|
42629
43475
|
'jodit-media'
|
|
42630
43476
|
])) && elm.firstElementChild) {
|
|
42631
|
-
|
|
43477
|
+
var media = elm.firstElementChild;
|
|
43478
|
+
(0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.hAlignElement)(media, command, (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_3__.getAlignClasses)(editor, media));
|
|
42632
43479
|
}
|
|
42633
43480
|
editor.synchronizeValues();
|
|
42634
43481
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -42741,17 +43588,18 @@ var align = {
|
|
|
42741
43588
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
42742
43589
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
42743
43590
|
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
|
|
42744
|
-
/* harmony import */ var
|
|
42745
|
-
/* harmony import */ var
|
|
42746
|
-
/* harmony import */ var
|
|
42747
|
-
/* harmony import */ var
|
|
42748
|
-
/* harmony import */ var
|
|
42749
|
-
/* harmony import */ var
|
|
42750
|
-
/* harmony import */ var
|
|
42751
|
-
/* harmony import */ var
|
|
42752
|
-
/* harmony import */ var
|
|
42753
|
-
/* harmony import */ var
|
|
42754
|
-
/* harmony import */ var
|
|
43591
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42395);
|
|
43592
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
|
|
43593
|
+
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38574);
|
|
43594
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84839);
|
|
43595
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27795);
|
|
43596
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28077);
|
|
43597
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65946);
|
|
43598
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91206);
|
|
43599
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4099);
|
|
43600
|
+
/* harmony import */ var jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(56490);
|
|
43601
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4274);
|
|
43602
|
+
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(89873);
|
|
42755
43603
|
/*!
|
|
42756
43604
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42757
43605
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42777,6 +43625,7 @@ var align = {
|
|
|
42777
43625
|
|
|
42778
43626
|
|
|
42779
43627
|
|
|
43628
|
+
|
|
42780
43629
|
/**
|
|
42781
43630
|
* Plugin for show inline popup dialog
|
|
42782
43631
|
*/ var inlinePopup = /*#__PURE__*/ function(Plugin) {
|
|
@@ -42789,7 +43638,7 @@ var align = {
|
|
|
42789
43638
|
* The user pressed a button inside the selection toolbar — after the
|
|
42790
43639
|
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
42791
43640
|
* while the selection is still there. See #1238
|
|
42792
|
-
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "elmsList", (0,
|
|
43641
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "elmsList", (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.keys)(_this.j.o.popup, false).filter(function(s) {
|
|
42793
43642
|
return !_this.isExcludedTarget(s);
|
|
42794
43643
|
}));
|
|
42795
43644
|
return _this;
|
|
@@ -42798,24 +43647,26 @@ var align = {
|
|
|
42798
43647
|
{
|
|
42799
43648
|
key: "popup",
|
|
42800
43649
|
get: function get() {
|
|
42801
|
-
return new
|
|
43650
|
+
return new jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup(this.jodit, false);
|
|
42802
43651
|
}
|
|
42803
43652
|
},
|
|
42804
43653
|
{
|
|
42805
43654
|
key: "toolbar",
|
|
42806
43655
|
get: function get() {
|
|
42807
|
-
return (0,
|
|
43656
|
+
return (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_15__.makeCollection)(this.jodit, this.popup);
|
|
42808
43657
|
}
|
|
42809
43658
|
},
|
|
42810
43659
|
{
|
|
42811
43660
|
key: "onClick",
|
|
42812
43661
|
value: function onClick(node) {
|
|
42813
43662
|
var _this = this;
|
|
42814
|
-
var elements = this.elmsList, target =
|
|
42815
|
-
|
|
43663
|
+
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);
|
|
43664
|
+
// A media wrapper kept in the content gets the media popup
|
|
43665
|
+
var type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
|
|
43666
|
+
if (target && type && this.canShowPopupForType(type)) {
|
|
42816
43667
|
this.showPopup(function() {
|
|
42817
|
-
return (0,
|
|
42818
|
-
},
|
|
43668
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(target, _this.j);
|
|
43669
|
+
}, type, target);
|
|
42819
43670
|
return false;
|
|
42820
43671
|
}
|
|
42821
43672
|
}
|
|
@@ -42835,15 +43686,15 @@ var align = {
|
|
|
42835
43686
|
this.previousTarget = target;
|
|
42836
43687
|
var data = this.j.o.popup[type];
|
|
42837
43688
|
var content;
|
|
42838
|
-
if ((0,
|
|
43689
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isFunction)(data)) {
|
|
42839
43690
|
content = data(this.j, target, this.popup.close);
|
|
42840
43691
|
} else {
|
|
42841
43692
|
content = data;
|
|
42842
43693
|
}
|
|
42843
|
-
if ((0,
|
|
43694
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isArray)(content)) {
|
|
42844
43695
|
var disabled = this.j.o.toolbarInlineDisabledButtons;
|
|
42845
43696
|
this.toolbar.build(disabled.length ? content.filter(function(item) {
|
|
42846
|
-
var name = (0,
|
|
43697
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42847
43698
|
return !disabled.includes(name !== null && name !== void 0 ? name : '');
|
|
42848
43699
|
}) : content, target);
|
|
42849
43700
|
this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
|
|
@@ -42861,7 +43712,7 @@ var align = {
|
|
|
42861
43712
|
value: /**
|
|
42862
43713
|
* Hide opened popup
|
|
42863
43714
|
*/ function hidePopup(type) {
|
|
42864
|
-
if (this.popup.isOpened && (!(0,
|
|
43715
|
+
if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(type) || type === this.type)) {
|
|
42865
43716
|
this.popup.close();
|
|
42866
43717
|
}
|
|
42867
43718
|
}
|
|
@@ -42889,7 +43740,7 @@ var align = {
|
|
|
42889
43740
|
value: /**
|
|
42890
43741
|
* For some elements do not show popup
|
|
42891
43742
|
*/ function isExcludedTarget(type) {
|
|
42892
|
-
return (0,
|
|
43743
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.splitArray)(this.j.o.toolbarInlineDisableFor).map(function(a) {
|
|
42893
43744
|
return a.toLowerCase();
|
|
42894
43745
|
}).includes(type.toLowerCase());
|
|
42895
43746
|
}
|
|
@@ -42901,15 +43752,15 @@ var align = {
|
|
|
42901
43752
|
this.j.e.on('getDiffButtons.mobile', function(toolbar) {
|
|
42902
43753
|
if (_this.toolbar === toolbar) {
|
|
42903
43754
|
var names = _this.toolbar.getButtonsNames();
|
|
42904
|
-
return (0,
|
|
43755
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.toArray)(jodit.registeredButtons).filter(function(btn) {
|
|
42905
43756
|
return !_this.j.o.toolbarInlineDisabledButtons.includes(btn.name);
|
|
42906
43757
|
}).filter(function(item) {
|
|
42907
|
-
var name = (0,
|
|
43758
|
+
var name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(item) ? item : item.name;
|
|
42908
43759
|
return name && name !== '|' && name !== '\n' && !names.includes(name);
|
|
42909
43760
|
});
|
|
42910
43761
|
}
|
|
42911
43762
|
}).on('hidePopup', this.hidePopup).on('showInlineToolbar', this.showInlineToolbar).on('showPopup', function(elm, rect, type) {
|
|
42912
|
-
_this.showPopup(rect, type || ((0,
|
|
43763
|
+
_this.showPopup(rect, type || ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? elm : elm.nodeName), (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? undefined : elm);
|
|
42913
43764
|
}).on('mousedown keydown', this.onSelectionStart).on('change', function() {
|
|
42914
43765
|
if (_this.popup.isOpened && _this.previousTarget && !_this.previousTarget.parentNode) {
|
|
42915
43766
|
_this.hidePopup();
|
|
@@ -42928,7 +43779,7 @@ var align = {
|
|
|
42928
43779
|
{
|
|
42929
43780
|
key: "__onDocumentMouseDown",
|
|
42930
43781
|
value: function __onDocumentMouseDown(e) {
|
|
42931
|
-
if (this.popup.isOpened && this.type === 'selection' && e.target &&
|
|
43782
|
+
if (this.popup.isOpened && this.type === 'selection' && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup)) {
|
|
42932
43783
|
this.__reopenSelectionPopup = true;
|
|
42933
43784
|
}
|
|
42934
43785
|
}
|
|
@@ -42967,7 +43818,7 @@ var align = {
|
|
|
42967
43818
|
var rect = this.j.s.range.getBoundingClientRect();
|
|
42968
43819
|
var left = rect.left, top = rect.top;
|
|
42969
43820
|
if (this.j.iframe) {
|
|
42970
|
-
var offset = (0,
|
|
43821
|
+
var offset = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.position)(this.j.iframe, this.j, true);
|
|
42971
43822
|
left += offset.left;
|
|
42972
43823
|
top += offset.top;
|
|
42973
43824
|
}
|
|
@@ -42988,7 +43839,7 @@ var align = {
|
|
|
42988
43839
|
{
|
|
42989
43840
|
key: "onSelectionEnd",
|
|
42990
43841
|
value: function onSelectionEnd(e) {
|
|
42991
|
-
if (e && e.target &&
|
|
43842
|
+
if (e && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_14__.Popup)) {
|
|
42992
43843
|
return;
|
|
42993
43844
|
}
|
|
42994
43845
|
var snapRange = this.snapRange, range = this.j.s.range;
|
|
@@ -43030,7 +43881,7 @@ var align = {
|
|
|
43030
43881
|
* In not collapsed selection - only one image
|
|
43031
43882
|
*/ function isSelectedTarget(r) {
|
|
43032
43883
|
var sc = r.startContainer;
|
|
43033
|
-
return
|
|
43884
|
+
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isElement(sc) && sc === r.endContainer && jodit_core_dom__WEBPACK_IMPORTED_MODULE_9__.Dom.isTag(sc.childNodes[r.startOffset], new Set((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.keys)(this.j.o.popup, false))) && r.startOffset === r.endOffset - 1;
|
|
43034
43885
|
}
|
|
43035
43886
|
},
|
|
43036
43887
|
{
|
|
@@ -43054,11 +43905,17 @@ var align = {
|
|
|
43054
43905
|
{
|
|
43055
43906
|
key: "_eventsList",
|
|
43056
43907
|
value: function _eventsList() {
|
|
43057
|
-
var
|
|
43908
|
+
var _this_j_o_mediaWrappers;
|
|
43909
|
+
// Clicks on a media wrapper kept in the content (`mediaWrappers`)
|
|
43910
|
+
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) {
|
|
43911
|
+
var tag = param.tag;
|
|
43912
|
+
return tag.toLowerCase();
|
|
43913
|
+
});
|
|
43914
|
+
var el = (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_5__._)(new Set(this.elmsList.concat(wrapperTags)));
|
|
43058
43915
|
return el.map(function(e) {
|
|
43059
|
-
return (0,
|
|
43916
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("click_".concat(e));
|
|
43060
43917
|
}).concat(el.map(function(e) {
|
|
43061
|
-
return (0,
|
|
43918
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.camelCase)("touchstart_".concat(e));
|
|
43062
43919
|
})).join(' ');
|
|
43063
43920
|
}
|
|
43064
43921
|
},
|
|
@@ -43091,56 +43948,56 @@ var align = {
|
|
|
43091
43948
|
}
|
|
43092
43949
|
]);
|
|
43093
43950
|
return inlinePopup;
|
|
43094
|
-
}((0,
|
|
43951
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin));
|
|
43095
43952
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(inlinePopup, "requires", [
|
|
43096
43953
|
'select'
|
|
43097
43954
|
]);
|
|
43098
|
-
(0,
|
|
43099
|
-
|
|
43955
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43956
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43100
43957
|
], inlinePopup.prototype, "popup", null);
|
|
43101
|
-
(0,
|
|
43102
|
-
|
|
43958
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43959
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.cache
|
|
43103
43960
|
], inlinePopup.prototype, "toolbar", null);
|
|
43104
|
-
(0,
|
|
43105
|
-
|
|
43961
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43962
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43106
43963
|
], inlinePopup.prototype, "onClick", null);
|
|
43107
|
-
(0,
|
|
43108
|
-
(0,
|
|
43964
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43965
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.wait)(function(ctx) {
|
|
43109
43966
|
return !ctx.j.isLocked;
|
|
43110
43967
|
})
|
|
43111
43968
|
], inlinePopup.prototype, "showPopup", null);
|
|
43112
|
-
(0,
|
|
43113
|
-
(0,
|
|
43969
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43970
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)([
|
|
43114
43971
|
':clickEditor',
|
|
43115
43972
|
':beforeCommandDelete',
|
|
43116
43973
|
':backSpaceAfterDelete'
|
|
43117
43974
|
]),
|
|
43118
|
-
|
|
43975
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43119
43976
|
], inlinePopup.prototype, "hidePopup", null);
|
|
43120
|
-
(0,
|
|
43121
|
-
(0,
|
|
43977
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43978
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)(':outsideClick')
|
|
43122
43979
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
43123
|
-
(0,
|
|
43124
|
-
|
|
43980
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43981
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43125
43982
|
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
43126
|
-
(0,
|
|
43127
|
-
|
|
43983
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43984
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43128
43985
|
], inlinePopup.prototype, "__onCloseAllPopups", null);
|
|
43129
|
-
(0,
|
|
43130
|
-
|
|
43986
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43987
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43131
43988
|
], inlinePopup.prototype, "onSelectionStart", null);
|
|
43132
|
-
(0,
|
|
43133
|
-
|
|
43989
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43990
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43134
43991
|
], inlinePopup.prototype, "onSelectionEnd", null);
|
|
43135
|
-
(0,
|
|
43136
|
-
(0,
|
|
43992
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43993
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.debounce)(function(ctx) {
|
|
43137
43994
|
return ctx.defaultTimeout;
|
|
43138
43995
|
})
|
|
43139
43996
|
], inlinePopup.prototype, "onSelectionChange", null);
|
|
43140
|
-
(0,
|
|
43141
|
-
|
|
43997
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
43998
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
43142
43999
|
], inlinePopup.prototype, "showInlineToolbar", null);
|
|
43143
|
-
|
|
44000
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_10__.pluginSystem.add('inlinePopup', inlinePopup);
|
|
43144
44001
|
|
|
43145
44002
|
|
|
43146
44003
|
/***/ }),
|
|
@@ -44761,6 +45618,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44761
45618
|
'video',
|
|
44762
45619
|
'audio'
|
|
44763
45620
|
];
|
|
45621
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
44764
45622
|
|
|
44765
45623
|
|
|
44766
45624
|
/***/ }),
|
|
@@ -44796,11 +45654,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44796
45654
|
* Process `video` and `audio`
|
|
44797
45655
|
*/ function media(editor) {
|
|
44798
45656
|
var keyFake = 'jodit_fake_wrapper';
|
|
44799
|
-
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock;
|
|
45657
|
+
var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock, mediaWrappers = _editor_options.mediaWrappers;
|
|
44800
45658
|
var wrap = function wrap(element) {
|
|
44801
45659
|
if (element.parentNode && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
44802
45660
|
element = element.parentNode;
|
|
44803
|
-
} else {
|
|
45661
|
+
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
45662
|
+
var _getMediaWrapper;
|
|
45663
|
+
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);
|
|
45664
|
+
} else if (mediaInFakeBlock) {
|
|
44804
45665
|
var wrapper = editor.createInside.element(mediaFakeTag, (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)({
|
|
44805
45666
|
'data-jodit-temp': 1,
|
|
44806
45667
|
contenteditable: false,
|
|
@@ -44817,12 +45678,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44817
45678
|
}
|
|
44818
45679
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, element);
|
|
44819
45680
|
element = wrapper;
|
|
45681
|
+
} else {
|
|
45682
|
+
return;
|
|
44820
45683
|
}
|
|
44821
45684
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', function() {
|
|
44822
45685
|
editor.s.setCursorAfter(element);
|
|
44823
45686
|
});
|
|
44824
45687
|
};
|
|
44825
|
-
if (mediaInFakeBlock) {
|
|
45688
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
44826
45689
|
editor.e.on('afterGetValueFromEditor', function(data) {
|
|
44827
45690
|
var rxp = new RegExp("<".concat(mediaFakeTag, "[^>]+data-").concat(keyFake, "[^>]+>([^]+?)</").concat(mediaFakeTag, ">"), 'ig');
|
|
44828
45691
|
if (rxp.test(data.value)) {
|
|
@@ -54059,16 +54922,34 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('toolbarNavigat
|
|
|
54059
54922
|
|
|
54060
54923
|
|
|
54061
54924
|
|
|
54925
|
+
// Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
|
|
54926
|
+
// with `mediaDefaultAlign`
|
|
54927
|
+
function prepareMedia(jodit, element) {
|
|
54928
|
+
var media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
|
|
54929
|
+
var mediaDefaultAlign = jodit.o.mediaDefaultAlign;
|
|
54930
|
+
if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
|
|
54931
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
|
|
54932
|
+
}
|
|
54933
|
+
return media;
|
|
54934
|
+
}
|
|
54062
54935
|
function insertVideos(data) {
|
|
54063
54936
|
var _this = this;
|
|
54064
54937
|
var _data_files;
|
|
54065
54938
|
(_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach(function(file) {
|
|
54066
|
-
_this.s.insertNode(_this.createInside.element('video', {
|
|
54939
|
+
_this.s.insertNode(prepareMedia(_this, _this.createInside.element('video', {
|
|
54067
54940
|
controls: '',
|
|
54068
54941
|
src: data.baseurl + file
|
|
54069
|
-
}));
|
|
54942
|
+
})));
|
|
54070
54943
|
});
|
|
54071
54944
|
}
|
|
54945
|
+
// Embed code that is one element is prepared as media; other code goes in as
|
|
54946
|
+
// it is
|
|
54947
|
+
function prepareEmbedCode(jodit, code) {
|
|
54948
|
+
var box = jodit.createInside.div();
|
|
54949
|
+
box.innerHTML = code.trim();
|
|
54950
|
+
var element = box.firstElementChild;
|
|
54951
|
+
return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
|
|
54952
|
+
}
|
|
54072
54953
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
54073
54954
|
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
54074
54955
|
defaultWidth: 400,
|
|
@@ -54110,7 +54991,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
54110
54991
|
])
|
|
54111
54992
|
]), tabs = [], insertCode = function insertCode(code) {
|
|
54112
54993
|
jodit.s.restore();
|
|
54113
|
-
jodit.s.insertHTML(code);
|
|
54994
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
54114
54995
|
close();
|
|
54115
54996
|
};
|
|
54116
54997
|
jodit.s.save();
|