jodit 4.6.12 → 4.6.14
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 +14 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +16 -7
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +20 -8
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +1 -1
- 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 +19 -8
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +19 -8
- package/es2021.en/jodit.min.js +2 -2
- 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/415.fat.min.js +1 -1
- package/es5/415.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +16 -7
- 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/esm/core/constants.js +1 -1
- package/esm/core/selection/style/transactions.js +15 -4
- package/esm/plugins/copy-format/copy-format.js +3 -2
- package/package.json +1 -1
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-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.6.
|
|
6
|
+
export const APP_VERSION = "4.6.14";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -81,16 +81,27 @@ export const transactions = {
|
|
|
81
81
|
},
|
|
82
82
|
[states.EXTRACT]: {
|
|
83
83
|
exec(value) {
|
|
84
|
+
var _a;
|
|
84
85
|
const { element, jodit, style } = value;
|
|
85
86
|
const suit = suitableClosest(style, element, jodit.editor);
|
|
86
87
|
assert(suit, 'This place should have an element');
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
// If we're applying inline styles to a block element, don't split the block
|
|
89
|
+
const isApplyingInlineStyle = !style.elementIsBlock && ((_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style);
|
|
90
|
+
const shouldNotSplitBlock = isApplyingInlineStyle && Dom.isBlock(suit);
|
|
91
|
+
if (!shouldNotSplitBlock) {
|
|
92
|
+
if (!style.elementIsBlock) {
|
|
93
|
+
extractSelectedPart(suit, element, jodit);
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
...value,
|
|
97
|
+
element: suit,
|
|
98
|
+
next: states.ELEMENT
|
|
99
|
+
};
|
|
89
100
|
}
|
|
101
|
+
// Create a new wrapper instead of splitting the block
|
|
90
102
|
return {
|
|
91
103
|
...value,
|
|
92
|
-
|
|
93
|
-
next: states.ELEMENT
|
|
104
|
+
next: states.WRAP
|
|
94
105
|
};
|
|
95
106
|
}
|
|
96
107
|
},
|
|
@@ -15,9 +15,11 @@ const pluginKey = 'copy-format';
|
|
|
15
15
|
* Plug-in copy and paste formatting from one element to another
|
|
16
16
|
*/
|
|
17
17
|
const copyStyles = [
|
|
18
|
+
'lineHeight',
|
|
18
19
|
'fontWeight',
|
|
19
20
|
'fontStyle',
|
|
20
21
|
'fontSize',
|
|
22
|
+
'fontFamily',
|
|
21
23
|
'color',
|
|
22
24
|
'margin',
|
|
23
25
|
'padding',
|
|
@@ -26,8 +28,7 @@ const copyStyles = [
|
|
|
26
28
|
'borderColor',
|
|
27
29
|
'borderRadius',
|
|
28
30
|
'backgroundColor',
|
|
29
|
-
'textDecorationLine'
|
|
30
|
-
'fontFamily'
|
|
31
|
+
'textDecorationLine'
|
|
31
32
|
];
|
|
32
33
|
const getStyle = (editor, key, box, defaultStyles) => {
|
|
33
34
|
let result = css(box, key);
|