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/es2015/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 = "es2015";
|
|
1697
1697
|
const IS_ES_MODERN = true;
|
|
@@ -11009,7 +11009,8 @@ class Selection {
|
|
|
11009
11009
|
if (this.isCollapsed()) {
|
|
11010
11010
|
return this;
|
|
11011
11011
|
}
|
|
11012
|
-
const { range } = this
|
|
11012
|
+
const { range } = this;
|
|
11013
|
+
const c = range.cloneRange();
|
|
11013
11014
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isOrContains(this.j.editor, range.commonAncestorContainer, true)) {
|
|
11014
11015
|
return this;
|
|
11015
11016
|
}
|
|
@@ -11057,6 +11058,9 @@ class Selection {
|
|
|
11057
11058
|
}
|
|
11058
11059
|
this.selectRange(c);
|
|
11059
11060
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.safeRemove(leftFake, rightFake);
|
|
11061
|
+
if (this.isCollapsed()) {
|
|
11062
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.error)('Selection is collapsed');
|
|
11063
|
+
}
|
|
11060
11064
|
return this;
|
|
11061
11065
|
}
|
|
11062
11066
|
}
|
|
@@ -16598,18 +16602,12 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16598
16602
|
}
|
|
16599
16603
|
if (result !== false) {
|
|
16600
16604
|
this.s.focus();
|
|
16601
|
-
|
|
16602
|
-
this.
|
|
16603
|
-
this.s.expandSelection();
|
|
16605
|
+
try {
|
|
16606
|
+
result = this.nativeExecCommand(command, showUI, value);
|
|
16604
16607
|
}
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
}
|
|
16609
|
-
catch (e) {
|
|
16610
|
-
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16611
|
-
throw e;
|
|
16612
|
-
}
|
|
16608
|
+
catch (e) {
|
|
16609
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
16610
|
+
throw e;
|
|
16613
16611
|
}
|
|
16614
16612
|
}
|
|
16615
16613
|
}
|
|
@@ -16620,7 +16618,7 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16620
16618
|
* @param third - The third option is for the team
|
|
16621
16619
|
*/
|
|
16622
16620
|
this.e.fire('afterCommand', command, showUI, value);
|
|
16623
|
-
this.
|
|
16621
|
+
this.__imdSynchronizeValues(); // synchrony
|
|
16624
16622
|
return result;
|
|
16625
16623
|
}
|
|
16626
16624
|
/**
|
|
@@ -37727,13 +37725,20 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37727
37725
|
}
|
|
37728
37726
|
beforeCommandCut(command) {
|
|
37729
37727
|
const { s } = this.j;
|
|
37730
|
-
if (
|
|
37728
|
+
if (!s.isCollapsed()) {
|
|
37731
37729
|
const current = s.current();
|
|
37732
37730
|
if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .i.isOrContains(this.j.editor, current)) {
|
|
37733
37731
|
this.onCopyNormalizeSelectionBound();
|
|
37734
37732
|
}
|
|
37735
37733
|
}
|
|
37736
37734
|
}
|
|
37735
|
+
beforeCommandSelectall(command) {
|
|
37736
|
+
const { s } = this.j;
|
|
37737
|
+
s.focus();
|
|
37738
|
+
s.select(this.j.editor, true);
|
|
37739
|
+
s.expandSelection();
|
|
37740
|
+
return false;
|
|
37741
|
+
}
|
|
37737
37742
|
onCopyNormalizeSelectionBound(e) {
|
|
37738
37743
|
const { s, editor, o } = this.j;
|
|
37739
37744
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -37755,8 +37760,11 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */
|
|
|
37755
37760
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('ow:click')
|
|
37756
37761
|
], select.prototype, "onOutsideClick", null);
|
|
37757
37762
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37758
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':
|
|
37763
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandCut'])
|
|
37759
37764
|
], select.prototype, "beforeCommandCut", null);
|
|
37765
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37766
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':beforeCommandSelectall'])
|
|
37767
|
+
], select.prototype, "beforeCommandSelectall", null);
|
|
37760
37768
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
37761
37769
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([':copy', ':cut'])
|
|
37762
37770
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|