jodit 4.12.23 → 4.12.25
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 +21 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +145 -20
- 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 +8 -8
- 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 +8 -8
- package/es2021/jodit.js +144 -20
- 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 -20
- package/es2021.en/jodit.min.js +8 -8
- 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 +191 -52
- 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 +30 -0
- package/esm/core/constants.js +1 -1
- package/esm/modules/image-editor/image-editor.js +5 -0
- package/esm/modules/uploader/helpers/send-files.js +9 -0
- package/esm/plugins/backspace/backspace.js +7 -3
- package/esm/plugins/backspace/cases/index.d.ts +19 -3
- package/esm/plugins/backspace/cases/index.js +18 -13
- package/esm/plugins/backspace/config.d.ts +15 -0
- package/esm/plugins/clean-html/clean-html.d.ts +8 -0
- package/esm/plugins/clean-html/clean-html.js +16 -0
- package/esm/plugins/clean-html/config.d.ts +9 -0
- package/esm/plugins/clean-html/config.js +1 -0
- package/esm/plugins/font/config.js +19 -0
- package/esm/plugins/link/config.d.ts +6 -0
- package/esm/plugins/link/config.js +1 -0
- package/esm/plugins/link/link.js +8 -1
- package/esm/plugins/link/template.js +10 -1
- package/esm/plugins/select-cells/select-cells.d.ts +1 -1
- package/esm/plugins/select-cells/select-cells.js +29 -2
- package/esm/plugins/source/config.js +1 -1
- package/esm/types/uploader.d.ts +23 -0
- package/package.json +1 -1
- package/types/config.d.ts +30 -0
- package/types/plugins/backspace/cases/index.d.ts +19 -3
- package/types/plugins/backspace/config.d.ts +15 -0
- package/types/plugins/clean-html/clean-html.d.ts +8 -0
- package/types/plugins/clean-html/config.d.ts +9 -0
- package/types/plugins/link/config.d.ts +6 -0
- package/types/plugins/select-cells/select-cells.d.ts +1 -1
- package/types/types/uploader.d.ts +23 -0
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.12.
|
|
4
|
+
* Version: v4.12.25
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1810,7 +1810,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1810
1810
|
* ```
|
|
1811
1811
|
* @packageDocumentation
|
|
1812
1812
|
* @module constants
|
|
1813
|
-
*/ const APP_VERSION = "4.12.
|
|
1813
|
+
*/ const APP_VERSION = "4.12.25";
|
|
1814
1814
|
// prettier-ignore
|
|
1815
1815
|
const ES = "es2021";
|
|
1816
1816
|
const IS_ES_MODERN = true;
|
|
@@ -22019,12 +22019,17 @@ class ImageEditor extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.View
|
|
|
22019
22019
|
self.j.alert('The name should not be empty');
|
|
22020
22020
|
return false;
|
|
22021
22021
|
}
|
|
22022
|
+
self.j.e.fire('afterImageEditorSave', data, name);
|
|
22022
22023
|
self.onSave(name, data, self.hide, (e)=>{
|
|
22023
22024
|
self.j.alert(e.message);
|
|
22024
22025
|
});
|
|
22025
22026
|
});
|
|
22026
22027
|
break;
|
|
22027
22028
|
case self.buttons.save:
|
|
22029
|
+
// Notify listeners that a crop/resize was applied,
|
|
22030
|
+
// passing the action box (action + box dimensions).
|
|
22031
|
+
// See https://github.com/xdan/jodit/issues/820
|
|
22032
|
+
self.j.e.fire('afterImageEditorSave', data);
|
|
22028
22033
|
self.onSave(undefined, data, self.hide, (e)=>{
|
|
22029
22034
|
self.j.alert(e.message);
|
|
22030
22035
|
});
|
|
@@ -24524,6 +24529,15 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
|
|
|
24524
24529
|
if (!fileList.length) {
|
|
24525
24530
|
return Promise.reject((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Need files'));
|
|
24526
24531
|
}
|
|
24532
|
+
// Client-side validation hook — returning `false` aborts the upload.
|
|
24533
|
+
// See https://github.com/xdan/jodit/issues/1329
|
|
24534
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(o.beforeUpload)) {
|
|
24535
|
+
if (o.beforeUpload.call(uploader, fileList) === false) {
|
|
24536
|
+
const err = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Upload canceled');
|
|
24537
|
+
(handlerError || o.defaultHandlerError).call(uploader, err);
|
|
24538
|
+
return Promise.reject(err);
|
|
24539
|
+
}
|
|
24540
|
+
}
|
|
24527
24541
|
const promises = [];
|
|
24528
24542
|
if (o.insertImageAsBase64URI) {
|
|
24529
24543
|
readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
|
|
@@ -26185,10 +26199,14 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
|
26185
26199
|
return false;
|
|
26186
26200
|
}
|
|
26187
26201
|
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_6__.moveNodeInsideStart)(jodit, fakeNode, backspace);
|
|
26188
|
-
|
|
26202
|
+
const disabled = jodit.o.delete.disableCases;
|
|
26203
|
+
if (_cases__WEBPACK_IMPORTED_MODULE_9__.casesMap.some(([key, func])=>{
|
|
26204
|
+
if (disabled && disabled.has(key)) {
|
|
26205
|
+
return;
|
|
26206
|
+
}
|
|
26189
26207
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_4__.isFunction)(func) && func(jodit, fakeNode, backspace, mode)) {
|
|
26190
26208
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
26191
|
-
console.info('Remove case:',
|
|
26209
|
+
console.info('Remove case:', key);
|
|
26192
26210
|
}
|
|
26193
26211
|
return true;
|
|
26194
26212
|
}
|
|
@@ -26877,8 +26895,9 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
26877
26895
|
|
|
26878
26896
|
"use strict";
|
|
26879
26897
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26880
|
-
/* harmony export */
|
|
26898
|
+
/* harmony export */ casesMap: function() { return /* binding */ casesMap; }
|
|
26881
26899
|
/* harmony export */ });
|
|
26900
|
+
/* unused harmony export cases */
|
|
26882
26901
|
/* harmony import */ var _check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26106);
|
|
26883
26902
|
/* harmony import */ var _check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80951);
|
|
26884
26903
|
/* harmony import */ var _check_remove_char__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58881);
|
|
@@ -26904,18 +26923,52 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
26904
26923
|
|
|
26905
26924
|
|
|
26906
26925
|
/**
|
|
26926
|
+
* Ordered delete/backspace cases with stable keys. The first one returning
|
|
26927
|
+
* `true` wins. The keys are stable across minified builds (function names are
|
|
26928
|
+
* mangled by terser) so they can be referenced by `delete.disableCases`.
|
|
26907
26929
|
* @private
|
|
26908
|
-
*/ const
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
|
|
26930
|
+
*/ const casesMap = [
|
|
26931
|
+
[
|
|
26932
|
+
'remove-unbreakable',
|
|
26933
|
+
_check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__.checkRemoveUnbreakableElement
|
|
26934
|
+
],
|
|
26935
|
+
[
|
|
26936
|
+
'remove-not-editable',
|
|
26937
|
+
_check_remove_content_not_editable__WEBPACK_IMPORTED_MODULE_3__.checkRemoveContentNotEditable
|
|
26938
|
+
],
|
|
26939
|
+
[
|
|
26940
|
+
'remove-char',
|
|
26941
|
+
_check_remove_char__WEBPACK_IMPORTED_MODULE_2__.checkRemoveChar
|
|
26942
|
+
],
|
|
26943
|
+
[
|
|
26944
|
+
'table-cell',
|
|
26945
|
+
_check_table_cell__WEBPACK_IMPORTED_MODULE_7__.checkTableCell
|
|
26946
|
+
],
|
|
26947
|
+
[
|
|
26948
|
+
'remove-empty-parent',
|
|
26949
|
+
_check_remove_empty_parent__WEBPACK_IMPORTED_MODULE_5__.checkRemoveEmptyParent
|
|
26950
|
+
],
|
|
26951
|
+
[
|
|
26952
|
+
'remove-empty-neighbor',
|
|
26953
|
+
_check_remove_empty_neighbor__WEBPACK_IMPORTED_MODULE_4__.checkRemoveEmptyNeighbor
|
|
26954
|
+
],
|
|
26955
|
+
[
|
|
26956
|
+
'join-two-lists',
|
|
26957
|
+
_check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
|
|
26958
|
+
],
|
|
26959
|
+
[
|
|
26960
|
+
'join-neighbors',
|
|
26961
|
+
_check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
|
|
26962
|
+
],
|
|
26963
|
+
[
|
|
26964
|
+
'unwrap-first-list-item',
|
|
26965
|
+
_check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__.checkUnwrapFirstListItem
|
|
26966
|
+
]
|
|
26918
26967
|
];
|
|
26968
|
+
/**
|
|
26969
|
+
* @private
|
|
26970
|
+
* @deprecated Use `casesMap` to also get the stable case keys.
|
|
26971
|
+
*/ const cases = casesMap.map(([, fn])=>fn);
|
|
26919
26972
|
|
|
26920
26973
|
|
|
26921
26974
|
/***/ }),
|
|
@@ -27397,6 +27450,18 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27397
27450
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(iframe);
|
|
27398
27451
|
return false;
|
|
27399
27452
|
}
|
|
27453
|
+
/**
|
|
27454
|
+
* Collapse a value that holds only a single empty block (e.g.
|
|
27455
|
+
* `<p><br></p>` left after deleting all content) to an empty string —
|
|
27456
|
+
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
27457
|
+
*/ onAfterGetValueFromEditor(data) {
|
|
27458
|
+
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
27459
|
+
return;
|
|
27460
|
+
}
|
|
27461
|
+
if (/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.test(data.value.trim())) {
|
|
27462
|
+
data.value = '';
|
|
27463
|
+
}
|
|
27464
|
+
}
|
|
27400
27465
|
onSafeHTML(sandBox) {
|
|
27401
27466
|
const sanitizer = this.j.o.cleanHTML.sanitizer;
|
|
27402
27467
|
if (sanitizer) {
|
|
@@ -27436,6 +27501,9 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27436
27501
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27437
27502
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeSetNativeEditorValue')
|
|
27438
27503
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|
|
27504
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27505
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterGetValueFromEditor')
|
|
27506
|
+
], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
|
|
27439
27507
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27440
27508
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':safeHTML')
|
|
27441
27509
|
], cleanHtml.prototype, "onSafeHTML", null);
|
|
@@ -27465,6 +27533,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
27465
27533
|
timeout: 300,
|
|
27466
27534
|
removeEmptyElements: true,
|
|
27467
27535
|
fillEmptyParagraph: true,
|
|
27536
|
+
collapseEmptyValueToEmptyString: false,
|
|
27468
27537
|
replaceNBSP: true,
|
|
27469
27538
|
replaceOldTags: {
|
|
27470
27539
|
i: 'em',
|
|
@@ -30877,6 +30946,25 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
30877
30946
|
return v.toLowerCase().replace(/['"]+/g, '').replace(/[^a-z0-9-]+/g, ',');
|
|
30878
30947
|
}
|
|
30879
30948
|
},
|
|
30949
|
+
// When no font is explicitly set, the computed font-family equals the
|
|
30950
|
+
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
30951
|
+
// button shows the `Default` list entry instead of that raw stack.
|
|
30952
|
+
// See #1370
|
|
30953
|
+
value: (editor)=>{
|
|
30954
|
+
const current = editor.s.current();
|
|
30955
|
+
if (!current) {
|
|
30956
|
+
return;
|
|
30957
|
+
}
|
|
30958
|
+
const box = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
|
|
30959
|
+
if (!box) {
|
|
30960
|
+
return;
|
|
30961
|
+
}
|
|
30962
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'font-family').toString();
|
|
30963
|
+
if (value === (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(editor.editor, 'font-family').toString()) {
|
|
30964
|
+
return '';
|
|
30965
|
+
}
|
|
30966
|
+
return value;
|
|
30967
|
+
},
|
|
30880
30968
|
tooltip: 'Font family'
|
|
30881
30969
|
};
|
|
30882
30970
|
|
|
@@ -35350,6 +35438,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
35350
35438
|
noFollowCheckbox: true,
|
|
35351
35439
|
openInNewTabCheckbox: true,
|
|
35352
35440
|
openInNewTabCheckboxDefaultChecked: false,
|
|
35441
|
+
ariaLabelInput: false,
|
|
35353
35442
|
modeClassName: 'input',
|
|
35354
35443
|
selectMultipleClassName: true,
|
|
35355
35444
|
preventReadOnlyNavigation: true,
|
|
@@ -35505,7 +35594,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35505
35594
|
const currentElement = current;
|
|
35506
35595
|
const isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isImage(currentElement);
|
|
35507
35596
|
let { content_input } = elements;
|
|
35508
|
-
const { className_input } = elements, { className_select } = elements;
|
|
35597
|
+
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
35509
35598
|
if (!content_input) {
|
|
35510
35599
|
content_input = jodit.c.element('input', {
|
|
35511
35600
|
type: 'hidden',
|
|
@@ -35528,6 +35617,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35528
35617
|
if (!isImageContent && current) {
|
|
35529
35618
|
content_input.value = getSelectionText();
|
|
35530
35619
|
}
|
|
35620
|
+
if (aria_label_input) {
|
|
35621
|
+
aria_label_input.value = link ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'aria-label') || '' : '';
|
|
35622
|
+
}
|
|
35531
35623
|
if (link) {
|
|
35532
35624
|
url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'href') || '';
|
|
35533
35625
|
if (modeClassName) {
|
|
@@ -35615,6 +35707,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35615
35707
|
}
|
|
35616
35708
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
35617
35709
|
}
|
|
35710
|
+
if (aria_label_input) {
|
|
35711
|
+
const ariaLabel = aria_label_input.value.trim();
|
|
35712
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'aria-label', ariaLabel || null);
|
|
35713
|
+
}
|
|
35618
35714
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
35619
35715
|
});
|
|
35620
35716
|
jodit.synchronizeValues();
|
|
@@ -35754,7 +35850,7 @@ function writeImage(a, content_input, textWasChanged, url_input) {
|
|
|
35754
35850
|
*/
|
|
35755
35851
|
|
|
35756
35852
|
const formTemplate = (editor)=>{
|
|
35757
|
-
const { openInNewTabCheckbox, noFollowCheckbox, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
35853
|
+
const { openInNewTabCheckbox, noFollowCheckbox, ariaLabelInput, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
35758
35854
|
return new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIForm(editor, [
|
|
35759
35855
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35760
35856
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
@@ -35766,6 +35862,13 @@ const formTemplate = (editor)=>{
|
|
|
35766
35862
|
required: true
|
|
35767
35863
|
})
|
|
35768
35864
|
]),
|
|
35865
|
+
ariaLabelInput ? new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35866
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
35867
|
+
name: 'ariaLabel',
|
|
35868
|
+
ref: 'aria_label_input',
|
|
35869
|
+
label: 'Aria label'
|
|
35870
|
+
})
|
|
35871
|
+
]) : null,
|
|
35769
35872
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35770
35873
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
35771
35874
|
name: 'content',
|
|
@@ -39387,15 +39490,36 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
|
|
|
39387
39490
|
}
|
|
39388
39491
|
/**
|
|
39389
39492
|
* Mouse click inside the table
|
|
39390
|
-
*/ onStartSelection(cell) {
|
|
39493
|
+
*/ onStartSelection(cell, event) {
|
|
39391
39494
|
if (this.j.o.readonly) {
|
|
39392
39495
|
return;
|
|
39393
39496
|
}
|
|
39497
|
+
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
39498
|
+
// Ctrl/Cmd + click toggles a single cell into the existing selection
|
|
39499
|
+
// instead of resetting it — non-contiguous multi-cell selection.
|
|
39500
|
+
// See https://github.com/xdan/jodit/issues/1163
|
|
39501
|
+
if ((event?.ctrlKey || event?.metaKey) && cell !== this.j.editor && table && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isCell(cell)) {
|
|
39502
|
+
if (this.__tableModule.getAllSelectedCells().includes(cell)) {
|
|
39503
|
+
this.__tableModule.removeSelection(cell);
|
|
39504
|
+
} else {
|
|
39505
|
+
if (!cell.firstChild) {
|
|
39506
|
+
cell.appendChild(this.j.createInside.element('br'));
|
|
39507
|
+
}
|
|
39508
|
+
this.__tableModule.addSelection(cell);
|
|
39509
|
+
}
|
|
39510
|
+
this.__selectedCell = cell;
|
|
39511
|
+
this.j.s.sel?.removeAllRanges();
|
|
39512
|
+
if (this.__tableModule.getAllSelectedCells().length) {
|
|
39513
|
+
this.j.e.fire('showPopup', table, ()=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.position)(cell, this.j), 'cells');
|
|
39514
|
+
} else {
|
|
39515
|
+
this.j.e.fire('hidePopup', 'cells');
|
|
39516
|
+
}
|
|
39517
|
+
return false;
|
|
39518
|
+
}
|
|
39394
39519
|
this.unselectCells();
|
|
39395
39520
|
if (cell === this.j.editor) {
|
|
39396
39521
|
return;
|
|
39397
39522
|
}
|
|
39398
|
-
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
39399
39523
|
if (!cell || !table) {
|
|
39400
39524
|
return;
|
|
39401
39525
|
}
|
|
@@ -40177,7 +40301,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorNativeOpt
|
|
|
40177
40301
|
*/ highlightActiveLine: true
|
|
40178
40302
|
};
|
|
40179
40303
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorCDNUrlsJS = [
|
|
40180
|
-
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.
|
|
40304
|
+
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js'
|
|
40181
40305
|
];
|
|
40182
40306
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.beautifyHTMLCDNUrlsJS = [
|
|
40183
40307
|
'https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js',
|