jodit 4.18.3 → 4.18.4
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 +60 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +35 -10
- package/es2015/jodit.js +968 -152
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +41 -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 +33 -8
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +33 -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 +60 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +36 -11
- package/es2021/jodit.js +958 -150
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +36 -11
- 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 +60 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +36 -11
- package/es2021.en/jodit.js +932 -124
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +51 -26
- 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 +76 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1103 -155
- 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 +25 -26
- package/esm/config.js +19 -21
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +1 -1
- package/esm/core/helpers/utils/align.js +2 -3
- package/esm/jodit.js +14 -4
- package/esm/langs/ar.d.ts +7 -0
- package/esm/langs/ar.js +8 -1
- package/esm/langs/az.d.ts +7 -0
- package/esm/langs/az.js +8 -1
- package/esm/langs/cs_cz.d.ts +7 -0
- package/esm/langs/cs_cz.js +9 -1
- package/esm/langs/de.d.ts +7 -0
- package/esm/langs/de.js +8 -1
- package/esm/langs/es.d.ts +7 -0
- package/esm/langs/es.js +8 -1
- package/esm/langs/fa.d.ts +7 -0
- package/esm/langs/fa.js +8 -1
- package/esm/langs/fi.d.ts +7 -0
- package/esm/langs/fi.js +8 -1
- package/esm/langs/fr.d.ts +7 -0
- package/esm/langs/fr.js +8 -1
- package/esm/langs/he.d.ts +7 -0
- package/esm/langs/he.js +8 -1
- package/esm/langs/hu.d.ts +7 -0
- package/esm/langs/hu.js +8 -1
- package/esm/langs/id.d.ts +7 -0
- package/esm/langs/id.js +8 -1
- package/esm/langs/it.d.ts +7 -0
- package/esm/langs/it.js +8 -1
- package/esm/langs/ja.d.ts +7 -0
- package/esm/langs/ja.js +8 -1
- package/esm/langs/ko.d.ts +7 -0
- package/esm/langs/ko.js +8 -1
- package/esm/langs/mn.d.ts +7 -0
- package/esm/langs/mn.js +8 -1
- package/esm/langs/nl.d.ts +7 -0
- package/esm/langs/nl.js +8 -1
- package/esm/langs/no.d.ts +7 -0
- package/esm/langs/no.js +8 -1
- package/esm/langs/pl.d.ts +7 -0
- package/esm/langs/pl.js +8 -1
- package/esm/langs/pt_br.d.ts +7 -0
- package/esm/langs/pt_br.js +8 -1
- package/esm/langs/ru.d.ts +7 -0
- package/esm/langs/ru.js +8 -1
- package/esm/langs/sk.d.ts +7 -0
- package/esm/langs/sk.js +8 -1
- package/esm/langs/sv.d.ts +7 -0
- package/esm/langs/sv.js +8 -1
- package/esm/langs/tr.d.ts +7 -0
- package/esm/langs/tr.js +8 -1
- package/esm/langs/ua.d.ts +7 -0
- package/esm/langs/ua.js +8 -1
- package/esm/langs/zh_cn.d.ts +7 -0
- package/esm/langs/zh_cn.js +8 -1
- package/esm/langs/zh_tw.d.ts +7 -0
- package/esm/langs/zh_tw.js +8 -1
- package/esm/plugins/all.d.ts +1 -0
- package/esm/plugins/all.js +1 -0
- package/esm/plugins/image-processor/image-processor.d.ts +4 -1
- package/esm/plugins/image-processor/image-processor.js +9 -3
- package/esm/plugins/image-properties/readers/align.d.ts +2 -2
- package/esm/plugins/index.d.ts +1 -0
- package/esm/plugins/inline-popup/config/items/iframe.d.ts +9 -1
- package/esm/plugins/inline-popup/config/items/iframe.js +15 -0
- package/esm/plugins/media/media.js +16 -7
- package/esm/plugins/resizer/config.d.ts +5 -3
- package/esm/plugins/resizer/config.js +8 -2
- package/esm/plugins/resizer/resizer.d.ts +10 -0
- package/esm/plugins/resizer/resizer.js +64 -15
- package/esm/plugins/video/config.d.ts +6 -0
- package/esm/plugins/video/config.js +77 -65
- package/esm/plugins/video-properties/interface.d.ts +31 -0
- package/esm/plugins/video-properties/interface.js +6 -0
- package/esm/plugins/video-properties/readers.d.ts +26 -0
- package/esm/plugins/video-properties/readers.js +65 -0
- package/esm/plugins/video-properties/replace.d.ts +15 -0
- package/esm/plugins/video-properties/replace.js +97 -0
- package/esm/plugins/video-properties/ui/ui-video-form.d.ts +41 -0
- package/esm/plugins/video-properties/ui/ui-video-form.js +228 -0
- package/esm/plugins/video-properties/video-properties.d.ts +37 -0
- package/esm/plugins/video-properties/video-properties.js +175 -0
- package/esm/plugins/video-properties/writers.d.ts +15 -0
- package/esm/plugins/video-properties/writers.js +73 -0
- package/esm/types/types.d.ts +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +25 -26
- package/types/core/helpers/utils/align.d.ts +1 -1
- package/types/langs/ar.d.ts +7 -0
- package/types/langs/az.d.ts +7 -0
- package/types/langs/cs_cz.d.ts +7 -0
- package/types/langs/de.d.ts +7 -0
- package/types/langs/es.d.ts +7 -0
- package/types/langs/fa.d.ts +7 -0
- package/types/langs/fi.d.ts +7 -0
- package/types/langs/fr.d.ts +7 -0
- package/types/langs/he.d.ts +7 -0
- package/types/langs/hu.d.ts +7 -0
- package/types/langs/id.d.ts +7 -0
- package/types/langs/it.d.ts +7 -0
- package/types/langs/ja.d.ts +7 -0
- package/types/langs/ko.d.ts +7 -0
- package/types/langs/mn.d.ts +7 -0
- package/types/langs/nl.d.ts +7 -0
- package/types/langs/no.d.ts +7 -0
- package/types/langs/pl.d.ts +7 -0
- package/types/langs/pt_br.d.ts +7 -0
- package/types/langs/ru.d.ts +7 -0
- package/types/langs/sk.d.ts +7 -0
- package/types/langs/sv.d.ts +7 -0
- package/types/langs/tr.d.ts +7 -0
- package/types/langs/ua.d.ts +7 -0
- package/types/langs/zh_cn.d.ts +7 -0
- package/types/langs/zh_tw.d.ts +7 -0
- package/types/plugins/image-processor/image-processor.d.ts +4 -1
- package/types/plugins/image-properties/readers/align.d.ts +2 -2
- package/types/plugins/index.d.ts +1 -0
- package/types/plugins/inline-popup/config/items/iframe.d.ts +9 -1
- package/types/plugins/resizer/config.d.ts +5 -3
- package/types/plugins/resizer/resizer.d.ts +10 -0
- package/types/plugins/video/config.d.ts +6 -0
- package/types/plugins/video-properties/interface.d.ts +31 -0
- package/types/plugins/video-properties/readers.d.ts +26 -0
- package/types/plugins/video-properties/replace.d.ts +15 -0
- package/types/plugins/video-properties/ui/ui-video-form.d.ts +41 -0
- package/types/plugins/video-properties/video-properties.d.ts +37 -0
- package/types/plugins/video-properties/writers.d.ts +15 -0
- package/types/types/types.d.ts +1 -1
package/es2021.en/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.18.
|
|
4
|
+
* Version: v4.18.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -733,28 +733,18 @@ let ConfigPrototype = {};
|
|
|
733
733
|
* them unaligned
|
|
734
734
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "imageDefaultAlign", 'normal');
|
|
735
735
|
/**
|
|
736
|
-
*
|
|
737
|
-
* `
|
|
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.
|
|
741
|
-
*
|
|
742
|
-
* ```javascript
|
|
743
|
-
* Jodit.make('#editor', {
|
|
744
|
-
* imageAlignClasses: {
|
|
745
|
-
* left: 'align-left',
|
|
746
|
-
* right: 'align-right',
|
|
747
|
-
* center: ['align-center', 'centered']
|
|
748
|
-
* }
|
|
749
|
-
* });
|
|
750
|
-
* ```
|
|
736
|
+
* @deprecated Use `alignClasses.img`, which takes the same value. When
|
|
737
|
+
* `alignClasses.img` isn't set, the editor copies this into it.
|
|
751
738
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "imageAlignClasses", null);
|
|
752
739
|
/**
|
|
753
|
-
* Class names to align elements with, by tag name,
|
|
754
|
-
*
|
|
755
|
-
* popup.
|
|
756
|
-
*
|
|
757
|
-
*
|
|
740
|
+
* Class names to align elements with, by tag name, instead of an inline
|
|
741
|
+
* `float` or `margin`: `img`, and `video`, `audio` and `iframe` in the
|
|
742
|
+
* media popup. Aligning an element removes every class listed for its tag
|
|
743
|
+
* and adds the chosen alignment's, which can be several separated by
|
|
744
|
+
* spaces. An alignment can also list several such sets, to recognise each
|
|
745
|
+
* of them; aligning writes the first. A media wrapper (see
|
|
746
|
+
* `mediaWrappers`), and Jodit's own `jodit` and `jodit-media` wrappers,
|
|
747
|
+
* are aligned with the classes for the media in them.
|
|
758
748
|
*
|
|
759
749
|
* ```javascript
|
|
760
750
|
* const media = {
|
|
@@ -764,7 +754,15 @@ let ConfigPrototype = {};
|
|
|
764
754
|
* };
|
|
765
755
|
*
|
|
766
756
|
* Jodit.make('#editor', {
|
|
767
|
-
* alignClasses: {
|
|
757
|
+
* alignClasses: {
|
|
758
|
+
* img: {
|
|
759
|
+
* left: 'align-left',
|
|
760
|
+
* right: 'align-right',
|
|
761
|
+
* center: ['align-center', 'centered']
|
|
762
|
+
* },
|
|
763
|
+
* video: media,
|
|
764
|
+
* iframe: media
|
|
765
|
+
* }
|
|
768
766
|
* });
|
|
769
767
|
* ```
|
|
770
768
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "alignClasses", {});
|
|
@@ -1824,7 +1822,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1824
1822
|
* ```
|
|
1825
1823
|
* @packageDocumentation
|
|
1826
1824
|
* @module constants
|
|
1827
|
-
*/ const APP_VERSION = "4.18.
|
|
1825
|
+
*/ const APP_VERSION = "4.18.4";
|
|
1828
1826
|
// prettier-ignore
|
|
1829
1827
|
const ES = "es2021";
|
|
1830
1828
|
const IS_ES_MODERN = true;
|
|
@@ -7628,7 +7626,7 @@ const classSets = (value)=>((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPO
|
|
|
7628
7626
|
/**
|
|
7629
7627
|
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
7630
7628
|
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
7631
|
-
* `jodit-media`)
|
|
7629
|
+
* `jodit-media`)
|
|
7632
7630
|
*/ function getAlignClasses(jodit, elm) {
|
|
7633
7631
|
if (!elm) {
|
|
7634
7632
|
return null;
|
|
@@ -7637,8 +7635,7 @@ const classSets = (value)=>((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPO
|
|
|
7637
7635
|
'jodit',
|
|
7638
7636
|
'jodit-media'
|
|
7639
7637
|
])) ? elm.firstElementChild : (0,jodit_core_helpers_utils_media_wrapper__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
|
|
7640
|
-
|
|
7641
|
-
return jodit.o.alignClasses?.[tag] ?? (tag === 'img' ? jodit.o.imageAlignClasses : null);
|
|
7638
|
+
return jodit.o.alignClasses?.[(media ?? elm).nodeName.toLowerCase()] ?? null;
|
|
7642
7639
|
}
|
|
7643
7640
|
/**
|
|
7644
7641
|
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
@@ -17923,6 +17920,18 @@ const __defaultClassesKey = 'data-jodit-default-classes';
|
|
|
17923
17920
|
const NOEDIT = {
|
|
17924
17921
|
contenteditable: false
|
|
17925
17922
|
};
|
|
17923
|
+
/**
|
|
17924
|
+
* The editor's options, with the deprecated `imageAlignClasses` copied into
|
|
17925
|
+
* `alignClasses.img` when that isn't set
|
|
17926
|
+
*/ function makeOptions(options) {
|
|
17927
|
+
const opt = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_9__.Config.defaultOptions);
|
|
17928
|
+
if (opt.imageAlignClasses && !opt.alignClasses?.img) {
|
|
17929
|
+
opt.alignClasses = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)({
|
|
17930
|
+
img: opt.imageAlignClasses
|
|
17931
|
+
}, opt.alignClasses);
|
|
17932
|
+
}
|
|
17933
|
+
return opt;
|
|
17934
|
+
}
|
|
17926
17935
|
class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE_10__.ViewWithToolbar {
|
|
17927
17936
|
/** @override */ className() {
|
|
17928
17937
|
return 'Jodit';
|
|
@@ -18691,7 +18700,7 @@ class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE_10__.ViewWithToolbar
|
|
|
18691
18700
|
// do nothing
|
|
18692
18701
|
}
|
|
18693
18702
|
/** @override **/ initOptions(options) {
|
|
18694
|
-
this.options = (
|
|
18703
|
+
this.options = makeOptions(options);
|
|
18695
18704
|
}
|
|
18696
18705
|
/** @override **/ initOwners() {
|
|
18697
18706
|
// in iframe, it can be changed
|
|
@@ -18805,7 +18814,7 @@ class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE_10__.ViewWithToolbar
|
|
|
18805
18814
|
right: rightSlot
|
|
18806
18815
|
},
|
|
18807
18816
|
statusbar: new jodit_modules__WEBPACK_IMPORTED_MODULE_10__.StatusBar(this, container),
|
|
18808
|
-
options: this.isReady ? (
|
|
18817
|
+
options: this.isReady ? makeOptions(options) : this.options,
|
|
18809
18818
|
history: new jodit_modules__WEBPACK_IMPORTED_MODULE_10__.History(this),
|
|
18810
18819
|
editorWindow: this.ow
|
|
18811
18820
|
};
|
|
@@ -33843,6 +33852,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
33843
33852
|
const JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
33844
33853
|
const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
33845
33854
|
const IMAGE_SELECTED = 'jodit-wysiwyg_image-selected';
|
|
33855
|
+
const SELECTED_TAGS = new Set([
|
|
33856
|
+
'img',
|
|
33857
|
+
'jodit',
|
|
33858
|
+
'jodit-media'
|
|
33859
|
+
]);
|
|
33846
33860
|
/**
|
|
33847
33861
|
* Change editor's size after load all images
|
|
33848
33862
|
*/ class imageProcessor extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
@@ -33884,7 +33898,10 @@ const IMAGE_SELECTED = 'jodit-wysiwyg_image-selected';
|
|
|
33884
33898
|
}
|
|
33885
33899
|
/**
|
|
33886
33900
|
* While the selection is an image, only the image is highlighted: Safari
|
|
33887
|
-
* paints the rest of a block image's line with its parent's highlight. See #1528
|
|
33901
|
+
* paints the rest of a block image's line with its parent's highlight. See #1528.
|
|
33902
|
+
* Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
|
|
33903
|
+
* one from `mediaWrappers`) isn't highlighted either, as Safari paints its
|
|
33904
|
+
* wrapper's whole line, and its resize frame shows it's selected
|
|
33888
33905
|
*/ onSelectionChange() {
|
|
33889
33906
|
const { jodit } = this;
|
|
33890
33907
|
jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
|
|
@@ -33937,7 +33954,8 @@ function isImageSelected(jodit) {
|
|
|
33937
33954
|
return false;
|
|
33938
33955
|
}
|
|
33939
33956
|
const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
|
|
33940
|
-
|
|
33957
|
+
const node = startContainer.childNodes[startOffset];
|
|
33958
|
+
return startContainer === endContainer && endOffset === startOffset + 1 && (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(node, SELECTED_TAGS) || Boolean((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, node))) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isOrContains(jodit.editor, startContainer);
|
|
33941
33959
|
}
|
|
33942
33960
|
/**
|
|
33943
33961
|
* Remove the invisible-space text beside an image, which only held a caret.
|
|
@@ -35845,9 +35863,10 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent
|
|
|
35845
35863
|
/* harmony import */ var jodit_plugins_table_keyboard_navigation_table_keyboard_navigation__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(30110);
|
|
35846
35864
|
/* harmony import */ var jodit_plugins_toolbar_navigation_toolbar_navigation__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(74192);
|
|
35847
35865
|
/* harmony import */ var jodit_plugins_video_video__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(34142);
|
|
35848
|
-
/* harmony import */ var
|
|
35849
|
-
/* harmony import */ var
|
|
35850
|
-
/* harmony import */ var
|
|
35866
|
+
/* harmony import */ var jodit_plugins_video_properties_video_properties__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(40878);
|
|
35867
|
+
/* harmony import */ var jodit_plugins_wrap_nodes_wrap_nodes__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(22980);
|
|
35868
|
+
/* harmony import */ var jodit_plugins_dtd_dtd__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(56894);
|
|
35869
|
+
/* harmony import */ var jodit_plugins_xpath_xpath__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(52014);
|
|
35851
35870
|
/*!
|
|
35852
35871
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35853
35872
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35920,6 +35939,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent
|
|
|
35920
35939
|
|
|
35921
35940
|
|
|
35922
35941
|
|
|
35942
|
+
|
|
35923
35943
|
|
|
35924
35944
|
|
|
35925
35945
|
/***/ }),
|
|
@@ -36182,6 +36202,12 @@ const cmd = (control)=>control.args && (0,jodit_core_helpers_checker__WEBPACK_IM
|
|
|
36182
36202
|
* @module plugins/inline-popup
|
|
36183
36203
|
*/
|
|
36184
36204
|
/* harmony default export */ __webpack_exports__["default"] = ([
|
|
36205
|
+
{
|
|
36206
|
+
name: 'replace',
|
|
36207
|
+
icon: 'video',
|
|
36208
|
+
tooltip: 'Replace',
|
|
36209
|
+
popup: (editor, target, close)=>target ? editor.e.fire('generateReplaceVideoTabs', target, close) : undefined
|
|
36210
|
+
},
|
|
36185
36211
|
{
|
|
36186
36212
|
name: 'bin',
|
|
36187
36213
|
tooltip: 'Delete',
|
|
@@ -36189,6 +36215,13 @@ const cmd = (control)=>control.args && (0,jodit_core_helpers_checker__WEBPACK_IM
|
|
|
36189
36215
|
image && editor.s.removeNode(image);
|
|
36190
36216
|
}
|
|
36191
36217
|
},
|
|
36218
|
+
{
|
|
36219
|
+
name: 'pencil',
|
|
36220
|
+
tooltip: 'Edit',
|
|
36221
|
+
exec: (editor, target)=>{
|
|
36222
|
+
target && editor.e.fire('openVideoProperties', target);
|
|
36223
|
+
}
|
|
36224
|
+
},
|
|
36192
36225
|
_img__WEBPACK_IMPORTED_MODULE_0__.align
|
|
36193
36226
|
]);
|
|
36194
36227
|
|
|
@@ -37850,6 +37883,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
37850
37883
|
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
37851
37884
|
element = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(editor, element) ?? (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.wrapMedia)(editor, element);
|
|
37852
37885
|
} else if (mediaInFakeBlock) {
|
|
37886
|
+
const media = element;
|
|
37853
37887
|
const wrapper = editor.createInside.element(mediaFakeTag, {
|
|
37854
37888
|
'data-jodit-temp': 1,
|
|
37855
37889
|
contenteditable: false,
|
|
@@ -37857,11 +37891,17 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
37857
37891
|
[`data-${keyFake}`]: 1
|
|
37858
37892
|
});
|
|
37859
37893
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.attr)(wrapper, 'style', (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.attr)(element, 'style'));
|
|
37860
|
-
|
|
37861
|
-
|
|
37862
|
-
|
|
37863
|
-
|
|
37864
|
-
|
|
37894
|
+
// The wrapper fits the media, whose size changes as its metadata loads
|
|
37895
|
+
// and as it's resized. A percentage width is of the line, so it takes that
|
|
37896
|
+
const fit = ()=>{
|
|
37897
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, {
|
|
37898
|
+
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(media, 'display') === 'inline-block' ? 'inline-block' : 'block',
|
|
37899
|
+
width: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.cssInline)(media, 'width').endsWith('%') ? '' : 'fit-content',
|
|
37900
|
+
height: ''
|
|
37901
|
+
});
|
|
37902
|
+
};
|
|
37903
|
+
fit();
|
|
37904
|
+
editor.e.on(media, 'changesize', fit);
|
|
37865
37905
|
if (element.parentNode) {
|
|
37866
37906
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.before(element, wrapper);
|
|
37867
37907
|
}
|
|
@@ -40091,7 +40131,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.allowResizeTags = new
|
|
|
40091
40131
|
'img',
|
|
40092
40132
|
'iframe',
|
|
40093
40133
|
'table',
|
|
40094
|
-
'jodit'
|
|
40134
|
+
'jodit',
|
|
40135
|
+
'video'
|
|
40095
40136
|
]);
|
|
40096
40137
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
40097
40138
|
showSize: true,
|
|
@@ -40100,7 +40141,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
40100
40141
|
min_width: 10,
|
|
40101
40142
|
min_height: 10,
|
|
40102
40143
|
useAspectRatio: new Set([
|
|
40103
|
-
'img'
|
|
40144
|
+
'img',
|
|
40145
|
+
'video'
|
|
40104
40146
|
])
|
|
40105
40147
|
};
|
|
40106
40148
|
|
|
@@ -40154,6 +40196,12 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40154
40196
|
}
|
|
40155
40197
|
return parseFloat(value);
|
|
40156
40198
|
}
|
|
40199
|
+
/**
|
|
40200
|
+
* A video with no height of its own takes it from its width and its ratio,
|
|
40201
|
+
* so resizing it keeps the ratio without setting a height.
|
|
40202
|
+
*/ function heightFollowsWidth(element) {
|
|
40203
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(element, 'video') && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(element, 'height') && !(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(element, 'height');
|
|
40204
|
+
}
|
|
40157
40205
|
/**
|
|
40158
40206
|
* The module creates a supporting frame for resizing of the elements img and table
|
|
40159
40207
|
*/ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_8__.Plugin {
|
|
@@ -40181,14 +40229,26 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40181
40229
|
let node = e.target;
|
|
40182
40230
|
const { editor, options: { allowResizeTags } } = this.j;
|
|
40183
40231
|
while(node && node !== editor){
|
|
40184
|
-
|
|
40185
|
-
|
|
40186
|
-
this.
|
|
40232
|
+
const element = this.__resizable(node);
|
|
40233
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(element, allowResizeTags)) {
|
|
40234
|
+
this.__bind(element);
|
|
40235
|
+
this.onClickElement(element);
|
|
40187
40236
|
return;
|
|
40188
40237
|
}
|
|
40189
40238
|
node = node.parentNode;
|
|
40190
40239
|
}
|
|
40191
40240
|
}
|
|
40241
|
+
/**
|
|
40242
|
+
* What a click on `node` resizes: the media in it when it's a media
|
|
40243
|
+
* wrapper (`jodit-media`, or one from `mediaWrappers`), or `node` itself
|
|
40244
|
+
*/ __resizable(node) {
|
|
40245
|
+
const media = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.getWrappedMedia)(this.j, node) ?? (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isHTMLElement(node) && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(node, 'data-jodit_fake_wrapper') ? node.firstElementChild : null);
|
|
40246
|
+
if (!media) {
|
|
40247
|
+
return node;
|
|
40248
|
+
}
|
|
40249
|
+
// An embed is resized through its own wrapper
|
|
40250
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isHTMLElement(media.parentNode) && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(media.parentNode, 'data-jodit_iframe_wrapper') ? media.parentNode : media;
|
|
40251
|
+
}
|
|
40192
40252
|
__afterInsertImage(image) {
|
|
40193
40253
|
if (this.j.o.resizer.forImageChangeAttributes) {
|
|
40194
40254
|
return;
|
|
@@ -40205,17 +40265,15 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40205
40265
|
if (this.isShown && (e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.KEY_DELETE || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.KEY_BACKSPACE) && this.element && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, 'table')) {
|
|
40206
40266
|
this.onDelete(e);
|
|
40207
40267
|
}
|
|
40208
|
-
}).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize)
|
|
40268
|
+
}).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize)// The frame is outside the content, so it's moved to follow the
|
|
40269
|
+
// element as the content scrolls
|
|
40270
|
+
.on([
|
|
40209
40271
|
editor.ow,
|
|
40210
40272
|
editor.editor
|
|
40211
|
-
], 'scroll.resizer', ()
|
|
40212
|
-
if (this.isShown && !this.isResizeMode) {
|
|
40213
|
-
this.hide();
|
|
40214
|
-
}
|
|
40215
|
-
}).on(editor.ow, 'keydown.resizer', this.onKeyDown).on(editor.ow, 'keyup.resizer', this.onKeyUp).on(editor.ow, 'mouseup.resizer touchend.resizer', this.onClickOutside);
|
|
40273
|
+
], 'scroll.resizer', this.updateSize).on(editor.ow, 'keydown.resizer', this.onKeyDown).on(editor.ow, 'keyup.resizer', this.onKeyUp).on(editor.ow, 'mouseup.resizer touchend.resizer', this.onClickOutside);
|
|
40216
40274
|
}
|
|
40217
40275
|
onStartResizing(resizeHandle, e) {
|
|
40218
|
-
if (!this.element || !this.
|
|
40276
|
+
if (!this.element || !this.isElementInEditor) {
|
|
40219
40277
|
this.hide();
|
|
40220
40278
|
return false;
|
|
40221
40279
|
}
|
|
@@ -40268,7 +40326,8 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40268
40326
|
const className = this.handle.className;
|
|
40269
40327
|
let new_w, new_h;
|
|
40270
40328
|
const uar = this.j.o.resizer.useAspectRatio;
|
|
40271
|
-
|
|
40329
|
+
const keepRatio = !this.isAltMode && (uar === true || Boolean(uar && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, uar)));
|
|
40330
|
+
if (keepRatio) {
|
|
40272
40331
|
if (diff_x) {
|
|
40273
40332
|
new_w = this.width + (className.match(/left/) ? -1 : 1) * diff_x;
|
|
40274
40333
|
new_h = Math.round(new_w / this.ratio);
|
|
@@ -40291,7 +40350,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40291
40350
|
this.applySize(this.element, 'width', '100%');
|
|
40292
40351
|
}
|
|
40293
40352
|
}
|
|
40294
|
-
if (new_h > this.j.o.resizer.min_height) {
|
|
40353
|
+
if (new_h > this.j.o.resizer.min_height && !(keepRatio && heightFollowsWidth(this.element))) {
|
|
40295
40354
|
this.applySize(this.element, 'height', new_h);
|
|
40296
40355
|
}
|
|
40297
40356
|
this.updateSize();
|
|
@@ -40337,10 +40396,19 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40337
40396
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(element, key, value);
|
|
40338
40397
|
}
|
|
40339
40398
|
}
|
|
40399
|
+
/**
|
|
40400
|
+
* The framed element can go with a wrapper round it, keeping its parent
|
|
40401
|
+
*/ get isElementInEditor() {
|
|
40402
|
+
return Boolean(this.element && this.j.editor.contains(this.element));
|
|
40403
|
+
}
|
|
40340
40404
|
onDelete(e) {
|
|
40341
40405
|
if (!this.element) {
|
|
40342
40406
|
return;
|
|
40343
40407
|
}
|
|
40408
|
+
if (!this.isElementInEditor) {
|
|
40409
|
+
this.hide();
|
|
40410
|
+
return;
|
|
40411
|
+
}
|
|
40344
40412
|
if (this.element.tagName !== 'JODIT') {
|
|
40345
40413
|
this.j.s.select(this.element);
|
|
40346
40414
|
} else {
|
|
@@ -40351,7 +40419,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40351
40419
|
}
|
|
40352
40420
|
__onChangeEditor() {
|
|
40353
40421
|
if (this.isShown) {
|
|
40354
|
-
if (!this.
|
|
40422
|
+
if (!this.isElementInEditor) {
|
|
40355
40423
|
this.hide();
|
|
40356
40424
|
} else {
|
|
40357
40425
|
this.updateSize();
|
|
@@ -40449,9 +40517,13 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40449
40517
|
return;
|
|
40450
40518
|
}
|
|
40451
40519
|
this.isShown = true;
|
|
40520
|
+
if (this.layer.parentNode !== this.j.workplace) {
|
|
40521
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.markOwner)(this.j, this.layer);
|
|
40522
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.append(this.j.workplace, this.layer);
|
|
40523
|
+
}
|
|
40452
40524
|
if (!this.rect.parentNode) {
|
|
40453
40525
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.markOwner)(this.j, this.rect);
|
|
40454
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.append(this.
|
|
40526
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.append(this.layer, this.rect);
|
|
40455
40527
|
}
|
|
40456
40528
|
if (this.j.isFullSize) {
|
|
40457
40529
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(this.rect, 'zIndex', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(this.j.container, 'zIndex').toString());
|
|
@@ -40471,6 +40543,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40471
40543
|
}
|
|
40472
40544
|
beforeDestruct(jodit) {
|
|
40473
40545
|
this.hide();
|
|
40546
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(this.layer);
|
|
40474
40547
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.eventEmitter.off('hideHelpers', this.hide);
|
|
40475
40548
|
jodit.e.off(this.j.ow, '.resizer').off('.resizer');
|
|
40476
40549
|
}
|
|
@@ -40481,7 +40554,8 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40481
40554
|
<div class="jodit-resizer__bottom-right"></div>
|
|
40482
40555
|
<div class="jodit-resizer__bottom-left"></div>
|
|
40483
40556
|
<span>100x100</span>
|
|
40484
|
-
</div>`)),
|
|
40557
|
+
</div>`)), // Clips the frame to the workplace, without the frame making it scroll
|
|
40558
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "layer", this.j.c.div('jodit-resizer-layer')), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "sizeViewer", this.rect.getElementsByTagName('span')[0]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "pointerX", 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "pointerY", 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isAltMode", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "onClickElement", (element)=>{
|
|
40485
40559
|
if (this.isResizeMode) {
|
|
40486
40560
|
return;
|
|
40487
40561
|
}
|
|
@@ -40491,6 +40565,9 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
40491
40565
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, 'img') && !this.element.complete) {
|
|
40492
40566
|
this.j.e.one(this.element, 'load', this.updateSize);
|
|
40493
40567
|
}
|
|
40568
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(this.element, 'video') && this.element.readyState < HTMLMediaElement.HAVE_METADATA) {
|
|
40569
|
+
this.j.e.one(this.element, 'loadedmetadata', this.updateSize);
|
|
40570
|
+
}
|
|
40494
40571
|
}
|
|
40495
40572
|
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "updateSize", ()=>{
|
|
40496
40573
|
if (this.isInDestruct || !this.isShown) {
|
|
@@ -44893,10 +44970,732 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
|
|
|
44893
44970
|
|
|
44894
44971
|
/***/ }),
|
|
44895
44972
|
|
|
44896
|
-
/***/
|
|
44973
|
+
/***/ 39057:
|
|
44974
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
44975
|
+
|
|
44976
|
+
"use strict";
|
|
44977
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44978
|
+
/* harmony export */ editedMedia: function() { return /* binding */ editedMedia; },
|
|
44979
|
+
/* harmony export */ ownSize: function() { return /* binding */ ownSize; },
|
|
44980
|
+
/* harmony export */ readValues: function() { return /* binding */ readValues; }
|
|
44981
|
+
/* harmony export */ });
|
|
44982
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
44983
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70222);
|
|
44984
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
|
|
44985
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80991);
|
|
44986
|
+
/* harmony import */ var jodit_plugins_image_properties_utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10808);
|
|
44987
|
+
/*!
|
|
44988
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44989
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
44990
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
44991
|
+
*/ /**
|
|
44992
|
+
* @module plugins/video-properties
|
|
44993
|
+
*/
|
|
44994
|
+
|
|
44995
|
+
|
|
44996
|
+
|
|
44997
|
+
|
|
44998
|
+
const mediaSelector = 'video, audio, iframe';
|
|
44999
|
+
/**
|
|
45000
|
+
* The media `target` is, or holds as its wrapper (`jodit-media`, the resizer's
|
|
45001
|
+
* `jodit` for an embed, or one from `mediaWrappers`)
|
|
45002
|
+
* @private
|
|
45003
|
+
*/ function editedMedia(target) {
|
|
45004
|
+
return target.matches(mediaSelector) ? target : target.querySelector(mediaSelector);
|
|
45005
|
+
}
|
|
45006
|
+
/**
|
|
45007
|
+
* The size `media` is given, inline or by its attribute
|
|
45008
|
+
* @private
|
|
45009
|
+
*/ function ownSize(media, key) {
|
|
45010
|
+
return (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.cssInline)(media, key) || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(media, key) || '';
|
|
45011
|
+
}
|
|
45012
|
+
const toNumber = (value)=>parseFloat(value.toString());
|
|
45013
|
+
/**
|
|
45014
|
+
* Read the media's values into the state
|
|
45015
|
+
* @private
|
|
45016
|
+
*/ function readValues(state) {
|
|
45017
|
+
const { media, values } = state;
|
|
45018
|
+
const width = ownSize(media, 'width');
|
|
45019
|
+
const height = ownSize(media, 'height');
|
|
45020
|
+
values.width = width ? (0,jodit_plugins_image_properties_utils_utils__WEBPACK_IMPORTED_MODULE_4__.normalSizeFromString)(width) : media.offsetWidth;
|
|
45021
|
+
values.height = height ? (0,jodit_plugins_image_properties_utils_utils__WEBPACK_IMPORTED_MODULE_4__.normalSizeFromString)(height) : '';
|
|
45022
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'video') && media.videoWidth) {
|
|
45023
|
+
state.ratio = media.videoWidth / media.videoHeight;
|
|
45024
|
+
} else if ((0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(values.width) && (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(values.height)) {
|
|
45025
|
+
state.ratio = toNumber(values.width) / toNumber(values.height);
|
|
45026
|
+
} else {
|
|
45027
|
+
state.ratio = media.offsetWidth / media.offsetHeight || 1;
|
|
45028
|
+
}
|
|
45029
|
+
// One with no height takes it from its width
|
|
45030
|
+
if (!height && (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(values.width)) {
|
|
45031
|
+
values.height = Math.round(toNumber(values.width) / state.ratio);
|
|
45032
|
+
}
|
|
45033
|
+
state.sizeIsLocked = (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(values.width) && (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(values.height) && (!height || Math.abs(toNumber(values.width) - toNumber(values.height) * state.ratio) < 1);
|
|
45034
|
+
values.poster = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(media, 'poster') || '';
|
|
45035
|
+
values.autoplay = media.hasAttribute('autoplay');
|
|
45036
|
+
values.loop = media.hasAttribute('loop');
|
|
45037
|
+
// Autoplay's own: turning it off gives the sound back
|
|
45038
|
+
values.muted = media.hasAttribute('muted') && !values.autoplay;
|
|
45039
|
+
// Without Autoplay it keeps its controls, or it could never be played
|
|
45040
|
+
values.controls = media.hasAttribute('controls') || !values.autoplay;
|
|
45041
|
+
}
|
|
45042
|
+
|
|
45043
|
+
|
|
45044
|
+
/***/ }),
|
|
45045
|
+
|
|
45046
|
+
/***/ 25001:
|
|
45047
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45048
|
+
|
|
45049
|
+
"use strict";
|
|
45050
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45051
|
+
/* harmony export */ replaceMedia: function() { return /* binding */ replaceMedia; }
|
|
45052
|
+
/* harmony export */ });
|
|
45053
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
45054
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
45055
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80991);
|
|
45056
|
+
/* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39057);
|
|
45057
|
+
/* harmony import */ var _writers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94893);
|
|
45058
|
+
/*!
|
|
45059
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45060
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45061
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45062
|
+
*/ /**
|
|
45063
|
+
* @module plugins/video-properties
|
|
45064
|
+
*/
|
|
45065
|
+
|
|
45066
|
+
|
|
45067
|
+
|
|
45068
|
+
|
|
45069
|
+
/**
|
|
45070
|
+
* Give `media`, in `outer`, the classes, inline styles, size and playback
|
|
45071
|
+
* settings of `old`, in `oldOuter`. It keeps its own source and poster.
|
|
45072
|
+
*/ function takeOver(j, oldOuter, old, outer, media) {
|
|
45073
|
+
const state = {
|
|
45074
|
+
target: oldOuter,
|
|
45075
|
+
media: old,
|
|
45076
|
+
ratio: 1,
|
|
45077
|
+
sizeIsLocked: true,
|
|
45078
|
+
values: {
|
|
45079
|
+
width: '',
|
|
45080
|
+
height: '',
|
|
45081
|
+
poster: '',
|
|
45082
|
+
autoplay: false,
|
|
45083
|
+
loop: false,
|
|
45084
|
+
muted: false,
|
|
45085
|
+
controls: true
|
|
45086
|
+
}
|
|
45087
|
+
};
|
|
45088
|
+
(0,_readers__WEBPACK_IMPORTED_MODULE_3__.readValues)(state);
|
|
45089
|
+
const pairs = [
|
|
45090
|
+
[
|
|
45091
|
+
old,
|
|
45092
|
+
media
|
|
45093
|
+
]
|
|
45094
|
+
];
|
|
45095
|
+
// A wrapper kept in the content, which holds the alignment
|
|
45096
|
+
if (oldOuter !== old && outer !== media && oldOuter.nodeName === outer.nodeName) {
|
|
45097
|
+
pairs.push([
|
|
45098
|
+
oldOuter,
|
|
45099
|
+
outer
|
|
45100
|
+
]);
|
|
45101
|
+
}
|
|
45102
|
+
pairs.forEach(([from, to])=>{
|
|
45103
|
+
[
|
|
45104
|
+
'class',
|
|
45105
|
+
'style'
|
|
45106
|
+
].forEach((name)=>(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(to, name, (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(from, name)));
|
|
45107
|
+
});
|
|
45108
|
+
// A video's size is CSS and an embed's its attributes, so the writer sizes
|
|
45109
|
+
// one that's a different element
|
|
45110
|
+
if (old.nodeName !== media.nodeName) {
|
|
45111
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(media, {
|
|
45112
|
+
width: null,
|
|
45113
|
+
height: null
|
|
45114
|
+
});
|
|
45115
|
+
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'style')?.trim()) {
|
|
45116
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'style', null);
|
|
45117
|
+
}
|
|
45118
|
+
}
|
|
45119
|
+
state.media = media;
|
|
45120
|
+
state.values.poster = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'poster') || '';
|
|
45121
|
+
(0,_writers__WEBPACK_IMPORTED_MODULE_4__.applyValues)(j, state, Boolean((0,_readers__WEBPACK_IMPORTED_MODULE_3__.ownSize)(old, 'width') || (0,_readers__WEBPACK_IMPORTED_MODULE_3__.ownSize)(old, 'height')));
|
|
45122
|
+
}
|
|
45123
|
+
/**
|
|
45124
|
+
* Run `insert`, which inserts media at the cursor, with the cursor after
|
|
45125
|
+
* `replaced`, and put what it inserts in place of `replaced`
|
|
45126
|
+
* @private
|
|
45127
|
+
*/ function replaceMedia(j, replaced, insert) {
|
|
45128
|
+
const inserted = [];
|
|
45129
|
+
const collect = (node)=>{
|
|
45130
|
+
inserted.push(node);
|
|
45131
|
+
};
|
|
45132
|
+
j.history.snapshot.transaction(()=>{
|
|
45133
|
+
j.s.focus();
|
|
45134
|
+
j.s.setCursorAfter(replaced);
|
|
45135
|
+
j.e.on('afterInsertNode', collect);
|
|
45136
|
+
try {
|
|
45137
|
+
insert();
|
|
45138
|
+
} finally{
|
|
45139
|
+
j.e.off('afterInsertNode', collect);
|
|
45140
|
+
}
|
|
45141
|
+
const [outer] = inserted;
|
|
45142
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(outer)) {
|
|
45143
|
+
return;
|
|
45144
|
+
}
|
|
45145
|
+
const old = (0,_readers__WEBPACK_IMPORTED_MODULE_3__.editedMedia)(replaced);
|
|
45146
|
+
const media = (0,_readers__WEBPACK_IMPORTED_MODULE_3__.editedMedia)(outer);
|
|
45147
|
+
if (old && media) {
|
|
45148
|
+
takeOver(j, replaced, old, outer, media);
|
|
45149
|
+
}
|
|
45150
|
+
// The resizer can have put an embed in its own wrapper already
|
|
45151
|
+
const placed = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(outer.parentElement) && (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(outer.parentElement, 'data-jodit-temp') ? outer.parentElement : outer;
|
|
45152
|
+
// Where the old one was, since media Jodit counts as blocks can be put
|
|
45153
|
+
// after the paragraph
|
|
45154
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(replaced, placed);
|
|
45155
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(replaced);
|
|
45156
|
+
j.s.setCursorAfter(placed);
|
|
45157
|
+
});
|
|
45158
|
+
j.synchronizeValues();
|
|
45159
|
+
j.e.fire('closeAllPopups');
|
|
45160
|
+
}
|
|
45161
|
+
|
|
45162
|
+
|
|
45163
|
+
/***/ }),
|
|
45164
|
+
|
|
45165
|
+
/***/ 83533:
|
|
45166
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45167
|
+
|
|
45168
|
+
"use strict";
|
|
45169
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45170
|
+
/* harmony export */ UIVideoPropertiesForm: function() { return /* binding */ UIVideoPropertiesForm; }
|
|
45171
|
+
/* harmony export */ });
|
|
45172
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
45173
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
45174
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91672);
|
|
45175
|
+
/* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29200);
|
|
45176
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68616);
|
|
45177
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23211);
|
|
45178
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70222);
|
|
45179
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7909);
|
|
45180
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80991);
|
|
45181
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(96007);
|
|
45182
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(29434);
|
|
45183
|
+
/*!
|
|
45184
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45185
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45186
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45187
|
+
*/ /**
|
|
45188
|
+
* @module plugins/video-properties
|
|
45189
|
+
*/
|
|
45190
|
+
|
|
45191
|
+
|
|
45192
|
+
|
|
45193
|
+
|
|
45194
|
+
|
|
45195
|
+
|
|
45196
|
+
|
|
45197
|
+
|
|
45198
|
+
|
|
45199
|
+
|
|
45200
|
+
|
|
45201
|
+
const flags = {
|
|
45202
|
+
autoplay: 'Autoplay',
|
|
45203
|
+
loop: 'Loop',
|
|
45204
|
+
muted: 'Muted',
|
|
45205
|
+
controls: 'Controls'
|
|
45206
|
+
};
|
|
45207
|
+
const checkbox = ([flag, label])=>`<label class="jodit_vertical_middle">
|
|
45208
|
+
<input type="checkbox" class="jodit-checkbox &__${flag}"/>
|
|
45209
|
+
<span>~${label}~</span>
|
|
45210
|
+
</label>`;
|
|
45211
|
+
class UIVideoPropertiesForm extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_9__.UIElement {
|
|
45212
|
+
className() {
|
|
45213
|
+
return 'UIVideoPropertiesForm';
|
|
45214
|
+
}
|
|
45215
|
+
render() {
|
|
45216
|
+
return `<form>
|
|
45217
|
+
<div class="jodit-form__group &__previewBox">
|
|
45218
|
+
<img class="&__preview" alt=""/>
|
|
45219
|
+
</div>
|
|
45220
|
+
<div class="jodit-form__group &__sizes">
|
|
45221
|
+
<input type="text" class="jodit-input &__width" placeholder="~Width~" aria-label="~Width~"/>
|
|
45222
|
+
<a class="&__lockSize">*lock*</a>
|
|
45223
|
+
<input type="text" class="jodit-input &__height" placeholder="~Height~" aria-label="~Height~"/>
|
|
45224
|
+
</div>
|
|
45225
|
+
<div class="jodit-form__group &__editPoster">
|
|
45226
|
+
<label>~Poster~</label>
|
|
45227
|
+
<div class="jodit-input_group">
|
|
45228
|
+
<input type="text" class="jodit-input &__poster" placeholder="https://"/>
|
|
45229
|
+
<div class="jodit-input_group-buttons">
|
|
45230
|
+
<a class="jodit-button &__changePoster" title="~Upload~">*image*</a>
|
|
45231
|
+
<a class="jodit-button &__removePoster" title="~Remove~">*bin*</a>
|
|
45232
|
+
</div>
|
|
45233
|
+
</div>
|
|
45234
|
+
</div>
|
|
45235
|
+
<div class="jodit-form__group &__playback">
|
|
45236
|
+
${Object.entries(flags).map(checkbox).join('')}
|
|
45237
|
+
</div>
|
|
45238
|
+
</form>`;
|
|
45239
|
+
}
|
|
45240
|
+
input(name) {
|
|
45241
|
+
return this.getElm(name);
|
|
45242
|
+
}
|
|
45243
|
+
show(name, shown) {
|
|
45244
|
+
;(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__.css)(this.getElm(name), 'display', shown ? null : 'none');
|
|
45245
|
+
}
|
|
45246
|
+
/**
|
|
45247
|
+
* A video has every field, an embed only its size, and audio only its
|
|
45248
|
+
* playback settings
|
|
45249
|
+
*/ onStateMediaChange() {
|
|
45250
|
+
const { media } = this.state;
|
|
45251
|
+
this.show('editPoster', jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(media, 'video'));
|
|
45252
|
+
this.show('sizes', !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(media, 'audio'));
|
|
45253
|
+
this.show('playback', !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(media, 'iframe'));
|
|
45254
|
+
this.showPreview();
|
|
45255
|
+
}
|
|
45256
|
+
// A video's poster, when it has one
|
|
45257
|
+
showPreview() {
|
|
45258
|
+
const { media, values } = this.state;
|
|
45259
|
+
const shown = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__.Dom.isTag(media, 'video') && Boolean(values.poster);
|
|
45260
|
+
this.show('previewBox', shown);
|
|
45261
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_7__.attr)(this.getElm('preview'), 'src', shown ? values.poster : null);
|
|
45262
|
+
}
|
|
45263
|
+
hideChangePoster() {
|
|
45264
|
+
const { uploader, filebrowser } = this.j.o;
|
|
45265
|
+
// What FileSelectorWidget offers
|
|
45266
|
+
const canUpload = uploader.showTabInFileSelector !== false && Boolean(uploader.url || uploader.insertImageAsBase64URI || uploader.customUploadFunction);
|
|
45267
|
+
const canBrowse = Boolean(filebrowser.ajax.url || filebrowser.items.url);
|
|
45268
|
+
this.show('changePoster', canUpload || canBrowse);
|
|
45269
|
+
}
|
|
45270
|
+
onStatePosterChange() {
|
|
45271
|
+
const { poster } = this.state.values;
|
|
45272
|
+
this.input('poster').value = poster;
|
|
45273
|
+
this.show('removePoster', Boolean(poster));
|
|
45274
|
+
this.showPreview();
|
|
45275
|
+
}
|
|
45276
|
+
onPosterChange() {
|
|
45277
|
+
this.state.values.poster = this.input('poster').value;
|
|
45278
|
+
}
|
|
45279
|
+
onChangePosterClick(e) {
|
|
45280
|
+
this.handlers.openPosterPopup(this.getElm('changePoster'));
|
|
45281
|
+
e.stopPropagation();
|
|
45282
|
+
}
|
|
45283
|
+
onRemovePosterClick() {
|
|
45284
|
+
this.state.values.poster = '';
|
|
45285
|
+
}
|
|
45286
|
+
onStateSizeIsLockedChange() {
|
|
45287
|
+
this.getElm('lockSize').innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__.Icon.get(this.state.sizeIsLocked ? 'lock' : 'unlock');
|
|
45288
|
+
}
|
|
45289
|
+
onLockSizeClick() {
|
|
45290
|
+
const { state } = this;
|
|
45291
|
+
const { values } = state;
|
|
45292
|
+
state.sizeIsLocked = !state.sizeIsLocked;
|
|
45293
|
+
if (state.sizeIsLocked && (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_6__.isNumeric)(values.width)) {
|
|
45294
|
+
values.height = Math.round(parseFloat(values.width.toString()) / state.ratio);
|
|
45295
|
+
}
|
|
45296
|
+
}
|
|
45297
|
+
onStateSizeChange() {
|
|
45298
|
+
const { values } = this.state;
|
|
45299
|
+
// Not the field being typed in
|
|
45300
|
+
[
|
|
45301
|
+
'width',
|
|
45302
|
+
'height'
|
|
45303
|
+
].forEach((key)=>{
|
|
45304
|
+
const input = this.input(key);
|
|
45305
|
+
if (input !== this.j.od.activeElement) {
|
|
45306
|
+
input.value = values[key].toString();
|
|
45307
|
+
}
|
|
45308
|
+
});
|
|
45309
|
+
}
|
|
45310
|
+
onSizeInput(e) {
|
|
45311
|
+
const { state } = this;
|
|
45312
|
+
const { values } = state;
|
|
45313
|
+
// Both read first, since setting one rewrites the other's field
|
|
45314
|
+
const width = this.input('width').value;
|
|
45315
|
+
const height = this.input('height').value;
|
|
45316
|
+
if (!state.sizeIsLocked || !(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_6__.isNumeric)(width) || !(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_6__.isNumeric)(height)) {
|
|
45317
|
+
values.width = width;
|
|
45318
|
+
values.height = height;
|
|
45319
|
+
return;
|
|
45320
|
+
}
|
|
45321
|
+
const w = parseFloat(width);
|
|
45322
|
+
const h = parseFloat(height);
|
|
45323
|
+
if (e.target === this.input('width')) {
|
|
45324
|
+
values.width = w;
|
|
45325
|
+
values.height = Math.round(w / state.ratio);
|
|
45326
|
+
} else {
|
|
45327
|
+
values.width = Math.round(h * state.ratio);
|
|
45328
|
+
values.height = h;
|
|
45329
|
+
}
|
|
45330
|
+
}
|
|
45331
|
+
/**
|
|
45332
|
+
* Autoplay mutes it, and it keeps its controls unless it autoplays
|
|
45333
|
+
*/ onStateFlagsChange() {
|
|
45334
|
+
const { values } = this.state;
|
|
45335
|
+
this.input('autoplay').checked = values.autoplay;
|
|
45336
|
+
this.input('loop').checked = values.loop;
|
|
45337
|
+
this.input('muted').checked = values.muted || values.autoplay;
|
|
45338
|
+
this.input('muted').disabled = values.autoplay;
|
|
45339
|
+
this.input('controls').checked = values.controls || !values.autoplay;
|
|
45340
|
+
this.input('controls').disabled = !values.autoplay;
|
|
45341
|
+
}
|
|
45342
|
+
onFlagChange(e) {
|
|
45343
|
+
Object.keys(flags).forEach((flag)=>{
|
|
45344
|
+
const input = this.input(flag);
|
|
45345
|
+
if (e.target === input) {
|
|
45346
|
+
this.state.values[flag] = input.checked;
|
|
45347
|
+
}
|
|
45348
|
+
});
|
|
45349
|
+
}
|
|
45350
|
+
constructor(jodit, state, handlers){
|
|
45351
|
+
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "handlers", void 0), this.state = state, this.handlers = handlers;
|
|
45352
|
+
}
|
|
45353
|
+
}
|
|
45354
|
+
;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45355
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready'),
|
|
45356
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('state.media')
|
|
45357
|
+
], UIVideoPropertiesForm.prototype, "onStateMediaChange", null);
|
|
45358
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45359
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready')
|
|
45360
|
+
], UIVideoPropertiesForm.prototype, "hideChangePoster", null);
|
|
45361
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45362
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready'),
|
|
45363
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('state.values.poster')
|
|
45364
|
+
], UIVideoPropertiesForm.prototype, "onStatePosterChange", null);
|
|
45365
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45366
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('poster:change')
|
|
45367
|
+
], UIVideoPropertiesForm.prototype, "onPosterChange", null);
|
|
45368
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45369
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('changePoster:click')
|
|
45370
|
+
], UIVideoPropertiesForm.prototype, "onChangePosterClick", null);
|
|
45371
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45372
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('removePoster:click')
|
|
45373
|
+
], UIVideoPropertiesForm.prototype, "onRemovePosterClick", null);
|
|
45374
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45375
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready'),
|
|
45376
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('state.sizeIsLocked')
|
|
45377
|
+
], UIVideoPropertiesForm.prototype, "onStateSizeIsLockedChange", null);
|
|
45378
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45379
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)('lockSize:click')
|
|
45380
|
+
], UIVideoPropertiesForm.prototype, "onLockSizeClick", null);
|
|
45381
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45382
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready'),
|
|
45383
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)([
|
|
45384
|
+
'state.values.width',
|
|
45385
|
+
'state.values.height'
|
|
45386
|
+
])
|
|
45387
|
+
], UIVideoPropertiesForm.prototype, "onStateSizeChange", null);
|
|
45388
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45389
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)([
|
|
45390
|
+
'width:input',
|
|
45391
|
+
'height:input',
|
|
45392
|
+
'width:change',
|
|
45393
|
+
'height:change'
|
|
45394
|
+
])
|
|
45395
|
+
], UIVideoPropertiesForm.prototype, "onSizeInput", null);
|
|
45396
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45397
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_3__.hook)('ready'),
|
|
45398
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)(Object.keys(flags).map((flag)=>`state.values.${flag}`))
|
|
45399
|
+
], UIVideoPropertiesForm.prototype, "onStateFlagsChange", null);
|
|
45400
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45401
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)(Object.keys(flags).map((flag)=>`${flag}:change`))
|
|
45402
|
+
], UIVideoPropertiesForm.prototype, "onFlagChange", null);
|
|
45403
|
+
UIVideoPropertiesForm = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45404
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_2__.component
|
|
45405
|
+
], UIVideoPropertiesForm);
|
|
45406
|
+
|
|
45407
|
+
|
|
45408
|
+
/***/ }),
|
|
45409
|
+
|
|
45410
|
+
/***/ 40878:
|
|
44897
45411
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
44898
45412
|
|
|
44899
45413
|
"use strict";
|
|
45414
|
+
/* unused harmony export videoProperties */
|
|
45415
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
45416
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
45417
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84839);
|
|
45418
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23211);
|
|
45419
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28077);
|
|
45420
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17312);
|
|
45421
|
+
/* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23599);
|
|
45422
|
+
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(71125);
|
|
45423
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18855);
|
|
45424
|
+
/* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59400);
|
|
45425
|
+
/* harmony import */ var jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(51116);
|
|
45426
|
+
/* harmony import */ var jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18762);
|
|
45427
|
+
/* harmony import */ var _ui_ui_video_form__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(83533);
|
|
45428
|
+
/* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(39057);
|
|
45429
|
+
/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(25001);
|
|
45430
|
+
/* harmony import */ var _writers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(94893);
|
|
45431
|
+
/* harmony import */ var jodit_plugins_video_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(48899);
|
|
45432
|
+
/*!
|
|
45433
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45434
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45435
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45436
|
+
*/ /**
|
|
45437
|
+
* [[include:plugins/video-properties/README.md]]
|
|
45438
|
+
* @packageDocumentation
|
|
45439
|
+
* @module plugins/video-properties
|
|
45440
|
+
*/
|
|
45441
|
+
|
|
45442
|
+
|
|
45443
|
+
|
|
45444
|
+
|
|
45445
|
+
|
|
45446
|
+
|
|
45447
|
+
|
|
45448
|
+
|
|
45449
|
+
|
|
45450
|
+
|
|
45451
|
+
|
|
45452
|
+
|
|
45453
|
+
|
|
45454
|
+
|
|
45455
|
+
|
|
45456
|
+
|
|
45457
|
+
/**
|
|
45458
|
+
* Show a dialog with the size, poster and playback settings of a video, an
|
|
45459
|
+
* embed or audio. The media popup's Edit button opens it:
|
|
45460
|
+
*
|
|
45461
|
+
* ```javascript
|
|
45462
|
+
* editor.events.fire('openVideoProperties', video);
|
|
45463
|
+
* ```
|
|
45464
|
+
*/ class videoProperties extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_8__.Plugin {
|
|
45465
|
+
get __size() {
|
|
45466
|
+
const { width, height } = this.state.values;
|
|
45467
|
+
return `${width}x${height}`;
|
|
45468
|
+
}
|
|
45469
|
+
get form() {
|
|
45470
|
+
return new _ui_ui_video_form__WEBPACK_IMPORTED_MODULE_12__.UIVideoPropertiesForm(this.j, this.state, {
|
|
45471
|
+
openPosterPopup: (target)=>this.__openPosterPopup(target)
|
|
45472
|
+
});
|
|
45473
|
+
}
|
|
45474
|
+
get dialog() {
|
|
45475
|
+
const { j } = this;
|
|
45476
|
+
const dialog = j.dlg({
|
|
45477
|
+
minWidth: Math.min(400, screen.width),
|
|
45478
|
+
buttons: [
|
|
45479
|
+
'dialog.close'
|
|
45480
|
+
]
|
|
45481
|
+
});
|
|
45482
|
+
const buttons = this.__buttons;
|
|
45483
|
+
buttons.check.onAction(()=>{
|
|
45484
|
+
(0,_writers__WEBPACK_IMPORTED_MODULE_15__.applyValues)(j, this.state, this.__size !== this.__readSize);
|
|
45485
|
+
j.synchronizeValues();
|
|
45486
|
+
dialog.close();
|
|
45487
|
+
});
|
|
45488
|
+
buttons.remove.onAction(()=>{
|
|
45489
|
+
j.s.removeNode(this.state.target);
|
|
45490
|
+
dialog.close();
|
|
45491
|
+
});
|
|
45492
|
+
buttons.cancel.onAction(()=>{
|
|
45493
|
+
dialog.close();
|
|
45494
|
+
});
|
|
45495
|
+
dialog.setContent(this.form);
|
|
45496
|
+
dialog.setFooter([
|
|
45497
|
+
[
|
|
45498
|
+
buttons.cancel,
|
|
45499
|
+
buttons.remove
|
|
45500
|
+
],
|
|
45501
|
+
buttons.check
|
|
45502
|
+
]);
|
|
45503
|
+
(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_7__.markOwner)(j, dialog.container);
|
|
45504
|
+
return dialog;
|
|
45505
|
+
}
|
|
45506
|
+
get __buttons() {
|
|
45507
|
+
const { j } = this;
|
|
45508
|
+
return {
|
|
45509
|
+
check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_9__.Button)(j, 'ok', 'Apply', 'primary'),
|
|
45510
|
+
remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_9__.Button)(j, 'bin', 'Delete'),
|
|
45511
|
+
cancel: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_9__.Button)(j, 'cancel', 'Cancel')
|
|
45512
|
+
};
|
|
45513
|
+
}
|
|
45514
|
+
/**
|
|
45515
|
+
* Open the dialog for the media `target` is, or is the wrapper of
|
|
45516
|
+
*/ open(target) {
|
|
45517
|
+
const media = (0,_readers__WEBPACK_IMPORTED_MODULE_13__.editedMedia)(target);
|
|
45518
|
+
if (!media) {
|
|
45519
|
+
return;
|
|
45520
|
+
}
|
|
45521
|
+
this.state.target = target;
|
|
45522
|
+
this.state.media = media;
|
|
45523
|
+
(0,_readers__WEBPACK_IMPORTED_MODULE_13__.readValues)(this.state);
|
|
45524
|
+
this.__readSize = this.__size;
|
|
45525
|
+
this.dialog.setHeader(this.j.i18n(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(media, 'audio') ? 'Audio properties' : 'Video properties'));
|
|
45526
|
+
this.dialog.open().setModal(true).setPosition();
|
|
45527
|
+
}
|
|
45528
|
+
/**
|
|
45529
|
+
* The video popup's tabs for the media popup's Replace: what they insert
|
|
45530
|
+
* takes the place of the media `target` is, or is the wrapper of
|
|
45531
|
+
*/ onGenerateReplaceVideoTabs(target, close) {
|
|
45532
|
+
return (0,jodit_plugins_video_config__WEBPACK_IMPORTED_MODULE_16__.videoTabs)(this.j, close, (insert)=>(0,_replace__WEBPACK_IMPORTED_MODULE_14__.replaceMedia)(this.j, target, insert));
|
|
45533
|
+
}
|
|
45534
|
+
__openPosterPopup(button) {
|
|
45535
|
+
const { j, state } = this;
|
|
45536
|
+
const popup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_10__.Popup(this.dialog);
|
|
45537
|
+
const close = ()=>{
|
|
45538
|
+
popup.close();
|
|
45539
|
+
popup.destruct();
|
|
45540
|
+
};
|
|
45541
|
+
popup.setContent((0,jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_11__.FileSelectorWidget)(j, {
|
|
45542
|
+
upload: (data)=>{
|
|
45543
|
+
if (data.files && data.files.length) {
|
|
45544
|
+
state.values.poster = data.baseurl + data.files[0];
|
|
45545
|
+
}
|
|
45546
|
+
close();
|
|
45547
|
+
},
|
|
45548
|
+
filebrowser: (data)=>{
|
|
45549
|
+
if ((0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_5__.isArray)(data.files) && data.files.length) {
|
|
45550
|
+
state.values.poster = data.files[0];
|
|
45551
|
+
close();
|
|
45552
|
+
}
|
|
45553
|
+
}
|
|
45554
|
+
}, null, close)).open(()=>(0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_6__.position)(button));
|
|
45555
|
+
}
|
|
45556
|
+
/** @override */ afterInit() {}
|
|
45557
|
+
/** @override */ beforeDestruct() {
|
|
45558
|
+
Object.values((0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '__buttons') ?? {}).forEach((b)=>b.destruct());
|
|
45559
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cached)(this, 'dialog')?.destruct();
|
|
45560
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cached)(this, 'form')?.destruct();
|
|
45561
|
+
}
|
|
45562
|
+
constructor(...args){
|
|
45563
|
+
super(...args), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "state", {
|
|
45564
|
+
target: this.j.c.element('video'),
|
|
45565
|
+
media: this.j.c.element('video'),
|
|
45566
|
+
ratio: 1,
|
|
45567
|
+
sizeIsLocked: true,
|
|
45568
|
+
values: {
|
|
45569
|
+
width: '',
|
|
45570
|
+
height: '',
|
|
45571
|
+
poster: '',
|
|
45572
|
+
autoplay: false,
|
|
45573
|
+
loop: false,
|
|
45574
|
+
muted: false,
|
|
45575
|
+
controls: true
|
|
45576
|
+
}
|
|
45577
|
+
}), // The size as it was read, so an unchanged one isn't written
|
|
45578
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__readSize", '');
|
|
45579
|
+
}
|
|
45580
|
+
}
|
|
45581
|
+
;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45582
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
45583
|
+
], videoProperties.prototype, "form", null);
|
|
45584
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45585
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
45586
|
+
], videoProperties.prototype, "dialog", null);
|
|
45587
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45588
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
45589
|
+
], videoProperties.prototype, "__buttons", null);
|
|
45590
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45591
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':openVideoProperties')
|
|
45592
|
+
], videoProperties.prototype, "open", null);
|
|
45593
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
45594
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':generateReplaceVideoTabs')
|
|
45595
|
+
], videoProperties.prototype, "onGenerateReplaceVideoTabs", null);
|
|
45596
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('videoProperties', videoProperties);
|
|
45597
|
+
|
|
45598
|
+
|
|
45599
|
+
/***/ }),
|
|
45600
|
+
|
|
45601
|
+
/***/ 94893:
|
|
45602
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45603
|
+
|
|
45604
|
+
"use strict";
|
|
45605
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45606
|
+
/* harmony export */ applyValues: function() { return /* binding */ applyValues; }
|
|
45607
|
+
/* harmony export */ });
|
|
45608
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
45609
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
45610
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80991);
|
|
45611
|
+
/* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39057);
|
|
45612
|
+
/* harmony import */ var jodit_plugins_image_properties_utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10808);
|
|
45613
|
+
/*!
|
|
45614
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45615
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45616
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45617
|
+
*/ /**
|
|
45618
|
+
* @module plugins/video-properties
|
|
45619
|
+
*/
|
|
45620
|
+
|
|
45621
|
+
|
|
45622
|
+
|
|
45623
|
+
|
|
45624
|
+
const cssSize = (value)=>value === '' ? null : (0,jodit_plugins_image_properties_utils_utils__WEBPACK_IMPORTED_MODULE_4__.normalSizeToString)(value);
|
|
45625
|
+
// Sizes go on as the resizer writes them: an embed takes them as attributes,
|
|
45626
|
+
// and a video as CSS, without a height while its ratio is kept, if it had none
|
|
45627
|
+
function applySize(j, state) {
|
|
45628
|
+
const { media, values } = state;
|
|
45629
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'iframe')) {
|
|
45630
|
+
[
|
|
45631
|
+
'width',
|
|
45632
|
+
'height'
|
|
45633
|
+
].forEach((key)=>{
|
|
45634
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, key, values[key] === '' ? null : values[key]);
|
|
45635
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.cssInline)(media, key)) {
|
|
45636
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(media, key, cssSize(values[key]));
|
|
45637
|
+
}
|
|
45638
|
+
});
|
|
45639
|
+
// The resizer's frame for an embed
|
|
45640
|
+
const wrapper = media.parentElement;
|
|
45641
|
+
if (wrapper && (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(wrapper, 'data-jodit_iframe_wrapper')) {
|
|
45642
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(wrapper, {
|
|
45643
|
+
width: media.offsetWidth,
|
|
45644
|
+
height: media.offsetHeight
|
|
45645
|
+
});
|
|
45646
|
+
}
|
|
45647
|
+
return;
|
|
45648
|
+
}
|
|
45649
|
+
const heightFollowsWidth = state.sizeIsLocked && !(0,_readers__WEBPACK_IMPORTED_MODULE_3__.ownSize)(media, 'height');
|
|
45650
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(media, {
|
|
45651
|
+
width: cssSize(values.width),
|
|
45652
|
+
height: heightFollowsWidth ? null : cssSize(values.height)
|
|
45653
|
+
});
|
|
45654
|
+
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'style')?.trim()) {
|
|
45655
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'style', null);
|
|
45656
|
+
}
|
|
45657
|
+
j.e.fire(media, 'changesize');
|
|
45658
|
+
}
|
|
45659
|
+
function setFlag(media, name, on) {
|
|
45660
|
+
if (media.hasAttribute(name) !== on) {
|
|
45661
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, name, on ? '' : null);
|
|
45662
|
+
}
|
|
45663
|
+
}
|
|
45664
|
+
/**
|
|
45665
|
+
* Apply the dialog's values to the media
|
|
45666
|
+
* @private
|
|
45667
|
+
*/ function applyValues(j, state, sizeChanged) {
|
|
45668
|
+
const { media, values } = state;
|
|
45669
|
+
if (sizeChanged && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'audio')) {
|
|
45670
|
+
applySize(j, state);
|
|
45671
|
+
}
|
|
45672
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'iframe')) {
|
|
45673
|
+
return;
|
|
45674
|
+
}
|
|
45675
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'video')) {
|
|
45676
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(media, 'poster', values.poster || null);
|
|
45677
|
+
}
|
|
45678
|
+
// Browsers only autoplay muted media, and playsinline keeps an iPhone from
|
|
45679
|
+
// playing it full screen
|
|
45680
|
+
setFlag(media, 'autoplay', values.autoplay);
|
|
45681
|
+
setFlag(media, 'muted', values.autoplay || values.muted);
|
|
45682
|
+
setFlag(media, 'loop', values.loop);
|
|
45683
|
+
setFlag(media, 'controls', values.controls || !values.autoplay);
|
|
45684
|
+
if (values.autoplay && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(media, 'video')) {
|
|
45685
|
+
setFlag(media, 'playsinline', true);
|
|
45686
|
+
}
|
|
45687
|
+
}
|
|
45688
|
+
|
|
45689
|
+
|
|
45690
|
+
/***/ }),
|
|
45691
|
+
|
|
45692
|
+
/***/ 48899:
|
|
45693
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45694
|
+
|
|
45695
|
+
"use strict";
|
|
45696
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45697
|
+
/* harmony export */ videoTabs: function() { return /* binding */ videoTabs; }
|
|
45698
|
+
/* harmony export */ });
|
|
44900
45699
|
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65946);
|
|
44901
45700
|
/* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59400);
|
|
44902
45701
|
/* harmony import */ var jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5658);
|
|
@@ -44933,75 +45732,84 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
|
44933
45732
|
defaultHandlerSuccess: insertVideos
|
|
44934
45733
|
};
|
|
44935
45734
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
44936
|
-
|
|
44937
|
-
|
|
44938
|
-
|
|
44939
|
-
|
|
44940
|
-
|
|
44941
|
-
|
|
44942
|
-
|
|
44943
|
-
|
|
44944
|
-
|
|
44945
|
-
|
|
44946
|
-
|
|
44947
|
-
|
|
44948
|
-
|
|
44949
|
-
|
|
44950
|
-
|
|
44951
|
-
|
|
44952
|
-
|
|
44953
|
-
|
|
44954
|
-
|
|
44955
|
-
|
|
44956
|
-
|
|
44957
|
-
|
|
44958
|
-
|
|
44959
|
-
|
|
44960
|
-
|
|
44961
|
-
|
|
44962
|
-
|
|
44963
|
-
|
|
44964
|
-
|
|
44965
|
-
|
|
44966
|
-
|
|
44967
|
-
|
|
44968
|
-
|
|
45735
|
+
/**
|
|
45736
|
+
* The video popup's tabs: Upload, when the uploader is configured, then Link
|
|
45737
|
+
* and Code. `insert` runs what a tab inserts, which by default goes in at the
|
|
45738
|
+
* selection the popup was opened with.
|
|
45739
|
+
*/ function videoTabs(jodit, close, insert) {
|
|
45740
|
+
const run = insert ?? ((fn)=>{
|
|
45741
|
+
jodit.s.restore();
|
|
45742
|
+
fn();
|
|
45743
|
+
});
|
|
45744
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIForm(jodit, [
|
|
45745
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIBlock(jodit, [
|
|
45746
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIInput(jodit, {
|
|
45747
|
+
name: 'url',
|
|
45748
|
+
required: true,
|
|
45749
|
+
label: 'URL',
|
|
45750
|
+
placeholder: 'https://',
|
|
45751
|
+
validators: [
|
|
45752
|
+
'url'
|
|
45753
|
+
]
|
|
45754
|
+
})
|
|
45755
|
+
]),
|
|
45756
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIBlock(jodit, [
|
|
45757
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__.Button)(jodit, '', 'Insert', 'primary').onAction(()=>formLink.submit())
|
|
45758
|
+
])
|
|
45759
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIForm(jodit, [
|
|
45760
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIBlock(jodit, [
|
|
45761
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UITextArea(jodit, {
|
|
45762
|
+
name: 'code',
|
|
45763
|
+
required: true,
|
|
45764
|
+
label: 'Embed code'
|
|
45765
|
+
})
|
|
45766
|
+
]),
|
|
45767
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__.UIBlock(jodit, [
|
|
45768
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__.Button)(jodit, '', 'Insert', 'primary').onAction(()=>formCode.submit())
|
|
45769
|
+
])
|
|
45770
|
+
]), tabs = [], insertCode = (code)=>{
|
|
45771
|
+
run(()=>jodit.s.insertHTML((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code)));
|
|
45772
|
+
close();
|
|
45773
|
+
};
|
|
45774
|
+
if (!insert) {
|
|
44969
45775
|
jodit.s.save();
|
|
44970
|
-
|
|
44971
|
-
|
|
44972
|
-
|
|
44973
|
-
|
|
44974
|
-
|
|
44975
|
-
|
|
44976
|
-
}, {
|
|
44977
|
-
label: 'Drop file',
|
|
44978
|
-
accept: 'video/*'
|
|
44979
|
-
}));
|
|
44980
|
-
}
|
|
44981
|
-
tabs.push({
|
|
44982
|
-
icon: 'link',
|
|
44983
|
-
name: 'Link',
|
|
44984
|
-
content: formLink.container
|
|
45776
|
+
}
|
|
45777
|
+
const { uploader } = jodit.o;
|
|
45778
|
+
// Base64 alone would put whole video files into the content
|
|
45779
|
+
if (uploader.showTabInFileSelector !== false && (uploader.url || uploader.customUploadFunction)) {
|
|
45780
|
+
tabs.push((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.UploadTab)(jodit, (data)=>{
|
|
45781
|
+
run(()=>(jodit.o.video?.defaultHandlerSuccess ?? insertVideos).call(jodit, data));
|
|
44985
45782
|
}, {
|
|
44986
|
-
|
|
44987
|
-
|
|
44988
|
-
|
|
44989
|
-
|
|
44990
|
-
|
|
44991
|
-
|
|
44992
|
-
|
|
44993
|
-
|
|
44994
|
-
|
|
44995
|
-
|
|
44996
|
-
|
|
44997
|
-
|
|
44998
|
-
|
|
44999
|
-
|
|
45000
|
-
|
|
45001
|
-
|
|
45002
|
-
|
|
45003
|
-
|
|
45004
|
-
}
|
|
45783
|
+
label: 'Drop file',
|
|
45784
|
+
accept: 'video/*'
|
|
45785
|
+
}));
|
|
45786
|
+
}
|
|
45787
|
+
tabs.push({
|
|
45788
|
+
icon: 'link',
|
|
45789
|
+
name: 'Link',
|
|
45790
|
+
content: formLink.container
|
|
45791
|
+
}, {
|
|
45792
|
+
icon: 'source',
|
|
45793
|
+
name: 'Code',
|
|
45794
|
+
content: formCode.container
|
|
45795
|
+
});
|
|
45796
|
+
formLink.onSubmit((data)=>{
|
|
45797
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)(jodit.o.video?.parseUrlToVideoEmbed ?? jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
45798
|
+
width: jodit.o.video?.defaultWidth,
|
|
45799
|
+
height: jodit.o.video?.defaultHeight
|
|
45800
|
+
}));
|
|
45801
|
+
});
|
|
45802
|
+
formCode.onSubmit((data)=>{
|
|
45803
|
+
insertCode(data.code);
|
|
45804
|
+
});
|
|
45805
|
+
const box = (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
|
|
45806
|
+
// Its tabs are sized to their labels, as the file selector's are, since
|
|
45807
|
+
// "Upload" doesn't fit a third of the popup
|
|
45808
|
+
box.classList.add('jodit-file-selector');
|
|
45809
|
+
return box;
|
|
45810
|
+
}
|
|
45811
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
45812
|
+
popup: (jodit, current, close)=>videoTabs(jodit, close),
|
|
45005
45813
|
tags: [
|
|
45006
45814
|
'iframe'
|
|
45007
45815
|
],
|
|
@@ -45517,7 +46325,7 @@ module.exports["default"] = {"Type something":"Start writing...","pencil":"Edit"
|
|
|
45517
46325
|
/***/ 53414:
|
|
45518
46326
|
/***/ (function(module) {
|
|
45519
46327
|
|
|
45520
|
-
module.exports["default"] = [" URL","--Not Set--","About Jodit","Add column","Add folder","Add row","Advanced","Align","Align Center","Align Justify","Align Left","Align Right","All","Alternative","Alternative text","Anchor","Apply","Are you sure?","Background","Bold","Border","Border radius","Bottom","Break","Browse","Buy full version","Cancel","Center","Change mode","Chars: %d","Choose Content to Paste","Circle","Class name","Classes","Clean","Clear Formatting","Code","Copy selection","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Create directory","Crop","Cut selection","Decrease Indent","Default","Delete","Delete column","Delete row","Delete table","Dot","Drop file","Drop image","Edit","Edit image","Edit link","Embed code","Empty cell","Enter Directory name","Enter new name","Error on load folders","Error on load list","Eye","File Browser","Fill color or set the text color","Filter","Find","Find Next","Find Previous","Font family","Font size","For information about the license, please go to our website:","Free Non-commercial Version","Heading 1","Heading 2","Heading 3","Heading 4","Height","Horizontal align","Image","Image properties","Increase Indent","Insert","Insert Horizontal Line","Insert Image","Insert Ordered List","Insert Special Character","Insert Unordered List","Insert as Text","Insert className","Insert column after","Insert column before","Insert file","Insert format block","Insert link","Insert only Text","Insert row above","Insert row below","Insert table","Insert youtube/vimeo video","Interim Results","Italic","Jodit Editor","Jodit User's Guide","Keep","Keep Aspect Ratio","Left","License: %s","Line height","Link","List view","Lower Alpha","Lower Greek","Lower Roman","Margins","Merge","Middle","No","No follow","Normal","Ok","Open in fullsize","Open in new tab","Open link","Open link in new tab","Paint format","Paste","Paste as HTML","Paste from clipboard","Please enter a web address","Please fill out this field","Press Alt for custom resizing","Print","Quadrate","Quote","Redo","Remove","Remove file","Rename","Replace","Replace with","Reset","Resize","Right","Save","Save as ...","Search for","Select","Select %s","Select Special Character","Select all","Select file","Show all","Sort by changed","Sort by name","Sort by size","Sound","Speech Recognize","Spellcheck","Split","Split horizontal","Split vertical","Src","Strike through","Styles","Text","The image has been successfully uploaded to the host!","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","There are no files","Tiles view","Title","Top","Type something","Underline","Undo","Unlink","Update","Update file list","Upload","Upload file","Upper Alpha","Upper Roman","Vertical align","Width","Word Paste Detected","Words: %d","Yes","You can only edit your own images. Download this image on the host?","Your browser doesn't support direct access to the clipboard.","Your code is similar to HTML. Keep as HTML?","about","apply","bold","bottom","brush","circle","contains detailed help for using","copy","cut","default","delete","dot","download","edit","eraser","file","font","fontsize","fullsize","hr","image","indent","italic","left","link","newline","ol","or click","outdent","palette","paragraph","pencil","preview","print","redo","right","selectall","shrink","sound","source","space","spellcheck","square","strikethrough","subscript","superscript","table","top","type dir name","type name","ul","underline","undo","video"]
|
|
46328
|
+
module.exports["default"] = [" URL","--Not Set--","About Jodit","Add column","Add folder","Add row","Advanced","Align","Align Center","Align Justify","Align Left","Align Right","All","Alternative","Alternative text","Anchor","Apply","Are you sure?","Audio properties","Autoplay","Background","Bold","Border","Border radius","Bottom","Break","Browse","Buy full version","Cancel","Center","Change mode","Chars: %d","Choose Content to Paste","Circle","Class name","Classes","Clean","Clear Formatting","Code","Controls","Copy selection","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Create directory","Crop","Cut selection","Decrease Indent","Default","Delete","Delete column","Delete row","Delete table","Dot","Drop file","Drop image","Edit","Edit image","Edit link","Embed code","Empty cell","Enter Directory name","Enter new name","Error on load folders","Error on load list","Eye","File Browser","Fill color or set the text color","Filter","Find","Find Next","Find Previous","Font family","Font size","For information about the license, please go to our website:","Free Non-commercial Version","Heading 1","Heading 2","Heading 3","Heading 4","Height","Horizontal align","Image","Image properties","Increase Indent","Insert","Insert Horizontal Line","Insert Image","Insert Ordered List","Insert Special Character","Insert Unordered List","Insert as Text","Insert className","Insert column after","Insert column before","Insert file","Insert format block","Insert link","Insert only Text","Insert row above","Insert row below","Insert table","Insert youtube/vimeo video","Interim Results","Italic","Jodit Editor","Jodit User's Guide","Keep","Keep Aspect Ratio","Left","License: %s","Line height","Link","List view","Loop","Lower Alpha","Lower Greek","Lower Roman","Margins","Merge","Middle","Muted","No","No follow","Normal","Ok","Open in fullsize","Open in new tab","Open link","Open link in new tab","Paint format","Paste","Paste as HTML","Paste from clipboard","Please enter a web address","Please fill out this field","Poster","Press Alt for custom resizing","Print","Quadrate","Quote","Redo","Remove","Remove file","Rename","Replace","Replace with","Reset","Resize","Right","Save","Save as ...","Search for","Select","Select %s","Select Special Character","Select all","Select file","Show all","Sort by changed","Sort by name","Sort by size","Sound","Speech Recognize","Spellcheck","Split","Split horizontal","Split vertical","Src","Strike through","Styles","Text","The image has been successfully uploaded to the host!","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","There are no files","Tiles view","Title","Top","Type something","Underline","Undo","Unlink","Update","Update file list","Upload","Upload file","Upper Alpha","Upper Roman","Vertical align","Video properties","Width","Word Paste Detected","Words: %d","Yes","You can only edit your own images. Download this image on the host?","Your browser doesn't support direct access to the clipboard.","Your code is similar to HTML. Keep as HTML?","about","apply","bold","bottom","brush","circle","contains detailed help for using","copy","cut","default","delete","dot","download","edit","eraser","file","font","fontsize","fullsize","hr","image","indent","italic","left","link","newline","ol","or click","outdent","palette","paragraph","pencil","preview","print","redo","right","selectall","shrink","sound","source","space","spellcheck","square","strikethrough","subscript","superscript","table","top","type dir name","type name","ul","underline","undo","video"]
|
|
45521
46329
|
|
|
45522
46330
|
/***/ }),
|
|
45523
46331
|
|