jodit 4.17.6 → 4.18.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 +10 -0
- package/es2015/jodit.css +87 -3
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +789 -130
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +16 -16
- 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 +8 -8
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +8 -8
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +87 -3
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +14 -14
- package/es2021/jodit.js +769 -130
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +14 -14
- 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 +87 -3
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +12 -12
- package/es2021.en/jodit.js +769 -130
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +12 -12
- 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 +92 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1054 -190
- 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 +65 -2
- package/esm/config.js +29 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/align.d.ts +11 -5
- package/esm/core/helpers/utils/align.js +28 -8
- package/esm/core/helpers/utils/index.d.ts +1 -0
- package/esm/core/helpers/utils/index.js +1 -0
- package/esm/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/esm/core/helpers/utils/media-wrapper.js +63 -0
- package/esm/core/selection/selection.js +3 -3
- package/esm/modules/toolbar/button/button.d.ts +18 -0
- package/esm/modules/toolbar/button/button.js +75 -5
- package/esm/plugins/font/config.d.ts +12 -0
- package/esm/plugins/font/config.js +25 -10
- package/esm/plugins/font/font-picker.d.ts +51 -0
- package/esm/plugins/font/font-picker.js +238 -0
- package/esm/plugins/font/font.js +12 -0
- package/esm/plugins/font/google-fonts.d.ts +65 -0
- package/esm/plugins/font/google-fonts.js +143 -0
- package/esm/plugins/image-properties/readers/index.js +2 -1
- package/esm/plugins/image-properties/writers/index.js +2 -2
- package/esm/plugins/inline-popup/config/items/img.js +10 -8
- package/esm/plugins/inline-popup/inline-popup.js +13 -6
- package/esm/plugins/media/config.d.ts +26 -1
- package/esm/plugins/media/config.js +1 -3
- package/esm/plugins/media/media.js +12 -4
- package/esm/plugins/video/config.js +24 -4
- package/esm/types/toolbar.d.ts +2 -0
- package/esm/types/types.d.ts +13 -1
- package/package.json +1 -1
- package/types/config.d.ts +65 -2
- package/types/core/helpers/utils/align.d.ts +11 -5
- package/types/core/helpers/utils/index.d.ts +1 -0
- package/types/core/helpers/utils/media-wrapper.d.ts +29 -0
- package/types/modules/toolbar/button/button.d.ts +18 -0
- package/types/plugins/font/config.d.ts +12 -0
- package/types/plugins/font/font-picker.d.ts +51 -0
- package/types/plugins/font/google-fonts.d.ts +65 -0
- package/types/plugins/media/config.d.ts +26 -1
- package/types/types/toolbar.d.ts +2 -0
- package/types/types/types.d.ts +13 -1
|
@@ -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/media
|
|
8
|
+
*/
|
|
9
|
+
import type { IDictionary, MediaWrapper } from "../../types/index";
|
|
6
10
|
declare module 'jodit/config' {
|
|
7
11
|
interface Config {
|
|
8
12
|
/**
|
|
@@ -17,6 +21,27 @@ declare module 'jodit/config' {
|
|
|
17
21
|
* Media tags
|
|
18
22
|
*/
|
|
19
23
|
mediaBlocks: string[];
|
|
24
|
+
/**
|
|
25
|
+
* Wrappers that media keep in the content, by the media's tag name, such as
|
|
26
|
+
* Froala's `<span class="fr-video">` around video, audio and embeds. An
|
|
27
|
+
* element with a wrapper for its tag:
|
|
28
|
+
* - is wrapped in it instead of the editor-only `mediaFakeTag` when its tag
|
|
29
|
+
* is one of `mediaBlocks`, or left in it when it's already in one
|
|
30
|
+
* - goes in inside it when the video popup inserts it, as an upload, a
|
|
31
|
+
* link's embed or embed code that is one element
|
|
32
|
+
* - opens the media popup for its wrapper when clicked, whose Align and
|
|
33
|
+
* Delete act on the wrapper
|
|
34
|
+
*
|
|
35
|
+
* A wrapper is given `contenteditable="false"` and `draggable="true"`,
|
|
36
|
+
* which stay in the value.
|
|
37
|
+
* ```javascript
|
|
38
|
+
* const frVideo = { tag: 'span', className: 'fr-video' };
|
|
39
|
+
*
|
|
40
|
+
* Jodit.make('#editor', {
|
|
41
|
+
* mediaWrappers: { video: frVideo, audio: frVideo, iframe: frVideo }
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
mediaWrappers: IDictionary<MediaWrapper>;
|
|
20
46
|
}
|
|
21
47
|
}
|
|
22
|
-
export {};
|
package/types/types/toolbar.d.ts
CHANGED
|
@@ -193,6 +193,8 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
|
|
|
193
193
|
childTemplate?: (jodit: T, key: string, value: string, button: IToolbarButton) => string;
|
|
194
194
|
/**
|
|
195
195
|
* After click on the button it will show popup element which consist value that this function returned
|
|
196
|
+
* For a control with a `list`, the returned content replaces the list's buttons in its dropdown,
|
|
197
|
+
* and `false` keeps them
|
|
196
198
|
* @example
|
|
197
199
|
* ```javascript
|
|
198
200
|
* var editor = Jodit.make('.editor', {
|
package/types/types/types.d.ts
CHANGED
|
@@ -187,10 +187,22 @@ 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 alignment, see `alignClasses`. An alignment can list
|
|
192
|
+
* several sets of class names to recognise; aligning writes the first
|
|
193
|
+
*/
|
|
194
|
+
export type HAlignClasses = Partial<Record<Exclude<ImageHAlign, ''>, string | string[]>>;
|
|
190
195
|
/**
|
|
191
196
|
* Class names for each image alignment, see `imageAlignClasses`
|
|
192
197
|
*/
|
|
193
|
-
export type ImageAlignClasses =
|
|
198
|
+
export type ImageAlignClasses = HAlignClasses;
|
|
199
|
+
/**
|
|
200
|
+
* A wrapper that media keep in the content, see `mediaWrappers`
|
|
201
|
+
*/
|
|
202
|
+
export interface MediaWrapper {
|
|
203
|
+
tag: string;
|
|
204
|
+
className: string;
|
|
205
|
+
}
|
|
194
206
|
export interface ImageBox {
|
|
195
207
|
w: number;
|
|
196
208
|
h: number;
|