jodit 4.17.6 → 4.18.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 (102) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/es2015/jodit.css +87 -3
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +8 -8
  5. package/es2015/jodit.js +808 -132
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +16 -16
  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 +8 -8
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +8 -8
  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 +87 -3
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +14 -14
  23. package/es2021/jodit.js +788 -132
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +14 -14
  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 +87 -3
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +26 -26
  35. package/es2021.en/jodit.js +788 -132
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +12 -12
  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 +92 -6
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +1073 -192
  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 +65 -2
  60. package/esm/config.js +29 -2
  61. package/esm/core/constants.js +1 -1
  62. package/esm/core/helpers/utils/align.d.ts +11 -5
  63. package/esm/core/helpers/utils/align.js +28 -8
  64. package/esm/core/helpers/utils/index.d.ts +1 -0
  65. package/esm/core/helpers/utils/index.js +1 -0
  66. package/esm/core/helpers/utils/media-wrapper.d.ts +29 -0
  67. package/esm/core/helpers/utils/media-wrapper.js +63 -0
  68. package/esm/core/selection/selection.js +3 -3
  69. package/esm/modules/toolbar/button/button.d.ts +18 -0
  70. package/esm/modules/toolbar/button/button.js +75 -5
  71. package/esm/plugins/dtd/after-insert/remove-extra-br.js +6 -1
  72. package/esm/plugins/dtd/before-insert/check-block-nesting.js +16 -1
  73. package/esm/plugins/dtd/config.js +3 -0
  74. package/esm/plugins/font/config.d.ts +12 -0
  75. package/esm/plugins/font/config.js +25 -10
  76. package/esm/plugins/font/font-picker.d.ts +51 -0
  77. package/esm/plugins/font/font-picker.js +238 -0
  78. package/esm/plugins/font/font.js +12 -0
  79. package/esm/plugins/font/google-fonts.d.ts +65 -0
  80. package/esm/plugins/font/google-fonts.js +143 -0
  81. package/esm/plugins/image-properties/readers/index.js +2 -1
  82. package/esm/plugins/image-properties/writers/index.js +2 -2
  83. package/esm/plugins/inline-popup/config/items/img.js +10 -8
  84. package/esm/plugins/inline-popup/inline-popup.js +13 -6
  85. package/esm/plugins/media/config.d.ts +26 -1
  86. package/esm/plugins/media/config.js +1 -3
  87. package/esm/plugins/media/media.js +12 -4
  88. package/esm/plugins/video/config.js +24 -4
  89. package/esm/types/toolbar.d.ts +2 -0
  90. package/esm/types/types.d.ts +13 -1
  91. package/package.json +1 -1
  92. package/types/config.d.ts +65 -2
  93. package/types/core/helpers/utils/align.d.ts +11 -5
  94. package/types/core/helpers/utils/index.d.ts +1 -0
  95. package/types/core/helpers/utils/media-wrapper.d.ts +29 -0
  96. package/types/modules/toolbar/button/button.d.ts +18 -0
  97. package/types/plugins/font/config.d.ts +12 -0
  98. package/types/plugins/font/font-picker.d.ts +51 -0
  99. package/types/plugins/font/google-fonts.d.ts +65 -0
  100. package/types/plugins/media/config.d.ts +26 -1
  101. package/types/types/toolbar.d.ts +2 -0
  102. package/types/types/types.d.ts +13 -1
package/CHANGELOG.md CHANGED
@@ -9,6 +9,23 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.18.1
13
+
14
+ #### :bug: Bug Fix
15
+
16
+ - [#1315](https://github.com/xdan/jodit/issues/1315) Pasting blocks into an empty line no longer leaves the caret on a line of its own below them, and with `enter: 'DIV'` the pasted blocks replace the empty line instead of going inside it. Thanks [@brendon](https://github.com/brendon).
17
+ - [#1573](https://github.com/xdan/jodit/issues/1573) Blocks pasted into a list item stay inside it instead of landing directly in the list (`li`, `dd` and `dt` joined `dtd.blockLimits`), and a pasted list adds its items to the list it is pasted into. Thanks [@brendon](https://github.com/brendon).
18
+
19
+ ## 4.18.0
20
+
21
+ #### :rocket: New Feature
22
+
23
+ - [#1559](https://github.com/xdan/jodit/issues/1559) Typing in a toolbar dropdown list moves the focus to the item whose label starts with what was typed, as in an open `<select>`: case and accents do not matter, repeating one letter cycles through the items that start with it, and the typed text starts again after a second. While a dropdown list opened with the mouse is open, typing in the editor searches the list as well instead of writing into the content. Thanks [@brendon](https://github.com/brendon).
24
+ - [#1562](https://github.com/xdan/jodit/issues/1562) Toolbar selects can be given a fixed width with the `--jd-toolbar-select-width` CSS variable, or per control with `--jd-toolbar-select-font-width`, `--jd-toolbar-select-fontsize-width` and `--jd-toolbar-select-paragraph-width`, and shorten a longer value with an ellipsis. Without the variables a select keeps its previous sizing. Thanks [@brendon](https://github.com/brendon).
25
+ - [#1561](https://github.com/xdan/jodit/issues/1561) The font family dropdown can offer the Google Fonts library, with the theme's fonts and the fonts the content uses at the top, through the new `font.googleFonts.url` option (the Google Fonts Developer API, or a proxy of it). The fonts the content uses are loaded into the editing document. For that, a list control whose `popup` returns content now shows that content in its dropdown in place of the list's buttons. Thanks [@brendon](https://github.com/brendon).
26
+ - [#1530](https://github.com/xdan/jodit/issues/1530) New `mediaWrappers` option keeps video, audio and embeds in a wrapper from the content, by tag name, such as Froala's `<span class="fr-video">`, in place of the editor-only `jodit-media`; the media popup's Align and Delete act on the wrapper. Thanks [@brendon](https://github.com/brendon).
27
+ - [#1530](https://github.com/xdan/jodit/issues/1530) New `alignClasses` option aligns elements with class names by tag (`img`, `video`, `audio`, `iframe`), including media wrappers, and `mediaDefaultAlign` aligns the media the video popup inserts. An alignment in it or in `imageAlignClasses` can list several class sets to recognise, writing the first. Thanks [@brendon](https://github.com/brendon).
28
+
12
29
  ## 4.17.6
13
30
 
14
31
  #### :bug: Bug Fix
package/es2015/jodit.css 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.17.6
4
+ * Version: v4.18.1
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -3169,6 +3169,7 @@ a + .jodit-file-browser-tree__source-title {
3169
3169
  .jodit-toolbar-select {
3170
3170
  --jd-color-button-background-hover-opacity40: rgba(220, 220, 220, 0.2);
3171
3171
  --jd-color-button-background-hover-opacity60: rgba(220, 220, 220, 0.1);
3172
+ --jd-toolbar-select-own-width: var(--jd-toolbar-select-width);
3172
3173
  display: flex;
3173
3174
  overflow: hidden;
3174
3175
  align-items: center;
@@ -3179,7 +3180,8 @@ a + .jodit-file-browser-tree__source-title {
3179
3180
  height: 34px;
3180
3181
  justify-content: space-between;
3181
3182
  cursor: pointer;
3182
- min-width: 100px;
3183
+ min-width: var(--jd-toolbar-select-own-width, 100px);
3184
+ max-width: var(--jd-toolbar-select-own-width, none);
3183
3185
  }
3184
3186
  .jodit-toolbar-select__icon {
3185
3187
  display: none;
@@ -3593,11 +3595,23 @@ a + .jodit-file-browser-tree__source-title {
3593
3595
  opacity: 0.3;
3594
3596
  pointer-events: none;
3595
3597
  }
3598
+ .jodit-toolbar-select_font {
3599
+ --jd-toolbar-select-own-width: var(--jd-toolbar-select-font-width, var(--jd-toolbar-select-width));
3600
+ }
3601
+ .jodit-toolbar-select_fontsize {
3602
+ --jd-toolbar-select-own-width: var(--jd-toolbar-select-fontsize-width, var(--jd-toolbar-select-width));
3603
+ }
3604
+ .jodit-toolbar-select_paragraph {
3605
+ --jd-toolbar-select-own-width: var(--jd-toolbar-select-paragraph-width, var(--jd-toolbar-select-width));
3606
+ }
3596
3607
  .jodit-toolbar-select__text:not(:empty) {
3597
- justify-content: left;
3608
+ display: block;
3609
+ text-align: start;
3610
+ white-space: nowrap;
3598
3611
  }
3599
3612
  .jodit-toolbar-select__button {
3600
3613
  flex: 1;
3614
+ min-width: 0;
3601
3615
  }
3602
3616
 
3603
3617
  /*!
@@ -4026,6 +4040,76 @@ a + .jodit-file-browser-tree__source-title {
4026
4040
  fill: var(--jd-color-text-icons);
4027
4041
  }
4028
4042
 
4043
+ /*!
4044
+ * Jodit Editor (https://xdsoft.net/jodit/)
4045
+ * Released under MIT see LICENSE.txt in the project root for license information.
4046
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
4047
+ */
4048
+ .jodit-ui-font-picker {
4049
+ width: 240px;
4050
+ }
4051
+ .jodit-ui-font-picker__group + .jodit-ui-font-picker__group {
4052
+ margin-top: var(--jd-padding-default);
4053
+ }
4054
+ .jodit-ui-font-picker__heading {
4055
+ padding: var(--jd-padding-default) var(--jd-padding-default) calc(var(--jd-padding-default) / 4);
4056
+ color: var(--jd-color-label);
4057
+ font-size: var(--jd-font-size-small);
4058
+ line-height: 1;
4059
+ text-transform: uppercase;
4060
+ }
4061
+ .jodit-ui-font-picker__item {
4062
+ position: relative;
4063
+ box-sizing: border-box;
4064
+ padding: 0;
4065
+ border: 0;
4066
+ appearance: none;
4067
+ background: 0 0;
4068
+ box-shadow: none;
4069
+ font-style: normal;
4070
+ outline: 0;
4071
+ text-align: center;
4072
+ text-decoration: none;
4073
+ text-transform: none;
4074
+ user-select: none;
4075
+ cursor: pointer;
4076
+ font-family: var(--jd-font-default);
4077
+ font-size: var(--jd-font-size-default);
4078
+ display: block;
4079
+ overflow: hidden;
4080
+ width: 100%;
4081
+ min-height: var(--jd-button-size);
4082
+ padding: 0 var(--jd-padding-default);
4083
+ margin: var(--jd-margin-v) 0;
4084
+ border-radius: var(--jd-border-radius-default);
4085
+ color: var(--jd-color-text);
4086
+ text-align: start;
4087
+ text-overflow: ellipsis;
4088
+ white-space: nowrap;
4089
+ }
4090
+ .jodit-ui-font-picker__item:hover:not([disabled]),
4091
+ .jodit-ui-font-picker__item:focus-visible:not([disabled]) {
4092
+ background-color: var(--jd-color-button-background-hover);
4093
+ opacity: 1;
4094
+ outline: 0;
4095
+ }
4096
+ .jodit-ui-font-picker__item:active:not([disabled]),
4097
+ .jodit-ui-font-picker__item[aria-pressed='true']:not([disabled]) {
4098
+ background-color: var(--jd-color-button-background-hover-opacity40);
4099
+ outline: 0;
4100
+ }
4101
+ .jodit-ui-font-picker__item[aria-pressed='true']:hover:not([disabled]) {
4102
+ background-color: var(--jd-color-button-background-hover-opacity60);
4103
+ }
4104
+ .jodit-ui-font-picker__item[disabled] {
4105
+ opacity: 0.3;
4106
+ pointer-events: none;
4107
+ }
4108
+ .jodit-ui-font-picker__item:focus:not([disabled]) {
4109
+ background-color: var(--jd-color-button-background-hover);
4110
+ outline: 0;
4111
+ }
4112
+
4029
4113
  /*!
4030
4114
  * Jodit Editor (https://xdsoft.net/jodit/)
4031
4115
  * Released under MIT see LICENSE.txt in the project root for license information.