jodit 4.2.24 → 4.2.27

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 (96) hide show
  1. package/CHANGELOG.md +24 -5
  2. package/es2015/jodit.css +4 -2
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +166 -76
  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 +33 -7
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  13. package/es2018/jodit.css +4 -2
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +2 -2
  16. package/es2018/jodit.js +166 -76
  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 +33 -7
  23. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  24. package/es2021/jodit.css +4 -2
  25. package/es2021/jodit.fat.min.css +1 -1
  26. package/es2021/jodit.fat.min.js +2 -2
  27. package/es2021/jodit.js +166 -76
  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 +33 -7
  34. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  35. package/es2021.en/jodit.css +4 -2
  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 +101 -57
  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 +3 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  46. package/es5/jodit.css +11 -6
  47. package/es5/jodit.fat.min.css +1 -1
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +167 -76
  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 +33 -7
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  57. package/esm/core/constants.js +3 -3
  58. package/esm/core/dom/dom.d.ts +2 -1
  59. package/esm/core/dom/dom.js +10 -4
  60. package/esm/core/global.js +4 -1
  61. package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
  62. package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
  63. package/esm/core/ui/button/tooltip/tooltip.js +11 -5
  64. package/esm/langs/ua.d.ts +212 -0
  65. package/esm/langs/ua.js +225 -0
  66. package/esm/languages.js +2 -0
  67. package/esm/modules/table/table.d.ts +2 -3
  68. package/esm/modules/table/table.js +27 -34
  69. package/esm/plugins/add-new-line/add-new-line.js +4 -1
  70. package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
  71. package/esm/plugins/hotkeys/hotkeys.js +4 -2
  72. package/esm/plugins/line-height/langs/index.d.ts +2 -1
  73. package/esm/plugins/line-height/langs/index.js +2 -1
  74. package/esm/plugins/line-height/langs/ua.d.ts +4 -0
  75. package/esm/plugins/line-height/langs/ua.js +9 -0
  76. package/esm/plugins/select-cells/select-cells.js +1 -1
  77. package/esm/plugins/speech-recognize/langs/index.d.ts +2 -1
  78. package/esm/plugins/speech-recognize/langs/index.js +2 -1
  79. package/esm/plugins/speech-recognize/langs/ua.d.ts +9 -0
  80. package/esm/plugins/speech-recognize/langs/ua.js +14 -0
  81. package/esm/plugins/spellcheck/langs/index.d.ts +2 -1
  82. package/esm/plugins/spellcheck/langs/index.js +2 -1
  83. package/esm/plugins/spellcheck/langs/ua.d.ts +1 -0
  84. package/esm/plugins/spellcheck/langs/ua.js +9 -0
  85. package/esm/plugins/table/config.js +19 -3
  86. package/package.json +1 -1
  87. package/types/core/dom/dom.d.ts +2 -1
  88. package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
  89. package/types/langs/ua.d.ts +212 -0
  90. package/types/modules/table/table.d.ts +2 -3
  91. package/types/plugins/line-height/langs/index.d.ts +2 -1
  92. package/types/plugins/line-height/langs/ua.d.ts +4 -0
  93. package/types/plugins/speech-recognize/langs/index.d.ts +2 -1
  94. package/types/plugins/speech-recognize/langs/ua.d.ts +9 -0
  95. package/types/plugins/spellcheck/langs/index.d.ts +2 -1
  96. package/types/plugins/spellcheck/langs/ua.d.ts +1 -0
@@ -0,0 +1,225 @@
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-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+
7
+ export default {
8
+ 'Type something': 'Напишіть щось',
9
+ 'About Jodit': 'Про Jodit',
10
+ 'Jodit Editor': 'Редактор Jodit',
11
+ "Jodit User's Guide": 'Jodit інструкція користувача',
12
+ 'contains detailed help for using':
13
+ 'містить детальну інформацію щодо користування',
14
+ 'For information about the license, please go to our website:':
15
+ 'Щоб дізнатись більше про ліцензію , будь ласка, перейдіть на наш сайт:',
16
+ 'Buy full version': 'Купити повну версію',
17
+ 'Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.':
18
+ 'Авторські права © XDSoft.net - Чупурнов Валерій. Всі права захищені.',
19
+ Anchor: 'Анкор',
20
+ 'Open in new tab': 'Відкрити у новій вкладці',
21
+ 'Open in fullsize': 'Відкрити редактор в повному розмірі',
22
+ 'Clear Formatting': 'Очистити форматування',
23
+ 'Fill color or set the text color': 'Колір заливки або колір текста',
24
+ Redo: 'Повторити',
25
+ Undo: 'Відмінити',
26
+ Bold: 'Жирний',
27
+ Italic: 'Курсів',
28
+ 'Insert Unordered List': 'Вставити невпорядкований список',
29
+ 'Insert Ordered List': 'Вставити нумерованний список',
30
+ 'Align Center': 'Вирівняти по центру',
31
+ 'Align Justify': 'Вирівняти по ширині',
32
+ 'Align Left': 'Вирівняти по лівому краю',
33
+ 'Align Right': 'Вирівняти по правому краю',
34
+ 'Insert Horizontal Line': 'Вставити горизонтальну лінію',
35
+ 'Insert Image': 'Вставити зображення',
36
+ 'Insert file': 'Вставити файл',
37
+ 'Insert youtube/vimeo video': 'Вставити відео',
38
+ 'Insert link': 'Вставити посилання',
39
+ 'Font size': 'Розмір шрифту',
40
+ 'Font family': 'Шрифт',
41
+ 'Insert format block': 'Вставити блочний елемент',
42
+ Normal: 'Нормальний текст',
43
+ 'Heading 1': 'Заголовок 1',
44
+ 'Heading 2': 'Заголовок 2',
45
+ 'Heading 3': 'Заголовок 3',
46
+ 'Heading 4': 'Заголовок 4',
47
+ Quote: 'Цитата',
48
+ Code: 'Код',
49
+ Insert: 'Вставити',
50
+ 'Insert table': 'Вставити таблицю',
51
+ 'Decrease Indent': 'Збільшити відступ',
52
+ 'Increase Indent': 'Зменшити відступ',
53
+ 'Select Special Character': 'Оберіть спеціальный символ',
54
+ 'Insert Special Character': 'Вставити спеціальный символ',
55
+ 'Paint format': 'Формат краски',
56
+ 'Change mode': 'Джерело',
57
+ Margins: 'Відступи',
58
+ top: 'зверху',
59
+ right: 'справа',
60
+ bottom: 'знизу',
61
+ left: 'зліва',
62
+ Styles: 'Стилі',
63
+ Classes: 'Класи',
64
+ Align: 'Вирівнювання',
65
+ Right: 'По правому краю',
66
+ Center: 'По центру',
67
+ Left: 'По лівому краю',
68
+ '--Not Set--': '--не встановлено--',
69
+ Src: 'src',
70
+ Title: 'Заголовок',
71
+ Alternative: 'Альтернативний текст (alt)',
72
+ Link: 'Посилання',
73
+ 'Open link in new tab': 'Відкрити посилання в новій вкладці',
74
+ file: 'Файл',
75
+ Advanced: 'Розширені',
76
+ 'Image properties': 'Властивості зображення',
77
+ Cancel: 'Відміна',
78
+ Ok: 'Ок',
79
+ 'Your code is similar to HTML. Keep as HTML?':
80
+ 'Текст, який Ви намагаєтесь вставити схожий на HTML. Вставити його як HTML?',
81
+ 'Paste as HTML': 'Вставити його як HTML',
82
+ Keep: 'Зберегти оригінал',
83
+ Clean: 'Почистити',
84
+ 'Insert as Text': 'Вставити як текст',
85
+ 'Insert only Text': 'Вставити тільки текст',
86
+ 'Word Paste Detected': 'Можливо це фрагмент Word або Excel',
87
+ 'The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?':
88
+ 'Ви вставляєте контент з документа Microsoft Word або Excel. Бажаєте зберегти форматування?',
89
+ 'File Browser': 'Браузер файлів',
90
+ 'Error on load list': 'Помилка при завантаженні списку зображень',
91
+ 'Error on load folders': 'Помилка при завантаженні списку папок',
92
+ 'Are you sure?': 'Ви впевнені?',
93
+ 'Enter Directory name': 'Введіть назву папки',
94
+ 'Create directory': 'Створити папку',
95
+ 'type name': 'введіть назву',
96
+ 'Drop image': 'Перетягніть зображення сюди',
97
+ 'Drop file': 'Перетягніть файл сюди',
98
+ 'or click': 'або клікніть',
99
+ 'Alternative text': 'Альтернативный текст',
100
+ Browse: 'Сервер',
101
+ Upload: 'Завантаження',
102
+ Background: 'Фон',
103
+ Text: 'Текст',
104
+ Top: ' Вгору',
105
+ Middle: 'По центру',
106
+ Bottom: 'Донизу',
107
+ 'Insert column before': 'Вставити стовпець до',
108
+ 'Insert column after': 'Вставити стовпець після',
109
+ 'Insert row above': 'Вставити рядок вище',
110
+ 'Insert row below': 'Вставити рядок нижче',
111
+ 'Delete table': 'Видалити таблицю',
112
+ 'Delete row': 'Видалити рядок',
113
+ 'Delete column': 'Видалити стовпчик',
114
+ 'Empty cell': 'Очистити кліинку',
115
+ source: 'HTML',
116
+ bold: 'жирний',
117
+ italic: 'курсів',
118
+ brush: 'заливка',
119
+ link: 'посилання',
120
+ undo: 'відмінити',
121
+ redo: 'повторити',
122
+ table: 'таблиця',
123
+ image: 'зображення',
124
+ eraser: 'видалення',
125
+ paragraph: 'параграф',
126
+ fontsize: 'розмір шрифту',
127
+ video: 'відео',
128
+ font: 'шрифт',
129
+ about: 'про редактор',
130
+ print: 'друк',
131
+ underline: 'підкреслений',
132
+ strikethrough: 'закреслений',
133
+ indent: 'відступ',
134
+ outdent: 'заступ',
135
+ fullsize: 'на весь екран',
136
+ shrink: 'звичайний розмір',
137
+ hr: 'лінія',
138
+ ul: 'Список',
139
+ ol: 'Нумерований список',
140
+ cut: 'Вирізати',
141
+ selectall: 'Виділити все',
142
+ 'Embed code': 'Код',
143
+ 'Open link': 'Відкрити посилання',
144
+ 'Edit link': 'Редагувати посилання',
145
+ 'No follow': 'Атрибут nofollow',
146
+ Unlink: 'Видалити посилання',
147
+ Eye: 'Перегляд',
148
+ pencil: 'Редагування',
149
+ Update: 'Оновити',
150
+ ' URL': 'URL',
151
+ Edit: 'Редагувати',
152
+ 'Horizontal align': 'Горизонтальне вирівнювання',
153
+ Filter: 'Фільтр',
154
+ 'Sort by changed': 'Сортувати за зміною',
155
+ 'Sort by name': "Сортувати за ім'ям",
156
+ 'Sort by size': 'Сортувати за розміром',
157
+ 'Add folder': 'Додати папку',
158
+ Reset: 'Відновити',
159
+ Save: 'Зберегти',
160
+ 'Save as ...': 'Зберегти як',
161
+ Resize: 'Змінити розмір',
162
+ Crop: 'Обрізати розмір',
163
+ Width: 'Ширина',
164
+ Height: 'Висота',
165
+ 'Keep Aspect Ratio': 'Зберегти пропорції',
166
+ Yes: 'Так',
167
+ No: 'Ні',
168
+ Remove: 'Видалити',
169
+ Select: 'Вибрати',
170
+ 'Chars: %d': 'Символів: %d',
171
+ 'Words: %d': 'Слів: %d',
172
+ All: 'Вибрати все',
173
+ 'Select %s': 'Вибрати: %s',
174
+ 'Select all': 'Вибрати все',
175
+ 'Vertical align': 'Вертикальне вирівнювання',
176
+ Split: 'Розділити',
177
+ 'Split vertical': 'Розділити по вертикалі',
178
+ 'Split horizontal': 'Розділити по горизонталі',
179
+ Merge: "Об'єднати в одну",
180
+ 'Add column': 'Додати стовпчик',
181
+ 'Add row': 'Додати рядок',
182
+ Delete: 'Видалити',
183
+ Border: 'Рамка',
184
+ 'License: %s': 'Ліцензія: %s',
185
+ 'Strike through': 'Закреслений',
186
+ Underline: 'Підкреслений',
187
+ superscript: 'верхній індекс',
188
+ subscript: 'індекс',
189
+ 'Cut selection': 'Обрізати вибране',
190
+ Break: 'Межа',
191
+ 'Search for': 'Шукати',
192
+ 'Replace with': 'Замінити на',
193
+ Replace: 'Замінити',
194
+ Paste: 'Вставити',
195
+ 'Choose Content to Paste': 'Обрати контент для вставки',
196
+ 'You can only edit your own images. Download this image on the host?':
197
+ 'Ви можете редагувати лише власні зображення. Завантажити зображення на ваш сервер?',
198
+ 'The image has been successfully uploaded to the host!':
199
+ 'Зображення успішно завантажено на сервер!',
200
+ palette: 'палітра',
201
+ 'There are no files': 'Файли відсутні',
202
+ Rename: 'Змінити назву',
203
+ 'Enter new name': "Введіть нове імя'",
204
+ preview: 'Попередній перегляд',
205
+ download: 'Завантажити',
206
+ 'Paste from clipboard': 'Вставити з буфера обміну',
207
+ "Your browser doesn't support direct access to the clipboard.":
208
+ 'Ваш браузер не підтримує доступ до буфера обміну.',
209
+ 'Copy selection': 'Копіювати виділене',
210
+ copy: 'копія',
211
+ 'Border radius': 'Радіус рамки',
212
+ 'Show all': 'Показати все',
213
+ Apply: 'Застосувати',
214
+ 'Please fill out this field': 'Будь ласка, заповніть це поле',
215
+ 'Please enter a web address': 'Будь ласка, введіть веб-адресу',
216
+ Default: 'За замовченням',
217
+ Circle: 'Коло',
218
+ Dot: 'Крапка',
219
+ Quadrate: 'Квадрат',
220
+ Find: 'Знайти',
221
+ 'Find Previous': 'Знайти попередні',
222
+ 'Find Next': 'Знайти наступні',
223
+ 'Insert className': 'Вставити клас',
224
+ 'Press Alt for custom resizing': 'Натисніть Alt для зміни розміру'
225
+ };
package/esm/languages.js CHANGED
@@ -24,6 +24,7 @@ import pl from "./langs/pl.js";
24
24
  import pt_br from "./langs/pt_br.js";
25
25
  import ru from "./langs/ru.js";
26
26
  import tr from "./langs/tr.js";
27
+ import ua from "./langs/ua.js";
27
28
  import zh_cn from "./langs/zh_cn.js";
28
29
  import zh_tw from "./langs/zh_tw.js";
29
30
  let exp = {};
@@ -47,6 +48,7 @@ exp = {
47
48
  pt_br,
48
49
  ru,
49
50
  tr,
51
+ ua,
50
52
  zh_cn,
51
53
  zh_tw
52
54
  };
@@ -62,11 +62,10 @@ export declare class Table extends ViewComponent<IJodit> {
62
62
  * Remove row
63
63
  */
64
64
  removeRow(table: HTMLTableElement, rowIndex: number): void;
65
- private static __appendColumn;
66
65
  /**
67
66
  * Insert column before / after all the columns containing the selected cells
68
67
  */
69
- appendColumn(table: HTMLTableElement, j: number, after: boolean): void;
68
+ appendColumn(table: HTMLTableElement, selectedCell: HTMLTableCellElement, insertAfter?: boolean): void;
70
69
  private static __removeColumn;
71
70
  /**
72
71
  * Remove column by index
@@ -86,7 +85,7 @@ export declare class Table extends ViewComponent<IJodit> {
86
85
  normalizeTable(table: HTMLTableElement): void;
87
86
  private static __mergeSelected;
88
87
  /**
89
- * It combines all of the selected cells into one. The contents of the cells will also be combined
88
+ * It combines all the selected cells into one. The contents of the cells will also be combined
90
89
  */
91
90
  mergeSelected(table: HTMLTableElement): void;
92
91
  private static __splitHorizontal;
@@ -254,46 +254,39 @@ export class Table extends ViewComponent {
254
254
  removeRow(table, rowIndex) {
255
255
  return Table.__removeRow(table, rowIndex);
256
256
  }
257
- static __appendColumn(table, j, after, create) {
257
+ /**
258
+ * Insert column before / after all the columns containing the selected cells
259
+ */
260
+ appendColumn(table, selectedCell, insertAfter = true) {
258
261
  const box = Table.__formalMatrix(table);
259
- let i;
260
- if (j === undefined || j < 0) {
261
- j = Table.__getColumnsCount(table) - 1;
262
+ if (!insertAfter && Dom.isCell(selectedCell.previousElementSibling)) {
263
+ return this.appendColumn(table, selectedCell.previousElementSibling, true);
262
264
  }
263
- for (i = 0; i < box.length; i += 1) {
264
- const cell = create.element('td');
265
- const td = box[i][j];
266
- let added = false;
267
- if (after) {
268
- if ((box[i] && td && j + 1 >= box[i].length) ||
269
- td !== box[i][j + 1]) {
270
- if (td.nextSibling) {
271
- Dom.before(td.nextSibling, cell);
272
- }
273
- else {
274
- td.parentNode && td.parentNode.appendChild(cell);
275
- }
276
- added = true;
265
+ const columnIndex = insertAfter
266
+ ? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
267
+ : selectedCell.cellIndex;
268
+ const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
269
+ for (let i = 0; i < box.length;) {
270
+ const cells = box[i];
271
+ if (cells[columnIndex] !== cells[newColumnIndex] ||
272
+ columnIndex === newColumnIndex) {
273
+ const cell = this.j.createInside.element('td');
274
+ if (insertAfter) {
275
+ Dom.after(cells[columnIndex], cell);
277
276
  }
278
- }
279
- else {
280
- if (j - 1 < 0 ||
281
- (box[i][j] !== box[i][j - 1] && box[i][j].parentNode)) {
282
- Dom.before(box[i][j], cell);
283
- added = true;
277
+ else {
278
+ Dom.before(cells[columnIndex], cell);
279
+ }
280
+ if (cells[columnIndex].rowSpan > 1) {
281
+ cell.rowSpan = cells[columnIndex].rowSpan;
284
282
  }
285
283
  }
286
- if (!added) {
287
- attr(box[i][j], 'colspan', parseInt(attr(box[i][j], 'colspan') || '1', 10) + 1);
284
+ else {
285
+ cells[columnIndex].colSpan += 1;
288
286
  }
287
+ i += cells[columnIndex].rowSpan || 1;
289
288
  }
290
289
  }
291
- /**
292
- * Insert column before / after all the columns containing the selected cells
293
- */
294
- appendColumn(table, j, after) {
295
- return Table.__appendColumn(table, j, after, this.j.createInside);
296
- }
297
290
  static __removeColumn(table, j) {
298
291
  const box = Table.__formalMatrix(table);
299
292
  let dec;
@@ -511,7 +504,7 @@ export class Table extends ViewComponent {
511
504
  alreadyMerged.delete(first);
512
505
  Table.__unmark(__marked);
513
506
  Table.__normalizeTable(table);
514
- toArray(table.rows).forEach((tr, index) => {
507
+ toArray(table.rows).forEach(tr => {
515
508
  if (!tr.cells.length) {
516
509
  Dom.safeRemove(tr);
517
510
  }
@@ -520,7 +513,7 @@ export class Table extends ViewComponent {
520
513
  }
521
514
  }
522
515
  /**
523
- * It combines all of the selected cells into one. The contents of the cells will also be combined
516
+ * It combines all the selected cells into one. The contents of the cells will also be combined
524
517
  */
525
518
  mergeSelected(table) {
526
519
  return Table.__mergeSelected(table, this.j);
@@ -120,7 +120,9 @@ export class addNewLine extends Plugin {
120
120
  editor.e
121
121
  .off(editor.editor, '.' + ns)
122
122
  .off(editor.container, '.' + ns)
123
+ .off('.' + ns)
123
124
  .on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
125
+ .on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
124
126
  .on(editor.editor, 'click' + '.' + ns, this.__hide)
125
127
  .on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
126
128
  .on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
@@ -208,7 +210,8 @@ export class addNewLine extends Plugin {
208
210
  Dom.safeRemove(this.__line);
209
211
  this.j.e
210
212
  .off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
211
- .off(this.j.container, '.' + ns);
213
+ .off(this.j.container, '.' + ns)
214
+ .off('.' + ns);
212
215
  }
213
216
  }
214
217
  __decorate([
@@ -5,13 +5,21 @@
5
5
  */
6
6
  import { INSEPARABLE_TAGS } from "../../../../../core/constants.js";
7
7
  import { Dom } from "../../../../../core/dom/dom.js";
8
+ const TABLE_CONTAINER_TAGS = new Set([
9
+ 'table',
10
+ 'tbody',
11
+ 'thead',
12
+ 'tfoot',
13
+ 'tr'
14
+ ]);
8
15
  /**
9
16
  * @private
10
17
  */
11
18
  export function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
12
19
  if (jodit.o.cleanHTML.fillEmptyParagraph &&
13
20
  Dom.isBlock(nodeElm) &&
14
- Dom.isEmpty(nodeElm, INSEPARABLE_TAGS)) {
21
+ Dom.isEmpty(nodeElm, INSEPARABLE_TAGS) &&
22
+ !Dom.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
15
23
  const br = jodit.createInside.element('br');
16
24
  nodeElm.appendChild(br);
17
25
  return true;
@@ -15,7 +15,8 @@ export class hotkeys extends Plugin {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.onKeyPress = (event) => {
18
- const special = this.specialKeys[event.which], character = (event.key || String.fromCharCode(event.which)).toLowerCase();
18
+ const special = this.specialKeys[event.which];
19
+ const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
19
20
  const modif = [special || character];
20
21
  ['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
21
22
  if (event[specialKey + 'Key'] && special !== specialKey) {
@@ -109,7 +110,8 @@ export class hotkeys extends Plugin {
109
110
  }
110
111
  })
111
112
  .on('keydown.hotkeys', (event) => {
112
- const shortcut = this.onKeyPress(event), stop = {
113
+ const shortcut = this.onKeyPress(event);
114
+ const stop = {
113
115
  shouldStop: true
114
116
  };
115
117
  const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
@@ -22,6 +22,7 @@ import * as pl from "./pl.js";
22
22
  import * as pt_br from "./pt_br.js";
23
23
  import * as ru from "./ru.js";
24
24
  import * as tr from "./tr.js";
25
+ import * as ua from "./ua.js";
25
26
  import * as zh_cn from "./zh_cn.js";
26
27
  import * as zh_tw from "./zh_tw.js";
27
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
28
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -22,6 +22,7 @@ import * as pl from "./pl.js";
22
22
  import * as pt_br from "./pt_br.js";
23
23
  import * as ru from "./ru.js";
24
24
  import * as tr from "./tr.js";
25
+ import * as ua from "./ua.js";
25
26
  import * as zh_cn from "./zh_cn.js";
26
27
  import * as zh_tw from "./zh_tw.js";
27
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
28
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -0,0 +1,4 @@
1
+ declare const _exports: {
2
+ 'Line height': string;
3
+ };
4
+ export = _exports;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*!
3
+ * Jodit Editor (https://xdsoft.net/jodit/)
4
+ * Released under MIT see LICENSE.txt in the project root for license information.
5
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
6
+ */
7
+ export default {
8
+ 'Line height': 'Висота лінії'
9
+ };
@@ -283,7 +283,7 @@ export class selectCells extends Plugin {
283
283
  break;
284
284
  case 'addcolumnafter':
285
285
  case 'addcolumnbefore':
286
- this.__tableModule.appendColumn(table, cell.cellIndex, command === 'addcolumnafter');
286
+ this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
287
287
  break;
288
288
  case 'addrowafter':
289
289
  case 'addrowbefore':
@@ -22,6 +22,7 @@ import * as pl from "./pl.js";
22
22
  import * as pt_br from "./pt_br.js";
23
23
  import * as ru from "./ru.js";
24
24
  import * as tr from "./tr.js";
25
+ import * as ua from "./ua.js";
25
26
  import * as zh_cn from "./zh_cn.js";
26
27
  import * as zh_tw from "./zh_tw.js";
27
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
28
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -23,6 +23,7 @@ import * as pl from "./pl.js";
23
23
  import * as pt_br from "./pt_br.js";
24
24
  import * as ru from "./ru.js";
25
25
  import * as tr from "./tr.js";
26
+ import * as ua from "./ua.js";
26
27
  import * as zh_cn from "./zh_cn.js";
27
28
  import * as zh_tw from "./zh_tw.js";
28
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
29
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -0,0 +1,9 @@
1
+ declare const _exports: {
2
+ newline: string;
3
+ delete: string;
4
+ space: string;
5
+ 'Speech Recognize': string;
6
+ Sound: string;
7
+ 'Interim Results': string;
8
+ };
9
+ export = _exports;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /*!
3
+ * Jodit Editor (https://xdsoft.net/jodit/)
4
+ * Released under MIT see LICENSE.txt in the project root for license information.
5
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
6
+ */
7
+ export default {
8
+ newline: 'новая строка|перенос|ентер',
9
+ delete: 'видалити',
10
+ space: 'пробел',
11
+ 'Speech Recognize': 'Распознавание речи',
12
+ Sound: 'Звук',
13
+ 'Interim Results': 'Проміжні результати'
14
+ };
@@ -22,6 +22,7 @@ import * as pl from "./pl.js";
22
22
  import * as pt_br from "./pt_br.js";
23
23
  import * as ru from "./ru.js";
24
24
  import * as tr from "./tr.js";
25
+ import * as ua from "./ua.js";
25
26
  import * as zh_cn from "./zh_cn.js";
26
27
  import * as zh_tw from "./zh_tw.js";
27
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
28
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -22,6 +22,7 @@ import * as pl from "./pl.js";
22
22
  import * as pt_br from "./pt_br.js";
23
23
  import * as ru from "./ru.js";
24
24
  import * as tr from "./tr.js";
25
+ import * as ua from "./ua.js";
25
26
  import * as zh_cn from "./zh_cn.js";
26
27
  import * as zh_tw from "./zh_tw.js";
27
- export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, zh_cn, zh_tw };
28
+ export { ar, cs_cz, de, es, fa, fi, fr, he, hu, id, it, ja, ko, mn, nl, pl, pt_br, ru, tr, ua, zh_cn, zh_tw };
@@ -0,0 +1 @@
1
+ export let Spellcheck: string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*!
3
+ * Jodit Editor (https://xdsoft.net/jodit/)
4
+ * Released under MIT see LICENSE.txt in the project root for license information.
5
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
6
+ */
7
+ export default {
8
+ Spellcheck: 'Перевірка орфографії'
9
+ };
@@ -25,6 +25,8 @@ Config.prototype.controls.table = {
25
25
  }
26
26
  },
27
27
  popup: (editor, current, close, button) => {
28
+ editor.editor.normalize();
29
+ const snapshot = editor.history.snapshot.make();
28
30
  const control = button.control;
29
31
  const default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
30
32
  const generateExtraClasses = () => {
@@ -117,10 +119,24 @@ Config.prototype.controls.table = {
117
119
  table.classList.add(className);
118
120
  });
119
121
  });
120
- if (editor.editor.firstChild) {
121
- editor.s.insertNode(crt.text('\n'), false, false);
122
+ editor.s.restore();
123
+ editor.s.removeMarkers();
124
+ editor.editor.normalize();
125
+ editor.history.snapshot.restore(snapshot);
126
+ const block = Dom.furthest(editor.s.current(), Dom.isBlock, editor.editor);
127
+ if (block && Dom.isEmpty(block)) {
128
+ Dom.replace(block, table, undefined, false, true);
129
+ }
130
+ else {
131
+ if (block) {
132
+ const fake = crt.text('\n');
133
+ Dom.after(block, fake);
134
+ Dom.after(fake, table);
135
+ }
136
+ else {
137
+ editor.s.insertNode(table, false);
138
+ }
122
139
  }
123
- editor.s.insertNode(table, false);
124
140
  if (first_td) {
125
141
  editor.s.setCursorIn(first_td);
126
142
  scrollIntoViewIfNeeded(first_td, editor.editor, editor.ed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.2.24",
3
+ "version": "4.2.27",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -45,8 +45,9 @@ export declare class Dom {
45
45
  * // Replace the first <span> element to the < p >
46
46
  * ```
47
47
  */
48
+ static replace<T extends HTMLElement>(elm: Node, newTagName: HTMLTagNames): T;
48
49
  static replace<T extends HTMLElement>(elm: Node, newTagName: HTMLTagNames, create: ICreate, withAttributes?: boolean, notMoveContent?: boolean): T;
49
- static replace<T extends Node>(elm: Node, newTagName: T | string, create: ICreate, withAttributes?: boolean, notMoveContent?: boolean): T;
50
+ static replace<T extends Node>(elm: Node, newTagName: T | string, create?: ICreate, withAttributes?: boolean, notMoveContent?: boolean): T;
50
51
  /**
51
52
  * Checks whether the Node text and blank (in this case it may contain invisible auxiliary characters ,
52
53
  * it is also empty )
@@ -16,6 +16,7 @@ export declare class UITooltip extends UIElement {
16
16
  className(): string;
17
17
  protected render(): string;
18
18
  constructor(view: IViewBased);
19
+ private __onAttach;
19
20
  private __listenClose;
20
21
  private __addListenersOnEnter;
21
22
  private __removeListenersOnLeave;