jodit 4.0.0-beta.92 → 4.0.0-beta.95
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 +13 -5
- package/README.md +5 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +33 -10
- 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 +33 -10
- 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 +33 -10
- 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 +33 -10
- 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 +37 -10
- 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 +14 -5
- package/esm/core/view/view.d.ts +1 -0
- package/esm/core/view/view.js +4 -1
- package/esm/jodit.d.ts +2 -1
- package/esm/jodit.js +6 -0
- package/esm/modules/uploader/helpers/send.js +6 -1
- package/esm/plugins/wrap-nodes/wrap-nodes.js +2 -2
- package/package.json +1 -1
- package/types/core/view/view.d.ts +1 -0
- package/types/jodit.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.0-beta.
|
|
4
|
+
* Version: v4.0.0-beta.95
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1715,7 +1715,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1715
1715
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1716
1716
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1717
1717
|
*/
|
|
1718
|
-
const APP_VERSION = "4.0.0-beta.
|
|
1718
|
+
const APP_VERSION = "4.0.0-beta.95";
|
|
1719
1719
|
// prettier-ignore
|
|
1720
1720
|
const ES = "es2015";
|
|
1721
1721
|
const IS_ES_MODERN = true;
|
|
@@ -10746,7 +10746,7 @@ class Selection {
|
|
|
10746
10746
|
const range = this.createRange();
|
|
10747
10747
|
let start = node, last = node;
|
|
10748
10748
|
do {
|
|
10749
|
-
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(start)) {
|
|
10749
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(start) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(start, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
10750
10750
|
break;
|
|
10751
10751
|
}
|
|
10752
10752
|
last = start;
|
|
@@ -10754,7 +10754,7 @@ class Selection {
|
|
|
10754
10754
|
} while (start);
|
|
10755
10755
|
if (!start) {
|
|
10756
10756
|
const fakeNode = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
|
|
10757
|
-
if (
|
|
10757
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(last, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
10758
10758
|
last.appendChild(fakeNode);
|
|
10759
10759
|
last = fakeNode;
|
|
10760
10760
|
}
|
|
@@ -10762,8 +10762,17 @@ class Selection {
|
|
|
10762
10762
|
start = last;
|
|
10763
10763
|
}
|
|
10764
10764
|
}
|
|
10765
|
-
|
|
10766
|
-
|
|
10765
|
+
const workElm = start || last;
|
|
10766
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(workElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
10767
|
+
range.selectNodeContents(workElm);
|
|
10768
|
+
range.collapse(inStart);
|
|
10769
|
+
}
|
|
10770
|
+
else {
|
|
10771
|
+
inStart || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(workElm, 'br')
|
|
10772
|
+
? range.setStartBefore(workElm)
|
|
10773
|
+
: range.setEndAfter(workElm);
|
|
10774
|
+
range.collapse(inStart);
|
|
10775
|
+
}
|
|
10767
10776
|
this.selectRange(range);
|
|
10768
10777
|
return last;
|
|
10769
10778
|
}
|
|
@@ -15758,7 +15767,10 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
|
|
|
15758
15767
|
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage */ .Ke.makeStorage();
|
|
15759
15768
|
}
|
|
15760
15769
|
get message() {
|
|
15761
|
-
return
|
|
15770
|
+
return this.getMessageModule(this.container);
|
|
15771
|
+
}
|
|
15772
|
+
getMessageModule(container) {
|
|
15773
|
+
return new jodit_modules_messages_messages__WEBPACK_IMPORTED_MODULE_8__/* .UIMessages */ .D(this, container);
|
|
15762
15774
|
}
|
|
15763
15775
|
/**
|
|
15764
15776
|
* Container for persistent set/get value
|
|
@@ -16150,6 +16162,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16150
16162
|
get workplace() {
|
|
16151
16163
|
return this.currentPlace.workplace;
|
|
16152
16164
|
}
|
|
16165
|
+
get message() {
|
|
16166
|
+
return this.getMessageModule(this.workplace);
|
|
16167
|
+
}
|
|
16153
16168
|
/**
|
|
16154
16169
|
* Statusbar module
|
|
16155
16170
|
*/
|
|
@@ -17234,6 +17249,9 @@ Jodit.core = {
|
|
|
17234
17249
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17235
17250
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17236
17251
|
], Jodit.prototype, "createInside", null);
|
|
17252
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17253
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17254
|
+
], Jodit.prototype, "message", null);
|
|
17237
17255
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17238
17256
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17239
17257
|
], Jodit.prototype, "s", null);
|
|
@@ -23969,7 +23987,12 @@ function send(uploader, data) {
|
|
|
23969
23987
|
.send()
|
|
23970
23988
|
.then(resp => resp.json())
|
|
23971
23989
|
.catch(error => {
|
|
23972
|
-
|
|
23990
|
+
return {
|
|
23991
|
+
success: false,
|
|
23992
|
+
data: {
|
|
23993
|
+
messages: [error]
|
|
23994
|
+
}
|
|
23995
|
+
};
|
|
23973
23996
|
})
|
|
23974
23997
|
.finally(() => {
|
|
23975
23998
|
ajax.destruct();
|
|
@@ -40928,10 +40951,10 @@ class wrapNodes extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin
|
|
|
40928
40951
|
return;
|
|
40929
40952
|
}
|
|
40930
40953
|
jodit.e
|
|
40931
|
-
.on('drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn', this.preprocessInput, {
|
|
40954
|
+
.on('drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn', this.preprocessInput, {
|
|
40932
40955
|
top: true
|
|
40933
40956
|
})
|
|
40934
|
-
.on('afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn', this.postProcessSetEditorValue);
|
|
40957
|
+
.on('afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn', this.postProcessSetEditorValue);
|
|
40935
40958
|
}
|
|
40936
40959
|
/** @override **/
|
|
40937
40960
|
beforeDestruct(jodit) {
|