jodit 4.16.1 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +7 -7
  4. package/es2015/jodit.js +152 -29
  5. package/es2015/jodit.min.js +7 -7
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +7 -7
  13. package/es2018/jodit.min.js +7 -7
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +7 -7
  18. package/es2021/jodit.js +144 -28
  19. package/es2021/jodit.min.js +7 -7
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +7 -7
  28. package/es2021.en/jodit.js +144 -28
  29. package/es2021.en/jodit.min.js +7 -7
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +161 -29
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +40 -1
  51. package/esm/core/constants.js +1 -1
  52. package/esm/modules/widget/file-selector/file-selector.d.ts +10 -1
  53. package/esm/modules/widget/file-selector/file-selector.js +30 -18
  54. package/esm/plugins/file/file.d.ts +24 -1
  55. package/esm/plugins/file/file.js +17 -1
  56. package/esm/plugins/inline-popup/config/items/img.js +22 -1
  57. package/esm/plugins/source/editor/engines/ace.js +2 -1
  58. package/esm/plugins/source/source.d.ts +17 -0
  59. package/esm/plugins/source/source.js +60 -8
  60. package/esm/plugins/video/config.d.ts +21 -1
  61. package/esm/plugins/video/config.js +22 -2
  62. package/package.json +1 -1
  63. package/types/config.d.ts +40 -1
  64. package/types/modules/widget/file-selector/file-selector.d.ts +10 -1
  65. package/types/plugins/file/file.d.ts +24 -1
  66. package/types/plugins/source/source.d.ts +17 -0
  67. package/types/plugins/video/config.d.ts +21 -1
package/es2021/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.16.1
4
+ * Version: v4.17.0
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1799,7 +1799,7 @@ __webpack_require__.r(__webpack_exports__);
1799
1799
  * ```
1800
1800
  * @packageDocumentation
1801
1801
  * @module constants
1802
- */ const APP_VERSION = "4.16.1";
1802
+ */ const APP_VERSION = "4.17.0";
1803
1803
  // prettier-ignore
1804
1804
  const ES = "es2021";
1805
1805
  const IS_ES_MODERN = true;
@@ -26195,22 +26195,19 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26195
26195
  const tabs = [];
26196
26196
  const options = editor.o.uploader;
26197
26197
  if (callbacks.upload && options.showTabInFileSelector !== false && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
26198
- const dragBox = editor.c.fromHTML('<div class="jodit-drag-and-drop__file-box">' + `<strong>${editor.i18n(isImage ? 'Drop image' : 'Drop file')}</strong>` + `<span><br>${editor.i18n('or click')}</span>` + `<input type="file" accept="${isImage ? 'image/*' : '*'}" tabindex="-1" dir="auto" multiple=""/>` + '</div>');
26199
- editor.uploader.bind(dragBox, (resp)=>{
26200
- const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : options.defaultHandlerSuccess;
26198
+ const { upload } = callbacks;
26199
+ tabs.push(UploadTab(editor, (resp)=>{
26200
+ const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(upload) ? upload : options.defaultHandlerSuccess;
26201
26201
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
26202
26202
  handler.call(editor, resp);
26203
26203
  }
26204
- editor.e.fire('closeAllPopups');
26205
- }, (error)=>{
26206
- editor.message.error(error.message);
26207
- editor.e.fire('closeAllPopups');
26208
- });
26209
- tabs.push({
26210
- icon: 'upload',
26211
- name: 'Upload',
26212
- content: dragBox
26213
- });
26204
+ }, isImage ? {
26205
+ label: 'Drop image',
26206
+ accept: 'image/*'
26207
+ } : {
26208
+ label: 'Drop file',
26209
+ accept: '*'
26210
+ }));
26214
26211
  }
26215
26212
  if (callbacks.filebrowser) {
26216
26213
  if (editor.o.filebrowser.ajax.url || editor.o.filebrowser.items.url) {
@@ -26278,6 +26275,24 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26278
26275
  box.classList.add('jodit-file-selector');
26279
26276
  return box;
26280
26277
  };
26278
+ /**
26279
+ * The Upload tab: a box that uploads the files dropped on it or chosen in its
26280
+ * file input, then passes the uploader's answer to `onSuccess` and closes the popup
26281
+ */ const UploadTab = (editor, onSuccess, { label, accept })=>{
26282
+ const dragBox = editor.c.fromHTML('<div class="jodit-drag-and-drop__file-box">' + `<strong>${editor.i18n(label)}</strong>` + `<span><br>${editor.i18n('or click')}</span>` + `<input type="file" accept="${accept}" tabindex="-1" dir="auto" multiple=""/>` + '</div>');
26283
+ editor.uploader.bind(dragBox, (resp)=>{
26284
+ onSuccess.call(editor, resp);
26285
+ editor.e.fire('closeAllPopups');
26286
+ }, (error)=>{
26287
+ editor.message.error(error.message);
26288
+ editor.e.fire('closeAllPopups');
26289
+ });
26290
+ return {
26291
+ icon: 'upload',
26292
+ name: 'Upload',
26293
+ content: dragBox
26294
+ };
26295
+ };
26281
26296
  function val(elm, name, value) {
26282
26297
  const child = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.first(elm, (node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(node, 'input') && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.attr)(node, 'name') === name);
26283
26298
  if (!child) {
@@ -26290,7 +26305,8 @@ function val(elm, name, value) {
26290
26305
  }
26291
26306
 
26292
26307
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
26293
- /* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget
26308
+ /* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget,
26309
+ /* harmony export */ "UploadTab", 0, /* binding */ UploadTab
26294
26310
  /* harmony export */ ]);
26295
26311
 
26296
26312
 
@@ -26303,7 +26319,8 @@ function val(elm, name, value) {
26303
26319
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26304
26320
  /* harmony export */ ColorPickerWidget: function() { return /* reexport safe */ _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__.ColorPickerWidget; },
26305
26321
  /* harmony export */ FileSelectorWidget: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.FileSelectorWidget; },
26306
- /* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; }
26322
+ /* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; },
26323
+ /* harmony export */ UploadTab: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.UploadTab; }
26307
26324
  /* harmony export */ });
26308
26325
  /* harmony import */ var _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72348);
26309
26326
  /* harmony import */ var _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18762);
@@ -32001,6 +32018,18 @@ function brBefore(start) {
32001
32018
 
32002
32019
 
32003
32020
 
32021
+ function insertLinks(data) {
32022
+ data.files?.forEach((file)=>{
32023
+ const link = this.createInside.element('a', {
32024
+ href: data.baseurl + file
32025
+ });
32026
+ link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
32027
+ this.s.insertNode(link);
32028
+ });
32029
+ }
32030
+ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
32031
+ defaultHandlerSuccess: insertLinks
32032
+ };
32004
32033
  jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
32005
32034
  popup: (editor, current, close)=>{
32006
32035
  const insert = (url, title = '')=>{
@@ -32015,7 +32044,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
32015
32044
  data.files && data.files.forEach((file)=>insert(data.baseurl + file));
32016
32045
  close();
32017
32046
  },
32018
- upload: true,
32047
+ upload: (data)=>{
32048
+ (editor.o.file?.defaultHandlerSuccess ?? insertLinks).call(editor, data);
32049
+ },
32019
32050
  url: (url, text)=>{
32020
32051
  if (sourceAnchor) {
32021
32052
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
@@ -35518,6 +35549,26 @@ const cmd = (control)=>control.args && (0,jodit_core_helpers_checker__WEBPACK_IM
35518
35549
  // Images align with `imageAlignClasses`; the wrappers of iframes and media
35519
35550
  // keep inline styles
35520
35551
  const alignClasses = (editor, elm)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
35552
+ // A Normal image sits where the text of its line is aligned (#1531)
35553
+ const lineAlign = (editor, elm)=>{
35554
+ const block = elm && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
35555
+ const rtl = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'direction') === 'rtl';
35556
+ switch((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'text-align')){
35557
+ case 'center':
35558
+ case '-webkit-center':
35559
+ return 'center';
35560
+ case 'justify':
35561
+ return 'justify';
35562
+ case 'right':
35563
+ return 'right';
35564
+ case 'end':
35565
+ return rtl ? 'left' : 'right';
35566
+ case 'start':
35567
+ return rtl ? 'right' : 'left';
35568
+ default:
35569
+ return 'left';
35570
+ }
35571
+ };
35521
35572
  const currentAlign = (editor, elm)=>elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
35522
35573
  const align = {
35523
35574
  name: 'left',
@@ -35530,7 +35581,7 @@ const align = {
35530
35581
  ],
35531
35582
  update: (editor, button)=>{
35532
35583
  const current = currentAlign(editor, button.target);
35533
- button.state.icon.name = current === 'normal' ? 'left' : current;
35584
+ button.state.icon.name = current === 'normal' ? lineAlign(editor, button.target) : current;
35534
35585
  },
35535
35586
  isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
35536
35587
  isChildActive: (editor, button)=>{
@@ -42098,7 +42149,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
42098
42149
  }
42099
42150
  return;
42100
42151
  }
42101
- this.fromWYSIWYG();
42152
+ // The source plugin carries the fallback editor's text over when this
42153
+ // one is ready; refilling from WYSIWYG here would drop unsynced typing
42102
42154
  tryInitAceEditor();
42103
42155
  };
42104
42156
  editor.e.on('afterSetMode', initAceEditor);
@@ -42480,6 +42532,7 @@ class SourceEditor {
42480
42532
  if (new_value !== this.getMirrorValue()) {
42481
42533
  this.setMirrorValue(new_value);
42482
42534
  }
42535
+ this.__filledValue = this.getMirrorValue();
42483
42536
  this.__lock = false;
42484
42537
  }
42485
42538
  }
@@ -42648,9 +42701,9 @@ class SourceEditor {
42648
42701
  return;
42649
42702
  }
42650
42703
  loading = true;
42651
- // It formats the source view from the next time it opens:
42652
- // filling it again now would replace what was typed there
42653
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener, ()=>null);
42704
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
42705
+ addEventListener() && this.beautifyUntouched();
42706
+ }, ()=>null);
42654
42707
  };
42655
42708
  editor.e.on('afterSetMode.source', loadBeautify);
42656
42709
  loadBeautify();
@@ -42669,9 +42722,7 @@ class SourceEditor {
42669
42722
  if (editor.o.sourceEditor !== 'area') {
42670
42723
  const sourceEditor = (0,_editor_factory__WEBPACK_IMPORTED_MODULE_9__.createSourceEditor)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
42671
42724
  sourceEditor.onReadyAlways(()=>{
42672
- this.sourceEditor?.destruct();
42673
- this.sourceEditor = sourceEditor;
42674
- this.syncValueFromWYSIWYG(true);
42725
+ this.takeOver(sourceEditor);
42675
42726
  editor.events?.fire('sourceEditorReady', editor);
42676
42727
  });
42677
42728
  } else {
@@ -42681,6 +42732,48 @@ class SourceEditor {
42681
42732
  });
42682
42733
  }
42683
42734
  }
42735
+ /**
42736
+ * Replaces the source editor (the textarea shown while ACE loads) with
42737
+ * the one that just became ready, carrying its text, selection and focus
42738
+ * over. Filling the new editor from WYSIWYG instead would drop what was
42739
+ * typed since the last, debounced, sync and normalise half-typed markup.
42740
+ */ takeOver(sourceEditor) {
42741
+ const previous = this.sourceEditor;
42742
+ if (!previous || previous === sourceEditor) {
42743
+ this.sourceEditor = sourceEditor;
42744
+ this.syncValueFromWYSIWYG(true);
42745
+ return;
42746
+ }
42747
+ const value = previous.getValue(), start = previous.getSelectionStart(), end = previous.getSelectionEnd(), focused = previous.isFocused, untouched = value === this.__filledValue;
42748
+ previous.destruct();
42749
+ this.sourceEditor = sourceEditor;
42750
+ if (untouched) {
42751
+ this.syncValueFromWYSIWYG(true);
42752
+ } else {
42753
+ sourceEditor.setValue(value);
42754
+ this.toWYSIWYG();
42755
+ }
42756
+ if (start >= 0) {
42757
+ sourceEditor.setSelectionRange(start, end);
42758
+ }
42759
+ focused && sourceEditor.focus();
42760
+ }
42761
+ /**
42762
+ * The beautifier arrived after the source view was opened: format the
42763
+ * view if nothing has been typed into it, otherwise leave the typing alone
42764
+ */ beautifyUntouched() {
42765
+ const value = this.getMirrorValue();
42766
+ if (this.j.o.editHTMLDocumentMode || !value || value !== this.__filledValue) {
42767
+ return;
42768
+ }
42769
+ const html = this.j.e.fire('beautifyHTML', value);
42770
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.isString)(html) && html !== value) {
42771
+ const focused = this.sourceEditor?.isFocused;
42772
+ this.setMirrorValue(html);
42773
+ this.__filledValue = this.getMirrorValue();
42774
+ focused && this.sourceEditor?.focus();
42775
+ }
42776
+ }
42684
42777
  /** @override */ beforeDestruct() {
42685
42778
  if (this.sourceEditor) {
42686
42779
  this.sourceEditor.destruct();
@@ -42694,7 +42787,10 @@ class SourceEditor {
42694
42787
  name: 'source',
42695
42788
  group: 'source'
42696
42789
  }
42697
- ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "sourceEditor", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mirrorContainer", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__lock", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__oldMirrorValue", ''), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerStart", '{start-jodit-selection}'), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerStartReg", /{start-jodit-selection}/g), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerEnd", '{end-jodit-selection}'), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerEndReg", /{end-jodit-selection}/g), // override it for ace editors
42790
+ ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "sourceEditor", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mirrorContainer", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__lock", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__oldMirrorValue", ''), /**
42791
+ * What the source view was last filled with from WYSIWYG, read back from
42792
+ * the editor; while the view still holds it, nothing has been typed there
42793
+ */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__filledValue", ''), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerStart", '{start-jodit-selection}'), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerStartReg", /{start-jodit-selection}/g), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerEnd", '{end-jodit-selection}'), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "tempMarkerEndReg", /{end-jodit-selection}/g), // override it for ace editors
42698
42794
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "getSelectionStart", ()=>{
42699
42795
  return this.sourceEditor?.getSelectionStart() ?? 0;
42700
42796
  }), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "getSelectionEnd", ()=>{
@@ -45058,10 +45154,19 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
45058
45154
 
45059
45155
 
45060
45156
 
45157
+ function insertVideos(data) {
45158
+ data.files?.forEach((file)=>{
45159
+ this.s.insertNode(this.createInside.element('video', {
45160
+ controls: '',
45161
+ src: data.baseurl + file
45162
+ }));
45163
+ });
45164
+ }
45061
45165
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
45062
45166
  parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
45063
45167
  defaultWidth: 400,
45064
- defaultHeight: 345
45168
+ defaultHeight: 345,
45169
+ defaultHandlerSuccess: insertVideos
45065
45170
  };
45066
45171
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
45067
45172
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
@@ -45098,6 +45203,17 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
45098
45203
  close();
45099
45204
  };
45100
45205
  jodit.s.save();
45206
+ const { uploader } = jodit.o;
45207
+ // Base64 alone would put whole video files into the content
45208
+ if (uploader.showTabInFileSelector !== false && (uploader.url || uploader.customUploadFunction)) {
45209
+ tabs.push((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.UploadTab)(jodit, (data)=>{
45210
+ jodit.s.restore();
45211
+ (jodit.o.video?.defaultHandlerSuccess ?? insertVideos).call(jodit, data);
45212
+ }, {
45213
+ label: 'Drop file',
45214
+ accept: 'video/*'
45215
+ }));
45216
+ }
45101
45217
  tabs.push({
45102
45218
  icon: 'link',
45103
45219
  name: 'Link',