jodit 4.12.43 → 4.13.3
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 +6 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +14 -14
- package/es2015/jodit.js +198 -20
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +5 -5
- 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 +3 -3
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +5 -5
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +6 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +189 -20
- 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 +6 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +6 -6
- package/es2021.en/jodit.js +189 -20
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +6 -6
- 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 +234 -20
- 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 +22 -0
- package/esm/config.js +21 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/selection/selection.d.ts +31 -0
- package/esm/core/selection/selection.js +143 -14
- package/esm/core/storage/async-storage.d.ts +2 -2
- package/esm/core/storage/async-storage.js +19 -1
- package/esm/core/storage/engines/local-storage-provider.js +6 -1
- package/esm/core/view/view-with-toolbar.d.ts +6 -0
- package/esm/core/view/view-with-toolbar.js +18 -2
- package/esm/core/view/view.js +1 -1
- package/esm/jodit.js +7 -0
- package/esm/types/jodit.d.ts +2 -0
- package/esm/types/storage.d.ts +15 -0
- package/esm/types/view.d.ts +8 -1
- package/package.json +1 -1
- package/types/config.d.ts +22 -0
- package/types/core/selection/selection.d.ts +31 -0
- package/types/core/storage/async-storage.d.ts +2 -2
- package/types/core/view/view-with-toolbar.d.ts +6 -0
- package/types/types/jodit.d.ts +2 -0
- package/types/types/storage.d.ts +15 -0
- package/types/types/view.d.ts +8 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module storage
|
|
8
8
|
*/
|
|
9
|
-
import type { IAsyncStorage, IStorage, StorageValueType } from "../../types/index";
|
|
9
|
+
import type { IAsyncStorage, IAsyncStorageOptions, IStorage, StorageValueType } from "../../types/index";
|
|
10
10
|
import { type WebStorageStrategy } from "./engines/local-storage-provider";
|
|
11
11
|
export declare class AsyncStorage<T = StorageValueType> implements IAsyncStorage<T> {
|
|
12
12
|
private provider;
|
|
@@ -18,5 +18,5 @@ export declare class AsyncStorage<T = StorageValueType> implements IAsyncStorage
|
|
|
18
18
|
exists(key: string): Promise<boolean>;
|
|
19
19
|
clear(): Promise<this>;
|
|
20
20
|
close(): Promise<void>;
|
|
21
|
-
static makeStorage(persistentOrStrategy?: boolean | WebStorageStrategy | 'memoryStorage' | 'indexedDB', suffix?: string): IAsyncStorage;
|
|
21
|
+
static makeStorage(persistentOrStrategy?: boolean | WebStorageStrategy | 'memoryStorage' | 'indexedDB', suffix?: string, options?: IAsyncStorageOptions): IAsyncStorage;
|
|
22
22
|
}
|
|
@@ -16,6 +16,12 @@ export declare abstract class ViewWithToolbar extends View implements IViewWithT
|
|
|
16
16
|
* Container for toolbar
|
|
17
17
|
*/
|
|
18
18
|
get toolbarContainer(): HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* Keep the toolbar box as the first child of the container, except that
|
|
21
|
+
* children flagged with `data-jodit-above-toolbar` (e.g. the `above`
|
|
22
|
+
* workplace slot used for presence bars and banners) stay above it.
|
|
23
|
+
*/
|
|
24
|
+
private __appendToolbarBox;
|
|
19
25
|
/**
|
|
20
26
|
* Change panel container
|
|
21
27
|
*/
|
package/types/types/jodit.d.ts
CHANGED
package/types/types/storage.d.ts
CHANGED
|
@@ -22,3 +22,18 @@ export interface IAsyncStorage<T = StorageValueType> {
|
|
|
22
22
|
clear(): Promise<this>;
|
|
23
23
|
close(): Promise<void>;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Which provider should back an {@link IAsyncStorage} created by
|
|
27
|
+
* `AsyncStorage.makeStorage`:
|
|
28
|
+
* - `'local'` — use `localStorage` (falls back to memory if it is blocked);
|
|
29
|
+
* - `'memory'` — use an in-memory store (nothing survives a page reload);
|
|
30
|
+
* - a custom {@link IAsyncStorage} implementation — use it as-is.
|
|
31
|
+
*/
|
|
32
|
+
export type AsyncStorageDefaultProvider = 'local' | 'memory' | IAsyncStorage;
|
|
33
|
+
export interface IAsyncStorageOptions {
|
|
34
|
+
/**
|
|
35
|
+
* Overrides the provider that backs the storage. When omitted the storage
|
|
36
|
+
* behaves as before — persistent `IndexedDB` with an in-memory fallback.
|
|
37
|
+
*/
|
|
38
|
+
defaultProvider?: AsyncStorageDefaultProvider;
|
|
39
|
+
}
|
package/types/types/view.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { Buttons, ButtonsGroup, ButtonsOption, Controls, IControlType, IProgressBar, IToolbarCollection } from "./toolbar";
|
|
10
10
|
import type { CanUndef, IComponent, IContainer, IDictionary, Nullable } from "./types";
|
|
11
11
|
import type { Attributes, ICreate } from "./create";
|
|
12
|
-
import type { IAsyncStorage, IStorage } from "./storage";
|
|
12
|
+
import type { IAsyncStorage, IAsyncStorageOptions, IStorage } from "./storage";
|
|
13
13
|
import type { IUIButtonState } from "./ui";
|
|
14
14
|
import type { IEventEmitter } from "./events";
|
|
15
15
|
import type { IPluginButton } from "./plugin";
|
|
@@ -40,6 +40,13 @@ interface IViewOptions extends ILanguageOptions, IToolbarOptions {
|
|
|
40
40
|
* Use cache for heavy methods
|
|
41
41
|
*/
|
|
42
42
|
cache?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Configure the provider that backs {@link IViewBased.asyncStorage}.
|
|
45
|
+
* By default it uses persistent `IndexedDB` (with an in-memory fallback);
|
|
46
|
+
* set `defaultProvider` to `'local'`, `'memory'` or a custom
|
|
47
|
+
* {@link IAsyncStorage} implementation to override it.
|
|
48
|
+
*/
|
|
49
|
+
asyncStorage?: IAsyncStorageOptions;
|
|
43
50
|
getIcon?: (name: string, clearName: string) => CanUndef<string>;
|
|
44
51
|
headerButtons?: string | Array<IControlType | string | ButtonsGroup>;
|
|
45
52
|
readonly basePath?: string;
|