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
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
* [[include:plugins/anchor/README.md]]
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @module plugins/anchor
|
|
10
|
+
*/
|
|
11
|
+
import type { IJodit } from "../../types/index";
|
|
12
|
+
import { Plugin } from "../../core/plugin/index";
|
|
13
|
+
import "./config";
|
|
14
|
+
/**
|
|
15
|
+
* Inserts anchors, empty `<a id>` that links in the document reach as
|
|
16
|
+
* `#name`, and renames and removes them
|
|
17
|
+
*/
|
|
18
|
+
export declare class anchor extends Plugin {
|
|
19
|
+
/** @override */
|
|
20
|
+
buttons: Plugin['buttons'];
|
|
21
|
+
/** @override */
|
|
22
|
+
protected afterInit(jodit: IJodit): void;
|
|
23
|
+
/**
|
|
24
|
+
* An anchor gets its own popup, in place of the link's
|
|
25
|
+
*/
|
|
26
|
+
private __onClickA;
|
|
27
|
+
/**
|
|
28
|
+
* Anchors are uneditable in the editor, so typing beside one never goes
|
|
29
|
+
* into it and it's deleted as a whole
|
|
30
|
+
*/
|
|
31
|
+
protected onChange(): void;
|
|
32
|
+
/**
|
|
33
|
+
* The editor's own attribute stays out of the value
|
|
34
|
+
*/
|
|
35
|
+
protected onAfterGetValueFromEditor(data: {
|
|
36
|
+
value: string;
|
|
37
|
+
}): void;
|
|
38
|
+
/**
|
|
39
|
+
* The form that names a new anchor, or renames or removes `target`
|
|
40
|
+
*/
|
|
41
|
+
private __generateForm;
|
|
42
|
+
/**
|
|
43
|
+
* The form in the anchor's own popup. The popup takes it out without
|
|
44
|
+
* destructing it when it shows something else, so it goes when the next
|
|
45
|
+
* one is made
|
|
46
|
+
*/
|
|
47
|
+
private __form;
|
|
48
|
+
private __dropForm;
|
|
49
|
+
/**
|
|
50
|
+
* Another element in the document has the name as its `id`, or another
|
|
51
|
+
* anchor as its `name`
|
|
52
|
+
*/
|
|
53
|
+
private __isTaken;
|
|
54
|
+
/**
|
|
55
|
+
* At the caret, or at the start of the selection. An anchor can't go in
|
|
56
|
+
* a link, so in one it goes just before it
|
|
57
|
+
*/
|
|
58
|
+
private __insert;
|
|
59
|
+
/**
|
|
60
|
+
* Gives the anchor the new name in whichever of `id` and `name` it has,
|
|
61
|
+
* and the links to it the new `#name`, unless they still reach
|
|
62
|
+
* something else by the old one, as they do after a copy is pasted
|
|
63
|
+
*/
|
|
64
|
+
private __rename;
|
|
65
|
+
/** @override */
|
|
66
|
+
protected beforeDestruct(jodit: IJodit): void;
|
|
67
|
+
}
|
|
@@ -20,7 +20,7 @@ declare module 'jodit/config' {
|
|
|
20
20
|
* Jodit.make('#editor', {
|
|
21
21
|
* file: {
|
|
22
22
|
* defaultHandlerSuccess(data) {
|
|
23
|
-
* data.
|
|
23
|
+
* data.items.forEach(({ file }) => {
|
|
24
24
|
* this.s.insertHTML(`<a class="file" href="${data.baseurl + file}">${file}</a>`);
|
|
25
25
|
* });
|
|
26
26
|
* }
|
package/types/plugins/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import "./key-arrow-outside/key-arrow-outside";
|
|
|
40
40
|
import "./limit/limit";
|
|
41
41
|
import "./line-height/line-height";
|
|
42
42
|
import "./link/link";
|
|
43
|
+
import "./anchor/anchor";
|
|
43
44
|
import "./media/media";
|
|
44
45
|
import "./mobile/mobile";
|
|
45
46
|
import "./ordered-list/ordered-list";
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module plugins/inline-popup
|
|
8
8
|
*/
|
|
9
|
-
import type { IControlType, IDictionary, IJodit } from "../../../types/index";
|
|
9
|
+
import type { IControlType, IDictionary, IJodit, IUIElement } from "../../../types/index";
|
|
10
10
|
declare module 'jodit/config' {
|
|
11
11
|
interface Config {
|
|
12
12
|
/**
|
|
13
13
|
* Element-specific popup toolbars. Keys are tag names (e.g. `img`, `a`, `cells`)
|
|
14
14
|
* and values are button lists or factory functions that return them.
|
|
15
15
|
*/
|
|
16
|
-
popup: IDictionary<Array<IControlType | string> | ((editor: IJodit, target: HTMLElement | undefined, close: () => void) => Array<IControlType | string> | HTMLElement | string)>;
|
|
16
|
+
popup: IDictionary<Array<IControlType | string> | ((editor: IJodit, target: HTMLElement | undefined, close: () => void) => Array<IControlType | string> | HTMLElement | IUIElement | string)>;
|
|
17
17
|
/**
|
|
18
18
|
* List of button names to exclude from the inline toolbar
|
|
19
19
|
*/
|
|
@@ -26,6 +26,12 @@ declare module 'jodit/config' {
|
|
|
26
26
|
* Show an inline toolbar when the user selects text
|
|
27
27
|
*/
|
|
28
28
|
toolbarInlineForSelection: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Keep an inline toolbar open after one of its buttons runs, beside its
|
|
31
|
+
* element or the selection. A list the button opened still closes.
|
|
32
|
+
* `false` closes the toolbar after every button
|
|
33
|
+
*/
|
|
34
|
+
toolbarInlineKeepOpen: boolean;
|
|
29
35
|
/**
|
|
30
36
|
* CSS selector or array of selectors for elements that should not trigger the inline toolbar
|
|
31
37
|
*/
|
|
@@ -29,6 +29,7 @@ export declare class inlinePopup extends Plugin {
|
|
|
29
29
|
* Show inline popup with some toolbar
|
|
30
30
|
*
|
|
31
31
|
* @param type - selection, img, a etc.
|
|
32
|
+
* @param force - make the popup again for the same target
|
|
32
33
|
*/
|
|
33
34
|
private showPopup;
|
|
34
35
|
private previousTarget?;
|
|
@@ -59,20 +60,9 @@ export declare class inlinePopup extends Plugin {
|
|
|
59
60
|
/** @override **/
|
|
60
61
|
protected afterInit(jodit: IJodit): void;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
-
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
64
|
-
* while the selection is still there. See #1238
|
|
63
|
+
* Follow the element once a control has moved it, as the alignments do
|
|
65
64
|
*/
|
|
66
|
-
private __reopenSelectionPopup;
|
|
67
|
-
/**
|
|
68
|
-
* The alignment controls fire `recalcPositionPopup` once they have moved
|
|
69
|
-
* the element, and their button then fires `closeAllPopups`. The popup
|
|
70
|
-
* opens again beside the element, as the selection toolbar does
|
|
71
|
-
*/
|
|
72
|
-
private __reopenFor;
|
|
73
65
|
protected onRecalcPositionPopup(): void;
|
|
74
|
-
private __onDocumentMouseDown;
|
|
75
|
-
private __onCloseAllPopups;
|
|
76
66
|
/**
|
|
77
67
|
* The selection rect comes from the editor document — in iframe mode its
|
|
78
68
|
* coordinates are iframe-local, while the popup lives in the host
|
|
@@ -88,6 +78,13 @@ export declare class inlinePopup extends Plugin {
|
|
|
88
78
|
* Selection change handler
|
|
89
79
|
*/
|
|
90
80
|
private onSelectionChange;
|
|
81
|
+
/**
|
|
82
|
+
* The selection holds more than a line break. A double click past the end
|
|
83
|
+
* of a line, or a drag from there into the next, selects only the break,
|
|
84
|
+
* with any rule, video or empty line it crosses: it starts at the end of a
|
|
85
|
+
* line, after everything in it, and holds no text that shows
|
|
86
|
+
*/
|
|
87
|
+
private __hasSelectedContent;
|
|
91
88
|
/**
|
|
92
89
|
* In not collapsed selection - only one image
|
|
93
90
|
*/
|
|
@@ -30,6 +30,12 @@ export declare class resizer extends Plugin {
|
|
|
30
30
|
private sizeViewer;
|
|
31
31
|
/** @override */
|
|
32
32
|
protected afterInit(editor: IJodit): void;
|
|
33
|
+
/**
|
|
34
|
+
* A tap that selects an image sends no `click` (iPadOS), so `touchend`
|
|
35
|
+
* stands in for it. A tick later, after `onClickOutside` has had the same
|
|
36
|
+
* `touchend`, as `click` comes after `mouseup`
|
|
37
|
+
*/
|
|
38
|
+
protected onEditorTouchEnd(e: TouchEvent): void;
|
|
33
39
|
/**
|
|
34
40
|
* Click in the editor area
|
|
35
41
|
*/
|
|
@@ -26,6 +26,21 @@ export declare class select extends Plugin {
|
|
|
26
26
|
private proxyEventsList;
|
|
27
27
|
protected afterInit(jodit: IJodit): void;
|
|
28
28
|
protected beforeDestruct(jodit: IJodit): void;
|
|
29
|
+
private __selectedMediaStyle;
|
|
30
|
+
/**
|
|
31
|
+
* The browsers shade an image in the selection, but Chrome doesn't shade
|
|
32
|
+
* a video with controls, or one in a `jodit-media` wrapper, so a selection
|
|
33
|
+
* that took one in didn't show it, and typing deleted it unseen (#1768).
|
|
34
|
+
* The media gets the same shade from a filter, in place of the tint Safari
|
|
35
|
+
* gives a block wrapper's whole line. It's a style in the editing
|
|
36
|
+
* document, as selected cells get their border, so the content, and with
|
|
37
|
+
* it the value, the history and a copy, doesn't change. Media a click
|
|
38
|
+
* selected whole is left alone, as its resize frame shows it (#1528). A
|
|
39
|
+
* change, read-only and the source mode redo or drop the style, as the
|
|
40
|
+
* selection may not change with them, and the style's paths could then
|
|
41
|
+
* fit other elements
|
|
42
|
+
*/
|
|
43
|
+
private __markSelectedMedia;
|
|
29
44
|
private onStartSelection;
|
|
30
45
|
/**
|
|
31
46
|
* Where the last press started. Chrome reports a drag that begins in one
|
|
@@ -93,5 +108,21 @@ export declare class select extends Plugin {
|
|
|
93
108
|
* Normalize selection after triple click
|
|
94
109
|
*/
|
|
95
110
|
protected onTripleClickNormalizeSelection(e: MouseEvent): void;
|
|
111
|
+
/**
|
|
112
|
+
* A double click past the end of a line selects only its line break, up
|
|
113
|
+
* to the start of the next line a caret can go on. The browsers show no
|
|
114
|
+
* caret for it, and typing replaces the break, joining the lines and
|
|
115
|
+
* taking any video in between with it (#1768). Put the caret at the end
|
|
116
|
+
* of the line instead
|
|
117
|
+
*/
|
|
118
|
+
protected onDblClickPastLineEnd(): void;
|
|
119
|
+
/**
|
|
120
|
+
* The browsers have no caret position beside an uneditable block alone
|
|
121
|
+
* on its line, such as a video, so a drag that ends on its line runs on
|
|
122
|
+
* past it, and typing deletes it (#1768). Until the pointer has passed
|
|
123
|
+
* the block, the selection stops at the last caret place in the block
|
|
124
|
+
* before its line, or for a drag upwards at the first in the block after
|
|
125
|
+
*/
|
|
126
|
+
protected onMouseUpOnUneditableLine(e: MouseEvent): void;
|
|
96
127
|
protected onCopyNormalizeSelectionBound(e?: ClipboardEvent): void;
|
|
97
128
|
}
|
|
@@ -41,6 +41,11 @@ export declare class selectCells extends Plugin {
|
|
|
41
41
|
*/
|
|
42
42
|
protected onKeyUp(): void;
|
|
43
43
|
private __followCaret;
|
|
44
|
+
/**
|
|
45
|
+
* The box round the marked cells, which their popup opens beside and
|
|
46
|
+
* follows when its commands add, merge or replace cells
|
|
47
|
+
*/
|
|
48
|
+
private __markedBound;
|
|
44
49
|
/**
|
|
45
50
|
* First selected cell
|
|
46
51
|
*/
|
|
@@ -71,6 +76,12 @@ export declare class selectCells extends Plugin {
|
|
|
71
76
|
* cells, the browser's own selection from the drag goes
|
|
72
77
|
*/
|
|
73
78
|
private __onClickAfterDrag;
|
|
79
|
+
/**
|
|
80
|
+
* The last press or key went to a popup, as to the cell popup's own
|
|
81
|
+
* controls, whose changes keep the cells marked
|
|
82
|
+
*/
|
|
83
|
+
private __inPopup;
|
|
84
|
+
protected onPress(e?: Event): void;
|
|
74
85
|
protected onChange(): void;
|
|
75
86
|
/**
|
|
76
87
|
* Mouse move inside the table
|
|
@@ -41,7 +41,7 @@ declare module 'jodit/config' {
|
|
|
41
41
|
* Jodit.make('#editor', {
|
|
42
42
|
* video: {
|
|
43
43
|
* defaultHandlerSuccess(data) {
|
|
44
|
-
* data.
|
|
44
|
+
* data.items.forEach(({ file }) => {
|
|
45
45
|
* this.s.insertHTML(`<video controls preload="metadata" src="${data.baseurl + file}"></video>`);
|
|
46
46
|
* });
|
|
47
47
|
* }
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module icons
|
|
10
10
|
*/
|
|
11
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
11
|
+
export { anchor, angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module types
|
|
8
8
|
*/
|
|
9
9
|
import type { CanPromise, IDestructible, IDictionary, ImageBox, IPermissions, Nullable } from "./types";
|
|
10
|
-
import type { IUploader, IUploaderOptions } from "./uploader";
|
|
10
|
+
import type { IUploadedFile, IUploader, IUploaderOptions } from "./uploader";
|
|
11
11
|
import type { IViewOptions, IViewWithToolbar } from "./view";
|
|
12
12
|
import type { IUIGroup } from "./ui";
|
|
13
13
|
import type { IObservable } from "./events";
|
|
@@ -140,7 +140,14 @@ export interface IFileBrowserOptions extends IViewOptions {
|
|
|
140
140
|
}
|
|
141
141
|
export interface IFileBrowserCallBackData {
|
|
142
142
|
baseurl: string;
|
|
143
|
+
/**
|
|
144
|
+
* One object per file. In 4.x the arrays win while `files` is set, as in
|
|
145
|
+
* the uploader's data
|
|
146
|
+
*/
|
|
147
|
+
items?: IUploadedFile[];
|
|
148
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
143
149
|
files: string[];
|
|
150
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
144
151
|
isImages?: boolean[];
|
|
145
152
|
}
|
|
146
153
|
interface IFileBrowserDataProviderItemsMods {
|
package/types/types/popup.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface IPopup extends IUIElement, IDestructible {
|
|
|
13
13
|
readonly container: HTMLElement;
|
|
14
14
|
readonly isOpened: boolean;
|
|
15
15
|
readonly strategy: PopupStrategy;
|
|
16
|
+
keepOpen?: boolean;
|
|
16
17
|
viewBound: () => IBound;
|
|
17
18
|
open(getBound: () => IBound, keepPosition?: boolean, parentContainer?: HTMLElement): this;
|
|
18
19
|
setContent(content: IUIElement | HTMLElement | string): this;
|
|
@@ -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
|
/**
|