jodit 4.16.1 → 4.17.0
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 +7 -7
- package/es2015/jodit.js +152 -29
- 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.js +7 -7
- 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 +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +144 -28
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +7 -7
- package/es2021.en/jodit.js +144 -28
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +161 -29
- 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/config.d.ts +40 -1
- package/esm/core/constants.js +1 -1
- package/esm/modules/widget/file-selector/file-selector.d.ts +10 -1
- package/esm/modules/widget/file-selector/file-selector.js +30 -18
- package/esm/plugins/file/file.d.ts +24 -1
- package/esm/plugins/file/file.js +17 -1
- package/esm/plugins/inline-popup/config/items/img.js +22 -1
- package/esm/plugins/source/editor/engines/ace.js +2 -1
- package/esm/plugins/source/source.d.ts +17 -0
- package/esm/plugins/source/source.js +60 -8
- package/esm/plugins/video/config.d.ts +21 -1
- package/esm/plugins/video/config.js +22 -2
- package/package.json +1 -1
- package/types/config.d.ts +40 -1
- package/types/modules/widget/file-selector/file-selector.d.ts +10 -1
- package/types/plugins/file/file.d.ts +24 -1
- package/types/plugins/source/source.d.ts +17 -0
- package/types/plugins/video/config.d.ts +21 -1
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module modules/widget/file-selector
|
|
10
10
|
*/
|
|
11
|
-
import type { IFileBrowserCallBackData, IJodit } from "../../../types/index";
|
|
11
|
+
import type { IFileBrowserCallBackData, IJodit, IUploaderData } from "../../../types/index";
|
|
12
|
+
import { type TabOption } from "../tabs/tabs";
|
|
12
13
|
interface ImageSelectorCallbacks {
|
|
13
14
|
/**
|
|
14
15
|
* Function that will be called when the user enters the URL of the tab image and alternative text for images
|
|
@@ -34,4 +35,12 @@ interface ImageSelectorCallbacks {
|
|
|
34
35
|
* functions with different parameters
|
|
35
36
|
*/
|
|
36
37
|
export declare const FileSelectorWidget: (editor: IJodit, callbacks: ImageSelectorCallbacks, elm: HTMLElement | null, close: () => void, isImage?: boolean) => HTMLDivElement;
|
|
38
|
+
/**
|
|
39
|
+
* The Upload tab: a box that uploads the files dropped on it or chosen in its
|
|
40
|
+
* file input, then passes the uploader's answer to `onSuccess` and closes the popup
|
|
41
|
+
*/
|
|
42
|
+
export declare const UploadTab: (editor: IJodit, onSuccess: (this: IJodit, data: IUploaderData) => void, { label, accept }: {
|
|
43
|
+
label: string;
|
|
44
|
+
accept: string;
|
|
45
|
+
}) => TabOption;
|
|
37
46
|
export {};
|
|
@@ -8,5 +8,28 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module plugins/file
|
|
10
10
|
*/
|
|
11
|
-
import type { IJodit } from "../../types/index";
|
|
11
|
+
import type { IJodit, IUploaderData } from "../../types/index";
|
|
12
|
+
declare module 'jodit/config' {
|
|
13
|
+
interface Config {
|
|
14
|
+
file: {
|
|
15
|
+
/**
|
|
16
|
+
* Inserts the files uploaded from the file popup's Upload tab. By default
|
|
17
|
+
* each one goes in as a link, an image as well, the way
|
|
18
|
+
* `uploader.defaultHandlerSuccess` inserts a file that isn't an image.
|
|
19
|
+
* ```javascript
|
|
20
|
+
* Jodit.make('#editor', {
|
|
21
|
+
* file: {
|
|
22
|
+
* defaultHandlerSuccess(data) {
|
|
23
|
+
* data.files.forEach(file => {
|
|
24
|
+
* this.s.insertHTML(`<a class="file" href="${data.baseurl + file}">${file}</a>`);
|
|
25
|
+
* });
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
defaultHandlerSuccess?: (this: IJodit, data: IUploaderData) => void;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
12
35
|
export declare function file(editor: IJodit): void;
|
|
@@ -21,6 +21,11 @@ export declare class source extends Plugin {
|
|
|
21
21
|
private mirrorContainer;
|
|
22
22
|
private __lock;
|
|
23
23
|
private __oldMirrorValue;
|
|
24
|
+
/**
|
|
25
|
+
* What the source view was last filled with from WYSIWYG, read back from
|
|
26
|
+
* the editor; while the view still holds it, nothing has been typed there
|
|
27
|
+
*/
|
|
28
|
+
private __filledValue;
|
|
24
29
|
private tempMarkerStart;
|
|
25
30
|
private tempMarkerStartReg;
|
|
26
31
|
private tempMarkerEnd;
|
|
@@ -50,6 +55,18 @@ export declare class source extends Plugin {
|
|
|
50
55
|
afterInit(editor: IJodit): void;
|
|
51
56
|
private syncValueFromWYSIWYG;
|
|
52
57
|
private initSourceEditor;
|
|
58
|
+
/**
|
|
59
|
+
* Replaces the source editor (the textarea shown while ACE loads) with
|
|
60
|
+
* the one that just became ready, carrying its text, selection and focus
|
|
61
|
+
* over. Filling the new editor from WYSIWYG instead would drop what was
|
|
62
|
+
* typed since the last, debounced, sync and normalise half-typed markup.
|
|
63
|
+
*/
|
|
64
|
+
private takeOver;
|
|
65
|
+
/**
|
|
66
|
+
* The beautifier arrived after the source view was opened: format the
|
|
67
|
+
* view if nothing has been typed into it, otherwise leave the typing alone
|
|
68
|
+
*/
|
|
69
|
+
private beautifyUntouched;
|
|
53
70
|
/** @override */
|
|
54
71
|
beforeDestruct(): void;
|
|
55
72
|
}
|
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* @module plugins/video
|
|
8
|
+
*/
|
|
9
|
+
import type { IJodit, IUploaderData } from "../../types/index";
|
|
6
10
|
declare module 'jodit/config' {
|
|
7
11
|
interface Config {
|
|
8
12
|
video: {
|
|
@@ -29,7 +33,23 @@ declare module 'jodit/config' {
|
|
|
29
33
|
* Default height for video iframe. Default: 345
|
|
30
34
|
*/
|
|
31
35
|
defaultHeight?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Inserts the videos uploaded from the popup's Upload tab, which is shown
|
|
38
|
+
* when `uploader.url` or `uploader.customUploadFunction` is set. By default
|
|
39
|
+
* each one goes in as `<video controls src="…">`.
|
|
40
|
+
* ```javascript
|
|
41
|
+
* Jodit.make('#editor', {
|
|
42
|
+
* video: {
|
|
43
|
+
* defaultHandlerSuccess(data) {
|
|
44
|
+
* data.files.forEach(file => {
|
|
45
|
+
* this.s.insertHTML(`<video controls preload="metadata" src="${data.baseurl + file}"></video>`);
|
|
46
|
+
* });
|
|
47
|
+
* }
|
|
48
|
+
* }
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
defaultHandlerSuccess?: (this: IJodit, data: IUploaderData) => void;
|
|
32
53
|
};
|
|
33
54
|
}
|
|
34
55
|
}
|
|
35
|
-
export {};
|