jodit 4.11.10 → 4.11.13
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 -0
- package/es2015/jodit.css +4 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +7 -7
- package/es2015/jodit.js +47 -13
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +7 -7
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +7 -7
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +4 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +45 -13
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +7 -7
- 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 +4 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +8 -8
- package/es2021.en/jodit.js +45 -13
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +7 -7
- 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 +7 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +47 -13
- package/es5/jodit.min.css +3 -3
- 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/config.d.ts +4 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/event-emitter/event-emitter.js +1 -1
- package/esm/core/ui/button/tooltip/tooltip.js +11 -0
- package/esm/plugins/dtd/before-insert/check-block-nesting.js +13 -2
- package/esm/plugins/focus/focus.js +3 -1
- package/esm/plugins/font/config.js +9 -5
- package/esm/plugins/link/config.d.ts +4 -0
- package/esm/plugins/link/config.js +1 -0
- package/esm/plugins/link/link.js +4 -1
- package/esm/plugins/resize-handler/resize-handler.js +1 -0
- package/esm/plugins/source/editor/engines/area.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +4 -0
- package/types/plugins/link/config.d.ts +4 -0
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/config.d.ts
CHANGED
|
@@ -1323,6 +1323,10 @@ interface Config {
|
|
|
1323
1323
|
* Show `Open in new tab` checkbox in link dialog.
|
|
1324
1324
|
*/
|
|
1325
1325
|
openInNewTabCheckbox: boolean;
|
|
1326
|
+
/**
|
|
1327
|
+
* Default value for the `Open in new tab` checkbox when inserting a new link.
|
|
1328
|
+
*/
|
|
1329
|
+
openInNewTabCheckboxDefaultChecked: boolean;
|
|
1326
1330
|
/**
|
|
1327
1331
|
* Use an input text to ask the classname or a select or not ask
|
|
1328
1332
|
*/
|
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.11.
|
|
6
|
+
export const APP_VERSION = "4.11.13";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -143,12 +143,23 @@ let UITooltip = UITooltip_1 = class UITooltip extends UIElement {
|
|
|
143
143
|
}
|
|
144
144
|
__show(getPoint, content) {
|
|
145
145
|
this.setMod('visible', true);
|
|
146
|
+
this.setMod('above', false);
|
|
146
147
|
this.getElm('content').innerHTML = content;
|
|
147
148
|
const point = getPoint();
|
|
148
149
|
css(this.container, {
|
|
149
150
|
left: point.x,
|
|
150
151
|
top: point.y
|
|
151
152
|
});
|
|
153
|
+
const tooltipPos = position(this.container);
|
|
154
|
+
const viewHeight = this.j.ow.innerHeight;
|
|
155
|
+
// If tooltip overflows below viewport, show it above the target
|
|
156
|
+
if (tooltipPos.top + tooltipPos.height > viewHeight) {
|
|
157
|
+
const targetPos = position(this.__currentTarget);
|
|
158
|
+
this.setMod('above', true);
|
|
159
|
+
css(this.container, {
|
|
160
|
+
top: targetPos.top - tooltipPos.height
|
|
161
|
+
});
|
|
162
|
+
}
|
|
152
163
|
}
|
|
153
164
|
__hide() {
|
|
154
165
|
this.j.async.clearTimeout(this.__delayShowTimeout);
|
|
@@ -10,12 +10,23 @@ import { Dom } from "../../../core/dom/dom.js";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export function checkBlockNesting(jodit, node) {
|
|
13
|
+
var _a, _b;
|
|
13
14
|
if (Dom.isFragment(node)) {
|
|
14
15
|
node = node.firstChild;
|
|
15
16
|
}
|
|
16
17
|
if (jodit.o.dtd.checkBlockNesting && Dom.isBlock(node)) {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
let parent = null;
|
|
19
|
+
let current = (_b = (_a = jodit.s.current()) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null;
|
|
20
|
+
while (current && current !== jodit.editor) {
|
|
21
|
+
if (Dom.isBlock(current)) {
|
|
22
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()]) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
parent = current;
|
|
26
|
+
}
|
|
27
|
+
current = current.parentElement;
|
|
28
|
+
}
|
|
29
|
+
if (parent) {
|
|
19
30
|
jodit.s.setCursorAfter(parent);
|
|
20
31
|
if (Dom.isEmpty(parent)) {
|
|
21
32
|
Dom.safeRemove(parent);
|
|
@@ -19,11 +19,8 @@ Config.prototype.controls.fontsize = {
|
|
|
19
19
|
command: 'fontsize',
|
|
20
20
|
data: {
|
|
21
21
|
cssRule: 'font-size',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return v.replace(/pt$/i, '');
|
|
25
|
-
}
|
|
26
|
-
return v;
|
|
22
|
+
normalize: (v) => {
|
|
23
|
+
return v.toString().replace(/(px|pt)$/i, '');
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
26
|
list: [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 32, 34, 36, 48, 60, 72, 96],
|
|
@@ -47,6 +44,13 @@ Config.prototype.controls.fontsize = {
|
|
|
47
44
|
const control = button.control;
|
|
48
45
|
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
49
46
|
const value = css(box, cssKey);
|
|
47
|
+
if (cssKey === 'font-size') {
|
|
48
|
+
const numValue = parseFloat(value.toString());
|
|
49
|
+
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
50
|
+
return Math.round(numValue * 0.75).toString();
|
|
51
|
+
}
|
|
52
|
+
return Math.round(numValue).toString();
|
|
53
|
+
}
|
|
50
54
|
return value.toString();
|
|
51
55
|
},
|
|
52
56
|
isChildActive: (editor, button) => {
|
|
@@ -35,6 +35,10 @@ declare module 'jodit/config' {
|
|
|
35
35
|
* Show `Open in new tab` checkbox in link dialog.
|
|
36
36
|
*/
|
|
37
37
|
openInNewTabCheckbox: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Default value for the `Open in new tab` checkbox when inserting a new link.
|
|
40
|
+
*/
|
|
41
|
+
openInNewTabCheckboxDefaultChecked: boolean;
|
|
38
42
|
/**
|
|
39
43
|
* Use an input text to ask the classname or a select or not ask
|
|
40
44
|
*/
|
package/esm/plugins/link/link.js
CHANGED
|
@@ -105,7 +105,7 @@ export class link extends Plugin {
|
|
|
105
105
|
}
|
|
106
106
|
__generateForm(current, close) {
|
|
107
107
|
const { jodit } = this;
|
|
108
|
-
const i18n = jodit.i18n.bind(jodit), { openInNewTabCheckbox, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
108
|
+
const i18n = jodit.i18n.bind(jodit), { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
109
109
|
const html = formTemplate(jodit);
|
|
110
110
|
const form = isString(html)
|
|
111
111
|
? jodit.c.fromHTML(html, {
|
|
@@ -163,6 +163,9 @@ export class link extends Plugin {
|
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
165
|
Dom.hide(unlink);
|
|
166
|
+
if (openInNewTabCheckbox && target_checkbox) {
|
|
167
|
+
target_checkbox.checked = openInNewTabCheckboxDefaultChecked;
|
|
168
|
+
}
|
|
166
169
|
}
|
|
167
170
|
jodit.editor.normalize();
|
|
168
171
|
const snapshot = jodit.history.snapshot.make();
|
|
@@ -50,6 +50,7 @@ export class resizeHandler extends Plugin {
|
|
|
50
50
|
if ((height !== 'auto' || width !== 'auto') &&
|
|
51
51
|
(allowResizeX || allowResizeY)) {
|
|
52
52
|
editor.statusbar.setMod('resize-handle', true);
|
|
53
|
+
editor.statusbar.show();
|
|
53
54
|
editor.e
|
|
54
55
|
.on('toggleFullSize.resizeHandler', () => {
|
|
55
56
|
this.handle.style.display = editor.isFullSize
|
|
@@ -28,7 +28,7 @@ export class TextAreaEditor extends SourceEditor {
|
|
|
28
28
|
})
|
|
29
29
|
.on(this.instance, 'change keydown mousedown touchstart input', this.autosize)
|
|
30
30
|
.on('afterSetMode.source', this.autosize)
|
|
31
|
-
.on(this.instance, 'mousedown focus', (e) => {
|
|
31
|
+
.on(this.instance, 'mousedown focus blur', (e) => {
|
|
32
32
|
editor.e.fire(e.type, e);
|
|
33
33
|
});
|
|
34
34
|
this.autosize();
|
package/package.json
CHANGED
package/types/config.d.ts
CHANGED
|
@@ -1323,6 +1323,10 @@ interface Config {
|
|
|
1323
1323
|
* Show `Open in new tab` checkbox in link dialog.
|
|
1324
1324
|
*/
|
|
1325
1325
|
openInNewTabCheckbox: boolean;
|
|
1326
|
+
/**
|
|
1327
|
+
* Default value for the `Open in new tab` checkbox when inserting a new link.
|
|
1328
|
+
*/
|
|
1329
|
+
openInNewTabCheckboxDefaultChecked: boolean;
|
|
1326
1330
|
/**
|
|
1327
1331
|
* Use an input text to ask the classname or a select or not ask
|
|
1328
1332
|
*/
|
|
@@ -35,6 +35,10 @@ declare module 'jodit/config' {
|
|
|
35
35
|
* Show `Open in new tab` checkbox in link dialog.
|
|
36
36
|
*/
|
|
37
37
|
openInNewTabCheckbox: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Default value for the `Open in new tab` checkbox when inserting a new link.
|
|
40
|
+
*/
|
|
41
|
+
openInNewTabCheckboxDefaultChecked: boolean;
|
|
38
42
|
/**
|
|
39
43
|
* Use an input text to ask the classname or a select or not ask
|
|
40
44
|
*/
|