jodit 4.5.15 → 4.5.17
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 +15 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +20 -6
- 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 -6
- 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 +20 -6
- 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 +20 -6
- 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 +20 -6
- 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/config.d.ts +4 -0
- package/esm/core/constants.js +1 -1
- package/esm/plugins/link/config.d.ts +4 -0
- package/esm/plugins/link/config.js +1 -0
- package/esm/plugins/link/link.d.ts +2 -1
- package/esm/plugins/link/link.js +17 -4
- package/package.json +1 -1
- package/types/config.d.ts +4 -0
- package/types/plugins/link/config.d.ts +4 -0
- package/types/plugins/link/link.d.ts +2 -1
package/esm/config.d.ts
CHANGED
|
@@ -1117,6 +1117,10 @@ interface Config {
|
|
|
1117
1117
|
*/
|
|
1118
1118
|
selectOptionsClassName: IUIOption[];
|
|
1119
1119
|
hotkeys: string[];
|
|
1120
|
+
/**
|
|
1121
|
+
* Prevent navigation to the link if it is readonly. Default: true
|
|
1122
|
+
*/
|
|
1123
|
+
preventReadOnlyNavigation: boolean;
|
|
1120
1124
|
};
|
|
1121
1125
|
}
|
|
1122
1126
|
interface Config {
|
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.5.
|
|
6
|
+
export const APP_VERSION = "4.5.17";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -19,9 +19,10 @@ export declare class link extends Plugin {
|
|
|
19
19
|
buttons: Plugin['buttons'];
|
|
20
20
|
/** @override */
|
|
21
21
|
protected afterInit(jodit: IJodit): void;
|
|
22
|
-
private
|
|
22
|
+
private __onDblClickOnLink;
|
|
23
23
|
private onProcessPasteLink;
|
|
24
24
|
private __generateForm;
|
|
25
25
|
/** @override */
|
|
26
26
|
protected beforeDestruct(jodit: IJodit): void;
|
|
27
|
+
private __onClickReadOnlyLink;
|
|
27
28
|
}
|
package/esm/plugins/link/link.js
CHANGED
|
@@ -36,8 +36,9 @@ export class link extends Plugin {
|
|
|
36
36
|
/** @override */
|
|
37
37
|
afterInit(jodit) {
|
|
38
38
|
if (jodit.o.link.followOnDblClick) {
|
|
39
|
-
jodit.e.on('dblclick.link', this.
|
|
39
|
+
jodit.e.on('dblclick.link', this.__onDblClickOnLink);
|
|
40
40
|
}
|
|
41
|
+
jodit.e.on(jodit.editor, 'click.link', this.__onClickReadOnlyLink);
|
|
41
42
|
if (jodit.o.link.processPastedLink) {
|
|
42
43
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
43
44
|
}
|
|
@@ -61,7 +62,7 @@ export class link extends Plugin {
|
|
|
61
62
|
hotkeys: jodit.o.link.hotkeys
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
__onDblClickOnLink(e) {
|
|
65
66
|
if (!Dom.isTag(e.target, 'a')) {
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
@@ -243,19 +244,31 @@ export class link extends Plugin {
|
|
|
243
244
|
beforeDestruct(jodit) {
|
|
244
245
|
jodit.e
|
|
245
246
|
.off('generateLinkForm.link', this.__generateForm)
|
|
246
|
-
.off('dblclick.link', this.
|
|
247
|
+
.off('dblclick.link', this.__onDblClickOnLink)
|
|
248
|
+
.off(jodit.editor, 'click.link', this.__onClickReadOnlyLink)
|
|
247
249
|
.off('processPaste.link', this.onProcessPasteLink);
|
|
248
250
|
}
|
|
251
|
+
__onClickReadOnlyLink(e) {
|
|
252
|
+
const { jodit } = this;
|
|
253
|
+
if (jodit.o.readonly &&
|
|
254
|
+
jodit.o.link.preventReadOnlyNavigation &&
|
|
255
|
+
Dom.isTag(e.target, 'a')) {
|
|
256
|
+
e.preventDefault();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
249
259
|
}
|
|
250
260
|
__decorate([
|
|
251
261
|
autobind
|
|
252
|
-
], link.prototype, "
|
|
262
|
+
], link.prototype, "__onDblClickOnLink", null);
|
|
253
263
|
__decorate([
|
|
254
264
|
autobind
|
|
255
265
|
], link.prototype, "onProcessPasteLink", null);
|
|
256
266
|
__decorate([
|
|
257
267
|
autobind
|
|
258
268
|
], link.prototype, "__generateForm", null);
|
|
269
|
+
__decorate([
|
|
270
|
+
autobind
|
|
271
|
+
], link.prototype, "__onClickReadOnlyLink", null);
|
|
259
272
|
pluginSystem.add('link', link);
|
|
260
273
|
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
261
274
|
var _a;
|
package/package.json
CHANGED
package/types/config.d.ts
CHANGED
|
@@ -1117,6 +1117,10 @@ interface Config {
|
|
|
1117
1117
|
*/
|
|
1118
1118
|
selectOptionsClassName: IUIOption[];
|
|
1119
1119
|
hotkeys: string[];
|
|
1120
|
+
/**
|
|
1121
|
+
* Prevent navigation to the link if it is readonly. Default: true
|
|
1122
|
+
*/
|
|
1123
|
+
preventReadOnlyNavigation: boolean;
|
|
1120
1124
|
};
|
|
1121
1125
|
}
|
|
1122
1126
|
interface Config {
|
|
@@ -19,9 +19,10 @@ export declare class link extends Plugin {
|
|
|
19
19
|
buttons: Plugin['buttons'];
|
|
20
20
|
/** @override */
|
|
21
21
|
protected afterInit(jodit: IJodit): void;
|
|
22
|
-
private
|
|
22
|
+
private __onDblClickOnLink;
|
|
23
23
|
private onProcessPasteLink;
|
|
24
24
|
private __generateForm;
|
|
25
25
|
/** @override */
|
|
26
26
|
protected beforeDestruct(jodit: IJodit): void;
|
|
27
|
+
private __onClickReadOnlyLink;
|
|
27
28
|
}
|