jodit 4.0.0-beta.84 → 4.0.0-beta.85

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.
Files changed (166) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +4 -4
  3. package/es2015/jodit.css +320 -41
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +2 -2
  6. package/es2015/jodit.js +2470 -2258
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +2 -2
  9. package/es2015/plugins/debug/debug.js +4 -4
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +37 -36
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.css +320 -41
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +2469 -2255
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.js +4 -4
  21. package/es2018/plugins/debug/debug.min.js +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.js +37 -36
  24. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  25. package/es2021/jodit.css +320 -41
  26. package/es2021/jodit.fat.min.css +1 -1
  27. package/es2021/jodit.fat.min.js +2 -2
  28. package/es2021/jodit.js +2459 -2253
  29. package/es2021/jodit.min.css +1 -1
  30. package/es2021/jodit.min.js +2 -2
  31. package/es2021/plugins/debug/debug.js +4 -4
  32. package/es2021/plugins/debug/debug.min.js +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.js +37 -36
  35. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es2021.en/jodit.css +320 -41
  37. package/es2021.en/jodit.fat.min.css +1 -1
  38. package/es2021.en/jodit.fat.min.js +2 -2
  39. package/es2021.en/jodit.js +2459 -2253
  40. package/es2021.en/jodit.min.css +1 -1
  41. package/es2021.en/jodit.min.js +2 -2
  42. package/es2021.en/plugins/debug/debug.js +4 -4
  43. package/es2021.en/plugins/debug/debug.min.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.js +37 -36
  46. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/jodit.css +400 -103
  48. package/es5/jodit.fat.min.css +1 -1
  49. package/es5/jodit.fat.min.js +2 -2
  50. package/es5/jodit.js +2530 -2312
  51. package/es5/jodit.min.css +3 -3
  52. package/es5/jodit.min.js +2 -2
  53. package/es5/plugins/debug/debug.js +4 -4
  54. package/es5/plugins/debug/debug.min.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.js +38 -36
  57. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  58. package/esm/core/component/component.d.ts +2 -2
  59. package/esm/core/constants.js +2 -2
  60. package/esm/core/dom/dom.js +2 -2
  61. package/esm/core/helpers/checker/is-marker.d.ts +3 -0
  62. package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
  63. package/esm/core/helpers/normalize/normalize-size.js +2 -2
  64. package/esm/core/helpers/string/trim.d.ts +1 -0
  65. package/esm/core/helpers/string/trim.js +5 -0
  66. package/esm/core/helpers/utils/attr.d.ts +3 -0
  67. package/esm/core/helpers/utils/css.js +1 -0
  68. package/esm/core/plugin/interface.d.ts +3 -0
  69. package/esm/core/selection/style/api/has-same-style.d.ts +1 -1
  70. package/esm/core/selection/style/api/has-same-style.js +7 -4
  71. package/esm/core/selection/style/api/is-suit-element.d.ts +7 -2
  72. package/esm/core/selection/style/api/is-suit-element.js +21 -10
  73. package/esm/core/selection/style/transactions.d.ts +3 -0
  74. package/esm/core/selection/style/transactions.js +3 -3
  75. package/esm/core/storage/engines/local-storage-provider.d.ts +1 -1
  76. package/esm/core/storage/engines/memory-storage-provider.d.ts +1 -1
  77. package/esm/core/ui/button/tooltip/tooltip.d.ts +2 -2
  78. package/esm/core/ui/button/tooltip/tooltip.js +2 -2
  79. package/esm/core/ui/element.d.ts +1 -1
  80. package/esm/core/ui/form/block/block.d.ts +1 -1
  81. package/esm/core/ui/form/block/block.js +1 -1
  82. package/esm/core/ui/group/group.d.ts +0 -1
  83. package/esm/core/ui/group/group.js +0 -2
  84. package/esm/core/ui/group/list.d.ts +1 -0
  85. package/esm/core/ui/group/list.js +14 -2
  86. package/esm/core/ui/helpers/get-control-type.js +9 -2
  87. package/esm/core/ui/popup/popup.d.ts +12 -12
  88. package/esm/core/ui/popup/popup.js +46 -40
  89. package/esm/modules/file-browser/config.js +1 -1
  90. package/esm/modules/image-editor/config.d.ts +3 -0
  91. package/esm/modules/toolbar/button/button.d.ts +5 -5
  92. package/esm/modules/toolbar/button/button.js +25 -24
  93. package/esm/modules/toolbar/button/content.js +1 -1
  94. package/esm/modules/toolbar/button/index.d.ts +1 -0
  95. package/esm/modules/toolbar/button/index.js +1 -0
  96. package/esm/modules/toolbar/button/select/select.d.ts +15 -0
  97. package/esm/modules/toolbar/button/select/select.js +47 -0
  98. package/esm/modules/toolbar/collection/collection.d.ts +1 -0
  99. package/esm/modules/toolbar/collection/collection.js +4 -1
  100. package/esm/modules/toolbar/factory.d.ts +1 -0
  101. package/esm/modules/toolbar/factory.js +4 -0
  102. package/esm/plugins/bold/bold.js +1 -6
  103. package/esm/plugins/bold/interface.d.ts +3 -0
  104. package/esm/plugins/class-span/class-span.js +7 -7
  105. package/esm/plugins/color/config.js +2 -2
  106. package/esm/plugins/delete/interface.d.ts +3 -0
  107. package/esm/plugins/enter/interface.d.ts +3 -0
  108. package/esm/plugins/file/file.js +1 -1
  109. package/esm/plugins/font/config.js +63 -51
  110. package/esm/plugins/font/font.js +1 -1
  111. package/esm/plugins/format-block/config.d.ts +6 -0
  112. package/esm/plugins/format-block/config.js +52 -0
  113. package/esm/plugins/format-block/format-block.d.ts +1 -0
  114. package/esm/plugins/format-block/format-block.js +1 -68
  115. package/esm/plugins/fullsize/config.js +1 -1
  116. package/esm/plugins/iframe/iframe.js +11 -9
  117. package/esm/plugins/image/image.js +1 -1
  118. package/esm/plugins/image-processor/config.js +3 -0
  119. package/esm/plugins/inline-popup/config/items/cells.js +1 -1
  120. package/esm/plugins/justify/justify.js +8 -7
  121. package/esm/plugins/link/config.js +1 -1
  122. package/esm/plugins/mobile/config.js +3 -3
  123. package/esm/plugins/search/interface.d.ts +3 -0
  124. package/esm/plugins/select-cells/select-cells.d.ts +2 -0
  125. package/esm/plugins/symbols/config.js +1 -1
  126. package/esm/plugins/table/config.js +2 -1
  127. package/esm/plugins/video/config.js +1 -1
  128. package/esm/types/messages.d.ts +8 -0
  129. package/esm/types/popup.d.ts +3 -3
  130. package/esm/types/toolbar.d.ts +12 -8
  131. package/esm/typings.d.ts +0 -1
  132. package/package.json +1 -1
  133. package/types/core/component/component.d.ts +2 -2
  134. package/types/core/helpers/checker/is-marker.d.ts +3 -0
  135. package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
  136. package/types/core/helpers/string/trim.d.ts +1 -0
  137. package/types/core/helpers/utils/attr.d.ts +3 -0
  138. package/types/core/plugin/interface.d.ts +3 -0
  139. package/types/core/selection/style/api/has-same-style.d.ts +1 -1
  140. package/types/core/selection/style/api/is-suit-element.d.ts +7 -2
  141. package/types/core/selection/style/transactions.d.ts +3 -0
  142. package/types/core/storage/engines/local-storage-provider.d.ts +1 -1
  143. package/types/core/storage/engines/memory-storage-provider.d.ts +1 -1
  144. package/types/core/ui/button/tooltip/tooltip.d.ts +2 -2
  145. package/types/core/ui/element.d.ts +1 -1
  146. package/types/core/ui/form/block/block.d.ts +1 -1
  147. package/types/core/ui/group/group.d.ts +0 -1
  148. package/types/core/ui/group/list.d.ts +1 -0
  149. package/types/core/ui/popup/popup.d.ts +12 -12
  150. package/types/modules/image-editor/config.d.ts +3 -0
  151. package/types/modules/toolbar/button/button.d.ts +5 -5
  152. package/types/modules/toolbar/button/index.d.ts +1 -0
  153. package/types/modules/toolbar/button/select/select.d.ts +15 -0
  154. package/types/modules/toolbar/collection/collection.d.ts +1 -0
  155. package/types/modules/toolbar/factory.d.ts +1 -0
  156. package/types/plugins/bold/interface.d.ts +3 -0
  157. package/types/plugins/delete/interface.d.ts +3 -0
  158. package/types/plugins/enter/interface.d.ts +3 -0
  159. package/types/plugins/format-block/config.d.ts +6 -0
  160. package/types/plugins/format-block/format-block.d.ts +1 -0
  161. package/types/plugins/search/interface.d.ts +3 -0
  162. package/types/plugins/select-cells/select-cells.d.ts +2 -0
  163. package/types/types/messages.d.ts +8 -0
  164. package/types/types/popup.d.ts +3 -3
  165. package/types/types/toolbar.d.ts +12 -8
  166. package/types/typings.d.ts +0 -1
@@ -10,9 +10,9 @@ import type { IBound, IDestructible } from "./types";
10
10
  import type { IUIElement } from "./ui";
11
11
  export type PopupStrategy = 'leftBottom' | 'rightBottom' | 'leftTop' | 'rightTop';
12
12
  export interface IPopup extends IUIElement, IDestructible {
13
- container: HTMLElement;
14
- isOpened: boolean;
15
- strategy: PopupStrategy;
13
+ readonly container: HTMLElement;
14
+ readonly isOpened: boolean;
15
+ readonly strategy: PopupStrategy;
16
16
  viewBound: () => IBound;
17
17
  open(getBound: () => IBound, keepPosition?: boolean, parentContainer?: HTMLElement): this;
18
18
  setContent(content: IUIElement | HTMLElement | string): this;
@@ -15,11 +15,12 @@ import type { IMods } from "./traits";
15
15
  interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser, B = IToolbarButton> {
16
16
  name?: string;
17
17
  text?: string;
18
+ textTemplate?: (jodit: T, value: string) => string;
18
19
  mode?: Modes;
19
20
  hotkeys?: string | string[];
20
21
  data?: IDictionary;
21
- update?: (button: B, editor: T) => void;
22
22
  isInput?: boolean;
23
+ component?: 'button' | 'select';
23
24
  /**
24
25
  * You can use it function for control - active/not active button
25
26
  *
@@ -44,9 +45,10 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
44
45
  * })
45
46
  * ```
46
47
  */
47
- isActive?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
48
- isChildActive?: (editor: T, control: IControlType<T, B>, button?: B) => boolean; // for list
49
- getContent?: (editor: T, control: IControlType<T, B>, button: B) => string | HTMLElement;
48
+ isActive?: (editor: T, button: B) => boolean;
49
+ update?: (editor: T, button: B) => void;
50
+ isChildActive?: (editor: T, button: B) => boolean; // for list
51
+ getContent?: (editor: T, button: B) => string | HTMLElement;
50
52
  /**
51
53
  * You can use it function for control - disable/enable button
52
54
  *
@@ -71,8 +73,8 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
71
73
  * })
72
74
  * ```
73
75
  */
74
- isDisabled?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
75
- isChildDisabled?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
76
+ isDisabled?: (editor: T, button: B) => boolean;
77
+ isChildDisabled?: (editor: T, button: B) => boolean;
76
78
  /**
77
79
  * Drop-down list. A hash or array. You must specify the command which will be submitted for the hash key
78
80
  * (or array value) (see .[[IJodit.execCommand]] or define 'exec' function. See example
@@ -104,7 +106,7 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
104
106
  * });
105
107
  * ```
106
108
  */
107
- list?: IDictionary<string | number> | string[] | number[] | IControlType[] | IControlListItem[];
109
+ list?: IDictionary<string | number> | string[] | number[];
108
110
  /**
109
111
  * The command executes when the button is pressed. Allowed all
110
112
  * @see https://developer.mozilla.org/ru/docs/Web/API/Document/execCommand#commands
@@ -214,8 +216,9 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
214
216
  * });
215
217
  * ```
216
218
  */
217
- popup?: (jodit: T, current: Nullable<Node>, control: IControlType<T, B>, close: () => void, button: B) => string | HTMLElement | IUIElement | false;
219
+ popup?: (jodit: T, current: Nullable<Node>, close: () => void, button: B) => string | HTMLElement | IUIElement | false;
218
220
  defaultValue?: string | string[];
221
+ value?: (jodit: T, button: B) => string | undefined;
219
222
  mods?: IMods['mods'];
220
223
  }
221
224
  interface IControlListItem {
@@ -224,6 +227,7 @@ interface IControlListItem {
224
227
  }
225
228
  interface IControlTypeStrong extends IControlType {
226
229
  name: NonNullable<IControlType['name']>;
230
+ list?: IDictionary<string | number>;
227
231
  }
228
232
  interface IControlTypeContent extends IControlTypeStrong {
229
233
  getContent: NonNullable<IControlTypeStrong['getContent']>;
package/esm/typings.d.ts CHANGED
@@ -5,7 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * @module types
8
- * @internal
9
8
  */
10
9
  declare module '*.svg' {
11
10
  const content: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.0.0-beta.84",
3
+ "version": "4.0.0-beta.85",
4
4
  "description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -86,7 +86,7 @@ export declare abstract class Component implements IComponent {
86
86
  */
87
87
  bindDestruct(component: IComponent): this;
88
88
  abstract className(): string;
89
- protected constructor();
89
+ constructor();
90
90
  /**
91
91
  * Destruct component method
92
92
  */
@@ -117,5 +117,5 @@ export declare abstract class Component implements IComponent {
117
117
  * @param callback - a function that will be called when the status is `status`
118
118
  */
119
119
  hookStatus(status: ComponentStatus, callback: (component: this) => void): void;
120
- static isInstanceOf<T extends IComponent>(c: unknown | IComponent, constructorFunc: Function): c is T;
120
+ static isInstanceOf<T extends Component>(c: unknown | Component, constructorFunc: Function): c is T;
121
121
  }
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module helpers/checker
8
+ */
6
9
  import type { Nullable } from "jodit/esm/types";
7
10
  /**
8
11
  * Define element is selection helper
@@ -9,4 +9,4 @@
9
9
  /**
10
10
  * Normalize value to CSS meters
11
11
  */
12
- export declare const normalizeSize: (value: string | number) => string;
12
+ export declare const normalizeSize: (value: string | number, units: 'px' | 'pt') => string;
@@ -8,6 +8,7 @@
8
8
  * from the beginning and end of the line
9
9
  */
10
10
  export declare function trim(value: string): string;
11
+ export declare function trimChars(value: string, chars: string): string;
11
12
  /**
12
13
  * Trim only invisible chars
13
14
  */
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module helpers/utils
8
+ */
6
9
  import type { IDictionary } from "jodit/esm/types";
7
10
  /**
8
11
  * Get attribute
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugin
8
+ */
6
9
  declare module 'jodit/types/events' {
7
10
  interface IEventEmitter {
8
11
  /**
@@ -10,6 +10,6 @@ import type { IStyle } from "jodit/esm/types";
10
10
  */
11
11
  export declare function hasSameStyle(elm: Node, rules: IStyle): boolean;
12
12
  /**
13
- * Element has the similar styles
13
+ * Element has the similar styles keys
14
14
  */
15
15
  export declare function hasSameStyleKeys(elm: Node, rules: IStyle): boolean;
@@ -12,10 +12,14 @@ import type { Nullable, ICommitStyle } from "jodit/esm/types";
12
12
  * @param commitStyle - style commit
13
13
  * @param elm - checked item
14
14
  * @param strict - strict mode - false - the default tag is suitable for us if it is also in the commit
15
+ * @param strictStyle - strict style mode - true - the element has the same style keys as in the commit, but not their values
15
16
  * @private
16
17
  */
17
- export declare function isSuitElement(commitStyle: ICommitStyle, elm: Nullable<Node>, strict: boolean): elm is HTMLElement;
18
- export declare function findSuitClosest(commitStyle: ICommitStyle, element: HTMLElement, root: HTMLElement): Nullable<HTMLElement>;
18
+ export declare function isSuitElement(commitStyle: ICommitStyle, elm: Nullable<Node>, strict: boolean, strictStyle?: boolean): elm is HTMLElement;
19
+ /**
20
+ * @private
21
+ */
22
+ export declare function suitableClosest(commitStyle: ICommitStyle, element: HTMLElement, root: HTMLElement): Nullable<HTMLElement>;
19
23
  /**
20
24
  * Inside the parent element there is a block with the same styles
21
25
  * @example
@@ -24,5 +28,6 @@ export declare function findSuitClosest(commitStyle: ICommitStyle, element: HTML
24
28
  * <p>|test<strong>test</strong>|</p>
25
29
  * ```
26
30
  * Apply `{element:'strong'}`
31
+ * @private
27
32
  */
28
33
  export declare function isSameStyleChild(commitStyle: ICommitStyle, elm: Nullable<Node>): elm is HTMLElement;
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module selection
8
+ */
6
9
  import type { IJodit, IDictionary, CommitMode, ICommitStyle } from "jodit/esm/types";
7
10
  export declare const states: {
8
11
  readonly START: "START";
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * @module storage/local
7
+ * @module storage
8
8
  */
9
9
  import type { BooleanFunction, IStorage, StorageValueType } from "jodit/esm/types";
10
10
  /**
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * @module storage/memory
7
+ * @module storage
8
8
  */
9
9
  import type { IStorage, StorageValueType } from "jodit/esm/types";
10
10
  export declare class MemoryStorageProvider<T = StorageValueType> implements IStorage<T> {
@@ -4,9 +4,9 @@
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * [[include:plugins/tooltip/README.md]]
7
+ * [[include:core/ui/button/tooltip/README.md]]
8
8
  * @packageDocumentation
9
- * @module plugins/tooltip
9
+ * @module ui/button
10
10
  */
11
11
 
12
12
  import type { IViewBased } from "jodit/esm/types";
@@ -25,7 +25,7 @@ export declare abstract class UIElement<T extends IViewBased = IViewBased> exten
25
25
  /**
26
26
  * Find match parent
27
27
  */
28
- closest<T extends IUIElement>(type: Function | T): Nullable<T>;
28
+ closest<T extends UIElement | typeof UIElement>(type: UIElement | Function): Nullable<T extends typeof UIElement ? InstanceType<T> : T>;
29
29
  /**
30
30
  * Find closest UIElement in DOM
31
31
  */
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * @module ui/form/block
7
+ * @module ui/form
8
8
  */
9
9
 
10
10
  import type { IUIElement, IViewBased } from "jodit/esm/types";
@@ -14,7 +14,6 @@ import type { IDictionary } from "jodit/esm/types";
14
14
  import { UIElement } from "jodit/esm/core/ui/element";
15
15
  export declare class UIGroup<T extends IViewBased = IViewBased> extends UIElement<T> implements IUIGroup {
16
16
  readonly options?: IDictionary | undefined;
17
- /** @override */
18
17
  className(): string;
19
18
  /**
20
19
  * Synchronize mods to all children
@@ -31,6 +31,7 @@ export declare class UIList<T extends IViewBased = IViewBased> extends UIGroup<T
31
31
  protected removeButtons: string[];
32
32
  setRemoveButtons(removeButtons?: string[]): this;
33
33
  build(items: ButtonsOption, target?: Nullable<HTMLElement>): IUIList;
34
+ protected makeSelect(control: IControlTypeStrong, target: Nullable<HTMLElement>): IUIButton;
34
35
  /**
35
36
  * Create button instance
36
37
  */
@@ -10,18 +10,17 @@
10
10
  */
11
11
 
12
12
  import type { IBound, IPopup, IUIElement, IViewBased, PopupStrategy } from "jodit/esm/types";
13
- import { UIElement } from "jodit/esm/core/ui/element";
13
+ import { UIGroup } from "jodit/esm/core/ui/group/group";
14
14
  type getBoundFunc = () => IBound;
15
- export declare class Popup extends UIElement implements IPopup {
15
+ export declare class Popup extends UIGroup implements IPopup {
16
16
  readonly smart: boolean;
17
- /** @override */
18
17
  className(): string;
19
18
  isOpened: boolean;
20
19
  strategy: PopupStrategy;
20
+ protected appendChildToContainer(childContainer: HTMLElement): void;
21
21
  viewBound: () => IBound;
22
- private targetBound;
23
- private childrenPopups;
24
- /** @override */
22
+ private __targetBound;
23
+ private __childrenPopups;
25
24
  updateParentElement(target: IUIElement): this;
26
25
  /**
27
26
  * Set popup content
@@ -31,7 +30,7 @@ export declare class Popup extends UIElement implements IPopup {
31
30
  * Open popup near with some bound
32
31
  */
33
32
  open(getBound: getBoundFunc, keepPosition?: boolean, parentContainer?: HTMLElement): this;
34
- private calculateZIndex;
33
+ private __calculateZIndex;
35
34
  /**
36
35
  * Calculate static bound for point
37
36
  */
@@ -40,11 +39,11 @@ export declare class Popup extends UIElement implements IPopup {
40
39
  * Update container position
41
40
  */
42
41
  updatePosition(): this;
43
- throttleUpdatePosition(): void;
42
+ private __throttleUpdatePosition;
44
43
  /**
45
44
  * Calculate start point
46
45
  */
47
- private calculatePosition;
46
+ private __calculatePosition;
48
47
  /**
49
48
  * Check if one box is inside second
50
49
  */
@@ -56,15 +55,16 @@ export declare class Popup extends UIElement implements IPopup {
56
55
  /**
57
56
  * Close popup if click was in outside
58
57
  */
59
- private closeOnOutsideClick;
58
+ private __closeOnOutsideClick;
60
59
  isOwnClick(e: MouseEvent): boolean;
61
- private addGlobalListeners;
62
- private removeGlobalListeners;
60
+ private __addGlobalListeners;
61
+ private __removeGlobalListeners;
63
62
  /**
64
63
  * Set ZIndex
65
64
  */
66
65
  setZIndex(index: number | string): void;
67
66
  constructor(jodit: IViewBased, smart?: boolean);
67
+ render(): string;
68
68
  /** @override **/
69
69
  destruct(): any;
70
70
  }
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module modules/image-editor
8
+ */
6
9
  import type { ImageEditorOptions } from "jodit/esm/types";
7
10
  declare module 'jodit/config' {
8
11
  interface Config {
@@ -42,11 +42,11 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
42
42
  /**
43
43
  * Calculates whether the button is active
44
44
  */
45
- private calculateActivatedStatus;
45
+ private __calculateActivatedStatus;
46
46
  /**
47
47
  * Calculates whether an element is blocked for the user
48
48
  */
49
- private calculateDisabledStatus;
49
+ private __calculateDisabledStatus;
50
50
  /** @override */
51
51
  protected onChangeActivated(): void;
52
52
  /** @override */
@@ -63,7 +63,7 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
63
63
  /**
64
64
  * Init constant data from control
65
65
  */
66
- private __initFromControl;
66
+ protected __initFromControl(): void;
67
67
  /**
68
68
  * Click on trigger button
69
69
  */
@@ -72,10 +72,10 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
72
72
  /**
73
73
  * Create and open popup list
74
74
  */
75
- private openControlList;
75
+ private __openControlList;
76
76
  protected onOutsideClick(e: MouseEvent): void;
77
77
  private openPopup;
78
- private closePopup;
78
+ private __closePopup;
79
79
  /**
80
80
  * Click handler
81
81
  */
@@ -8,3 +8,4 @@
8
8
  */
9
9
  export * from "./button";
10
10
  export * from "./content";
11
+ export * from "./select/select";
@@ -0,0 +1,15 @@
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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module modules/toolbar/button
8
+ */
9
+
10
+ import type { IViewBased } from "jodit/esm/types";
11
+ import { ToolbarButton } from "../button";
12
+ export declare class ToolbarSelect<T extends IViewBased = IViewBased> extends ToolbarButton<T> {
13
+ className(): string;
14
+ update(): void;
15
+ }
@@ -20,6 +20,7 @@ export declare class ToolbarCollection<T extends IViewWithToolbar = IViewWithToo
20
20
  */
21
21
  get firstButton(): Nullable<IToolbarButton>;
22
22
  protected makeButton(control: IControlTypeStrong, target?: Nullable<HTMLElement>): IUIButton;
23
+ protected makeSelect(control: IControlTypeStrong, target?: Nullable<HTMLElement>): IUIButton;
23
24
  /**
24
25
  * Button should be active
25
26
  */
@@ -17,3 +17,4 @@ export declare function makeCollection(jodit: IViewBased, parentElement?: IUIEle
17
17
  * Button factory
18
18
  */
19
19
  export declare function makeButton(jodit: IViewBased, control: IControlTypeStrong, target?: Nullable<HTMLElement>): IToolbarButton;
20
+ export declare function makeSelect(view: IViewBased, control: IControlTypeStrong, target?: Nullable<HTMLElement>): IToolbarButton;
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/bold
8
+ */
6
9
  declare module 'jodit/types/jodit' {
7
10
  interface IJodit {
8
11
  /**
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/delete
8
+ */
6
9
  declare module 'jodit/types/jodit' {
7
10
  interface IJodit {
8
11
  /**
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/enter
8
+ */
6
9
  declare module 'jodit/types/events' {
7
10
  interface IEventEmitter {
8
11
  /**
@@ -0,0 +1,6 @@
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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ export {};
@@ -9,6 +9,7 @@
9
9
  * @module plugins/format-block
10
10
  */
11
11
  import type { IJodit } from "jodit/esm/types";
12
+ import "./config";
12
13
  /**
13
14
  * Process command - `formatblock`
14
15
  */
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/search
8
+ */
6
9
  declare module 'jodit/types/events' {
7
10
  interface IEventEmitter {
8
11
  /**
@@ -4,6 +4,8 @@
4
4
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
+ * [[include:plugins/select-cells/README.md]]
8
+ * @packageDocumentation
7
9
  * @module plugins/select-cells
8
10
  */
9
11
  import type { IJodit } from "jodit/esm/types";
@@ -1,3 +1,11 @@
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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module types
8
+ */
1
9
  import type { IDestructible } from "./types";
2
10
  export type MessageVariant = 'info' | 'error' | 'success';
3
11
  export interface IMessages extends IDestructible {
@@ -10,9 +10,9 @@ import type { IBound, IDestructible } from "./types";
10
10
  import type { IUIElement } from "./ui";
11
11
  export type PopupStrategy = 'leftBottom' | 'rightBottom' | 'leftTop' | 'rightTop';
12
12
  export interface IPopup extends IUIElement, IDestructible {
13
- container: HTMLElement;
14
- isOpened: boolean;
15
- strategy: PopupStrategy;
13
+ readonly container: HTMLElement;
14
+ readonly isOpened: boolean;
15
+ readonly strategy: PopupStrategy;
16
16
  viewBound: () => IBound;
17
17
  open(getBound: () => IBound, keepPosition?: boolean, parentContainer?: HTMLElement): this;
18
18
  setContent(content: IUIElement | HTMLElement | string): this;
@@ -15,11 +15,12 @@ import type { IMods } from "./traits";
15
15
  interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser, B = IToolbarButton> {
16
16
  name?: string;
17
17
  text?: string;
18
+ textTemplate?: (jodit: T, value: string) => string;
18
19
  mode?: Modes;
19
20
  hotkeys?: string | string[];
20
21
  data?: IDictionary;
21
- update?: (button: B, editor: T) => void;
22
22
  isInput?: boolean;
23
+ component?: 'button' | 'select';
23
24
  /**
24
25
  * You can use it function for control - active/not active button
25
26
  *
@@ -44,9 +45,10 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
44
45
  * })
45
46
  * ```
46
47
  */
47
- isActive?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
48
- isChildActive?: (editor: T, control: IControlType<T, B>, button?: B) => boolean; // for list
49
- getContent?: (editor: T, control: IControlType<T, B>, button: B) => string | HTMLElement;
48
+ isActive?: (editor: T, button: B) => boolean;
49
+ update?: (editor: T, button: B) => void;
50
+ isChildActive?: (editor: T, button: B) => boolean; // for list
51
+ getContent?: (editor: T, button: B) => string | HTMLElement;
50
52
  /**
51
53
  * You can use it function for control - disable/enable button
52
54
  *
@@ -71,8 +73,8 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
71
73
  * })
72
74
  * ```
73
75
  */
74
- isDisabled?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
75
- isChildDisabled?: (editor: T, control: IControlType<T, B>, button?: B) => boolean;
76
+ isDisabled?: (editor: T, button: B) => boolean;
77
+ isChildDisabled?: (editor: T, button: B) => boolean;
76
78
  /**
77
79
  * Drop-down list. A hash or array. You must specify the command which will be submitted for the hash key
78
80
  * (or array value) (see .[[IJodit.execCommand]] or define 'exec' function. See example
@@ -104,7 +106,7 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
104
106
  * });
105
107
  * ```
106
108
  */
107
- list?: IDictionary<string | number> | string[] | number[] | IControlType[] | IControlListItem[];
109
+ list?: IDictionary<string | number> | string[] | number[];
108
110
  /**
109
111
  * The command executes when the button is pressed. Allowed all
110
112
  * @see https://developer.mozilla.org/ru/docs/Web/API/Document/execCommand#commands
@@ -214,8 +216,9 @@ interface IControlType<T extends IViewBased = IJodit | IViewBased | IFileBrowser
214
216
  * });
215
217
  * ```
216
218
  */
217
- popup?: (jodit: T, current: Nullable<Node>, control: IControlType<T, B>, close: () => void, button: B) => string | HTMLElement | IUIElement | false;
219
+ popup?: (jodit: T, current: Nullable<Node>, close: () => void, button: B) => string | HTMLElement | IUIElement | false;
218
220
  defaultValue?: string | string[];
221
+ value?: (jodit: T, button: B) => string | undefined;
219
222
  mods?: IMods['mods'];
220
223
  }
221
224
  interface IControlListItem {
@@ -224,6 +227,7 @@ interface IControlListItem {
224
227
  }
225
228
  interface IControlTypeStrong extends IControlType {
226
229
  name: NonNullable<IControlType['name']>;
230
+ list?: IDictionary<string | number>;
227
231
  }
228
232
  interface IControlTypeContent extends IControlTypeStrong {
229
233
  getContent: NonNullable<IControlTypeStrong['getContent']>;
@@ -5,7 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * @module types
8
- * @internal
9
8
  */
10
9
  declare module '*.svg' {
11
10
  const content: string;