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/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.18.
|
|
6
|
+
export const APP_VERSION = "4.18.1";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -33,7 +33,12 @@ export function removeExtraBr(jodit, node) {
|
|
|
33
33
|
if (Dom.findNotEmptySibling(br, false)) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
// After a block is inserted the caret is already at the end of its
|
|
37
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
38
|
+
// below the block (#1315)
|
|
39
|
+
if (!Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
40
|
+
jodit.s.setCursorBefore(br);
|
|
41
|
+
}
|
|
37
42
|
Dom.safeRemove(br);
|
|
38
43
|
}
|
|
39
44
|
}
|
|
@@ -19,13 +19,28 @@ export function checkBlockNesting(jodit, node) {
|
|
|
19
19
|
let current = (_b = (_a = jodit.s.current()) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null;
|
|
20
20
|
while (current && current !== jodit.editor) {
|
|
21
21
|
if (Dom.isBlock(current)) {
|
|
22
|
-
|
|
22
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
23
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
24
|
+
const isEmptyLine = !parent &&
|
|
25
|
+
Dom.isTag(current, jodit.o.enter) &&
|
|
26
|
+
Dom.isEmpty(current);
|
|
27
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] &&
|
|
28
|
+
!isEmptyLine) {
|
|
23
29
|
break;
|
|
24
30
|
}
|
|
25
31
|
parent = current;
|
|
26
32
|
}
|
|
27
33
|
current = current.parentElement;
|
|
28
34
|
}
|
|
35
|
+
// A list that is all of the inserted content adds its items to the
|
|
36
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
37
|
+
if (Dom.isLeaf(current) &&
|
|
38
|
+
Dom.isList(node) &&
|
|
39
|
+
Dom.isFragment(node.parentNode) &&
|
|
40
|
+
!Dom.findNotEmptySibling(node, false)) {
|
|
41
|
+
Dom.unwrap(node);
|
|
42
|
+
parent = current;
|
|
43
|
+
}
|
|
29
44
|
if (parent) {
|
|
30
45
|
jodit.s.setCursorAfter(parent);
|
|
31
46
|
if (Dom.isEmpty(parent)) {
|
|
@@ -13,10 +13,12 @@ Config.prototype.dtd = {
|
|
|
13
13
|
audio: 1,
|
|
14
14
|
body: 1,
|
|
15
15
|
caption: 1,
|
|
16
|
+
dd: 1,
|
|
16
17
|
details: 1,
|
|
17
18
|
dir: 1,
|
|
18
19
|
div: 1,
|
|
19
20
|
dl: 1,
|
|
21
|
+
dt: 1,
|
|
20
22
|
fieldset: 1,
|
|
21
23
|
figcaption: 1,
|
|
22
24
|
figure: 1,
|
|
@@ -24,6 +26,7 @@ Config.prototype.dtd = {
|
|
|
24
26
|
form: 1,
|
|
25
27
|
header: 1,
|
|
26
28
|
hgroup: 1,
|
|
29
|
+
li: 1,
|
|
27
30
|
main: 1,
|
|
28
31
|
menu: 1,
|
|
29
32
|
nav: 1,
|