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.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.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;
|
|
@@ -21999,12 +21999,17 @@ class ImageEditor extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.View
|
|
|
21999
21999
|
self.j.alert('The name should not be empty');
|
|
22000
22000
|
return false;
|
|
22001
22001
|
}
|
|
22002
|
+
self.j.e.fire('afterImageEditorSave', data, name);
|
|
22002
22003
|
self.onSave(name, data, self.hide, (e)=>{
|
|
22003
22004
|
self.j.alert(e.message);
|
|
22004
22005
|
});
|
|
22005
22006
|
});
|
|
22006
22007
|
break;
|
|
22007
22008
|
case self.buttons.save:
|
|
22009
|
+
// Notify listeners that a crop/resize was applied,
|
|
22010
|
+
// passing the action box (action + box dimensions).
|
|
22011
|
+
// See https://github.com/xdan/jodit/issues/820
|
|
22012
|
+
self.j.e.fire('afterImageEditorSave', data);
|
|
22008
22013
|
self.onSave(undefined, data, self.hide, (e)=>{
|
|
22009
22014
|
self.j.alert(e.message);
|
|
22010
22015
|
});
|
|
@@ -24504,6 +24509,15 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
|
|
|
24504
24509
|
if (!fileList.length) {
|
|
24505
24510
|
return Promise.reject((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Need files'));
|
|
24506
24511
|
}
|
|
24512
|
+
// Client-side validation hook — returning `false` aborts the upload.
|
|
24513
|
+
// See https://github.com/xdan/jodit/issues/1329
|
|
24514
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(o.beforeUpload)) {
|
|
24515
|
+
if (o.beforeUpload.call(uploader, fileList) === false) {
|
|
24516
|
+
const err = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Upload canceled');
|
|
24517
|
+
(handlerError || o.defaultHandlerError).call(uploader, err);
|
|
24518
|
+
return Promise.reject(err);
|
|
24519
|
+
}
|
|
24520
|
+
}
|
|
24507
24521
|
const promises = [];
|
|
24508
24522
|
if (o.insertImageAsBase64URI) {
|
|
24509
24523
|
readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
|
|
@@ -26115,10 +26129,14 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
|
26115
26129
|
return false;
|
|
26116
26130
|
}
|
|
26117
26131
|
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_6__.moveNodeInsideStart)(jodit, fakeNode, backspace);
|
|
26118
|
-
|
|
26132
|
+
const disabled = jodit.o.delete.disableCases;
|
|
26133
|
+
if (_cases__WEBPACK_IMPORTED_MODULE_9__.casesMap.some(([key, func])=>{
|
|
26134
|
+
if (disabled && disabled.has(key)) {
|
|
26135
|
+
return;
|
|
26136
|
+
}
|
|
26119
26137
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_4__.isFunction)(func) && func(jodit, fakeNode, backspace, mode)) {
|
|
26120
26138
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
26121
|
-
console.info('Remove case:',
|
|
26139
|
+
console.info('Remove case:', key);
|
|
26122
26140
|
}
|
|
26123
26141
|
return true;
|
|
26124
26142
|
}
|
|
@@ -26807,8 +26825,9 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
26807
26825
|
|
|
26808
26826
|
"use strict";
|
|
26809
26827
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26810
|
-
/* harmony export */
|
|
26828
|
+
/* harmony export */ casesMap: function() { return /* binding */ casesMap; }
|
|
26811
26829
|
/* harmony export */ });
|
|
26830
|
+
/* unused harmony export cases */
|
|
26812
26831
|
/* harmony import */ var _check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26106);
|
|
26813
26832
|
/* harmony import */ var _check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80951);
|
|
26814
26833
|
/* harmony import */ var _check_remove_char__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58881);
|
|
@@ -26834,18 +26853,52 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
26834
26853
|
|
|
26835
26854
|
|
|
26836
26855
|
/**
|
|
26856
|
+
* Ordered delete/backspace cases with stable keys. The first one returning
|
|
26857
|
+
* `true` wins. The keys are stable across minified builds (function names are
|
|
26858
|
+
* mangled by terser) so they can be referenced by `delete.disableCases`.
|
|
26837
26859
|
* @private
|
|
26838
|
-
*/ const
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26842
|
-
|
|
26843
|
-
|
|
26844
|
-
|
|
26845
|
-
|
|
26846
|
-
|
|
26847
|
-
|
|
26860
|
+
*/ const casesMap = [
|
|
26861
|
+
[
|
|
26862
|
+
'remove-unbreakable',
|
|
26863
|
+
_check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__.checkRemoveUnbreakableElement
|
|
26864
|
+
],
|
|
26865
|
+
[
|
|
26866
|
+
'remove-not-editable',
|
|
26867
|
+
_check_remove_content_not_editable__WEBPACK_IMPORTED_MODULE_3__.checkRemoveContentNotEditable
|
|
26868
|
+
],
|
|
26869
|
+
[
|
|
26870
|
+
'remove-char',
|
|
26871
|
+
_check_remove_char__WEBPACK_IMPORTED_MODULE_2__.checkRemoveChar
|
|
26872
|
+
],
|
|
26873
|
+
[
|
|
26874
|
+
'table-cell',
|
|
26875
|
+
_check_table_cell__WEBPACK_IMPORTED_MODULE_7__.checkTableCell
|
|
26876
|
+
],
|
|
26877
|
+
[
|
|
26878
|
+
'remove-empty-parent',
|
|
26879
|
+
_check_remove_empty_parent__WEBPACK_IMPORTED_MODULE_5__.checkRemoveEmptyParent
|
|
26880
|
+
],
|
|
26881
|
+
[
|
|
26882
|
+
'remove-empty-neighbor',
|
|
26883
|
+
_check_remove_empty_neighbor__WEBPACK_IMPORTED_MODULE_4__.checkRemoveEmptyNeighbor
|
|
26884
|
+
],
|
|
26885
|
+
[
|
|
26886
|
+
'join-two-lists',
|
|
26887
|
+
_check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
|
|
26888
|
+
],
|
|
26889
|
+
[
|
|
26890
|
+
'join-neighbors',
|
|
26891
|
+
_check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
|
|
26892
|
+
],
|
|
26893
|
+
[
|
|
26894
|
+
'unwrap-first-list-item',
|
|
26895
|
+
_check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__.checkUnwrapFirstListItem
|
|
26896
|
+
]
|
|
26848
26897
|
];
|
|
26898
|
+
/**
|
|
26899
|
+
* @private
|
|
26900
|
+
* @deprecated Use `casesMap` to also get the stable case keys.
|
|
26901
|
+
*/ const cases = casesMap.map(([, fn])=>fn);
|
|
26849
26902
|
|
|
26850
26903
|
|
|
26851
26904
|
/***/ }),
|
|
@@ -27327,6 +27380,18 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27327
27380
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(iframe);
|
|
27328
27381
|
return false;
|
|
27329
27382
|
}
|
|
27383
|
+
/**
|
|
27384
|
+
* Collapse a value that holds only a single empty block (e.g.
|
|
27385
|
+
* `<p><br></p>` left after deleting all content) to an empty string —
|
|
27386
|
+
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
27387
|
+
*/ onAfterGetValueFromEditor(data) {
|
|
27388
|
+
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
27389
|
+
return;
|
|
27390
|
+
}
|
|
27391
|
+
if (/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.test(data.value.trim())) {
|
|
27392
|
+
data.value = '';
|
|
27393
|
+
}
|
|
27394
|
+
}
|
|
27330
27395
|
onSafeHTML(sandBox) {
|
|
27331
27396
|
const sanitizer = this.j.o.cleanHTML.sanitizer;
|
|
27332
27397
|
if (sanitizer) {
|
|
@@ -27366,6 +27431,9 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27366
27431
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27367
27432
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeSetNativeEditorValue')
|
|
27368
27433
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|
|
27434
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27435
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterGetValueFromEditor')
|
|
27436
|
+
], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
|
|
27369
27437
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27370
27438
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':safeHTML')
|
|
27371
27439
|
], cleanHtml.prototype, "onSafeHTML", null);
|
|
@@ -27395,6 +27463,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
27395
27463
|
timeout: 300,
|
|
27396
27464
|
removeEmptyElements: true,
|
|
27397
27465
|
fillEmptyParagraph: true,
|
|
27466
|
+
collapseEmptyValueToEmptyString: false,
|
|
27398
27467
|
replaceNBSP: true,
|
|
27399
27468
|
replaceOldTags: {
|
|
27400
27469
|
i: 'em',
|
|
@@ -30473,6 +30542,25 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
30473
30542
|
return v.toLowerCase().replace(/['"]+/g, '').replace(/[^a-z0-9-]+/g, ',');
|
|
30474
30543
|
}
|
|
30475
30544
|
},
|
|
30545
|
+
// When no font is explicitly set, the computed font-family equals the
|
|
30546
|
+
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
30547
|
+
// button shows the `Default` list entry instead of that raw stack.
|
|
30548
|
+
// See #1370
|
|
30549
|
+
value: (editor)=>{
|
|
30550
|
+
const current = editor.s.current();
|
|
30551
|
+
if (!current) {
|
|
30552
|
+
return;
|
|
30553
|
+
}
|
|
30554
|
+
const box = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
|
|
30555
|
+
if (!box) {
|
|
30556
|
+
return;
|
|
30557
|
+
}
|
|
30558
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'font-family').toString();
|
|
30559
|
+
if (value === (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(editor.editor, 'font-family').toString()) {
|
|
30560
|
+
return '';
|
|
30561
|
+
}
|
|
30562
|
+
return value;
|
|
30563
|
+
},
|
|
30476
30564
|
tooltip: 'Font family'
|
|
30477
30565
|
};
|
|
30478
30566
|
|
|
@@ -34596,6 +34684,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
34596
34684
|
noFollowCheckbox: true,
|
|
34597
34685
|
openInNewTabCheckbox: true,
|
|
34598
34686
|
openInNewTabCheckboxDefaultChecked: false,
|
|
34687
|
+
ariaLabelInput: false,
|
|
34599
34688
|
modeClassName: 'input',
|
|
34600
34689
|
selectMultipleClassName: true,
|
|
34601
34690
|
preventReadOnlyNavigation: true,
|
|
@@ -34751,7 +34840,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
34751
34840
|
const currentElement = current;
|
|
34752
34841
|
const isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isImage(currentElement);
|
|
34753
34842
|
let { content_input } = elements;
|
|
34754
|
-
const { className_input } = elements, { className_select } = elements;
|
|
34843
|
+
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
34755
34844
|
if (!content_input) {
|
|
34756
34845
|
content_input = jodit.c.element('input', {
|
|
34757
34846
|
type: 'hidden',
|
|
@@ -34774,6 +34863,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
34774
34863
|
if (!isImageContent && current) {
|
|
34775
34864
|
content_input.value = getSelectionText();
|
|
34776
34865
|
}
|
|
34866
|
+
if (aria_label_input) {
|
|
34867
|
+
aria_label_input.value = link ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'aria-label') || '' : '';
|
|
34868
|
+
}
|
|
34777
34869
|
if (link) {
|
|
34778
34870
|
url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'href') || '';
|
|
34779
34871
|
if (modeClassName) {
|
|
@@ -34861,6 +34953,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
34861
34953
|
}
|
|
34862
34954
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
34863
34955
|
}
|
|
34956
|
+
if (aria_label_input) {
|
|
34957
|
+
const ariaLabel = aria_label_input.value.trim();
|
|
34958
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'aria-label', ariaLabel || null);
|
|
34959
|
+
}
|
|
34864
34960
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
34865
34961
|
});
|
|
34866
34962
|
jodit.synchronizeValues();
|
|
@@ -35000,7 +35096,7 @@ function writeImage(a, content_input, textWasChanged, url_input) {
|
|
|
35000
35096
|
*/
|
|
35001
35097
|
|
|
35002
35098
|
const formTemplate = (editor)=>{
|
|
35003
|
-
const { openInNewTabCheckbox, noFollowCheckbox, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
35099
|
+
const { openInNewTabCheckbox, noFollowCheckbox, ariaLabelInput, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
35004
35100
|
return new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIForm(editor, [
|
|
35005
35101
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35006
35102
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
@@ -35012,6 +35108,13 @@ const formTemplate = (editor)=>{
|
|
|
35012
35108
|
required: true
|
|
35013
35109
|
})
|
|
35014
35110
|
]),
|
|
35111
|
+
ariaLabelInput ? new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35112
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
35113
|
+
name: 'ariaLabel',
|
|
35114
|
+
ref: 'aria_label_input',
|
|
35115
|
+
label: 'Aria label'
|
|
35116
|
+
})
|
|
35117
|
+
]) : null,
|
|
35015
35118
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
35016
35119
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
35017
35120
|
name: 'content',
|
|
@@ -38633,15 +38736,36 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
|
|
|
38633
38736
|
}
|
|
38634
38737
|
/**
|
|
38635
38738
|
* Mouse click inside the table
|
|
38636
|
-
*/ onStartSelection(cell) {
|
|
38739
|
+
*/ onStartSelection(cell, event) {
|
|
38637
38740
|
if (this.j.o.readonly) {
|
|
38638
38741
|
return;
|
|
38639
38742
|
}
|
|
38743
|
+
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
38744
|
+
// Ctrl/Cmd + click toggles a single cell into the existing selection
|
|
38745
|
+
// instead of resetting it — non-contiguous multi-cell selection.
|
|
38746
|
+
// See https://github.com/xdan/jodit/issues/1163
|
|
38747
|
+
if ((event?.ctrlKey || event?.metaKey) && cell !== this.j.editor && table && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isCell(cell)) {
|
|
38748
|
+
if (this.__tableModule.getAllSelectedCells().includes(cell)) {
|
|
38749
|
+
this.__tableModule.removeSelection(cell);
|
|
38750
|
+
} else {
|
|
38751
|
+
if (!cell.firstChild) {
|
|
38752
|
+
cell.appendChild(this.j.createInside.element('br'));
|
|
38753
|
+
}
|
|
38754
|
+
this.__tableModule.addSelection(cell);
|
|
38755
|
+
}
|
|
38756
|
+
this.__selectedCell = cell;
|
|
38757
|
+
this.j.s.sel?.removeAllRanges();
|
|
38758
|
+
if (this.__tableModule.getAllSelectedCells().length) {
|
|
38759
|
+
this.j.e.fire('showPopup', table, ()=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.position)(cell, this.j), 'cells');
|
|
38760
|
+
} else {
|
|
38761
|
+
this.j.e.fire('hidePopup', 'cells');
|
|
38762
|
+
}
|
|
38763
|
+
return false;
|
|
38764
|
+
}
|
|
38640
38765
|
this.unselectCells();
|
|
38641
38766
|
if (cell === this.j.editor) {
|
|
38642
38767
|
return;
|
|
38643
38768
|
}
|
|
38644
|
-
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
38645
38769
|
if (!cell || !table) {
|
|
38646
38770
|
return;
|
|
38647
38771
|
}
|
|
@@ -39423,7 +39547,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorNativeOpt
|
|
|
39423
39547
|
*/ highlightActiveLine: true
|
|
39424
39548
|
};
|
|
39425
39549
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorCDNUrlsJS = [
|
|
39426
|
-
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.
|
|
39550
|
+
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js'
|
|
39427
39551
|
];
|
|
39428
39552
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.beautifyHTMLCDNUrlsJS = [
|
|
39429
39553
|
'https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js',
|