jodit 4.0.2 → 4.0.3
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +25 -17
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +25 -17
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.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 +2 -2
- package/es2021/jodit.js +25 -17
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +25 -17
- package/es2021.en/jodit.min.js +2 -2
- 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 +25 -17
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/core/selection/selection.js +5 -1
- package/esm/jodit.js +6 -12
- package/esm/plugins/select/select.d.ts +2 -1
- package/esm/plugins/select/select.js +12 -2
- package/package.json +1 -1
- package/types/plugins/select/select.d.ts +2 -1
package/es2021/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.0.
|
|
4
|
+
* Version: v4.0.3
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1692,7 +1692,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1692
1692
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1693
1693
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1694
1694
|
*/
|
|
1695
|
-
const APP_VERSION = "4.0.
|
|
1695
|
+
const APP_VERSION = "4.0.3";
|
|
1696
1696
|
// prettier-ignore
|
|
1697
1697
|
const ES = "es2021";
|
|
1698
1698
|
const IS_ES_MODERN = true;
|
|
@@ -10966,7 +10966,8 @@ class Selection {
|
|
|
10966
10966
|
if (this.isCollapsed()) {
|
|
10967
10967
|
return this;
|
|
10968
10968
|
}
|
|
10969
|
-
const { range } = this
|
|
10969
|
+
const { range } = this;
|
|
10970
|
+
const c = range.cloneRange();
|
|
10970
10971
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isOrContains(this.j.editor, range.commonAncestorContainer, true)) {
|
|
10971
10972
|
return this;
|
|
10972
10973
|
}
|
|
@@ -11014,6 +11015,9 @@ class Selection {
|
|
|
11014
11015
|
}
|
|
11015
11016
|
this.selectRange(c);
|
|
11016
11017
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.safeRemove(leftFake, rightFake);
|
|
11018
|
+
if (this.isCollapsed()) {
|
|
11019
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Selection is collapsed');
|
|
11020
|
+
}
|
|
11017
11021
|
return this;
|
|
11018
11022
|
}
|
|
11019
11023
|
}
|
|
@@ -16606,18 +16610,12 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16606
16610
|
}
|
|
16607
16611
|
if (result !== false) {
|
|
16608
16612
|
this.s.focus();
|
|
16609
|
-
|
|
16610
|
-
this.
|
|
16611
|
-
this.s.expandSelection();
|
|
16613
|
+
try {
|
|
16614
|
+
result = this.nativeExecCommand(command, showUI, value);
|
|
16612
16615
|
}
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
}
|
|
16617
|
-
catch (e) {
|
|
16618
|
-
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16619
|
-
throw e;
|
|
16620
|
-
}
|
|
16616
|
+
catch (e) {
|
|
16617
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16618
|
+
throw e;
|
|
16621
16619
|
}
|
|
16622
16620
|
}
|
|
16623
16621
|
}
|
|
@@ -16628,7 +16626,7 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16628
16626
|
* @param third - The third option is for the team
|
|
16629
16627
|
*/
|
|
16630
16628
|
this.e.fire('afterCommand', command, showUI, value);
|
|
16631
|
-
this.
|
|
16629
|
+
this.__imdSynchronizeValues(); // synchrony
|
|
16632
16630
|
return result;
|
|
16633
16631
|
}
|
|
16634
16632
|
/**
|
|
@@ -37689,13 +37687,20 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37689
37687
|
}
|
|
37690
37688
|
beforeCommandCut(command) {
|
|
37691
37689
|
const { s } = this.j;
|
|
37692
|
-
if (
|
|
37690
|
+
if (!s.isCollapsed()) {
|
|
37693
37691
|
const current = s.current();
|
|
37694
37692
|
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .i.isOrContains(this.j.editor, current)) {
|
|
37695
37693
|
this.onCopyNormalizeSelectionBound();
|
|
37696
37694
|
}
|
|
37697
37695
|
}
|
|
37698
37696
|
}
|
|
37697
|
+
beforeCommandSelectall(command) {
|
|
37698
|
+
const { s } = this.j;
|
|
37699
|
+
s.focus();
|
|
37700
|
+
s.select(this.j.editor, true);
|
|
37701
|
+
s.expandSelection();
|
|
37702
|
+
return false;
|
|
37703
|
+
}
|
|
37699
37704
|
onCopyNormalizeSelectionBound(e) {
|
|
37700
37705
|
const { s, editor, o } = this.j;
|
|
37701
37706
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -37717,8 +37722,11 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37717
37722
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('ow:click')
|
|
37718
37723
|
], select.prototype, "onOutsideClick", null);
|
|
37719
37724
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37720
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':
|
|
37725
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandCut'])
|
|
37721
37726
|
], select.prototype, "beforeCommandCut", null);
|
|
37727
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37728
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandSelectall'])
|
|
37729
|
+
], select.prototype, "beforeCommandSelectall", null);
|
|
37722
37730
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37723
37731
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':copy', ':cut'])
|
|
37724
37732
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|