jodit 4.15.17 → 4.16.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 +18 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +12 -11
- package/es2015/jodit.js +198 -80
- package/es2015/jodit.min.js +12 -11
- 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 +11 -10
- package/es2018/jodit.min.js +12 -11
- 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 +15 -14
- package/es2021/jodit.js +196 -80
- package/es2021/jodit.min.js +17 -16
- 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 +15 -14
- package/es2021.en/jodit.js +196 -80
- package/es2021.en/jodit.min.js +15 -14
- 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 +258 -116
- 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 +23 -0
- package/esm/config.js +21 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +8 -3
- package/esm/core/helpers/utils/align.js +40 -2
- package/esm/core/selection/selection.js +5 -0
- package/esm/core/ui/button/button/button.js +10 -4
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/group/group.d.ts +4 -0
- package/esm/core/ui/group/group.js +5 -1
- package/esm/core/ui/group/list.js +2 -2
- package/esm/modules/dialog/dialog.js +7 -0
- package/esm/modules/toolbar/button/content.d.ts +7 -0
- package/esm/modules/toolbar/button/content.js +9 -1
- package/esm/plugins/image-properties/readers/align.d.ts +5 -1
- package/esm/plugins/image-properties/readers/align.js +4 -18
- package/esm/plugins/image-properties/readers/index.js +1 -1
- package/esm/plugins/image-properties/writers/index.js +1 -1
- package/esm/plugins/inline-popup/config/items/img.js +17 -2
- package/esm/plugins/source/editor/engines/ace.js +13 -6
- package/esm/plugins/source/source.js +20 -1
- package/esm/types/types.d.ts +4 -0
- package/package.json +1 -1
- package/types/config.d.ts +23 -0
- package/types/core/helpers/utils/align.d.ts +8 -3
- package/types/core/ui/group/group.d.ts +4 -0
- package/types/modules/toolbar/button/content.d.ts +7 -0
- package/types/plugins/image-properties/readers/align.d.ts +5 -1
- package/types/types/types.d.ts +4 -0
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/utils
|
|
8
8
|
*/
|
|
9
|
-
import type { ImageHAlign } from "../../../types/index";
|
|
9
|
+
import type { ImageAlignClasses, ImageHAlign, Nullable } from "../../../types/index";
|
|
10
10
|
/**
|
|
11
|
-
* Align image
|
|
11
|
+
* Align image, with `classes` (see `imageAlignClasses`) instead of inline
|
|
12
|
+
* styles when they are given
|
|
12
13
|
*/
|
|
13
|
-
export declare function hAlignElement(image: HTMLElement, align: ImageHAlign): void;
|
|
14
|
+
export declare function hAlignElement(image: HTMLElement, align: ImageHAlign, classes?: Nullable<ImageAlignClasses>): void;
|
|
15
|
+
/**
|
|
16
|
+
* The alignment `hAlignElement` has set on an element
|
|
17
|
+
*/
|
|
18
|
+
export declare function getHAlign(elm: HTMLElement, classes?: Nullable<ImageAlignClasses>): ImageHAlign;
|
|
14
19
|
/**
|
|
15
20
|
* Remove text-align style for all selected children
|
|
16
21
|
*/
|
|
@@ -13,6 +13,10 @@ import { UIElement } from "../element";
|
|
|
13
13
|
export declare class UIGroup<T extends IViewBased = IViewBased> extends UIElement<T> implements IUIGroup {
|
|
14
14
|
readonly options?: IDictionary | undefined;
|
|
15
15
|
className(): string;
|
|
16
|
+
/**
|
|
17
|
+
* A generic container: `group` allows any children. Toolbar button groups
|
|
18
|
+
* are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
|
|
19
|
+
*/
|
|
16
20
|
getRole(): string;
|
|
17
21
|
/**
|
|
18
22
|
* Synchronize mods to all children
|
|
@@ -13,6 +13,13 @@ export declare class ToolbarContent<T extends IViewBased = IViewBased> extends U
|
|
|
13
13
|
readonly target: Nullable<HTMLElement>;
|
|
14
14
|
/** @override */
|
|
15
15
|
className(): string;
|
|
16
|
+
/** A toolbar item like `ToolbarButton`: the parent group is a `list`. */
|
|
17
|
+
getRole(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Arbitrary content is not a toggle button — `aria-pressed` is not
|
|
20
|
+
* allowed on a `listitem`.
|
|
21
|
+
*/
|
|
22
|
+
protected onChangeActivated(): void;
|
|
16
23
|
/** @override */
|
|
17
24
|
update(): void;
|
|
18
25
|
/**
|
|
@@ -3,8 +3,12 @@
|
|
|
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/image-properties
|
|
8
|
+
*/
|
|
9
|
+
import type { ImageAlignClasses, Nullable } from "../../../types/index";
|
|
6
10
|
import type { EditValues } from "../interface";
|
|
7
11
|
/**
|
|
8
12
|
* @private
|
|
9
13
|
*/
|
|
10
|
-
export declare function readAlign(image: HTMLImageElement, values: EditValues): void;
|
|
14
|
+
export declare function readAlign(image: HTMLImageElement, values: EditValues, classes?: Nullable<ImageAlignClasses>): void;
|
package/types/types/types.d.ts
CHANGED
|
@@ -187,6 +187,10 @@ export interface ImageEditorOptions {
|
|
|
187
187
|
export type InsertMode = 'insert_as_html' | 'insert_as_text' | 'insert_clear_html' | 'insert_only_text';
|
|
188
188
|
export type ImageAction = 'resize' | 'crop';
|
|
189
189
|
export type ImageHAlign = 'normal' | 'left' | 'right' | 'center' | '';
|
|
190
|
+
/**
|
|
191
|
+
* Class names for each image alignment, see `imageAlignClasses`
|
|
192
|
+
*/
|
|
193
|
+
export type ImageAlignClasses = Partial<Record<Exclude<ImageHAlign, ''>, string>>;
|
|
190
194
|
export interface ImageBox {
|
|
191
195
|
w: number;
|
|
192
196
|
h: number;
|