jodit 4.19.5 → 4.19.7

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 (85) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +21 -8
  4. package/es2015/jodit.js +847 -155
  5. package/es2015/jodit.min.js +21 -8
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +20 -7
  13. package/es2018/jodit.min.js +21 -8
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +21 -8
  18. package/es2021/jodit.js +832 -154
  19. package/es2021/jodit.min.js +69 -56
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +31 -18
  28. package/es2021.en/jodit.js +832 -154
  29. package/es2021.en/jodit.min.js +31 -18
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +947 -166
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +31 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/selection/helpers/move-node-inside-start.js +5 -2
  53. package/esm/core/selection/style/apply-style.js +31 -2
  54. package/esm/jodit.js +14 -2
  55. package/esm/plugins/backspace/cases/check-join-neighbors.js +36 -7
  56. package/esm/plugins/backspace/cases/check-remove-empty-parent.js +3 -1
  57. package/esm/plugins/bold/bold.js +4 -1
  58. package/esm/plugins/delete/delete.d.ts +12 -0
  59. package/esm/plugins/delete/delete.js +50 -1
  60. package/esm/plugins/link/config.d.ts +31 -0
  61. package/esm/plugins/link/config.js +3 -0
  62. package/esm/plugins/link/link.d.ts +27 -0
  63. package/esm/plugins/link/link.js +144 -2
  64. package/esm/plugins/link/tlds.d.ts +18 -0
  65. package/esm/plugins/link/tlds.js +33 -0
  66. package/esm/plugins/link/typed-link.d.ts +23 -0
  67. package/esm/plugins/link/typed-link.js +92 -0
  68. package/esm/plugins/resize-cells/resize-cells.d.ts +25 -1
  69. package/esm/plugins/resize-cells/resize-cells.js +84 -15
  70. package/esm/plugins/select/select.d.ts +35 -0
  71. package/esm/plugins/select/select.js +153 -1
  72. package/esm/plugins/select-cells/select-cells.d.ts +24 -0
  73. package/esm/plugins/select-cells/select-cells.js +81 -18
  74. package/esm/types/style.d.ts +5 -0
  75. package/package.json +1 -1
  76. package/types/config.d.ts +31 -0
  77. package/types/plugins/delete/delete.d.ts +12 -0
  78. package/types/plugins/link/config.d.ts +31 -0
  79. package/types/plugins/link/link.d.ts +27 -0
  80. package/types/plugins/link/tlds.d.ts +18 -0
  81. package/types/plugins/link/typed-link.d.ts +23 -0
  82. package/types/plugins/resize-cells/resize-cells.d.ts +25 -1
  83. package/types/plugins/select/select.d.ts +35 -0
  84. package/types/plugins/select-cells/select-cells.d.ts +24 -0
  85. package/types/types/style.d.ts +5 -0
@@ -46,6 +46,41 @@ export declare class select extends Plugin {
46
46
  * of the end (#1296); move it to the end of the item's own text.
47
47
  */
48
48
  protected onClickRightOfNestedListItem(e: MouseEvent): void;
49
+ /**
50
+ * The row a press to its right was beside, and the caret it put there,
51
+ * while the button is down
52
+ */
53
+ private __pressBesideRow;
54
+ /**
55
+ * The table row the mouse is to the right of
56
+ */
57
+ private __rowBeside;
58
+ /**
59
+ * A press to the right of a table row puts the caret where Word's typing
60
+ * goes from there: the start of the next row's first cell, or of the block
61
+ * after the table for the last row (#1770). The browsers put it after the
62
+ * table, whichever row it's beside, so typing starts a new line below it.
63
+ * Their own press is stopped, as its drag would start after the table and
64
+ * take in the rows below first
65
+ */
66
+ protected onMouseDownBesideTableRow(e: MouseEvent): void;
67
+ /**
68
+ * A drag from beside a row selects from the end of the row to the mouse,
69
+ * and back beside the row it's the caret again
70
+ */
71
+ private __onDragFromRow;
72
+ /**
73
+ * In iframe mode, a press in an editor without the focus puts the caret at
74
+ * its end, so a release that selected nothing puts it back
75
+ */
76
+ private __onReleaseFromRow;
77
+ private __endPressBesideRow;
78
+ /**
79
+ * A double click beside a row is two clicks there, so add-new-line,
80
+ * which adds a line on a double click with a caret, doesn't see it
81
+ */
82
+ private __onDblClickBesideRow;
83
+ private __putCaretBesideRow;
49
84
  /**
50
85
  * Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
51
86
  * a collapsed cursor leaves empty marker elements with the caret inside; a
@@ -49,11 +49,28 @@ export declare class selectCells extends Plugin {
49
49
  * User is selecting cells now
50
50
  */
51
51
  private __isSelectionMode;
52
+ /**
53
+ * The cell the marks were last drawn to
54
+ */
55
+ private __movedTo;
56
+ /**
57
+ * A drag let go outside the table ends in a click on the editor, which
58
+ * would unmark its cells
59
+ */
60
+ private __keepMarks;
52
61
  /**
53
62
  * Mouse click inside the table
54
63
  */
55
64
  protected onStartSelection(cell: HTMLTableCellElement, event?: MouseEvent): void | false;
56
65
  protected onOutsideClick(): void;
66
+ protected onMouseDown(): void;
67
+ /**
68
+ * The click that ends a drag let go outside the table, and inside the
69
+ * editor, lands on the editor. Taken on, it would unmark the cells and
70
+ * close their popup. As for the click on a row after a drag over the
71
+ * cells, the browser's own selection from the drag goes
72
+ */
73
+ private __onClickAfterDrag;
57
74
  protected onChange(): void;
58
75
  /**
59
76
  * Mouse move inside the table
@@ -67,6 +84,13 @@ export declare class selectCells extends Plugin {
67
84
  * Stop a selection process
68
85
  */
69
86
  private __onStopSelection;
87
+ /**
88
+ * A drag let go outside the table doesn't reach the table's `mouseup`, so
89
+ * the window's ends it, leaving the cells marked as they were (#1774)
90
+ */
91
+ private __onRelease;
92
+ private __showCellsPopup;
93
+ private __stopListening;
70
94
  /**
71
95
  * Remove selection for all cells
72
96
  */
@@ -17,6 +17,11 @@ export interface IStyleOptions {
17
17
  element?: HTMLTagNames;
18
18
  attributes?: IAttributes;
19
19
  defaultTag?: HTMLTagNames;
20
+ /**
21
+ * Tags the element takes the place of: the selection is taken out of
22
+ * them first, as subscript and superscript take each other's place
23
+ */
24
+ exclude?: HTMLTagNames[];
20
25
  hooks?: {
21
26
  beforeWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;
22
27
  afterWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;