jodit 4.2.14 → 4.2.17

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 (133) hide show
  1. package/CHANGELOG.md +64 -5
  2. package/es2015/jodit.css +115 -115
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +928 -823
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +11 -11
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  13. package/es2018/jodit.css +115 -115
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +2 -2
  16. package/es2018/jodit.js +928 -825
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +2 -2
  19. package/es2018/plugins/debug/debug.js +1 -1
  20. package/es2018/plugins/debug/debug.min.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.js +11 -11
  23. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  24. package/es2021/jodit.css +115 -115
  25. package/es2021/jodit.fat.min.css +1 -1
  26. package/es2021/jodit.fat.min.js +2 -2
  27. package/es2021/jodit.js +922 -819
  28. package/es2021/jodit.min.css +1 -1
  29. package/es2021/jodit.min.js +2 -2
  30. package/es2021/plugins/debug/debug.js +1 -1
  31. package/es2021/plugins/debug/debug.min.js +1 -1
  32. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.js +11 -11
  34. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  35. package/es2021.en/jodit.css +115 -115
  36. package/es2021.en/jodit.fat.min.css +1 -1
  37. package/es2021.en/jodit.fat.min.js +2 -2
  38. package/es2021.en/jodit.js +922 -819
  39. package/es2021.en/jodit.min.css +1 -1
  40. package/es2021.en/jodit.min.js +2 -2
  41. package/es2021.en/plugins/debug/debug.js +1 -1
  42. package/es2021.en/plugins/debug/debug.min.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.js +11 -11
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  46. package/es5/jodit.css +129 -129
  47. package/es5/jodit.fat.min.css +1 -1
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +950 -844
  50. package/es5/jodit.min.css +3 -3
  51. package/es5/jodit.min.js +2 -2
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +11 -11
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  57. package/esm/core/constants.js +1 -1
  58. package/esm/core/helpers/utils/config-proto.js +1 -1
  59. package/esm/core/request/ajax.js +1 -1
  60. package/esm/core/selection/helpers/index.d.ts +9 -3
  61. package/esm/core/selection/helpers/index.js +48 -0
  62. package/esm/core/selection/selection.d.ts +6 -1
  63. package/esm/core/selection/selection.js +95 -117
  64. package/esm/core/ui/helpers/get-control-type.js +15 -9
  65. package/esm/core/ui/helpers/get-strong-control-types.js +1 -1
  66. package/esm/index.d.ts +6 -1
  67. package/esm/index.js +3 -2
  68. package/esm/jodit.d.ts +1 -1
  69. package/esm/jodit.js +1 -1
  70. package/esm/modules/file-browser/file-browser.js +1 -1
  71. package/esm/modules/history/history.js +1 -1
  72. package/esm/modules/image-editor/config.js +1 -1
  73. package/esm/modules/image-editor/image-editor.js +1 -1
  74. package/esm/modules/table/table.d.ts +3 -1
  75. package/esm/modules/table/table.js +38 -33
  76. package/esm/modules/toolbar/button/button.js +2 -1
  77. package/esm/modules/toolbar/button/select/select.js +2 -1
  78. package/esm/modules/uploader/helpers/send-files.js +33 -29
  79. package/esm/modules/uploader/uploader.js +1 -1
  80. package/esm/plugins/about/about.js +1 -1
  81. package/esm/plugins/add-new-line/config.js +1 -1
  82. package/esm/plugins/ai-assistant/config.js +1 -1
  83. package/esm/plugins/backspace/cases/check-remove-char.js +68 -54
  84. package/esm/plugins/bold/bold.js +1 -1
  85. package/esm/plugins/class-span/class-span.js +1 -1
  86. package/esm/plugins/clean-html/config.js +1 -1
  87. package/esm/plugins/clipboard/config.js +1 -1
  88. package/esm/plugins/color/config.js +1 -1
  89. package/esm/plugins/copy-format/copy-format.js +1 -1
  90. package/esm/plugins/drag-and-drop/drag-and-drop.d.ts +2 -0
  91. package/esm/plugins/drag-and-drop/drag-and-drop.js +43 -36
  92. package/esm/plugins/file/file.js +1 -1
  93. package/esm/plugins/font/config.js +1 -1
  94. package/esm/plugins/format-block/config.js +6 -4
  95. package/esm/plugins/fullsize/config.js +1 -1
  96. package/esm/plugins/hr/hr.js +1 -1
  97. package/esm/plugins/image/image.js +1 -1
  98. package/esm/plugins/image-properties/config.d.ts +0 -3
  99. package/esm/plugins/image-properties/config.js +3 -0
  100. package/esm/plugins/image-properties/interface.d.ts +121 -0
  101. package/esm/plugins/indent/config.js +1 -1
  102. package/esm/plugins/inline-popup/config/config.js +1 -1
  103. package/esm/plugins/justify/justify.js +10 -6
  104. package/esm/plugins/line-height/config.js +1 -1
  105. package/esm/plugins/link/config.js +1 -1
  106. package/esm/plugins/link/link.js +71 -64
  107. package/esm/plugins/mobile/config.js +1 -1
  108. package/esm/plugins/ordered-list/config.js +1 -1
  109. package/esm/plugins/paste/config.js +1 -1
  110. package/esm/plugins/print/print.js +1 -1
  111. package/esm/plugins/redo-undo/redo-undo.js +1 -1
  112. package/esm/plugins/search/config.js +1 -1
  113. package/esm/plugins/search/helpers/highlight-text-ranges.d.ts +0 -4
  114. package/esm/plugins/search/helpers/highlight-text-ranges.js +58 -49
  115. package/esm/plugins/source/config.js +1 -1
  116. package/esm/plugins/speech-recognize/config.js +1 -1
  117. package/esm/plugins/spellcheck/config.js +1 -1
  118. package/esm/plugins/symbols/config.js +1 -1
  119. package/esm/plugins/table/config.js +1 -1
  120. package/esm/plugins/table-keyboard-navigation/table-keyboard-navigation.js +35 -29
  121. package/esm/plugins/video/config.js +1 -1
  122. package/esm/types/toolbar.d.ts +1 -2
  123. package/package.json +1 -1
  124. package/types/core/selection/helpers/index.d.ts +9 -3
  125. package/types/core/selection/selection.d.ts +6 -1
  126. package/types/index.d.ts +6 -1
  127. package/types/jodit.d.ts +1 -1
  128. package/types/modules/table/table.d.ts +3 -1
  129. package/types/plugins/drag-and-drop/drag-and-drop.d.ts +2 -0
  130. package/types/plugins/image-properties/config.d.ts +0 -3
  131. package/types/plugins/image-properties/interface.d.ts +121 -0
  132. package/types/plugins/search/helpers/highlight-text-ranges.d.ts +0 -4
  133. package/types/types/toolbar.d.ts +1 -2
package/CHANGELOG.md CHANGED
@@ -9,6 +9,65 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.2.17
13
+
14
+ #### :house: Internal
15
+
16
+ - Removed conversion of list arrays into objects when creating a button in the toolbar. Previously the code looked like:
17
+
18
+ ```js
19
+ Jodit.make('#editor', {
20
+ constrols: {
21
+ lineHeight: {
22
+ list: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 2]
23
+ }
24
+ }
25
+ });
26
+ ```
27
+
28
+ was implicitly transformed into an object of the form:
29
+
30
+ ```js
31
+ Jodit.make('#editor', {
32
+ constrols: {
33
+ lineHeight: {
34
+ list: {
35
+ 1: '1',
36
+ 2: '2',
37
+ 1.1: '1.1',
38
+ 1.2: '1.2',
39
+ 1.3: '1.3',
40
+ 1.4: '1.4',
41
+ 1.5: '1.5'
42
+ }
43
+ }
44
+ }
45
+ });
46
+ ```
47
+
48
+ Thus, due to the nature of integer keys, the order of the elements was lost. Now such a transformation does not occur.
49
+ In your code you clearly need to check what came into `list` and if it is an array, then use it as is.
50
+
51
+ ```js
52
+ Jodit.make('#editor', {
53
+ constrols: {
54
+ lineHeight: {
55
+ list: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 2],
56
+ update(editor: IJodit, button): boolean {
57
+ if (Array.isArray(button.control)) {
58
+ // Work with array
59
+ }
60
+ }
61
+ }
62
+ }
63
+ });
64
+ ```
65
+
66
+ ### :bug: Bug Fix
67
+
68
+ - [Backspacing in the editor with preadded styling or added styling is not retained #1120](https://github.com/xdan/jodit/issues/1120)
69
+ - [missing generation of inferface.js and interface.d.ts in esm build path esm\plugins\image-properties #1117](https://github.com/xdan/jodit/issues/1117)
70
+
12
71
  ## 4.2.13
13
72
 
14
73
  ### :bug: Bug Fix
@@ -2620,11 +2679,11 @@ Related with https://github.com/xdan/jodit/issues/574. In some cases need to lim
2620
2679
  - @property {IUIOption[]} link.selectOptionsClassName=[] The list of the option for the select (to use with
2621
2680
  modeClassName="select")
2622
2681
  - ex: [
2623
- - { value: "", text: "" },
2624
- - { value: "val1", text: "text1" },
2625
- - { value: "val2", text: "text2" },
2626
- - { value: "val3", text: "text3" }
2627
- - ]
2682
+ - { value: "", text: "" },
2683
+ - { value: "val1", text: "text1" },
2684
+ - { value: "val2", text: "text2" },
2685
+ - { value: "val3", text: "text3" }
2686
+ - ]
2628
2687
  PR: https://github.com/xdan/jodit/pull/577 Thanks @s-renier-taonix-fr
2629
2688
 
2630
2689
  ##### New option `statusbar: boolean = true`
package/es2015/jodit.css CHANGED
@@ -1,33 +1,11 @@
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.2.14
4
+ * Version: v4.2.17
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
 
9
- /*!
10
- * Jodit Editor (https://xdsoft.net/jodit/)
11
- * Released under MIT see LICENSE.txt in the project root for license information.
12
- * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
13
- */
14
- .jodit-about {
15
- padding: 20px;
16
- }
17
- .jodit-about a {
18
- color: #459ce7;
19
- text-decoration: none;
20
- }
21
- .jodit-about a:focus,
22
- .jodit-about a:hover {
23
- color: #23527c;
24
- outline: 0;
25
- text-decoration: underline;
26
- }
27
- .jodit-about div {
28
- margin-bottom: calc(var(--jd-padding-default) / 2);
29
- }
30
-
31
9
  /*!
32
10
  * Jodit Editor (https://xdsoft.net/jodit/)
33
11
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -733,98 +711,6 @@
733
711
  outline: 1px dashed #bd2130;
734
712
  }
735
713
 
736
- /*!
737
- * Jodit Editor (https://xdsoft.net/jodit/)
738
- * Released under MIT see LICENSE.txt in the project root for license information.
739
- * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
740
- */
741
- :root {
742
- --jd-popup-box-shadow: 0 4px 1px -2px rgba(76, 76, 76, 0.2),
743
- 0 3px 3px 0 rgb(76 76 76 / 15%), 0 1px 4px 0 rgb(76 76 76 / 13%);
744
- }
745
- .jodit-popup {
746
- position: static;
747
- width: auto;
748
- max-width: none;
749
- height: auto;
750
- padding: 0;
751
- border: 0;
752
- margin: 0;
753
- background: 0 0;
754
- float: none;
755
- outline: 0;
756
- position: fixed;
757
- z-index: var(--jd-z-index-popup);
758
- display: inline-block;
759
- box-shadow: var(--jd-popup-box-shadow);
760
- transform: translate3d(0, 0, 0);
761
- }
762
- .jodit-popup__content {
763
- font-family: var(--jd-font-default);
764
- font-size: var(--jd-font-size-default);
765
- overflow: auto;
766
- max-height: 300px;
767
- padding: var(--jd-padding-default);
768
- background: var(--jd-color-background-default);
769
- overflow-scrolling: touch;
770
- }
771
- .jodit-popup_padding_false .jodit-popup__content {
772
- padding: 0;
773
- }
774
- .jodit-popup_max-height_false .jodit-popup__content {
775
- max-height: fit-content;
776
- }
777
-
778
- /*!
779
- * Jodit Editor (https://xdsoft.net/jodit/)
780
- * Released under MIT see LICENSE.txt in the project root for license information.
781
- * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
782
- */
783
- .jodit-context-menu {
784
- position: static;
785
- width: auto;
786
- max-width: none;
787
- height: auto;
788
- padding: 0;
789
- border: 0;
790
- margin: 0;
791
- background: 0 0;
792
- float: none;
793
- outline: 0;
794
- position: fixed;
795
- z-index: var(--jd-z-index-popup);
796
- display: inline-block;
797
- box-shadow: var(--jd-popup-box-shadow);
798
- transform: translate3d(0, 0, 0);
799
- z-index: var(--jd-z-index-context-menu);
800
- font-family: var(--jd-font-default);
801
- font-size: var(--jd-font-size-default);
802
- }
803
- .jodit-context-menu__content {
804
- font-family: var(--jd-font-default);
805
- font-size: var(--jd-font-size-default);
806
- overflow: auto;
807
- max-height: 300px;
808
- padding: var(--jd-padding-default);
809
- background: var(--jd-color-background-default);
810
- overflow-scrolling: touch;
811
- }
812
- .jodit-context-menu_padding_false .jodit-context-menu__content {
813
- padding: 0;
814
- }
815
- .jodit-context-menu_max-height_false .jodit-context-menu__content {
816
- max-height: fit-content;
817
- }
818
- .jodit-context-menu .jodit-ui-button {
819
- display: flex;
820
- }
821
- .jodit-context-menu button {
822
- width: 100%;
823
- }
824
- .jodit-context-menu_theme_dark {
825
- background-color: var(--jd-dark-background-color);
826
- }
827
-
828
714
  .jodit-ui-button-group {
829
715
  margin-bottom: var(--jd-padding-default);
830
716
  }
@@ -1338,6 +1224,48 @@
1338
1224
  opacity: 0;
1339
1225
  }
1340
1226
 
1227
+ /*!
1228
+ * Jodit Editor (https://xdsoft.net/jodit/)
1229
+ * Released under MIT see LICENSE.txt in the project root for license information.
1230
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1231
+ */
1232
+ :root {
1233
+ --jd-popup-box-shadow: 0 4px 1px -2px rgba(76, 76, 76, 0.2),
1234
+ 0 3px 3px 0 rgb(76 76 76 / 15%), 0 1px 4px 0 rgb(76 76 76 / 13%);
1235
+ }
1236
+ .jodit-popup {
1237
+ position: static;
1238
+ width: auto;
1239
+ max-width: none;
1240
+ height: auto;
1241
+ padding: 0;
1242
+ border: 0;
1243
+ margin: 0;
1244
+ background: 0 0;
1245
+ float: none;
1246
+ outline: 0;
1247
+ position: fixed;
1248
+ z-index: var(--jd-z-index-popup);
1249
+ display: inline-block;
1250
+ box-shadow: var(--jd-popup-box-shadow);
1251
+ transform: translate3d(0, 0, 0);
1252
+ }
1253
+ .jodit-popup__content {
1254
+ font-family: var(--jd-font-default);
1255
+ font-size: var(--jd-font-size-default);
1256
+ overflow: auto;
1257
+ max-height: 300px;
1258
+ padding: var(--jd-padding-default);
1259
+ background: var(--jd-color-background-default);
1260
+ overflow-scrolling: touch;
1261
+ }
1262
+ .jodit-popup_padding_false .jodit-popup__content {
1263
+ padding: 0;
1264
+ }
1265
+ .jodit-popup_max-height_false .jodit-popup__content {
1266
+ max-height: fit-content;
1267
+ }
1268
+
1341
1269
  /*!
1342
1270
  * Jodit Editor (https://xdsoft.net/jodit/)
1343
1271
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -2705,6 +2633,56 @@
2705
2633
  z-index: var(--jd-z-index-dialog);
2706
2634
  }
2707
2635
 
2636
+ /*!
2637
+ * Jodit Editor (https://xdsoft.net/jodit/)
2638
+ * Released under MIT see LICENSE.txt in the project root for license information.
2639
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
2640
+ */
2641
+ .jodit-context-menu {
2642
+ position: static;
2643
+ width: auto;
2644
+ max-width: none;
2645
+ height: auto;
2646
+ padding: 0;
2647
+ border: 0;
2648
+ margin: 0;
2649
+ background: 0 0;
2650
+ float: none;
2651
+ outline: 0;
2652
+ position: fixed;
2653
+ z-index: var(--jd-z-index-popup);
2654
+ display: inline-block;
2655
+ box-shadow: var(--jd-popup-box-shadow);
2656
+ transform: translate3d(0, 0, 0);
2657
+ z-index: var(--jd-z-index-context-menu);
2658
+ font-family: var(--jd-font-default);
2659
+ font-size: var(--jd-font-size-default);
2660
+ }
2661
+ .jodit-context-menu__content {
2662
+ font-family: var(--jd-font-default);
2663
+ font-size: var(--jd-font-size-default);
2664
+ overflow: auto;
2665
+ max-height: 300px;
2666
+ padding: var(--jd-padding-default);
2667
+ background: var(--jd-color-background-default);
2668
+ overflow-scrolling: touch;
2669
+ }
2670
+ .jodit-context-menu_padding_false .jodit-context-menu__content {
2671
+ padding: 0;
2672
+ }
2673
+ .jodit-context-menu_max-height_false .jodit-context-menu__content {
2674
+ max-height: fit-content;
2675
+ }
2676
+ .jodit-context-menu .jodit-ui-button {
2677
+ display: flex;
2678
+ }
2679
+ .jodit-context-menu button {
2680
+ width: 100%;
2681
+ }
2682
+ .jodit-context-menu_theme_dark {
2683
+ background-color: var(--jd-dark-background-color);
2684
+ }
2685
+
2708
2686
  /*!
2709
2687
  * Jodit Editor (https://xdsoft.net/jodit/)
2710
2688
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -3403,6 +3381,28 @@ a + .jodit-file-browser-tree__source-title {
3403
3381
  }
3404
3382
  }
3405
3383
 
3384
+ /*!
3385
+ * Jodit Editor (https://xdsoft.net/jodit/)
3386
+ * Released under MIT see LICENSE.txt in the project root for license information.
3387
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3388
+ */
3389
+ .jodit-about {
3390
+ padding: 20px;
3391
+ }
3392
+ .jodit-about a {
3393
+ color: #459ce7;
3394
+ text-decoration: none;
3395
+ }
3396
+ .jodit-about a:focus,
3397
+ .jodit-about a:hover {
3398
+ color: #23527c;
3399
+ outline: 0;
3400
+ text-decoration: underline;
3401
+ }
3402
+ .jodit-about div {
3403
+ margin-bottom: calc(var(--jd-padding-default) / 2);
3404
+ }
3405
+
3406
3406
  /*!
3407
3407
  * Jodit Editor (https://xdsoft.net/jodit/)
3408
3408
  * Released under MIT see LICENSE.txt in the project root for license information.