jodit 4.0.2 → 4.0.4
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/es2018/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.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1691,7 +1691,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1691
1691
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1692
1692
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1693
1693
|
*/
|
|
1694
|
-
const APP_VERSION = "4.0.
|
|
1694
|
+
const APP_VERSION = "4.0.4";
|
|
1695
1695
|
// prettier-ignore
|
|
1696
1696
|
const ES = "es2018";
|
|
1697
1697
|
const IS_ES_MODERN = true;
|
|
@@ -10997,7 +10997,8 @@ class Selection {
|
|
|
10997
10997
|
if (this.isCollapsed()) {
|
|
10998
10998
|
return this;
|
|
10999
10999
|
}
|
|
11000
|
-
const { range } = this
|
|
11000
|
+
const { range } = this;
|
|
11001
|
+
const c = range.cloneRange();
|
|
11001
11002
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isOrContains(this.j.editor, range.commonAncestorContainer, true)) {
|
|
11002
11003
|
return this;
|
|
11003
11004
|
}
|
|
@@ -11045,6 +11046,9 @@ class Selection {
|
|
|
11045
11046
|
}
|
|
11046
11047
|
this.selectRange(c);
|
|
11047
11048
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.safeRemove(leftFake, rightFake);
|
|
11049
|
+
if (this.isCollapsed()) {
|
|
11050
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Selection is collapsed');
|
|
11051
|
+
}
|
|
11048
11052
|
return this;
|
|
11049
11053
|
}
|
|
11050
11054
|
}
|
|
@@ -16655,18 +16659,12 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16655
16659
|
}
|
|
16656
16660
|
if (result !== false) {
|
|
16657
16661
|
this.s.focus();
|
|
16658
|
-
|
|
16659
|
-
this.
|
|
16660
|
-
this.s.expandSelection();
|
|
16662
|
+
try {
|
|
16663
|
+
result = this.nativeExecCommand(command, showUI, value);
|
|
16661
16664
|
}
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
}
|
|
16666
|
-
catch (e) {
|
|
16667
|
-
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16668
|
-
throw e;
|
|
16669
|
-
}
|
|
16665
|
+
catch (e) {
|
|
16666
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16667
|
+
throw e;
|
|
16670
16668
|
}
|
|
16671
16669
|
}
|
|
16672
16670
|
}
|
|
@@ -16677,7 +16675,7 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16677
16675
|
* @param third - The third option is for the team
|
|
16678
16676
|
*/
|
|
16679
16677
|
this.e.fire('afterCommand', command, showUI, value);
|
|
16680
|
-
this.
|
|
16678
|
+
this.__imdSynchronizeValues(); // synchrony
|
|
16681
16679
|
return result;
|
|
16682
16680
|
}
|
|
16683
16681
|
/**
|
|
@@ -37798,13 +37796,20 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37798
37796
|
}
|
|
37799
37797
|
beforeCommandCut(command) {
|
|
37800
37798
|
const { s } = this.j;
|
|
37801
|
-
if (
|
|
37799
|
+
if (!s.isCollapsed()) {
|
|
37802
37800
|
const current = s.current();
|
|
37803
37801
|
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .i.isOrContains(this.j.editor, current)) {
|
|
37804
37802
|
this.onCopyNormalizeSelectionBound();
|
|
37805
37803
|
}
|
|
37806
37804
|
}
|
|
37807
37805
|
}
|
|
37806
|
+
beforeCommandSelectall(command) {
|
|
37807
|
+
const { s } = this.j;
|
|
37808
|
+
s.focus();
|
|
37809
|
+
s.select(this.j.editor, true);
|
|
37810
|
+
s.expandSelection();
|
|
37811
|
+
return false;
|
|
37812
|
+
}
|
|
37808
37813
|
onCopyNormalizeSelectionBound(e) {
|
|
37809
37814
|
const { s, editor, o } = this.j;
|
|
37810
37815
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -37826,8 +37831,11 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37826
37831
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('ow:click')
|
|
37827
37832
|
], select.prototype, "onOutsideClick", null);
|
|
37828
37833
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37829
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':
|
|
37834
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandCut'])
|
|
37830
37835
|
], select.prototype, "beforeCommandCut", null);
|
|
37836
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37837
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandSelectall'])
|
|
37838
|
+
], select.prototype, "beforeCommandSelectall", null);
|
|
37831
37839
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37832
37840
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':copy', ':cut'])
|
|
37833
37841
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|