jodit 4.19.14 → 4.20.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 +30 -0
- package/es2015/jodit.css +76 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +12 -12
- package/es2015/jodit.js +1464 -599
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +12 -12
- 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 +12 -12
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +12 -12
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +76 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +17 -17
- package/es2021/jodit.js +1445 -596
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +17 -17
- 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 +76 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +17 -17
- package/es2021.en/jodit.js +1419 -570
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +17 -17
- 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 +96 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1707 -706
- 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 +10 -3
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/anchor.d.ts +22 -0
- package/esm/core/helpers/utils/anchor.js +29 -0
- package/esm/core/helpers/utils/index.d.ts +1 -0
- package/esm/core/helpers/utils/index.js +1 -0
- package/esm/core/ui/form/inputs/input/input.js +2 -0
- package/esm/core/ui/popup/popup.d.ts +5 -0
- package/esm/core/ui/popup/popup.js +5 -0
- package/esm/jodit.js +11 -14
- package/esm/langs/ar.d.ts +5 -0
- package/esm/langs/ar.js +5 -0
- package/esm/langs/az.d.ts +5 -0
- package/esm/langs/az.js +5 -0
- package/esm/langs/cs_cz.d.ts +5 -0
- package/esm/langs/cs_cz.js +6 -1
- package/esm/langs/de.d.ts +5 -0
- package/esm/langs/de.js +6 -0
- package/esm/langs/es.d.ts +5 -0
- package/esm/langs/es.js +6 -1
- package/esm/langs/fa.d.ts +5 -0
- package/esm/langs/fa.js +6 -1
- package/esm/langs/fi.d.ts +5 -0
- package/esm/langs/fi.js +5 -0
- package/esm/langs/fr.d.ts +5 -0
- package/esm/langs/fr.js +5 -0
- package/esm/langs/he.d.ts +5 -0
- package/esm/langs/he.js +6 -1
- package/esm/langs/hu.d.ts +5 -0
- package/esm/langs/hu.js +5 -0
- package/esm/langs/id.d.ts +5 -0
- package/esm/langs/id.js +6 -1
- package/esm/langs/it.d.ts +5 -0
- package/esm/langs/it.js +6 -1
- package/esm/langs/ja.d.ts +5 -0
- package/esm/langs/ja.js +6 -1
- package/esm/langs/ko.d.ts +5 -0
- package/esm/langs/ko.js +6 -1
- package/esm/langs/mn.d.ts +5 -0
- package/esm/langs/mn.js +6 -1
- package/esm/langs/nl.d.ts +5 -0
- package/esm/langs/nl.js +5 -0
- package/esm/langs/no.d.ts +5 -0
- package/esm/langs/no.js +5 -0
- package/esm/langs/pl.d.ts +5 -0
- package/esm/langs/pl.js +5 -0
- package/esm/langs/pt_br.d.ts +5 -0
- package/esm/langs/pt_br.js +6 -1
- package/esm/langs/ru.d.ts +5 -0
- package/esm/langs/ru.js +6 -1
- package/esm/langs/sk.d.ts +5 -0
- package/esm/langs/sk.js +5 -0
- package/esm/langs/sv.d.ts +5 -0
- package/esm/langs/sv.js +5 -0
- package/esm/langs/tr.d.ts +5 -0
- package/esm/langs/tr.js +6 -1
- package/esm/langs/ua.d.ts +5 -0
- package/esm/langs/ua.js +6 -1
- package/esm/langs/zh_cn.d.ts +5 -0
- package/esm/langs/zh_cn.js +6 -1
- package/esm/langs/zh_tw.d.ts +5 -0
- package/esm/langs/zh_tw.js +5 -0
- package/esm/modules/file-browser/file-browser.d.ts +3 -4
- package/esm/modules/file-browser/file-browser.js +12 -12
- package/esm/modules/toolbar/button/button.d.ts +7 -0
- package/esm/modules/toolbar/button/button.js +32 -4
- package/esm/modules/uploader/config.js +18 -18
- package/esm/modules/uploader/helpers/index.d.ts +1 -0
- package/esm/modules/uploader/helpers/index.js +1 -0
- package/esm/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
- package/esm/modules/uploader/helpers/normalize-uploader-data.js +54 -0
- package/esm/modules/uploader/helpers/send-files.js +11 -6
- package/esm/modules/uploader/uploader.d.ts +4 -5
- package/esm/modules/uploader/uploader.js +12 -8
- package/esm/plugins/all.d.ts +1 -0
- package/esm/plugins/all.js +1 -0
- package/esm/plugins/anchor/anchor.d.ts +67 -0
- package/esm/plugins/anchor/anchor.js +302 -0
- package/esm/plugins/anchor/config.d.ts +6 -0
- package/esm/plugins/anchor/config.js +13 -0
- package/esm/plugins/file/file.d.ts +1 -1
- package/esm/plugins/file/file.js +6 -6
- package/esm/plugins/image/image.js +2 -2
- package/esm/plugins/image-caption/image-caption.js +1 -2
- package/esm/plugins/image-properties/utils/open-image-popup.js +7 -6
- package/esm/plugins/index.d.ts +1 -0
- package/esm/plugins/inline-popup/config/config.d.ts +8 -2
- package/esm/plugins/inline-popup/config/config.js +1 -0
- package/esm/plugins/inline-popup/config/items/cells.js +0 -10
- package/esm/plugins/inline-popup/config/items/img.js +1 -1
- package/esm/plugins/inline-popup/inline-popup.d.ts +9 -12
- package/esm/plugins/inline-popup/inline-popup.js +53 -77
- package/esm/plugins/link/link.js +150 -3
- package/esm/plugins/link/template.js +3 -1
- package/esm/plugins/resizer/resizer.d.ts +6 -0
- package/esm/plugins/resizer/resizer.js +11 -0
- package/esm/plugins/select/select.d.ts +31 -0
- package/esm/plugins/select/select.js +235 -2
- package/esm/plugins/select-cells/select-cells.d.ts +11 -0
- package/esm/plugins/select-cells/select-cells.js +48 -17
- package/esm/plugins/video/config.d.ts +1 -1
- package/esm/plugins/video/config.js +4 -3
- package/esm/plugins/video-properties/video-properties.js +7 -6
- package/esm/styles/icons/anchor.svg.js +1 -0
- package/esm/styles/icons/index.d.ts +1 -1
- package/esm/styles/icons/index.js +2 -1
- package/esm/types/file-browser.d.ts +8 -1
- package/esm/types/popup.d.ts +1 -0
- package/esm/types/uploader.d.ts +39 -1
- package/package.json +1 -1
- package/types/config.d.ts +10 -3
- package/types/core/helpers/utils/anchor.d.ts +22 -0
- package/types/core/helpers/utils/index.d.ts +1 -0
- package/types/core/ui/popup/popup.d.ts +5 -0
- package/types/langs/ar.d.ts +5 -0
- package/types/langs/az.d.ts +5 -0
- package/types/langs/cs_cz.d.ts +5 -0
- package/types/langs/de.d.ts +5 -0
- package/types/langs/es.d.ts +5 -0
- package/types/langs/fa.d.ts +5 -0
- package/types/langs/fi.d.ts +5 -0
- package/types/langs/fr.d.ts +5 -0
- package/types/langs/he.d.ts +5 -0
- package/types/langs/hu.d.ts +5 -0
- package/types/langs/id.d.ts +5 -0
- package/types/langs/it.d.ts +5 -0
- package/types/langs/ja.d.ts +5 -0
- package/types/langs/ko.d.ts +5 -0
- package/types/langs/mn.d.ts +5 -0
- package/types/langs/nl.d.ts +5 -0
- package/types/langs/no.d.ts +5 -0
- package/types/langs/pl.d.ts +5 -0
- package/types/langs/pt_br.d.ts +5 -0
- package/types/langs/ru.d.ts +5 -0
- package/types/langs/sk.d.ts +5 -0
- package/types/langs/sv.d.ts +5 -0
- package/types/langs/tr.d.ts +5 -0
- package/types/langs/ua.d.ts +5 -0
- package/types/langs/zh_cn.d.ts +5 -0
- package/types/langs/zh_tw.d.ts +5 -0
- package/types/modules/file-browser/file-browser.d.ts +3 -4
- package/types/modules/toolbar/button/button.d.ts +7 -0
- package/types/modules/uploader/helpers/index.d.ts +1 -0
- package/types/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
- package/types/modules/uploader/uploader.d.ts +4 -5
- package/types/plugins/anchor/anchor.d.ts +67 -0
- package/types/plugins/anchor/config.d.ts +6 -0
- package/types/plugins/file/file.d.ts +1 -1
- package/types/plugins/index.d.ts +1 -0
- package/types/plugins/inline-popup/config/config.d.ts +8 -2
- package/types/plugins/inline-popup/inline-popup.d.ts +9 -12
- package/types/plugins/resizer/resizer.d.ts +6 -0
- package/types/plugins/select/select.d.ts +31 -0
- package/types/plugins/select-cells/select-cells.d.ts +11 -0
- package/types/plugins/video/config.d.ts +1 -1
- package/types/styles/icons/index.d.ts +1 -1
- package/types/types/file-browser.d.ts +8 -1
- package/types/types/popup.d.ts +1 -0
- package/types/types/uploader.d.ts +39 -1
package/esm/types/uploader.d.ts
CHANGED
|
@@ -9,10 +9,39 @@
|
|
|
9
9
|
import type { CanPromise, IDictionary, IViewComponent } from "./types";
|
|
10
10
|
import type { IViewBased } from "./view";
|
|
11
11
|
import type { IAjax } from "./ajax";
|
|
12
|
+
/**
|
|
13
|
+
* One file in the data passed to upload and file browser handlers
|
|
14
|
+
*/
|
|
15
|
+
export interface IUploadedFile {
|
|
16
|
+
/**
|
|
17
|
+
* Relative to `baseurl`, or a data URI for an image read as base64
|
|
18
|
+
*/
|
|
19
|
+
file: string;
|
|
20
|
+
isImage: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The name the file had on the user's device. Jodit sets it for images
|
|
23
|
+
* read as base64 (`insertImageAsBase64URI`).
|
|
24
|
+
*/
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
12
27
|
interface IUploaderData {
|
|
13
28
|
code?: number;
|
|
14
29
|
messages?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* One object per file. Handlers always get it: Jodit builds it from
|
|
32
|
+
* `files`, `isImages` and `fileNames` when the server or
|
|
33
|
+
* `uploader.process` gives those, and fills those arrays in from it when
|
|
34
|
+
* it's given alone.
|
|
35
|
+
*
|
|
36
|
+
* In 4.x the arrays win while `files` is set: the default handlers read
|
|
37
|
+
* them, not `items`. A handler that changes what a default handler
|
|
38
|
+
* inserts edits `files` and `isImages`, or edits `items` and deletes
|
|
39
|
+
* `files` before passing the data on.
|
|
40
|
+
*/
|
|
41
|
+
items?: IUploadedFile[];
|
|
42
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
15
43
|
files: string[];
|
|
44
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
16
45
|
isImages?: boolean[];
|
|
17
46
|
path?: string;
|
|
18
47
|
baseurl: string;
|
|
@@ -21,9 +50,18 @@ interface IUploaderData {
|
|
|
21
50
|
* The names the files had on the user's device. Only set when the
|
|
22
51
|
* images were read as base64 (`insertImageAsBase64URI`), where `files`
|
|
23
52
|
* holds data URIs.
|
|
53
|
+
* @deprecated Use `items` instead. Removed in 5.0
|
|
24
54
|
*/
|
|
25
55
|
fileNames?: string[];
|
|
26
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* What `uploader.process` returns: the data handlers get, where `files` can
|
|
59
|
+
* be left out when `items` is given
|
|
60
|
+
*/
|
|
61
|
+
export interface IUploaderProcessData extends Omit<IUploaderData, 'files'> {
|
|
62
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
63
|
+
files?: string[];
|
|
64
|
+
}
|
|
27
65
|
interface IUploaderAnswer {
|
|
28
66
|
success: boolean;
|
|
29
67
|
time: string;
|
|
@@ -176,7 +214,7 @@ export interface IUploaderOptions<T> {
|
|
|
176
214
|
queryBuild?: (obj: string | IDictionary<string | object> | FormData, prefix?: string) => string | FormData;
|
|
177
215
|
isSuccess: (this: T, resp: IUploaderAnswer) => boolean;
|
|
178
216
|
getMessage: (this: T, resp: IUploaderAnswer) => string;
|
|
179
|
-
process: (this: T, resp: IUploaderAnswer) =>
|
|
217
|
+
process: (this: T, resp: IUploaderAnswer) => IUploaderProcessData;
|
|
180
218
|
error: (this: T, e: Error) => void;
|
|
181
219
|
defaultHandlerSuccess: HandlerSuccess;
|
|
182
220
|
/**
|
package/package.json
CHANGED
package/types/config.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type { IUploaderData } from "./types/index";
|
|
|
13
13
|
import type { ImageCaptionMarkup } from "./types/index";
|
|
14
14
|
import type { ImagePropertiesOptions } from "./plugins/image-properties/interface";
|
|
15
15
|
import type { IControlType } from "./types/index";
|
|
16
|
+
import type { IUIElement } from "./types/index";
|
|
16
17
|
import type { formTemplate } from "./plugins/link/template";
|
|
17
18
|
import type { IUIForm } from "./types/index";
|
|
18
19
|
import type { IUIOption } from "./types/index";
|
|
@@ -1306,7 +1307,7 @@ interface Config {
|
|
|
1306
1307
|
* Jodit.make('#editor', {
|
|
1307
1308
|
* file: {
|
|
1308
1309
|
* defaultHandlerSuccess(data) {
|
|
1309
|
-
* data.
|
|
1310
|
+
* data.items.forEach(({ file }) => {
|
|
1310
1311
|
* this.s.insertHTML(`<a class="file" href="${data.baseurl + file}">${file}</a>`);
|
|
1311
1312
|
* });
|
|
1312
1313
|
* }
|
|
@@ -1501,7 +1502,7 @@ interface Config {
|
|
|
1501
1502
|
* Element-specific popup toolbars. Keys are tag names (e.g. `img`, `a`, `cells`)
|
|
1502
1503
|
* and values are button lists or factory functions that return them.
|
|
1503
1504
|
*/
|
|
1504
|
-
popup: IDictionary<Array<IControlType | string> | ((editor: IJodit, target: HTMLElement | undefined, close: () => void) => Array<IControlType | string> | HTMLElement | string)>;
|
|
1505
|
+
popup: IDictionary<Array<IControlType | string> | ((editor: IJodit, target: HTMLElement | undefined, close: () => void) => Array<IControlType | string> | HTMLElement | IUIElement | string)>;
|
|
1505
1506
|
/**
|
|
1506
1507
|
* List of button names to exclude from the inline toolbar
|
|
1507
1508
|
*/
|
|
@@ -1514,6 +1515,12 @@ interface Config {
|
|
|
1514
1515
|
* Show an inline toolbar when the user selects text
|
|
1515
1516
|
*/
|
|
1516
1517
|
toolbarInlineForSelection: boolean;
|
|
1518
|
+
/**
|
|
1519
|
+
* Keep an inline toolbar open after one of its buttons runs, beside its
|
|
1520
|
+
* element or the selection. A list the button opened still closes.
|
|
1521
|
+
* `false` closes the toolbar after every button
|
|
1522
|
+
*/
|
|
1523
|
+
toolbarInlineKeepOpen: boolean;
|
|
1517
1524
|
/**
|
|
1518
1525
|
* CSS selector or array of selectors for elements that should not trigger the inline toolbar
|
|
1519
1526
|
*/
|
|
@@ -2144,7 +2151,7 @@ interface Config {
|
|
|
2144
2151
|
* Jodit.make('#editor', {
|
|
2145
2152
|
* video: {
|
|
2146
2153
|
* defaultHandlerSuccess(data) {
|
|
2147
|
-
* data.
|
|
2154
|
+
* data.items.forEach(({ file }) => {
|
|
2148
2155
|
* this.s.insertHTML(`<video controls preload="metadata" src="${data.baseurl + file}"></video>`);
|
|
2149
2156
|
* });
|
|
2150
2157
|
* }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
9
|
+
import type { Nullable } from "../../../types/index";
|
|
10
|
+
/**
|
|
11
|
+
* The name a link reaches an anchor by: its `id`, or in older content its
|
|
12
|
+
* `name`
|
|
13
|
+
*/
|
|
14
|
+
export declare function getAnchorName(anchor: HTMLAnchorElement): string;
|
|
15
|
+
/**
|
|
16
|
+
* An anchor: an `<a>` with a name, no `href` and nothing in it
|
|
17
|
+
*/
|
|
18
|
+
export declare function isAnchor(node: Nullable<Node>): node is HTMLAnchorElement;
|
|
19
|
+
/**
|
|
20
|
+
* The anchors in `root`, in the order they come
|
|
21
|
+
*/
|
|
22
|
+
export declare function getAnchors(root: ParentNode): HTMLAnchorElement[];
|
|
@@ -16,6 +16,11 @@ export declare class Popup extends UIGroup implements IPopup {
|
|
|
16
16
|
className(): string;
|
|
17
17
|
isOpened: boolean;
|
|
18
18
|
strategy: PopupStrategy;
|
|
19
|
+
/**
|
|
20
|
+
* The popup stays open after one of its buttons runs: the button closes
|
|
21
|
+
* only the lists it opened. See #1741
|
|
22
|
+
*/
|
|
23
|
+
keepOpen: boolean;
|
|
19
24
|
protected appendChildToContainer(childContainer: HTMLElement): void;
|
|
20
25
|
viewBound: () => IBound;
|
|
21
26
|
private __targetBound;
|
package/types/langs/ar.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/az.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Line height': string;
|
package/types/langs/cs_cz.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/de.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/es.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/fa.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/fi.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/fr.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/he.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/hu.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ declare const _exports: {
|
|
|
29
29
|
'Insert file': string;
|
|
30
30
|
'Insert youtube/vimeo video': string;
|
|
31
31
|
'Insert link': string;
|
|
32
|
+
'Insert anchor': string;
|
|
33
|
+
'Link to an anchor': string;
|
|
34
|
+
'On this page': string;
|
|
35
|
+
'The name cannot contain spaces': string;
|
|
36
|
+
'This name is already in use': string;
|
|
32
37
|
'Font size': string;
|
|
33
38
|
'Font family': string;
|
|
34
39
|
'Insert format block': string;
|
package/types/langs/id.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/it.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/ja.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/ko.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/mn.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/nl.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ declare const _exports: {
|
|
|
29
29
|
'Insert file': string;
|
|
30
30
|
'Insert youtube/vimeo video': string;
|
|
31
31
|
'Insert link': string;
|
|
32
|
+
'Insert anchor': string;
|
|
33
|
+
'Link to an anchor': string;
|
|
34
|
+
'On this page': string;
|
|
35
|
+
'The name cannot contain spaces': string;
|
|
36
|
+
'This name is already in use': string;
|
|
32
37
|
'Font size': string;
|
|
33
38
|
'Font family': string;
|
|
34
39
|
'Insert format block': string;
|
package/types/langs/no.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/pl.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/pt_br.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/ru.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/sk.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/sv.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/tr.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
package/types/langs/ua.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ declare const _exports: {
|
|
|
27
27
|
'Insert file': string;
|
|
28
28
|
'Insert youtube/vimeo video': string;
|
|
29
29
|
'Insert link': string;
|
|
30
|
+
'Insert anchor': string;
|
|
31
|
+
'Link to an anchor': string;
|
|
32
|
+
'On this page': string;
|
|
33
|
+
'The name cannot contain spaces': string;
|
|
34
|
+
'This name is already in use': string;
|
|
30
35
|
'Font size': string;
|
|
31
36
|
'Font family': string;
|
|
32
37
|
'Insert format block': string;
|
package/types/langs/zh_cn.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ declare const _exports: {
|
|
|
29
29
|
'Insert file': string;
|
|
30
30
|
'Insert youtube/vimeo video': string;
|
|
31
31
|
'Insert link': string;
|
|
32
|
+
'Insert anchor': string;
|
|
33
|
+
'Link to an anchor': string;
|
|
34
|
+
'On this page': string;
|
|
35
|
+
'The name cannot contain spaces': string;
|
|
36
|
+
'This name is already in use': string;
|
|
32
37
|
'Font size': string;
|
|
33
38
|
'Font family': string;
|
|
34
39
|
'Insert format block': string;
|
package/types/langs/zh_tw.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare const _exports: {
|
|
|
28
28
|
'Insert file': string;
|
|
29
29
|
'Insert youtube/vimeo video': string;
|
|
30
30
|
'Insert link': string;
|
|
31
|
+
'Insert anchor': string;
|
|
32
|
+
'Link to an anchor': string;
|
|
33
|
+
'On this page': string;
|
|
34
|
+
'The name cannot contain spaces': string;
|
|
35
|
+
'This name is already in use': string;
|
|
31
36
|
'Font size': string;
|
|
32
37
|
'Font family': string;
|
|
33
38
|
'Insert format block': string;
|
|
@@ -57,10 +57,9 @@ export declare class FileBrowser extends ViewWithToolbar implements IFileBrowser
|
|
|
57
57
|
* ```javascript
|
|
58
58
|
* var fb = new Jodit.modules.FileBrowser(parent);
|
|
59
59
|
* fb.open(function (data) {
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* }
|
|
60
|
+
* data.items.forEach(function (item) {
|
|
61
|
+
* parent.s.insertImage(data.baseurl + item.file);
|
|
62
|
+
* });
|
|
64
63
|
* });
|
|
65
64
|
* ```
|
|
66
65
|
*/
|
|
@@ -111,5 +111,12 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
|
|
|
111
111
|
* Click handler
|
|
112
112
|
*/
|
|
113
113
|
protected onClick(originalEvent: MouseEvent): void;
|
|
114
|
+
/**
|
|
115
|
+
* After the button's action, a popup that stays open (an element's)
|
|
116
|
+
* keeps its place beside the element, and only the lists the button is
|
|
117
|
+
* in close. Otherwise, as when the action removed the element, every
|
|
118
|
+
* popup closes
|
|
119
|
+
*/
|
|
120
|
+
private __closePopups;
|
|
114
121
|
destruct(): any;
|
|
115
122
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { Nullable } from "../../../types/index";
|
|
10
10
|
export * from "./build-data";
|
|
11
11
|
export * from "./data-uri-to-blob";
|
|
12
|
+
export * from "./normalize-uploader-data";
|
|
12
13
|
export * from "./process-old-browser-drag";
|
|
13
14
|
export * from "./send";
|
|
14
15
|
export * from "./send-files";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module modules/uploader
|
|
8
|
+
*/
|
|
9
|
+
import type { IUploadedFile, IUploaderData, IUploaderProcessData } from "../../../types/index";
|
|
10
|
+
type FilesData = Partial<Pick<IUploaderData, 'items' | 'files' | 'isImages' | 'fileNames'>>;
|
|
11
|
+
type Normalized<T> = T & IUploaderData & {
|
|
12
|
+
items: IUploadedFile[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The files in upload or file browser data, one object each. While the
|
|
16
|
+
* deprecated `files` array is set, it and `isImages` and `fileNames` win
|
|
17
|
+
* over `items`, so a handler that edits them and passes the data on to a
|
|
18
|
+
* default handler still gets its edits inserted. A file browser that
|
|
19
|
+
* passes only the arrays works too.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getItems(data: FilesData): IUploadedFile[];
|
|
22
|
+
/**
|
|
23
|
+
* Gives the data both `items` and the deprecated `files`, `isImages` and
|
|
24
|
+
* `fileNames` arrays, building whichever is missing, so a handler can read
|
|
25
|
+
* either. When both are given, `items` is rebuilt from the arrays, as in
|
|
26
|
+
* [[getItems]], unless `files` is empty and `items` isn't, as from a
|
|
27
|
+
* `process` that spreads the server's answer and adds `items`. Anything but
|
|
28
|
+
* an object, such as the `null` a custom `process` may return, is passed on
|
|
29
|
+
* as it is.
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeUploaderData<T extends IUploaderProcessData>(data: T): Normalized<T>;
|
|
32
|
+
export {};
|
|
@@ -40,11 +40,10 @@ export declare class Uploader extends ViewComponent implements IUploader {
|
|
|
40
40
|
* ```javascript
|
|
41
41
|
* var $form = jQuery('<form><input type="text" typpe="file"></form>');
|
|
42
42
|
* jQuery('body').append($form);
|
|
43
|
-
* Jodit.editors.someidfoeditor.uploader.bind($form[0], function (
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* }
|
|
43
|
+
* Jodit.editors.someidfoeditor.uploader.bind($form[0], function (data) {
|
|
44
|
+
* data.items.forEach(function (item) {
|
|
45
|
+
* parent.s.insertImage(data.baseurl + item.file);
|
|
46
|
+
* });
|
|
48
47
|
* });
|
|
49
48
|
* ```
|
|
50
49
|
*/
|