jodit 4.2.41 → 4.2.45

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 (119) hide show
  1. package/CHANGELOG.md +65 -5
  2. package/es2015/jodit.css +5 -7
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +121 -45
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  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 +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.css +5 -7
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +121 -45
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.css +1 -1
  21. package/es2018/plugins/debug/debug.js +1 -1
  22. package/es2018/plugins/debug/debug.min.js +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021/jodit.css +5 -7
  27. package/es2021/jodit.fat.min.css +1 -1
  28. package/es2021/jodit.fat.min.js +2 -2
  29. package/es2021/jodit.js +121 -45
  30. package/es2021/jodit.min.css +1 -1
  31. package/es2021/jodit.min.js +2 -2
  32. package/es2021/plugins/debug/debug.css +1 -1
  33. package/es2021/plugins/debug/debug.js +1 -1
  34. package/es2021/plugins/debug/debug.min.js +1 -1
  35. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  37. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  38. package/es2021.en/jodit.css +5 -7
  39. package/es2021.en/jodit.fat.min.css +1 -1
  40. package/es2021.en/jodit.fat.min.js +2 -2
  41. package/es2021.en/jodit.js +121 -45
  42. package/es2021.en/jodit.min.css +1 -1
  43. package/es2021.en/jodit.min.js +2 -2
  44. package/es2021.en/plugins/debug/debug.css +1 -1
  45. package/es2021.en/plugins/debug/debug.js +1 -1
  46. package/es2021.en/plugins/debug/debug.min.js +1 -1
  47. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  48. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  49. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  50. package/es5/164.fat.min.js +1 -1
  51. package/es5/164.min.js +1 -1
  52. package/es5/5.fat.min.js +1 -1
  53. package/es5/5.min.js +1 -1
  54. package/es5/jodit.css +35 -66
  55. package/es5/jodit.fat.min.css +1 -1
  56. package/es5/jodit.fat.min.js +2 -2
  57. package/es5/jodit.js +121 -45
  58. package/es5/jodit.min.css +3 -3
  59. package/es5/jodit.min.js +2 -2
  60. package/es5/plugins/debug/debug.css +1 -1
  61. package/es5/plugins/debug/debug.js +1 -1
  62. package/es5/plugins/debug/debug.min.js +1 -1
  63. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  64. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  65. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  66. package/esm/core/constants.js +1 -1
  67. package/esm/core/helpers/utils/complete-url.d.ts +0 -3
  68. package/esm/core/helpers/utils/complete-url.js +1 -1
  69. package/esm/core/helpers/utils/config-proto.d.ts +18 -0
  70. package/esm/core/helpers/utils/config-proto.js +25 -0
  71. package/esm/core/selection/style/api/extract.js +1 -0
  72. package/esm/jodit.d.ts +11 -1
  73. package/esm/jodit.js +14 -8
  74. package/esm/modules/history/snapshot.d.ts +1 -0
  75. package/esm/modules/history/snapshot.js +8 -1
  76. package/esm/modules/toolbar/button/button.js +18 -9
  77. package/esm/plugins/ai-assistant/langs/index.d.ts +3 -0
  78. package/esm/plugins/ai-assistant/langs/index.js +3 -0
  79. package/esm/plugins/image-properties/readers/align.d.ts +3 -1
  80. package/esm/plugins/image-properties/readers/align.js +3 -1
  81. package/esm/plugins/image-properties/readers/index.d.ts +3 -0
  82. package/esm/plugins/image-properties/readers/link.d.ts +3 -0
  83. package/esm/plugins/image-properties/readers/margin.js +3 -0
  84. package/esm/plugins/image-properties/readers/size.js +3 -0
  85. package/esm/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
  86. package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
  87. package/esm/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
  88. package/esm/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
  89. package/esm/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
  90. package/esm/plugins/image-properties/utils/utils.js +3 -0
  91. package/esm/plugins/image-properties/writers/index.d.ts +3 -0
  92. package/esm/plugins/image-properties/writers/link.d.ts +3 -0
  93. package/esm/plugins/image-properties/writers/margin.d.ts +3 -0
  94. package/esm/plugins/image-properties/writers/size.js +3 -0
  95. package/esm/plugins/source/editor/engines/ace.js +4 -0
  96. package/esm/plugins/source/editor/engines/area.js +2 -1
  97. package/esm/plugins/symbols/config.js +6 -7
  98. package/esm/plugins/symbols/symbols.d.ts +1 -3
  99. package/esm/plugins/symbols/symbols.js +16 -11
  100. package/esm/types/history.d.ts +3 -0
  101. package/package.json +1 -1
  102. package/types/core/helpers/utils/complete-url.d.ts +0 -3
  103. package/types/core/helpers/utils/config-proto.d.ts +18 -0
  104. package/types/jodit.d.ts +11 -1
  105. package/types/modules/history/snapshot.d.ts +1 -0
  106. package/types/plugins/ai-assistant/langs/index.d.ts +3 -0
  107. package/types/plugins/image-properties/readers/align.d.ts +3 -1
  108. package/types/plugins/image-properties/readers/index.d.ts +3 -0
  109. package/types/plugins/image-properties/readers/link.d.ts +3 -0
  110. package/types/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
  111. package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
  112. package/types/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
  113. package/types/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
  114. package/types/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
  115. package/types/plugins/image-properties/writers/index.d.ts +3 -0
  116. package/types/plugins/image-properties/writers/link.d.ts +3 -0
  117. package/types/plugins/image-properties/writers/margin.d.ts +3 -0
  118. package/types/plugins/symbols/symbols.d.ts +1 -3
  119. package/types/types/history.d.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.2.41",
3
+ "version": "4.2.45",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -3,7 +3,4 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- /**
7
- * @module helpers/utils
8
- */
9
6
  export declare const completeUrl: (url: string) => string;
@@ -39,3 +39,21 @@ import type { IDictionary } from "../../../types";
39
39
  */
40
40
  export declare function ConfigProto(options: IDictionary, proto: IDictionary, deep?: number): IDictionary;
41
41
  export declare function ConfigFlatten(obj: IDictionary): IDictionary;
42
+ /**
43
+ * Returns a plain object from a prototype-based object.
44
+ * ```typescript
45
+ * const editor = Jodit.make('#editor', {
46
+ * image: {
47
+ * dialogWidth: 500
48
+ * }
49
+ * });
50
+ *
51
+ * console.log(editor.o.image.openOnDblClick) // true
52
+ * // But you can't get all options in plain object
53
+ * console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
54
+ *
55
+ * const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
56
+ * console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
57
+ * ```
58
+ */
59
+ export declare function ConfigDeepFlatten(obj: IDictionary): IDictionary;
package/types/jodit.d.ts CHANGED
@@ -49,7 +49,17 @@ export declare class Jodit extends ViewWithToolbar implements IJodit, Dlgs {
49
49
  */
50
50
  get defaultTimeout(): number;
51
51
  /**
52
- * Method wrap usual Has Object in Object helper for prevent deep object merging in options*
52
+ * Method wrap usual object in Object helper for prevent deep object merging in options*
53
+ * ```js
54
+ * const editor = Jodit.make('#editor', {
55
+ * controls: {
56
+ * fontsize: {
57
+ * list: Jodit.atom([8, 9, 10])
58
+ * }
59
+ * }
60
+ * });
61
+ * ```
62
+ * In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
53
63
  */
54
64
  static atom<T>(object: T): T;
55
65
  /**
@@ -37,6 +37,7 @@ export declare class Snapshot extends ViewComponent<IJodit> implements ISnapshot
37
37
  private __isBlocked;
38
38
  get isBlocked(): boolean;
39
39
  private __block;
40
+ private __levelOfTransaction;
40
41
  transaction(changes: () => void): void;
41
42
  /**
42
43
  * Creates object a snapshot of editor: html and the current selection. Current selection calculate by
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/ai-assistant
8
+ */
6
9
  import * as en from "./en.js";
7
10
  import * as es from "./es.js";
8
11
  export { en, es };
@@ -4,5 +4,7 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import type { EditValues } from "../interface";
7
- /** @private */
7
+ /**
8
+ * @private
9
+ */
8
10
  export declare function readAlign(image: HTMLImageElement, values: EditValues): void;
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import type { ImagePropertiesState } from "../interface";
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-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import type { EditValues, ImagePropertiesState } from "../interface";
8
11
  /** @private */
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IComponent, IContainer, IElms, IJodit, Nullable } from "../../../types";
7
10
  import { UIGroup } from "../../../core/ui/group/group";
8
11
  import type { ImagePropertiesAPI, ImagePropertiesState } from "../interface";
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import { UIGroup } from "../../../core/ui/group/group";
8
11
  import type { ImagePropertiesAPI, ImagePropertiesState } from "../interface";
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import { UIElement } from "../../../core/ui/element";
8
11
  import type { ImagePropertiesAPI, ImagePropertiesState } from "../interface";
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import type { ImagePropertiesState } from "../interface";
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-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IDialog, IJodit } from "../../../types";
7
10
  import type { ImagePropertiesState } from "../interface";
8
11
  /** @private */
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  import type { ImagePropertiesState } from "../interface";
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-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  /** @private */
8
11
  export declare function applyLink(j: IJodit, image: HTMLImageElement, imageLink: string, imageLinkOpenInNewTab: boolean): void;
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
6
9
  import type { IJodit } from "../../../types";
7
10
  /** @private */
8
11
  export declare function applyMargin(j: IJodit, marginTop: number | string, marginRight: number | string, marginBottom: number | string, marginLeft: number | string, image: HTMLImageElement, marginIsLocked: boolean): void;
@@ -16,11 +16,9 @@ import "./config";
16
16
  * The plugin inserts characters that are not part of the standard keyboard.
17
17
  */
18
18
  export declare class symbols extends Plugin {
19
- /** @override */
20
19
  buttons: Plugin['buttons'];
21
- private countInRow;
20
+ private __countInRow;
22
21
  constructor(jodit: IJodit);
23
- /** @override */
24
22
  afterInit(jodit: IJodit): void;
25
23
  /** @override */
26
24
  protected beforeDestruct(jodit: IJodit): void;
@@ -28,6 +28,9 @@ export interface ISnapshot {
28
28
  make(): SnapshotType;
29
29
  restoreOnlySelection(snapshot: SnapshotType): void;
30
30
  restore(snapshot: SnapshotType): void;
31
+ /**
32
+ * Pack all changes in one transaction without creating history point
33
+ */
31
34
  transaction(changes: () => void): void;
32
35
  }
33
36
  export interface IHistory {