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.
- package/CHANGELOG.md +15 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +7 -7
- package/es2015/jodit.js +152 -29
- package/es2015/jodit.min.js +7 -7
- 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.js +7 -7
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +144 -28
- package/es2021/jodit.min.js +7 -7
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +7 -7
- package/es2021.en/jodit.js +144 -28
- package/es2021.en/jodit.min.js +7 -7
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +161 -29
- package/es5/jodit.min.css +2 -2
- 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 +40 -1
- package/esm/core/constants.js +1 -1
- package/esm/modules/widget/file-selector/file-selector.d.ts +10 -1
- package/esm/modules/widget/file-selector/file-selector.js +30 -18
- package/esm/plugins/file/file.d.ts +24 -1
- package/esm/plugins/file/file.js +17 -1
- package/esm/plugins/inline-popup/config/items/img.js +22 -1
- package/esm/plugins/source/editor/engines/ace.js +2 -1
- package/esm/plugins/source/source.d.ts +17 -0
- package/esm/plugins/source/source.js +60 -8
- package/esm/plugins/video/config.d.ts +21 -1
- package/esm/plugins/video/config.js +22 -2
- package/package.json +1 -1
- package/types/config.d.ts +40 -1
- package/types/modules/widget/file-selector/file-selector.d.ts +10 -1
- package/types/plugins/file/file.d.ts +24 -1
- package/types/plugins/source/source.d.ts +17 -0
- package/types/plugins/video/config.d.ts +21 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.
|
|
4
|
+
* Version: v4.17.0
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1805,7 +1805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1805
1805
|
* ```
|
|
1806
1806
|
* @packageDocumentation
|
|
1807
1807
|
* @module constants
|
|
1808
|
-
*/ const APP_VERSION = "4.
|
|
1808
|
+
*/ const APP_VERSION = "4.17.0";
|
|
1809
1809
|
// prettier-ignore
|
|
1810
1810
|
const ES = "es2015";
|
|
1811
1811
|
const IS_ES_MODERN = true;
|
|
@@ -26399,22 +26399,19 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
26399
26399
|
const tabs = [];
|
|
26400
26400
|
const options = editor.o.uploader;
|
|
26401
26401
|
if (callbacks.upload && options.showTabInFileSelector !== false && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
|
|
26402
|
-
const
|
|
26403
|
-
|
|
26404
|
-
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(
|
|
26402
|
+
const { upload } = callbacks;
|
|
26403
|
+
tabs.push(UploadTab(editor, (resp)=>{
|
|
26404
|
+
const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(upload) ? upload : options.defaultHandlerSuccess;
|
|
26405
26405
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
|
|
26406
26406
|
handler.call(editor, resp);
|
|
26407
26407
|
}
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
|
|
26411
|
-
|
|
26412
|
-
|
|
26413
|
-
|
|
26414
|
-
|
|
26415
|
-
name: 'Upload',
|
|
26416
|
-
content: dragBox
|
|
26417
|
-
});
|
|
26408
|
+
}, isImage ? {
|
|
26409
|
+
label: 'Drop image',
|
|
26410
|
+
accept: 'image/*'
|
|
26411
|
+
} : {
|
|
26412
|
+
label: 'Drop file',
|
|
26413
|
+
accept: '*'
|
|
26414
|
+
}));
|
|
26418
26415
|
}
|
|
26419
26416
|
if (callbacks.filebrowser) {
|
|
26420
26417
|
if (editor.o.filebrowser.ajax.url || editor.o.filebrowser.items.url) {
|
|
@@ -26482,6 +26479,24 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
26482
26479
|
box.classList.add('jodit-file-selector');
|
|
26483
26480
|
return box;
|
|
26484
26481
|
};
|
|
26482
|
+
/**
|
|
26483
|
+
* The Upload tab: a box that uploads the files dropped on it or chosen in its
|
|
26484
|
+
* file input, then passes the uploader's answer to `onSuccess` and closes the popup
|
|
26485
|
+
*/ const UploadTab = (editor, onSuccess, { label, accept })=>{
|
|
26486
|
+
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>');
|
|
26487
|
+
editor.uploader.bind(dragBox, (resp)=>{
|
|
26488
|
+
onSuccess.call(editor, resp);
|
|
26489
|
+
editor.e.fire('closeAllPopups');
|
|
26490
|
+
}, (error)=>{
|
|
26491
|
+
editor.message.error(error.message);
|
|
26492
|
+
editor.e.fire('closeAllPopups');
|
|
26493
|
+
});
|
|
26494
|
+
return {
|
|
26495
|
+
icon: 'upload',
|
|
26496
|
+
name: 'Upload',
|
|
26497
|
+
content: dragBox
|
|
26498
|
+
};
|
|
26499
|
+
};
|
|
26485
26500
|
function val(elm, name, value) {
|
|
26486
26501
|
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);
|
|
26487
26502
|
if (!child) {
|
|
@@ -26494,7 +26509,8 @@ function val(elm, name, value) {
|
|
|
26494
26509
|
}
|
|
26495
26510
|
|
|
26496
26511
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
26497
|
-
/* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget
|
|
26512
|
+
/* harmony export */ "FileSelectorWidget", 0, /* binding */ FileSelectorWidget,
|
|
26513
|
+
/* harmony export */ "UploadTab", 0, /* binding */ UploadTab
|
|
26498
26514
|
/* harmony export */ ]);
|
|
26499
26515
|
|
|
26500
26516
|
|
|
@@ -26507,7 +26523,8 @@ function val(elm, name, value) {
|
|
|
26507
26523
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26508
26524
|
/* harmony export */ ColorPickerWidget: function() { return /* reexport safe */ _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__.ColorPickerWidget; },
|
|
26509
26525
|
/* harmony export */ FileSelectorWidget: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.FileSelectorWidget; },
|
|
26510
|
-
/* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; }
|
|
26526
|
+
/* harmony export */ TabsWidget: function() { return /* reexport safe */ _tabs_tabs__WEBPACK_IMPORTED_MODULE_2__.TabsWidget; },
|
|
26527
|
+
/* harmony export */ UploadTab: function() { return /* reexport safe */ _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__.UploadTab; }
|
|
26511
26528
|
/* harmony export */ });
|
|
26512
26529
|
/* harmony import */ var _color_picker_color_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72348);
|
|
26513
26530
|
/* harmony import */ var _file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18762);
|
|
@@ -32223,6 +32240,19 @@ function brBefore(start) {
|
|
|
32223
32240
|
|
|
32224
32241
|
|
|
32225
32242
|
|
|
32243
|
+
function insertLinks(data) {
|
|
32244
|
+
var _data_files;
|
|
32245
|
+
(_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach((file)=>{
|
|
32246
|
+
const link = this.createInside.element('a', {
|
|
32247
|
+
href: data.baseurl + file
|
|
32248
|
+
});
|
|
32249
|
+
link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
|
|
32250
|
+
this.s.insertNode(link);
|
|
32251
|
+
});
|
|
32252
|
+
}
|
|
32253
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
|
|
32254
|
+
defaultHandlerSuccess: insertLinks
|
|
32255
|
+
};
|
|
32226
32256
|
jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
32227
32257
|
popup: (editor, current, close)=>{
|
|
32228
32258
|
const insert = (url, title = '')=>{
|
|
@@ -32237,7 +32267,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
|
32237
32267
|
data.files && data.files.forEach((file)=>insert(data.baseurl + file));
|
|
32238
32268
|
close();
|
|
32239
32269
|
},
|
|
32240
|
-
upload:
|
|
32270
|
+
upload: (data)=>{
|
|
32271
|
+
var _ref;
|
|
32272
|
+
var _editor_o_file;
|
|
32273
|
+
((_ref = (_editor_o_file = editor.o.file) === null || _editor_o_file === void 0 ? void 0 : _editor_o_file.defaultHandlerSuccess) !== null && _ref !== void 0 ? _ref : insertLinks).call(editor, data);
|
|
32274
|
+
},
|
|
32241
32275
|
url: (url, text)=>{
|
|
32242
32276
|
if (sourceAnchor) {
|
|
32243
32277
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
|
|
@@ -35782,6 +35816,26 @@ const cmd = (control)=>control.args && (0,jodit_core_helpers_checker__WEBPACK_IM
|
|
|
35782
35816
|
// Images align with `imageAlignClasses`; the wrappers of iframes and media
|
|
35783
35817
|
// keep inline styles
|
|
35784
35818
|
const alignClasses = (editor, elm)=>jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
35819
|
+
// A Normal image sits where the text of its line is aligned (#1531)
|
|
35820
|
+
const lineAlign = (editor, elm)=>{
|
|
35821
|
+
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;
|
|
35822
|
+
const rtl = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'direction') === 'rtl';
|
|
35823
|
+
switch((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(block, 'text-align')){
|
|
35824
|
+
case 'center':
|
|
35825
|
+
case '-webkit-center':
|
|
35826
|
+
return 'center';
|
|
35827
|
+
case 'justify':
|
|
35828
|
+
return 'justify';
|
|
35829
|
+
case 'right':
|
|
35830
|
+
return 'right';
|
|
35831
|
+
case 'end':
|
|
35832
|
+
return rtl ? 'left' : 'right';
|
|
35833
|
+
case 'start':
|
|
35834
|
+
return rtl ? 'right' : 'left';
|
|
35835
|
+
default:
|
|
35836
|
+
return 'left';
|
|
35837
|
+
}
|
|
35838
|
+
};
|
|
35785
35839
|
const currentAlign = (editor, elm)=>elm ? (0,jodit_core_helpers_utils_align__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
|
|
35786
35840
|
const align = {
|
|
35787
35841
|
name: 'left',
|
|
@@ -35794,7 +35848,7 @@ const align = {
|
|
|
35794
35848
|
],
|
|
35795
35849
|
update: (editor, button)=>{
|
|
35796
35850
|
const current = currentAlign(editor, button.target);
|
|
35797
|
-
button.state.icon.name = current === 'normal' ?
|
|
35851
|
+
button.state.icon.name = current === 'normal' ? lineAlign(editor, button.target) : current;
|
|
35798
35852
|
},
|
|
35799
35853
|
isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
|
|
35800
35854
|
isChildActive: (editor, button)=>{
|
|
@@ -42417,7 +42471,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
42417
42471
|
}
|
|
42418
42472
|
return;
|
|
42419
42473
|
}
|
|
42420
|
-
this
|
|
42474
|
+
// The source plugin carries the fallback editor's text over when this
|
|
42475
|
+
// one is ready; refilling from WYSIWYG here would drop unsynced typing
|
|
42421
42476
|
tryInitAceEditor();
|
|
42422
42477
|
};
|
|
42423
42478
|
editor.e.on('afterSetMode', initAceEditor);
|
|
@@ -42802,6 +42857,7 @@ class SourceEditor {
|
|
|
42802
42857
|
if (new_value !== this.getMirrorValue()) {
|
|
42803
42858
|
this.setMirrorValue(new_value);
|
|
42804
42859
|
}
|
|
42860
|
+
this.__filledValue = this.getMirrorValue();
|
|
42805
42861
|
this.__lock = false;
|
|
42806
42862
|
}
|
|
42807
42863
|
}
|
|
@@ -42979,9 +43035,9 @@ class SourceEditor {
|
|
|
42979
43035
|
return;
|
|
42980
43036
|
}
|
|
42981
43037
|
loading = true;
|
|
42982
|
-
|
|
42983
|
-
|
|
42984
|
-
|
|
43038
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
|
|
43039
|
+
addEventListener() && this.beautifyUntouched();
|
|
43040
|
+
}, ()=>null);
|
|
42985
43041
|
};
|
|
42986
43042
|
editor.e.on('afterSetMode.source', loadBeautify);
|
|
42987
43043
|
loadBeautify();
|
|
@@ -43000,10 +43056,8 @@ class SourceEditor {
|
|
|
43000
43056
|
if (editor.o.sourceEditor !== 'area') {
|
|
43001
43057
|
const sourceEditor = (0,_editor_factory__WEBPACK_IMPORTED_MODULE_9__.createSourceEditor)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
43002
43058
|
sourceEditor.onReadyAlways(()=>{
|
|
43003
|
-
var
|
|
43004
|
-
|
|
43005
|
-
this.sourceEditor = sourceEditor;
|
|
43006
|
-
this.syncValueFromWYSIWYG(true);
|
|
43059
|
+
var _editor_events;
|
|
43060
|
+
this.takeOver(sourceEditor);
|
|
43007
43061
|
(_editor_events = editor.events) === null || _editor_events === void 0 ? void 0 : _editor_events.fire('sourceEditorReady', editor);
|
|
43008
43062
|
});
|
|
43009
43063
|
} else {
|
|
@@ -43015,6 +43069,49 @@ class SourceEditor {
|
|
|
43015
43069
|
});
|
|
43016
43070
|
}
|
|
43017
43071
|
}
|
|
43072
|
+
/**
|
|
43073
|
+
* Replaces the source editor (the textarea shown while ACE loads) with
|
|
43074
|
+
* the one that just became ready, carrying its text, selection and focus
|
|
43075
|
+
* over. Filling the new editor from WYSIWYG instead would drop what was
|
|
43076
|
+
* typed since the last, debounced, sync and normalise half-typed markup.
|
|
43077
|
+
*/ takeOver(sourceEditor) {
|
|
43078
|
+
const previous = this.sourceEditor;
|
|
43079
|
+
if (!previous || previous === sourceEditor) {
|
|
43080
|
+
this.sourceEditor = sourceEditor;
|
|
43081
|
+
this.syncValueFromWYSIWYG(true);
|
|
43082
|
+
return;
|
|
43083
|
+
}
|
|
43084
|
+
const value = previous.getValue(), start = previous.getSelectionStart(), end = previous.getSelectionEnd(), focused = previous.isFocused, untouched = value === this.__filledValue;
|
|
43085
|
+
previous.destruct();
|
|
43086
|
+
this.sourceEditor = sourceEditor;
|
|
43087
|
+
if (untouched) {
|
|
43088
|
+
this.syncValueFromWYSIWYG(true);
|
|
43089
|
+
} else {
|
|
43090
|
+
sourceEditor.setValue(value);
|
|
43091
|
+
this.toWYSIWYG();
|
|
43092
|
+
}
|
|
43093
|
+
if (start >= 0) {
|
|
43094
|
+
sourceEditor.setSelectionRange(start, end);
|
|
43095
|
+
}
|
|
43096
|
+
focused && sourceEditor.focus();
|
|
43097
|
+
}
|
|
43098
|
+
/**
|
|
43099
|
+
* The beautifier arrived after the source view was opened: format the
|
|
43100
|
+
* view if nothing has been typed into it, otherwise leave the typing alone
|
|
43101
|
+
*/ beautifyUntouched() {
|
|
43102
|
+
const value = this.getMirrorValue();
|
|
43103
|
+
if (this.j.o.editHTMLDocumentMode || !value || value !== this.__filledValue) {
|
|
43104
|
+
return;
|
|
43105
|
+
}
|
|
43106
|
+
const html = this.j.e.fire('beautifyHTML', value);
|
|
43107
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.isString)(html) && html !== value) {
|
|
43108
|
+
var _this_sourceEditor, _this_sourceEditor1;
|
|
43109
|
+
const focused = (_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.isFocused;
|
|
43110
|
+
this.setMirrorValue(html);
|
|
43111
|
+
this.__filledValue = this.getMirrorValue();
|
|
43112
|
+
focused && ((_this_sourceEditor1 = this.sourceEditor) === null || _this_sourceEditor1 === void 0 ? void 0 : _this_sourceEditor1.focus());
|
|
43113
|
+
}
|
|
43114
|
+
}
|
|
43018
43115
|
/** @override */ beforeDestruct() {
|
|
43019
43116
|
if (this.sourceEditor) {
|
|
43020
43117
|
this.sourceEditor.destruct();
|
|
@@ -43028,7 +43125,10 @@ class SourceEditor {
|
|
|
43028
43125
|
name: 'source',
|
|
43029
43126
|
group: 'source'
|
|
43030
43127
|
}
|
|
43031
|
-
]), (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", ''),
|
|
43128
|
+
]), (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", ''), /**
|
|
43129
|
+
* What the source view was last filled with from WYSIWYG, read back from
|
|
43130
|
+
* the editor; while the view still holds it, nothing has been typed there
|
|
43131
|
+
*/ (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
|
|
43032
43132
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "getSelectionStart", ()=>{
|
|
43033
43133
|
var _ref;
|
|
43034
43134
|
var _this_sourceEditor;
|
|
@@ -45396,10 +45496,20 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('toolbarNavigati
|
|
|
45396
45496
|
|
|
45397
45497
|
|
|
45398
45498
|
|
|
45499
|
+
function insertVideos(data) {
|
|
45500
|
+
var _data_files;
|
|
45501
|
+
(_data_files = data.files) === null || _data_files === void 0 ? void 0 : _data_files.forEach((file)=>{
|
|
45502
|
+
this.s.insertNode(this.createInside.element('video', {
|
|
45503
|
+
controls: '',
|
|
45504
|
+
src: data.baseurl + file
|
|
45505
|
+
}));
|
|
45506
|
+
});
|
|
45507
|
+
}
|
|
45399
45508
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
45400
45509
|
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
45401
45510
|
defaultWidth: 400,
|
|
45402
|
-
defaultHeight: 345
|
|
45511
|
+
defaultHeight: 345,
|
|
45512
|
+
defaultHandlerSuccess: insertVideos
|
|
45403
45513
|
};
|
|
45404
45514
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
45405
45515
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
@@ -45436,6 +45546,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
45436
45546
|
close();
|
|
45437
45547
|
};
|
|
45438
45548
|
jodit.s.save();
|
|
45549
|
+
const { uploader } = jodit.o;
|
|
45550
|
+
// Base64 alone would put whole video files into the content
|
|
45551
|
+
if (uploader.showTabInFileSelector !== false && (uploader.url || uploader.customUploadFunction)) {
|
|
45552
|
+
tabs.push((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.UploadTab)(jodit, (data)=>{
|
|
45553
|
+
var _ref;
|
|
45554
|
+
var _jodit_o_video;
|
|
45555
|
+
jodit.s.restore();
|
|
45556
|
+
((_ref = (_jodit_o_video = jodit.o.video) === null || _jodit_o_video === void 0 ? void 0 : _jodit_o_video.defaultHandlerSuccess) !== null && _ref !== void 0 ? _ref : insertVideos).call(jodit, data);
|
|
45557
|
+
}, {
|
|
45558
|
+
label: 'Drop file',
|
|
45559
|
+
accept: 'video/*'
|
|
45560
|
+
}));
|
|
45561
|
+
}
|
|
45439
45562
|
tabs.push({
|
|
45440
45563
|
icon: 'link',
|
|
45441
45564
|
name: 'Link',
|