jodit 4.15.9 → 4.15.13

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 (77) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +7 -0
  3. package/es2015/jodit.css +21 -1
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +7 -7
  6. package/es2015/jodit.js +250 -9
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +5 -5
  9. package/es2015/plugins/debug/debug.css +1 -1
  10. package/es2015/plugins/debug/debug.js +1 -1
  11. package/es2015/plugins/debug/debug.min.js +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  14. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +5 -5
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +5 -5
  19. package/es2018/plugins/debug/debug.min.js +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  21. package/es2021/jodit.css +21 -1
  22. package/es2021/jodit.fat.min.css +1 -1
  23. package/es2021/jodit.fat.min.js +6 -6
  24. package/es2021/jodit.js +249 -9
  25. package/es2021/jodit.min.css +1 -1
  26. package/es2021/jodit.min.js +6 -6
  27. package/es2021/plugins/debug/debug.css +1 -1
  28. package/es2021/plugins/debug/debug.js +1 -1
  29. package/es2021/plugins/debug/debug.min.js +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  32. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  33. package/es2021.en/jodit.css +21 -1
  34. package/es2021.en/jodit.fat.min.css +1 -1
  35. package/es2021.en/jodit.fat.min.js +11 -11
  36. package/es2021.en/jodit.js +249 -9
  37. package/es2021.en/jodit.min.css +1 -1
  38. package/es2021.en/jodit.min.js +10 -10
  39. package/es2021.en/plugins/debug/debug.css +1 -1
  40. package/es2021.en/plugins/debug/debug.js +1 -1
  41. package/es2021.en/plugins/debug/debug.min.js +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  45. package/es5/jodit.css +22 -2
  46. package/es5/jodit.fat.min.css +1 -1
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +307 -9
  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 +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 +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/es5/polyfills.fat.min.js +1 -1
  58. package/es5/polyfills.js +1 -1
  59. package/es5/polyfills.min.js +1 -1
  60. package/esm/core/constants.d.ts +2 -0
  61. package/esm/core/constants.js +3 -1
  62. package/esm/core/selection/selection.d.ts +11 -0
  63. package/esm/core/selection/selection.js +24 -1
  64. package/esm/modules/toolbar/button/button.d.ts +14 -0
  65. package/esm/modules/toolbar/button/button.js +102 -4
  66. package/esm/plugins/all.d.ts +1 -0
  67. package/esm/plugins/all.js +1 -0
  68. package/esm/plugins/index.d.ts +1 -0
  69. package/esm/plugins/index.js +1 -0
  70. package/esm/plugins/toolbar-navigation/toolbar-navigation.d.ts +42 -0
  71. package/esm/plugins/toolbar-navigation/toolbar-navigation.js +113 -0
  72. package/package.json +1 -1
  73. package/types/core/constants.d.ts +2 -0
  74. package/types/core/selection/selection.d.ts +11 -0
  75. package/types/modules/toolbar/button/button.d.ts +14 -0
  76. package/types/plugins/index.d.ts +1 -0
  77. package/types/plugins/toolbar-navigation/toolbar-navigation.d.ts +42 -0
package/CHANGELOG.md CHANGED
@@ -9,6 +9,22 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.15.13
13
+
14
+ #### :rocket: New Feature
15
+
16
+ - [#1423](https://github.com/xdan/jodit/issues/1423) New `toolbar-navigation` plugin: the toolbar is now reachable from the keyboard. `Alt+F10` moves the focus from the editable area into the toolbar, the arrow keys walk the buttons (wrapping at the ends, reversed in RTL), `Home`/`End` jump to the ends, `Enter`/`Space` activate a button and `Escape` gives the focus back to the editor; disabled buttons are skipped. This follows the WAI-ARIA authoring practices for a `role="toolbar"` widget, and the focus is moved programmatically, so it also works with the default `allowTabNavigation: false`, where the buttons take no part in the page tab order. On a button with a dropdown, `ArrowDown` opens it and focuses the first item, `ArrowDown`/`ArrowUp` walk the items, and `Escape` or `ArrowUp` on the first item close it and return to the button. Reaching the toolbar is the regular `focusToolbar` command, so it can be remapped like any other (`commandToHotkeys: { focusToolbar: 'alt+0' }`) or called with `execCommand`. Requested by [@cut2run](https://github.com/cut2run).
17
+
18
+ #### :bug: Bug Fix
19
+
20
+ - A toolbar button focused from the keyboard right after a mouse click showed no highlight in Chrome: a modifier shortcut such as `Alt+F10` does not switch the browser to keyboard modality, so `:focus-visible` never matched. Toolbar buttons are never focused by the mouse (`mousedown` is prevented to keep the selection), so they now highlight plain `:focus`.
21
+
22
+ ## 4.15.10
23
+
24
+ #### :bug: Bug Fix
25
+
26
+ - [#1184](https://github.com/xdan/jodit/issues/1184) Clicking an image wrapped in a `contenteditable="false"` element (for example `<picture contenteditable="false"><img></picture>`) left the caret stuck: the arrow keys could not move it past the image. Selecting a node put the range inside that non-editable island — the browser cannot place a caret there, so there was nothing for the arrow keys to move. `select()` now selects the outermost non-editable ancestor instead, so the range stays in editable content and the caret steps over the element as usual. Selecting an editable node, and `select(node, true)`, are unchanged.
27
+
12
28
  ## 4.15.9
13
29
 
14
30
  #### :bug: Bug Fix
package/README.md CHANGED
@@ -7,6 +7,13 @@
7
7
  &nbsp;
8
8
  <a href="https://xdsoft.net/jodit/pro/"><img src="https://img.shields.io/badge/Get%20Jodit%20PRO%20%E2%86%92-F5A623?style=for-the-badge" height="34" alt="Get Jodit PRO"></a>
9
9
  </p>
10
+ <p>
11
+ <a href="https://www.npmjs.com/package/jodit"><img src="https://img.shields.io/npm/v/jodit?style=flat-square&labelColor=1F2937&color=4B5563" alt="npm version"></a>
12
+ <a href="https://www.npmjs.com/package/jodit"><img src="https://img.shields.io/npm/dm/jodit?style=flat-square&label=jodit&labelColor=1F2937&color=4B5563" alt="jodit downloads per month"></a>
13
+ <a href="https://www.npmjs.com/package/jodit-react"><img src="https://img.shields.io/npm/dm/jodit-react?style=flat-square&label=jodit-react&labelColor=1F2937&color=4B5563" alt="jodit-react downloads per month"></a>
14
+ <a href="https://github.com/xdan/jodit/actions/workflows/tests.yml"><img src="https://img.shields.io/github/actions/workflow/status/xdan/jodit/tests.yml?branch=main&style=flat-square&label=tests&labelColor=1F2937" alt="Tests"></a>
15
+ <a href="https://github.com/xdan/jodit/blob/main/LICENSE.txt"><img src="https://img.shields.io/npm/l/jodit?style=flat-square&labelColor=1F2937&color=4B5563" alt="MIT license"></a>
16
+ </p>
10
17
  </div>
11
18
 
12
19
  <br>
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.15.9
4
+ * Version: v4.15.13
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2757,6 +2757,11 @@ a + .jodit-file-browser-tree__source-title {
2757
2757
  opacity: 0.3;
2758
2758
  pointer-events: none;
2759
2759
  }
2760
+ .jodit-toolbar-button__button:focus:not([disabled]) {
2761
+ background-color: var(--jd-color-button-background-hover);
2762
+ opacity: 1;
2763
+ outline: 0;
2764
+ }
2760
2765
  .jodit-toolbar-button__trigger {
2761
2766
  display: flex;
2762
2767
  height: 100%;
@@ -2768,6 +2773,11 @@ a + .jodit-file-browser-tree__source-title {
2768
2773
  --jd-button-trigger-size: 14px;
2769
2774
  width: calc(var(--jd-button-trigger-size, 14px) + 2px);
2770
2775
  }
2776
+ .jodit-toolbar-button__trigger:focus:not([disabled]) {
2777
+ background-color: var(--jd-color-button-background-hover);
2778
+ opacity: 1;
2779
+ outline: 0;
2780
+ }
2771
2781
  .jodit-toolbar-button__trigger:hover:not([disabled]),
2772
2782
  .jodit-toolbar-button__trigger:focus-visible:not([disabled]) {
2773
2783
  background-color: var(--jd-color-button-background-hover);
@@ -3486,6 +3496,11 @@ a + .jodit-file-browser-tree__source-title {
3486
3496
  opacity: 0.3;
3487
3497
  pointer-events: none;
3488
3498
  }
3499
+ .jodit-toolbar-select__button:focus:not([disabled]) {
3500
+ background-color: var(--jd-color-button-background-hover);
3501
+ opacity: 1;
3502
+ outline: 0;
3503
+ }
3489
3504
  .jodit-toolbar-select__trigger {
3490
3505
  display: flex;
3491
3506
  height: 100%;
@@ -3497,6 +3512,11 @@ a + .jodit-file-browser-tree__source-title {
3497
3512
  --jd-button-trigger-size: 14px;
3498
3513
  width: calc(var(--jd-button-trigger-size, 14px) + 2px);
3499
3514
  }
3515
+ .jodit-toolbar-select__trigger:focus:not([disabled]) {
3516
+ background-color: var(--jd-color-button-background-hover);
3517
+ opacity: 1;
3518
+ outline: 0;
3519
+ }
3500
3520
  .jodit-toolbar-select__trigger:hover:not([disabled]),
3501
3521
  .jodit-toolbar-select__trigger:focus-visible:not([disabled]) {
3502
3522
  background-color: var(--jd-color-button-background-hover);