jodit 4.15.13 → 4.15.14

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 (71) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/es2015/jodit.css +21 -3
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +5 -5
  5. package/es2015/jodit.js +76 -73
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +5 -5
  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.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +5 -5
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +5 -5
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +21 -3
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +5 -5
  23. package/es2021/jodit.js +76 -73
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +5 -5
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +21 -3
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +5 -5
  35. package/es2021.en/jodit.js +76 -73
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +5 -5
  38. package/es2021.en/plugins/debug/debug.css +1 -1
  39. package/es2021.en/plugins/debug/debug.js +1 -1
  40. package/es2021.en/plugins/debug/debug.min.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  44. package/es5/jodit.css +26 -3
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +76 -73
  48. package/es5/jodit.min.css +3 -3
  49. package/es5/jodit.min.js +2 -2
  50. package/es5/plugins/debug/debug.css +1 -1
  51. package/es5/plugins/debug/debug.js +1 -1
  52. package/es5/plugins/debug/debug.min.js +1 -1
  53. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  56. package/es5/polyfills.fat.min.js +1 -1
  57. package/es5/polyfills.js +1 -1
  58. package/es5/polyfills.min.js +1 -1
  59. package/esm/config.d.ts +2 -1
  60. package/esm/config.js +2 -1
  61. package/esm/core/constants.js +1 -1
  62. package/esm/modules/widget/color-picker/color-picker.d.ts +1 -1
  63. package/esm/modules/widget/color-picker/color-picker.js +10 -3
  64. package/esm/plugins/clean-html/config.js +0 -3
  65. package/esm/styles/icons/index.d.ts +1 -1
  66. package/esm/styles/icons/index.js +2 -1
  67. package/package.json +1 -1
  68. package/types/config.d.ts +2 -1
  69. package/types/modules/widget/color-picker/color-picker.d.ts +1 -1
  70. package/types/styles/icons/index.d.ts +1 -1
  71. /package/esm/{plugins/clean-html → styles/icons}/eraser.svg.js +0 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.15.13
4
+ * Version: v4.15.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/esm/config.d.ts CHANGED
@@ -607,7 +607,8 @@ declare class Config implements IViewOptions {
607
607
  */
608
608
  useSplitMode: boolean;
609
609
  /**
610
- * The colors in HEX representation to select a color for the background and for the text in colorpicker
610
+ * The colors in HEX representation to select a color for the background and for the text in colorpicker.
611
+ * Each group is laid out in rows of `--jd-color-picker-columns` colors (10 by default).
611
612
  *
612
613
  * ```javascript
613
614
  * Jodit.make('#editor', {
package/esm/config.js CHANGED
@@ -629,7 +629,8 @@ class Config {
629
629
  */
630
630
  this.useSplitMode = false;
631
631
  /**
632
- * The colors in HEX representation to select a color for the background and for the text in colorpicker
632
+ * The colors in HEX representation to select a color for the background and for the text in colorpicker.
633
+ * Each group is laid out in rows of `--jd-color-picker-columns` colors (10 by default).
633
634
  *
634
635
  * ```javascript
635
636
  * Jodit.make('#editor', {
@@ -3,7 +3,7 @@
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
- export const APP_VERSION = "4.15.13";
6
+ export const APP_VERSION = "4.15.14";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -12,7 +12,7 @@ import type { IJodit } from "../../../types/index";
12
12
  /**
13
13
  * Build color picker
14
14
  *
15
- * @param callback - Callback 'function (color) \{\}'
15
+ * @param callback - Callback 'function (color) \{\}'. The remove button calls it with an empty string
16
16
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
17
17
  * @example
18
18
  * ```javascript
@@ -11,7 +11,7 @@ Icon.set('palette', paletteIcon);
11
11
  /**
12
12
  * Build color picker
13
13
  *
14
- * @param callback - Callback 'function (color) \{\}'
14
+ * @param callback - Callback 'function (color) \{\}'. The remove button calls it with an empty string
15
15
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
16
16
  * @example
17
17
  * ```javascript
@@ -46,7 +46,12 @@ export const ColorPickerWidget = (editor, callback, coldColor) => {
46
46
  }
47
47
  return stack.join('');
48
48
  };
49
- Dom.append(form, editor.c.fromHTML(`<div class="${cn}__groups">${eachColor(editor.o.colors)}</div>`));
49
+ // The group wrapper lays the colors out in rows, so a flat list needs one
50
+ // too. See #1487
51
+ const groups = isArray(editor.o.colors)
52
+ ? `<div class="${cn}__group">${eachColor(editor.o.colors)}</div>`
53
+ : eachColor(editor.o.colors);
54
+ Dom.append(form, editor.c.fromHTML(`<div class="${cn}__groups">${groups}</div>`));
50
55
  Dom.append(form, editor.c.fromHTML(`<div data-ref="extra" class="${cn}__extra"></div>`));
51
56
  const { extra } = refs(form);
52
57
  Dom.append(extra, editor.c.fromHTML(`<div class="${cn}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${valueHex || ''}"/></div>`));
@@ -83,6 +88,7 @@ export const ColorPickerWidget = (editor, callback, coldColor) => {
83
88
  e.stopPropagation();
84
89
  applyHexInput();
85
90
  });
91
+ Dom.append(extra, editor.c.fromHTML(`<span class="${cn}__remove" data-color="" title="${editor.i18n('Remove')}">${editor.o.textIcons ? editor.i18n('Remove') : Icon.get('eraser')}</span>`));
86
92
  if (editor.o.showBrowserColorPicker && hasBrowserColorPicker()) {
87
93
  Dom.append(extra, editor.c.fromHTML(`<div class="${cn}__native">${iconPalette}<input type="color" value="#ffffff"/></div>`));
88
94
  editor.e.on(form, 'change', (e) => {
@@ -118,7 +124,8 @@ export const ColorPickerWidget = (editor, callback, coldColor) => {
118
124
  target = Dom.closest(target.parentNode, 'span', editor.editor);
119
125
  }
120
126
  if (!Dom.isTag(target, 'span') ||
121
- !target.classList.contains(cn + '__color-item')) {
127
+ (!target.classList.contains(cn + '__color-item') &&
128
+ !target.classList.contains(cn + '__remove'))) {
122
129
  return;
123
130
  }
124
131
  const color = attr(target, '-color') || '';
@@ -3,9 +3,7 @@
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
- import { Icon } from "../../core/ui/icon.js";
7
6
  import { Config } from "../../config.js";
8
- import eraserIcon from "./eraser.svg.js";
9
7
  Config.prototype.cleanHTML = {
10
8
  timeout: 300,
11
9
  removeEmptyElements: true,
@@ -35,4 +33,3 @@ Config.prototype.controls.eraser = {
35
33
  command: 'removeFormat',
36
34
  tooltip: 'Clear Formatting'
37
35
  };
38
- Icon.set('eraser', eraserIcon);
@@ -8,4 +8,4 @@
8
8
  * @packageDocumentation
9
9
  * @module icons
10
10
  */
11
- export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
11
+ export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
@@ -19,6 +19,7 @@ import check from "./check.svg.js";
19
19
  import chevron from "./chevron.svg.js";
20
20
  import dots from "./dots.svg.js";
21
21
  import download from "./download.svg.js";
22
+ import eraser from "./eraser.svg.js";
22
23
  import eye from "./eye.svg.js";
23
24
  import file from "./file.svg.js";
24
25
  import folder from "./folder.svg.js";
@@ -36,4 +37,4 @@ import unlock from "./unlock.svg.js";
36
37
  import update from "./update.svg.js";
37
38
  import upload from "./upload.svg.js";
38
39
  import valign from "./valign.svg.js";
39
- export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
40
+ export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.15.13",
3
+ "version": "4.15.14",
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",
package/types/config.d.ts CHANGED
@@ -607,7 +607,8 @@ declare class Config implements IViewOptions {
607
607
  */
608
608
  useSplitMode: boolean;
609
609
  /**
610
- * The colors in HEX representation to select a color for the background and for the text in colorpicker
610
+ * The colors in HEX representation to select a color for the background and for the text in colorpicker.
611
+ * Each group is laid out in rows of `--jd-color-picker-columns` colors (10 by default).
611
612
  *
612
613
  * ```javascript
613
614
  * Jodit.make('#editor', {
@@ -12,7 +12,7 @@ import type { IJodit } from "../../../types/index";
12
12
  /**
13
13
  * Build color picker
14
14
  *
15
- * @param callback - Callback 'function (color) \{\}'
15
+ * @param callback - Callback 'function (color) \{\}'. The remove button calls it with an empty string
16
16
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
17
17
  * @example
18
18
  * ```javascript
@@ -8,4 +8,4 @@
8
8
  * @packageDocumentation
9
9
  * @module icons
10
10
  */
11
- export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
11
+ export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };