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
@@ -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;
@@ -26171,22 +26171,19 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26171
26171
  const tabs = [];
26172
26172
  const options = editor.o.uploader;
26173
26173
  if (callbacks.upload && options.showTabInFileSelector !== false && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
26174
- 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>');
26175
- editor.uploader.bind(dragBox, (resp)=>{
26176
- const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : options.defaultHandlerSuccess;
26174
+ const { upload } = callbacks;
26175
+ tabs.push(UploadTab(editor, (resp)=>{
26176
+ const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(upload) ? upload : options.defaultHandlerSuccess;
26177
26177
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
26178
26178
  handler.call(editor, resp);
26179
26179
  }
26180
- editor.e.fire('closeAllPopups');
26181
- }, (error)=>{
26182
- editor.message.error(error.message);
26183
- editor.e.fire('closeAllPopups');
26184
- });
26185
- tabs.push({
26186
- icon: 'upload',
26187
- name: 'Upload',
26188
- content: dragBox
26189
- });
26180
+ }, isImage ? {
26181
+ label: 'Drop image',
26182
+ accept: 'image/*'
26183
+ } : {
26184
+ label: 'Drop file',
26185
+ accept: '*'
26186
+ }));
26190
26187
  }
26191
26188
  if (callbacks.filebrowser) {
26192
26189
  if (editor.o.filebrowser.ajax.url || editor.o.filebrowser.items.url) {
@@ -26254,6 +26251,24 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
26254
26251
  box.classList.add('jodit-file-selector');
26255
26252
  return box;
26256
26253
  };
26254
+ /**
26255
+ * The Upload tab: a box that uploads the files dropped on it or chosen in its
26256
+ * file input, then passes the uploader's answer to `onSuccess` and closes the popup
26257
+ */ const UploadTab = (editor, onSuccess, { label, accept })=>{
26258
+ 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>');
26259
+ editor.uploader.bind(dragBox, (resp)=>{
26260
+ onSuccess.call(editor, resp);
26261
+ editor.e.fire('closeAllPopups');
26262
+ }, (error)=>{
26263
+ editor.message.error(error.message);
26264
+ editor.e.fire('closeAllPopups');
26265
+ });
26266
+ return {
26267
+ icon: 'upload',
26268
+ name: 'Upload',
26269
+ content: dragBox
26270
+ };
26271
+ };
26257
26272
  function val(elm, name, value) {
26258
26273
  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);
26259
26274
  if (!child) {
@@ -26266,7 +26281,8 @@ function val(elm, name, value) {
26266
26281
  }
26267
26282
 
26268
26283
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
26269
- /* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget
26284
+ /* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget,
26285
+ /* harmony export */ "UploadTab", 0, /* binding */ UploadTab
26270
26286
  /* harmony export */ ]);
26271
26287
 
26272
26288
 
@@ -26279,7 +26295,8 @@ function val(elm, name, value) {
26279
26295
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26280
26296
  /* harmony export */ ColorPickerWidget: function() { return /* reexport safe */ _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__.ColorPickerWidget; },
26281
26297
  /* harmony export */ FileSelectorWidget: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.FileSelectorWidget; },
26282
- /* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; }
26298
+ /* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; },
26299
+ /* harmony export */ UploadTab: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.UploadTab; }
26283
26300
  /* harmony export */ });
26284
26301
  /* harmony import */ var _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72348);
26285
26302
  /* harmony import */ var _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18762);
@@ -31614,6 +31631,18 @@ function brBefore(start) {
31614
31631
 
31615
31632
 
31616
31633
 
31634
+ function insertLinks(data) {
31635
+ data.files?.forEach((file)=>{
31636
+ const link = this.createInside.element('a', {
31637
+ href: data.baseurl + file
31638
+ });
31639
+ link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
31640
+ this.s.insertNode(link);
31641
+ });
31642
+ }
31643
+ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
31644
+ defaultHandlerSuccess: insertLinks
31645
+ };
31617
31646
  jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
31618
31647
  popup: (editor, current, close)=>{
31619
31648
  const insert = (url, title = '')=>{
@@ -31628,7 +31657,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
31628
31657
  data.files && data.files.forEach((file)=>insert(data.baseurl + file));
31629
31658
  close();
31630
31659
  },
31631
- upload: true,
31660
+ upload: (data)=>{
31661
+ (editor.o.file?.defaultHandlerSuccess ?? insertLinks).call(editor, data);
31662
+ },
31632
31663
  url: (url, text)=>{
31633
31664
  if (sourceAnchor) {
31634
31665
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
@@ -35131,6 +35162,26 @@ const cmd = (control)=>control.args && (0,jodit_core_helpers_checker__WEBPACK_IM
35131
35162
  // Images align with `imageAlignClasses`; the wrappers of iframes and media
35132
35163
  // keep inline styles
35133
35164
  const alignClasses = (editor, elm)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
35165
+ // A Normal image sits where the text of its line is aligned (#1531)
35166
+ const lineAlign = (editor, elm)=>{
35167
+ 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;
35168
+ const rtl = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'direction') === 'rtl';
35169
+ switch((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'text-align')){
35170
+ case 'center':
35171
+ case '-webkit-center':
35172
+ return 'center';
35173
+ case 'justify':
35174
+ return 'justify';
35175
+ case 'right':
35176
+ return 'right';
35177
+ case 'end':
35178
+ return rtl ? 'left' : 'right';
35179
+ case 'start':
35180
+ return rtl ? 'right' : 'left';
35181
+ default:
35182
+ return 'left';
35183
+ }
35184
+ };
35134
35185
  const currentAlign = (editor, elm)=>elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
35135
35186
  const align = {
35136
35187
  name: 'left',
@@ -35143,7 +35194,7 @@ const align = {
35143
35194
  ],
35144
35195
  update: (editor, button)=>{
35145
35196
  const current = currentAlign(editor, button.target);
35146
- button.state.icon.name = current === 'normal' ? 'left' : current;
35197
+ button.state.icon.name = current === 'normal' ? lineAlign(editor, button.target) : current;
35147
35198
  },
35148
35199
  isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
35149
35200
  isChildActive: (editor, button)=>{
@@ -41345,7 +41396,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
41345
41396
  }
41346
41397
  return;
41347
41398
  }
41348
- this.fromWYSIWYG();
41399
+ // The source plugin carries the fallback editor's text over when this
41400
+ // one is ready; refilling from WYSIWYG here would drop unsynced typing
41349
41401
  tryInitAceEditor();
41350
41402
  };
41351
41403
  editor.e.on('afterSetMode', initAceEditor);
@@ -41727,6 +41779,7 @@ class SourceEditor {
41727
41779
  if (new_value !== this.getMirrorValue()) {
41728
41780
  this.setMirrorValue(new_value);
41729
41781
  }
41782
+ this.__filledValue = this.getMirrorValue();
41730
41783
  this.__lock = false;
41731
41784
  }
41732
41785
  }
@@ -41895,9 +41948,9 @@ class SourceEditor {
41895
41948
  return;
41896
41949
  }
41897
41950
  loading = true;
41898
- // It formats the source view from the next time it opens:
41899
- // filling it again now would replace what was typed there
41900
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener, ()=>null);
41951
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
41952
+ addEventListener() && this.beautifyUntouched();
41953
+ }, ()=>null);
41901
41954
  };
41902
41955
  editor.e.on('afterSetMode.source', loadBeautify);
41903
41956
  loadBeautify();
@@ -41916,9 +41969,7 @@ class SourceEditor {
41916
41969
  if (editor.o.sourceEditor !== 'area') {
41917
41970
  const sourceEditor = (0,_editor_factory__WEBPACK_IMPORTED_MODULE_9__.createSourceEditor)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
41918
41971
  sourceEditor.onReadyAlways(()=>{
41919
- this.sourceEditor?.destruct();
41920
- this.sourceEditor = sourceEditor;
41921
- this.syncValueFromWYSIWYG(true);
41972
+ this.takeOver(sourceEditor);
41922
41973
  editor.events?.fire('sourceEditorReady', editor);
41923
41974
  });
41924
41975
  } else {
@@ -41928,6 +41979,48 @@ class SourceEditor {
41928
41979
  });
41929
41980
  }
41930
41981
  }
41982
+ /**
41983
+ * Replaces the source editor (the textarea shown while ACE loads) with
41984
+ * the one that just became ready, carrying its text, selection and focus
41985
+ * over. Filling the new editor from WYSIWYG instead would drop what was
41986
+ * typed since the last, debounced, sync and normalise half-typed markup.
41987
+ */ takeOver(sourceEditor) {
41988
+ const previous = this.sourceEditor;
41989
+ if (!previous || previous === sourceEditor) {
41990
+ this.sourceEditor = sourceEditor;
41991
+ this.syncValueFromWYSIWYG(true);
41992
+ return;
41993
+ }
41994
+ const value = previous.getValue(), start = previous.getSelectionStart(), end = previous.getSelectionEnd(), focused = previous.isFocused, untouched = value === this.__filledValue;
41995
+ previous.destruct();
41996
+ this.sourceEditor = sourceEditor;
41997
+ if (untouched) {
41998
+ this.syncValueFromWYSIWYG(true);
41999
+ } else {
42000
+ sourceEditor.setValue(value);
42001
+ this.toWYSIWYG();
42002
+ }
42003
+ if (start >= 0) {
42004
+ sourceEditor.setSelectionRange(start, end);
42005
+ }
42006
+ focused && sourceEditor.focus();
42007
+ }
42008
+ /**
42009
+ * The beautifier arrived after the source view was opened: format the
42010
+ * view if nothing has been typed into it, otherwise leave the typing alone
42011
+ */ beautifyUntouched() {
42012
+ const value = this.getMirrorValue();
42013
+ if (this.j.o.editHTMLDocumentMode || !value || value !== this.__filledValue) {
42014
+ return;
42015
+ }
42016
+ const html = this.j.e.fire('beautifyHTML', value);
42017
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.isString)(html) && html !== value) {
42018
+ const focused = this.sourceEditor?.isFocused;
42019
+ this.setMirrorValue(html);
42020
+ this.__filledValue = this.getMirrorValue();
42021
+ focused && this.sourceEditor?.focus();
42022
+ }
42023
+ }
41931
42024
  /** @override */ beforeDestruct() {
41932
42025
  if (this.sourceEditor) {
41933
42026
  this.sourceEditor.destruct();
@@ -41941,7 +42034,10 @@ class SourceEditor {
41941
42034
  name: 'source',
41942
42035
  group: 'source'
41943
42036
  }
41944
- ]), (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
42037
+ ]), (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", ''), /**
42038
+ * What the source view was last filled with from WYSIWYG, read back from
42039
+ * the editor; while the view still holds it, nothing has been typed there
42040
+ */ (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
41945
42041
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "getSelectionStart", ()=>{
41946
42042
  return this.sourceEditor?.getSelectionStart() ?? 0;
41947
42043
  }), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "getSelectionEnd", ()=>{
@@ -43573,10 +43669,19 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
43573
43669
 
43574
43670
 
43575
43671
 
43672
+ function insertVideos(data) {
43673
+ data.files?.forEach((file)=>{
43674
+ this.s.insertNode(this.createInside.element('video', {
43675
+ controls: '',
43676
+ src: data.baseurl + file
43677
+ }));
43678
+ });
43679
+ }
43576
43680
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
43577
43681
  parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
43578
43682
  defaultWidth: 400,
43579
- defaultHeight: 345
43683
+ defaultHeight: 345,
43684
+ defaultHandlerSuccess: insertVideos
43580
43685
  };
43581
43686
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
43582
43687
  jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
@@ -43613,6 +43718,17 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
43613
43718
  close();
43614
43719
  };
43615
43720
  jodit.s.save();
43721
+ const { uploader } = jodit.o;
43722
+ // Base64 alone would put whole video files into the content
43723
+ if (uploader.showTabInFileSelector !== false && (uploader.url || uploader.customUploadFunction)) {
43724
+ tabs.push((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.UploadTab)(jodit, (data)=>{
43725
+ jodit.s.restore();
43726
+ (jodit.o.video?.defaultHandlerSuccess ?? insertVideos).call(jodit, data);
43727
+ }, {
43728
+ label: 'Drop file',
43729
+ accept: 'video/*'
43730
+ }));
43731
+ }
43616
43732
  tabs.push({
43617
43733
  icon: 'link',
43618
43734
  name: 'Link',