jodit 4.18.0 → 4.18.1
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 +7 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +21 -4
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.js +8 -8
- 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 +3 -3
- package/es2021/jodit.js +21 -4
- package/es2021/jodit.min.js +9 -9
- 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 +24 -24
- package/es2021.en/jodit.js +21 -4
- package/es2021.en/jodit.min.js +3 -3
- 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 +21 -4
- 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/core/constants.js +1 -1
- package/esm/plugins/dtd/after-insert/remove-extra-br.js +6 -1
- package/esm/plugins/dtd/before-insert/check-block-nesting.js +16 -1
- package/esm/plugins/dtd/config.js +3 -0
- package/package.json +1 -1
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.18.
|
|
4
|
+
* Version: v4.18.1
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1830,7 +1830,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1830
1830
|
* ```
|
|
1831
1831
|
* @packageDocumentation
|
|
1832
1832
|
* @module constants
|
|
1833
|
-
*/ const APP_VERSION = "4.18.
|
|
1833
|
+
*/ const APP_VERSION = "4.18.1";
|
|
1834
1834
|
// prettier-ignore
|
|
1835
1835
|
const ES = "es2015";
|
|
1836
1836
|
const IS_ES_MODERN = true;
|
|
@@ -31933,7 +31933,12 @@ const brBoxes = new Set([
|
|
|
31933
31933
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(br, false)) {
|
|
31934
31934
|
return;
|
|
31935
31935
|
}
|
|
31936
|
-
|
|
31936
|
+
// After a block is inserted the caret is already at the end of its
|
|
31937
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
31938
|
+
// below the block (#1315)
|
|
31939
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
31940
|
+
jodit.s.setCursorBefore(br);
|
|
31941
|
+
}
|
|
31937
31942
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(br);
|
|
31938
31943
|
}
|
|
31939
31944
|
}
|
|
@@ -31972,13 +31977,22 @@ const brBoxes = new Set([
|
|
|
31972
31977
|
let current = (_ref = (_jodit_s_current = jodit.s.current()) === null || _jodit_s_current === void 0 ? void 0 : _jodit_s_current.parentElement) !== null && _ref !== void 0 ? _ref : null;
|
|
31973
31978
|
while(current && current !== jodit.editor){
|
|
31974
31979
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(current)) {
|
|
31975
|
-
|
|
31980
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
31981
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
31982
|
+
const isEmptyLine = !parent && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, jodit.o.enter) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(current);
|
|
31983
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] && !isEmptyLine) {
|
|
31976
31984
|
break;
|
|
31977
31985
|
}
|
|
31978
31986
|
parent = current;
|
|
31979
31987
|
}
|
|
31980
31988
|
current = current.parentElement;
|
|
31981
31989
|
}
|
|
31990
|
+
// A list that is all of the inserted content adds its items to the
|
|
31991
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
31992
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(current) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(node) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(node.parentNode) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(node, false)) {
|
|
31993
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(node);
|
|
31994
|
+
parent = current;
|
|
31995
|
+
}
|
|
31982
31996
|
if (parent) {
|
|
31983
31997
|
jodit.s.setCursorAfter(parent);
|
|
31984
31998
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
|
|
@@ -32033,10 +32047,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
32033
32047
|
audio: 1,
|
|
32034
32048
|
body: 1,
|
|
32035
32049
|
caption: 1,
|
|
32050
|
+
dd: 1,
|
|
32036
32051
|
details: 1,
|
|
32037
32052
|
dir: 1,
|
|
32038
32053
|
div: 1,
|
|
32039
32054
|
dl: 1,
|
|
32055
|
+
dt: 1,
|
|
32040
32056
|
fieldset: 1,
|
|
32041
32057
|
figcaption: 1,
|
|
32042
32058
|
figure: 1,
|
|
@@ -32044,6 +32060,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
32044
32060
|
form: 1,
|
|
32045
32061
|
header: 1,
|
|
32046
32062
|
hgroup: 1,
|
|
32063
|
+
li: 1,
|
|
32047
32064
|
main: 1,
|
|
32048
32065
|
menu: 1,
|
|
32049
32066
|
nav: 1,
|