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/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.12.
|
|
4
|
+
* Version: v4.12.25
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1816,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1816
1816
|
* ```
|
|
1817
1817
|
* @packageDocumentation
|
|
1818
1818
|
* @module constants
|
|
1819
|
-
*/ const APP_VERSION = "4.12.
|
|
1819
|
+
*/ const APP_VERSION = "4.12.25";
|
|
1820
1820
|
// prettier-ignore
|
|
1821
1821
|
const ES = "es2015";
|
|
1822
1822
|
const IS_ES_MODERN = true;
|
|
@@ -22186,12 +22186,17 @@ class ImageEditor extends jodit_core_component__WEBPACK_IMPORTED_MODULE_2__.View
|
|
|
22186
22186
|
self.j.alert('The name should not be empty');
|
|
22187
22187
|
return false;
|
|
22188
22188
|
}
|
|
22189
|
+
self.j.e.fire('afterImageEditorSave', data, name);
|
|
22189
22190
|
self.onSave(name, data, self.hide, (e)=>{
|
|
22190
22191
|
self.j.alert(e.message);
|
|
22191
22192
|
});
|
|
22192
22193
|
});
|
|
22193
22194
|
break;
|
|
22194
22195
|
case self.buttons.save:
|
|
22196
|
+
// Notify listeners that a crop/resize was applied,
|
|
22197
|
+
// passing the action box (action + box dimensions).
|
|
22198
|
+
// See https://github.com/xdan/jodit/issues/820
|
|
22199
|
+
self.j.e.fire('afterImageEditorSave', data);
|
|
22195
22200
|
self.onSave(undefined, data, self.hide, (e)=>{
|
|
22196
22201
|
self.j.alert(e.message);
|
|
22197
22202
|
});
|
|
@@ -24712,6 +24717,15 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
|
|
|
24712
24717
|
if (!fileList.length) {
|
|
24713
24718
|
return Promise.reject((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Need files'));
|
|
24714
24719
|
}
|
|
24720
|
+
// Client-side validation hook — returning `false` aborts the upload.
|
|
24721
|
+
// See https://github.com/xdan/jodit/issues/1329
|
|
24722
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(o.beforeUpload)) {
|
|
24723
|
+
if (o.beforeUpload.call(uploader, fileList) === false) {
|
|
24724
|
+
const err = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Upload canceled');
|
|
24725
|
+
(handlerError || o.defaultHandlerError).call(uploader, err);
|
|
24726
|
+
return Promise.reject(err);
|
|
24727
|
+
}
|
|
24728
|
+
}
|
|
24715
24729
|
const promises = [];
|
|
24716
24730
|
if (o.insertImageAsBase64URI) {
|
|
24717
24731
|
readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
|
|
@@ -26377,10 +26391,14 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
|
26377
26391
|
return false;
|
|
26378
26392
|
}
|
|
26379
26393
|
(0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_6__.moveNodeInsideStart)(jodit, fakeNode, backspace);
|
|
26380
|
-
|
|
26394
|
+
const disabled = jodit.o.delete.disableCases;
|
|
26395
|
+
if (_cases__WEBPACK_IMPORTED_MODULE_9__.casesMap.some(([key, func])=>{
|
|
26396
|
+
if (disabled && disabled.has(key)) {
|
|
26397
|
+
return;
|
|
26398
|
+
}
|
|
26381
26399
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_4__.isFunction)(func) && func(jodit, fakeNode, backspace, mode)) {
|
|
26382
26400
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
26383
|
-
console.info('Remove case:',
|
|
26401
|
+
console.info('Remove case:', key);
|
|
26384
26402
|
}
|
|
26385
26403
|
return true;
|
|
26386
26404
|
}
|
|
@@ -27074,8 +27092,9 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
27074
27092
|
|
|
27075
27093
|
"use strict";
|
|
27076
27094
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27077
|
-
/* harmony export */
|
|
27095
|
+
/* harmony export */ casesMap: function() { return /* binding */ casesMap; }
|
|
27078
27096
|
/* harmony export */ });
|
|
27097
|
+
/* unused harmony export cases */
|
|
27079
27098
|
/* harmony import */ var _check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26106);
|
|
27080
27099
|
/* harmony import */ var _check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80951);
|
|
27081
27100
|
/* harmony import */ var _check_remove_char__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58881);
|
|
@@ -27101,18 +27120,52 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
27101
27120
|
|
|
27102
27121
|
|
|
27103
27122
|
/**
|
|
27123
|
+
* Ordered delete/backspace cases with stable keys. The first one returning
|
|
27124
|
+
* `true` wins. The keys are stable across minified builds (function names are
|
|
27125
|
+
* mangled by terser) so they can be referenced by `delete.disableCases`.
|
|
27104
27126
|
* @private
|
|
27105
|
-
*/ const
|
|
27106
|
-
|
|
27107
|
-
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27127
|
+
*/ const casesMap = [
|
|
27128
|
+
[
|
|
27129
|
+
'remove-unbreakable',
|
|
27130
|
+
_check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__.checkRemoveUnbreakableElement
|
|
27131
|
+
],
|
|
27132
|
+
[
|
|
27133
|
+
'remove-not-editable',
|
|
27134
|
+
_check_remove_content_not_editable__WEBPACK_IMPORTED_MODULE_3__.checkRemoveContentNotEditable
|
|
27135
|
+
],
|
|
27136
|
+
[
|
|
27137
|
+
'remove-char',
|
|
27138
|
+
_check_remove_char__WEBPACK_IMPORTED_MODULE_2__.checkRemoveChar
|
|
27139
|
+
],
|
|
27140
|
+
[
|
|
27141
|
+
'table-cell',
|
|
27142
|
+
_check_table_cell__WEBPACK_IMPORTED_MODULE_7__.checkTableCell
|
|
27143
|
+
],
|
|
27144
|
+
[
|
|
27145
|
+
'remove-empty-parent',
|
|
27146
|
+
_check_remove_empty_parent__WEBPACK_IMPORTED_MODULE_5__.checkRemoveEmptyParent
|
|
27147
|
+
],
|
|
27148
|
+
[
|
|
27149
|
+
'remove-empty-neighbor',
|
|
27150
|
+
_check_remove_empty_neighbor__WEBPACK_IMPORTED_MODULE_4__.checkRemoveEmptyNeighbor
|
|
27151
|
+
],
|
|
27152
|
+
[
|
|
27153
|
+
'join-two-lists',
|
|
27154
|
+
_check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
|
|
27155
|
+
],
|
|
27156
|
+
[
|
|
27157
|
+
'join-neighbors',
|
|
27158
|
+
_check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
|
|
27159
|
+
],
|
|
27160
|
+
[
|
|
27161
|
+
'unwrap-first-list-item',
|
|
27162
|
+
_check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__.checkUnwrapFirstListItem
|
|
27163
|
+
]
|
|
27115
27164
|
];
|
|
27165
|
+
/**
|
|
27166
|
+
* @private
|
|
27167
|
+
* @deprecated Use `casesMap` to also get the stable case keys.
|
|
27168
|
+
*/ const cases = casesMap.map(([, fn])=>fn);
|
|
27116
27169
|
|
|
27117
27170
|
|
|
27118
27171
|
/***/ }),
|
|
@@ -27594,6 +27647,18 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27594
27647
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(iframe);
|
|
27595
27648
|
return false;
|
|
27596
27649
|
}
|
|
27650
|
+
/**
|
|
27651
|
+
* Collapse a value that holds only a single empty block (e.g.
|
|
27652
|
+
* `<p><br></p>` left after deleting all content) to an empty string —
|
|
27653
|
+
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
27654
|
+
*/ onAfterGetValueFromEditor(data) {
|
|
27655
|
+
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
27656
|
+
return;
|
|
27657
|
+
}
|
|
27658
|
+
if (/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.test(data.value.trim())) {
|
|
27659
|
+
data.value = '';
|
|
27660
|
+
}
|
|
27661
|
+
}
|
|
27597
27662
|
onSafeHTML(sandBox) {
|
|
27598
27663
|
const sanitizer = this.j.o.cleanHTML.sanitizer;
|
|
27599
27664
|
if (sanitizer) {
|
|
@@ -27633,6 +27698,9 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27633
27698
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27634
27699
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeSetNativeEditorValue')
|
|
27635
27700
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|
|
27701
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27702
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterGetValueFromEditor')
|
|
27703
|
+
], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
|
|
27636
27704
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
27637
27705
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':safeHTML')
|
|
27638
27706
|
], cleanHtml.prototype, "onSafeHTML", null);
|
|
@@ -27662,6 +27730,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
27662
27730
|
timeout: 300,
|
|
27663
27731
|
removeEmptyElements: true,
|
|
27664
27732
|
fillEmptyParagraph: true,
|
|
27733
|
+
collapseEmptyValueToEmptyString: false,
|
|
27665
27734
|
replaceNBSP: true,
|
|
27666
27735
|
replaceOldTags: {
|
|
27667
27736
|
i: 'em',
|
|
@@ -31090,6 +31159,25 @@ jodit_config__WEBPACK_IMPORTED_MODULE_6__.Config.prototype.controls.font = (0,_s
|
|
|
31090
31159
|
return v.toLowerCase().replace(/['"]+/g, '').replace(/[^a-z0-9-]+/g, ',');
|
|
31091
31160
|
}
|
|
31092
31161
|
},
|
|
31162
|
+
// When no font is explicitly set, the computed font-family equals the
|
|
31163
|
+
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
31164
|
+
// button shows the `Default` list entry instead of that raw stack.
|
|
31165
|
+
// See #1370
|
|
31166
|
+
value: (editor)=>{
|
|
31167
|
+
const current = editor.s.current();
|
|
31168
|
+
if (!current) {
|
|
31169
|
+
return;
|
|
31170
|
+
}
|
|
31171
|
+
const box = jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement, editor.editor);
|
|
31172
|
+
if (!box) {
|
|
31173
|
+
return;
|
|
31174
|
+
}
|
|
31175
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(box, 'font-family').toString();
|
|
31176
|
+
if (value === (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_4__.css)(editor.editor, 'font-family').toString()) {
|
|
31177
|
+
return '';
|
|
31178
|
+
}
|
|
31179
|
+
return value;
|
|
31180
|
+
},
|
|
31093
31181
|
tooltip: 'Font family'
|
|
31094
31182
|
});
|
|
31095
31183
|
|
|
@@ -35598,6 +35686,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
35598
35686
|
noFollowCheckbox: true,
|
|
35599
35687
|
openInNewTabCheckbox: true,
|
|
35600
35688
|
openInNewTabCheckboxDefaultChecked: false,
|
|
35689
|
+
ariaLabelInput: false,
|
|
35601
35690
|
modeClassName: 'input',
|
|
35602
35691
|
selectMultipleClassName: true,
|
|
35603
35692
|
preventReadOnlyNavigation: true,
|
|
@@ -35755,7 +35844,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35755
35844
|
const currentElement = current;
|
|
35756
35845
|
const isImageContent = jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isImage(currentElement);
|
|
35757
35846
|
let { content_input } = elements;
|
|
35758
|
-
const { className_input } = elements, { className_select } = elements;
|
|
35847
|
+
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
35759
35848
|
if (!content_input) {
|
|
35760
35849
|
content_input = jodit.c.element('input', {
|
|
35761
35850
|
type: 'hidden',
|
|
@@ -35778,6 +35867,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35778
35867
|
if (!isImageContent && current) {
|
|
35779
35868
|
content_input.value = getSelectionText();
|
|
35780
35869
|
}
|
|
35870
|
+
if (aria_label_input) {
|
|
35871
|
+
aria_label_input.value = link ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'aria-label') || '' : '';
|
|
35872
|
+
}
|
|
35781
35873
|
if (link) {
|
|
35782
35874
|
url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'href') || '';
|
|
35783
35875
|
if (modeClassName) {
|
|
@@ -35865,6 +35957,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
35865
35957
|
}
|
|
35866
35958
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
35867
35959
|
}
|
|
35960
|
+
if (aria_label_input) {
|
|
35961
|
+
const ariaLabel = aria_label_input.value.trim();
|
|
35962
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'aria-label', ariaLabel || null);
|
|
35963
|
+
}
|
|
35868
35964
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
35869
35965
|
});
|
|
35870
35966
|
jodit.synchronizeValues();
|
|
@@ -36005,7 +36101,7 @@ function writeImage(a, content_input, textWasChanged, url_input) {
|
|
|
36005
36101
|
*/
|
|
36006
36102
|
|
|
36007
36103
|
const formTemplate = (editor)=>{
|
|
36008
|
-
const { openInNewTabCheckbox, noFollowCheckbox, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
36104
|
+
const { openInNewTabCheckbox, noFollowCheckbox, ariaLabelInput, modeClassName, selectSizeClassName, selectMultipleClassName, selectOptionsClassName } = editor.o.link;
|
|
36009
36105
|
return new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIForm(editor, [
|
|
36010
36106
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
36011
36107
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
@@ -36017,6 +36113,13 @@ const formTemplate = (editor)=>{
|
|
|
36017
36113
|
required: true
|
|
36018
36114
|
})
|
|
36019
36115
|
]),
|
|
36116
|
+
ariaLabelInput ? new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
36117
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
36118
|
+
name: 'ariaLabel',
|
|
36119
|
+
ref: 'aria_label_input',
|
|
36120
|
+
label: 'Aria label'
|
|
36121
|
+
})
|
|
36122
|
+
]) : null,
|
|
36020
36123
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIBlock(editor, [
|
|
36021
36124
|
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_1__.UIInput(editor, {
|
|
36022
36125
|
name: 'content',
|
|
@@ -39677,15 +39780,37 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin
|
|
|
39677
39780
|
}
|
|
39678
39781
|
/**
|
|
39679
39782
|
* Mouse click inside the table
|
|
39680
|
-
*/ onStartSelection(cell) {
|
|
39783
|
+
*/ onStartSelection(cell, event) {
|
|
39681
39784
|
if (this.j.o.readonly) {
|
|
39682
39785
|
return;
|
|
39683
39786
|
}
|
|
39787
|
+
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
39788
|
+
// Ctrl/Cmd + click toggles a single cell into the existing selection
|
|
39789
|
+
// instead of resetting it — non-contiguous multi-cell selection.
|
|
39790
|
+
// See https://github.com/xdan/jodit/issues/1163
|
|
39791
|
+
if (((event === null || event === void 0 ? void 0 : event.ctrlKey) || (event === null || event === void 0 ? void 0 : event.metaKey)) && cell !== this.j.editor && table && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isCell(cell)) {
|
|
39792
|
+
var _this_j_s_sel;
|
|
39793
|
+
if (this.__tableModule.getAllSelectedCells().includes(cell)) {
|
|
39794
|
+
this.__tableModule.removeSelection(cell);
|
|
39795
|
+
} else {
|
|
39796
|
+
if (!cell.firstChild) {
|
|
39797
|
+
cell.appendChild(this.j.createInside.element('br'));
|
|
39798
|
+
}
|
|
39799
|
+
this.__tableModule.addSelection(cell);
|
|
39800
|
+
}
|
|
39801
|
+
this.__selectedCell = cell;
|
|
39802
|
+
(_this_j_s_sel = this.j.s.sel) === null || _this_j_s_sel === void 0 ? void 0 : _this_j_s_sel.removeAllRanges();
|
|
39803
|
+
if (this.__tableModule.getAllSelectedCells().length) {
|
|
39804
|
+
this.j.e.fire('showPopup', table, ()=>(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.position)(cell, this.j), 'cells');
|
|
39805
|
+
} else {
|
|
39806
|
+
this.j.e.fire('hidePopup', 'cells');
|
|
39807
|
+
}
|
|
39808
|
+
return false;
|
|
39809
|
+
}
|
|
39684
39810
|
this.unselectCells();
|
|
39685
39811
|
if (cell === this.j.editor) {
|
|
39686
39812
|
return;
|
|
39687
39813
|
}
|
|
39688
|
-
const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(cell, 'table', this.j.editor);
|
|
39689
39814
|
if (!cell || !table) {
|
|
39690
39815
|
return;
|
|
39691
39816
|
}
|
|
@@ -40476,7 +40601,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorNativeOpt
|
|
|
40476
40601
|
*/ highlightActiveLine: true
|
|
40477
40602
|
};
|
|
40478
40603
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.sourceEditorCDNUrlsJS = [
|
|
40479
|
-
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.
|
|
40604
|
+
'https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js'
|
|
40480
40605
|
];
|
|
40481
40606
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.beautifyHTMLCDNUrlsJS = [
|
|
40482
40607
|
'https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js',
|