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/es2021.en/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
|
*/
|
|
@@ -1824,7 +1824,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1824
1824
|
* ```
|
|
1825
1825
|
* @packageDocumentation
|
|
1826
1826
|
* @module constants
|
|
1827
|
-
*/ const APP_VERSION = "4.18.
|
|
1827
|
+
*/ const APP_VERSION = "4.18.1";
|
|
1828
1828
|
// prettier-ignore
|
|
1829
1829
|
const ES = "es2021";
|
|
1830
1830
|
const IS_ES_MODERN = true;
|
|
@@ -31312,7 +31312,12 @@ const brBoxes = new Set([
|
|
|
31312
31312
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(br, false)) {
|
|
31313
31313
|
return;
|
|
31314
31314
|
}
|
|
31315
|
-
|
|
31315
|
+
// After a block is inserted the caret is already at the end of its
|
|
31316
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
31317
|
+
// below the block (#1315)
|
|
31318
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
31319
|
+
jodit.s.setCursorBefore(br);
|
|
31320
|
+
}
|
|
31316
31321
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(br);
|
|
31317
31322
|
}
|
|
31318
31323
|
}
|
|
@@ -31349,13 +31354,22 @@ const brBoxes = new Set([
|
|
|
31349
31354
|
let current = jodit.s.current()?.parentElement ?? null;
|
|
31350
31355
|
while(current && current !== jodit.editor){
|
|
31351
31356
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(current)) {
|
|
31352
|
-
|
|
31357
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
31358
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
31359
|
+
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);
|
|
31360
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] && !isEmptyLine) {
|
|
31353
31361
|
break;
|
|
31354
31362
|
}
|
|
31355
31363
|
parent = current;
|
|
31356
31364
|
}
|
|
31357
31365
|
current = current.parentElement;
|
|
31358
31366
|
}
|
|
31367
|
+
// A list that is all of the inserted content adds its items to the
|
|
31368
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
31369
|
+
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)) {
|
|
31370
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(node);
|
|
31371
|
+
parent = current;
|
|
31372
|
+
}
|
|
31359
31373
|
if (parent) {
|
|
31360
31374
|
jodit.s.setCursorAfter(parent);
|
|
31361
31375
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
|
|
@@ -31410,10 +31424,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
31410
31424
|
audio: 1,
|
|
31411
31425
|
body: 1,
|
|
31412
31426
|
caption: 1,
|
|
31427
|
+
dd: 1,
|
|
31413
31428
|
details: 1,
|
|
31414
31429
|
dir: 1,
|
|
31415
31430
|
div: 1,
|
|
31416
31431
|
dl: 1,
|
|
31432
|
+
dt: 1,
|
|
31417
31433
|
fieldset: 1,
|
|
31418
31434
|
figcaption: 1,
|
|
31419
31435
|
figure: 1,
|
|
@@ -31421,6 +31437,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
31421
31437
|
form: 1,
|
|
31422
31438
|
header: 1,
|
|
31423
31439
|
hgroup: 1,
|
|
31440
|
+
li: 1,
|
|
31424
31441
|
main: 1,
|
|
31425
31442
|
menu: 1,
|
|
31426
31443
|
nav: 1,
|