jodit 4.20.5 → 4.21.1

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 (90) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +0 -1
  3. package/es2015/jodit.css +2 -2
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +12 -12
  6. package/es2015/jodit.js +558 -210
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +12 -12
  9. package/es2015/plugins/debug/debug.css +1 -1
  10. package/es2015/plugins/debug/debug.js +2 -2
  11. package/es2015/plugins/debug/debug.min.js +2 -2
  12. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.js +2 -2
  14. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +12 -12
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +12 -12
  19. package/es2018/plugins/debug/debug.min.js +2 -2
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  21. package/es2021/jodit.css +2 -2
  22. package/es2021/jodit.fat.min.css +1 -1
  23. package/es2021/jodit.fat.min.js +17 -17
  24. package/es2021/jodit.js +550 -203
  25. package/es2021/jodit.min.css +1 -1
  26. package/es2021/jodit.min.js +17 -17
  27. package/es2021/plugins/debug/debug.css +1 -1
  28. package/es2021/plugins/debug/debug.js +2 -2
  29. package/es2021/plugins/debug/debug.min.js +2 -2
  30. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.js +2 -2
  32. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  33. package/es2021.en/jodit.css +2 -2
  34. package/es2021.en/jodit.fat.min.css +1 -1
  35. package/es2021.en/jodit.fat.min.js +17 -17
  36. package/es2021.en/jodit.js +550 -203
  37. package/es2021.en/jodit.min.css +1 -1
  38. package/es2021.en/jodit.min.js +32 -32
  39. package/es2021.en/plugins/debug/debug.css +1 -1
  40. package/es2021.en/plugins/debug/debug.js +2 -2
  41. package/es2021.en/plugins/debug/debug.min.js +2 -2
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.js +2 -2
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  45. package/es5/jodit.css +3 -3
  46. package/es5/jodit.fat.min.css +1 -1
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +595 -177
  49. package/es5/jodit.min.css +3 -3
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +2 -2
  53. package/es5/plugins/debug/debug.min.js +2 -2
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +2 -2
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  57. package/es5/polyfills.fat.min.js +2 -2
  58. package/es5/polyfills.js +1 -29
  59. package/es5/polyfills.min.js +2 -2
  60. package/esm/config.d.ts +18 -0
  61. package/esm/core/constants.d.ts +6 -0
  62. package/esm/core/constants.js +18 -1
  63. package/esm/core/helpers/html/clean-from-word.d.ts +3 -1
  64. package/esm/core/helpers/html/clean-from-word.js +87 -11
  65. package/esm/core/helpers/utils/selector.js +4 -3
  66. package/esm/plugins/hr/hr.js +290 -1
  67. package/esm/plugins/inline-popup/config/config.js +2 -0
  68. package/esm/plugins/inline-popup/config/items/hr.d.ts +11 -0
  69. package/esm/plugins/inline-popup/config/items/hr.js +15 -0
  70. package/esm/plugins/key-arrow-outside/key-arrow-outside.js +2 -2
  71. package/esm/plugins/link/config.d.ts +7 -0
  72. package/esm/plugins/link/config.js +1 -0
  73. package/esm/plugins/link/link.js +20 -16
  74. package/esm/plugins/paste/config.d.ts +5 -0
  75. package/esm/plugins/paste/config.js +2 -1
  76. package/esm/plugins/paste/paste.js +1 -1
  77. package/esm/plugins/paste-from-word/paste-from-word.js +2 -2
  78. package/esm/plugins/symbols/config.d.ts +6 -0
  79. package/esm/plugins/symbols/config.js +1 -0
  80. package/esm/plugins/symbols/symbols.d.ts +0 -1
  81. package/esm/plugins/symbols/symbols.js +12 -10
  82. package/package.json +1 -1
  83. package/types/config.d.ts +18 -0
  84. package/types/core/constants.d.ts +6 -0
  85. package/types/core/helpers/html/clean-from-word.d.ts +3 -1
  86. package/types/plugins/inline-popup/config/items/hr.d.ts +11 -0
  87. package/types/plugins/link/config.d.ts +7 -0
  88. package/types/plugins/paste/config.d.ts +5 -0
  89. package/types/plugins/symbols/config.d.ts +6 -0
  90. package/types/plugins/symbols/symbols.d.ts +0 -1
package/types/config.d.ts CHANGED
@@ -1646,6 +1646,13 @@ interface Config {
1646
1646
  * The list of the option for the select (to use with modeClassName="select")
1647
1647
  */
1648
1648
  selectOptionsClassName: IUIOption[];
1649
+ /**
1650
+ * With modeClassName="select", keep the link's classes that the list
1651
+ * doesn't offer, such as one an integration gives some of its links,
1652
+ * and change only the listed ones. Off, the form sets the link's
1653
+ * classes to the selected ones alone
1654
+ */
1655
+ selectKeepOtherClassNames: boolean;
1649
1656
  hotkeys: string[];
1650
1657
  /**
1651
1658
  * Prevent navigation to the link if it is readonly. Default: true
@@ -1744,6 +1751,11 @@ interface Config {
1744
1751
  * List of tags that will not be removed from the pasted HTML with INSERT_AS_TEXT mode
1745
1752
  */
1746
1753
  pasteExcludeStripTags: HTMLTagNames[];
1754
+ /**
1755
+ * The attributes a clean paste (INSERT_CLEAR_HTML, and Clean for HTML
1756
+ * from Word) keeps. It removes every other attribute, and every style
1757
+ */
1758
+ pasteKeepAttributes: string[];
1747
1759
  /**
1748
1760
  * Options when inserting HTML string
1749
1761
  */
@@ -2091,6 +2103,12 @@ interface Config {
2091
2103
  * When true, show the special-characters picker as a toolbar popup instead of a modal dialog
2092
2104
  */
2093
2105
  usePopupForSpecialCharacters: boolean;
2106
+ /**
2107
+ * How many characters each row of the special-characters picker holds.
2108
+ * The picker widens or narrows to fit them. Anything but a positive
2109
+ * whole number falls back to 17.
2110
+ */
2111
+ specialCharactersColumns: number;
2094
2112
  }
2095
2113
  interface Config {
2096
2114
  tab: {
@@ -129,6 +129,12 @@ export declare const INSERT_AS_TEXT = "insert_as_text";
129
129
  * ```
130
130
  */
131
131
  export declare const INSERT_ONLY_TEXT = "insert_only_text";
132
+ /**
133
+ * The attributes a clean paste ([[INSERT_CLEAR_HTML]], and Clean for HTML from
134
+ * Word) keeps by default: what links and media need, and what carries a table's
135
+ * structure or the meaning of an image or a link
136
+ */
137
+ export declare const PASTE_KEEP_ATTRIBUTES: readonly string[];
132
138
  export declare const SAFE_COUNT_CHANGE_CALL = 10;
133
139
  export declare const ERROR_CODE_CONFLICT = 409;
134
140
  export declare const IS_MAC: boolean;
@@ -6,5 +6,7 @@
6
6
  /**
7
7
  * The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
8
8
  * content that matches the look and feel of the site.
9
+ *
10
+ * @param keepAttributes - The attributes to keep; every other attribute, and every style, is removed
9
11
  */
10
- export declare function cleanFromWord(html: string): string;
12
+ export declare function cleanFromWord(html: string, keepAttributes?: readonly string[]): string;
@@ -0,0 +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-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module plugins/inline-popup
8
+ */
9
+ import type { IControlType } from "../../../../types/index";
10
+ declare const _default: Array<IControlType | string>;
11
+ export default _default;
@@ -102,6 +102,13 @@ declare module 'jodit/config' {
102
102
  * The list of the option for the select (to use with modeClassName="select")
103
103
  */
104
104
  selectOptionsClassName: IUIOption[];
105
+ /**
106
+ * With modeClassName="select", keep the link's classes that the list
107
+ * doesn't offer, such as one an integration gives some of its links,
108
+ * and change only the listed ones. Off, the form sets the link's
109
+ * classes to the selected ones alone
110
+ */
111
+ selectKeepOtherClassNames: boolean;
105
112
  hotkeys: string[];
106
113
  /**
107
114
  * Prevent navigation to the link if it is readonly. Default: true
@@ -30,6 +30,11 @@ declare module 'jodit/config' {
30
30
  * List of tags that will not be removed from the pasted HTML with INSERT_AS_TEXT mode
31
31
  */
32
32
  pasteExcludeStripTags: HTMLTagNames[];
33
+ /**
34
+ * The attributes a clean paste (INSERT_CLEAR_HTML, and Clean for HTML
35
+ * from Word) keeps. It removes every other attribute, and every style
36
+ */
37
+ pasteKeepAttributes: string[];
33
38
  /**
34
39
  * Options when inserting HTML string
35
40
  */
@@ -13,6 +13,12 @@ declare module 'jodit/config' {
13
13
  * When true, show the special-characters picker as a toolbar popup instead of a modal dialog
14
14
  */
15
15
  usePopupForSpecialCharacters: boolean;
16
+ /**
17
+ * How many characters each row of the special-characters picker holds.
18
+ * The picker widens or narrows to fit them. Anything but a positive
19
+ * whole number falls back to 17.
20
+ */
21
+ specialCharactersColumns: number;
16
22
  }
17
23
  }
18
24
  export {};
@@ -16,7 +16,6 @@ import "./config";
16
16
  */
17
17
  export declare class symbols extends Plugin {
18
18
  buttons: Plugin['buttons'];
19
- private __countInRow;
20
19
  constructor(jodit: IJodit);
21
20
  afterInit(jodit: IJodit): void;
22
21
  /** @override */