jodit 4.14.2 → 4.14.3

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 (71) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +7 -7
  4. package/es2015/jodit.js +469 -313
  5. package/es2015/jodit.min.js +5 -5
  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 +7 -7
  13. package/es2018/jodit.min.js +5 -5
  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 +9 -9
  18. package/es2021/jodit.js +456 -304
  19. package/es2021/jodit.min.js +6 -6
  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 +5 -5
  28. package/es2021.en/jodit.js +395 -251
  29. package/es2021.en/jodit.min.js +5 -5
  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 +701 -381
  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/core/constants.js +1 -1
  51. package/esm/core/selection/helpers/index.js +5 -2
  52. package/esm/core/selection/selection.d.ts +8 -5
  53. package/esm/core/selection/selection.js +267 -159
  54. package/esm/core/selection/style/api/extract.js +1 -3
  55. package/esm/core/selection/style/api/is-same-attributes.js +5 -2
  56. package/esm/core/selection/style/api/toggle-attributes.js +27 -10
  57. package/esm/core/selection/style/api/unwrap-children.js +39 -33
  58. package/esm/core/selection/style/apply-style.js +23 -25
  59. package/esm/core/selection/style/commit-style.js +3 -0
  60. package/esm/core/selection/style/transactions.js +2 -1
  61. package/esm/langs/az.d.ts +223 -0
  62. package/esm/langs/az.js +240 -0
  63. package/esm/languages.js +2 -0
  64. package/esm/modules/history/snapshot.js +45 -20
  65. package/esm/types/style.d.ts +2 -2
  66. package/esm/types/types.d.ts +3 -0
  67. package/package.json +1 -1
  68. package/types/core/selection/selection.d.ts +8 -5
  69. package/types/langs/az.d.ts +223 -0
  70. package/types/types/style.d.ts +2 -2
  71. package/types/types/types.d.ts +3 -0
@@ -0,0 +1,240 @@
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-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+
7
+ // Azerbaijani
8
+
9
+ export default {
10
+ 'Type something': 'Mətn daxil edin',
11
+ Advanced: 'Ətraflı',
12
+ 'About Jodit': 'Jodit haqqında',
13
+ 'Jodit Editor': 'Jodit Redaktoru',
14
+ "Jodit User's Guide": 'Jodit istifadəçi bələdçisi',
15
+ 'contains detailed help for using':
16
+ 'istifadə üzrə ətraflı kömək məlumatını əhatə edir',
17
+ 'For information about the license, please go to our website:':
18
+ 'Lisenziya haqqında məlumat üçün veb saytımıza daxil olun:',
19
+ 'Buy full version': 'Tam versiyanı satın al',
20
+ 'Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.':
21
+ 'Copyright © XDSoft.net - Chupurnov Valeriy. Bütün hüquqlar qorunur.',
22
+ Anchor: 'Lövbər',
23
+ 'Open in new tab': 'Yeni vərəqdə aç',
24
+ 'Open in fullsize': 'Tam ölçüdə aç',
25
+ 'Clear Formatting': 'Formatlamanı təmizlə',
26
+ 'Fill color or set the text color':
27
+ 'Doldurma rəngini və ya mətn rəngini təyin et',
28
+ Redo: 'Təkrarla',
29
+ Undo: 'Geri qaytar',
30
+ Bold: 'Qalın',
31
+ Italic: 'Kursiv',
32
+ 'Insert Unordered List': 'Nizamsız siyahı əlavə et',
33
+ 'Insert Ordered List': 'Nömrələnmiş siyahı əlavə et',
34
+ 'Align Center': 'Ortaya düzləndir',
35
+ 'Align Justify': 'Enə görə düzləndir',
36
+ 'Align Left': 'Sola düzləndir',
37
+ 'Align Right': 'Sağa düzləndir',
38
+ 'Insert Horizontal Line': 'Üfüqi xətt əlavə et',
39
+ 'Insert Image': 'Şəkil əlavə et',
40
+ 'Insert file': 'Fayl əlavə et',
41
+ 'Insert youtube/vimeo video': 'Youtube/vimeo video əlavə et',
42
+ 'Insert link': 'Keçid əlavə et',
43
+ 'Font size': 'Şrift ölçüsü',
44
+ 'Font family': 'Şrift ailəsi',
45
+ 'Line height': 'Sətir hündürlüyü',
46
+ Spellcheck: 'Orfoqrafiya yoxlaması',
47
+ 'Speech Recognize': 'Nitqin tanınması',
48
+ newline: 'Yeni sətir',
49
+ 'Insert format block': 'Format bloku əlavə et',
50
+ Normal: 'Normal',
51
+ 'Heading 1': 'Başlıq 1',
52
+ 'Heading 2': 'Başlıq 2',
53
+ 'Heading 3': 'Başlıq 3',
54
+ 'Heading 4': 'Başlıq 4',
55
+ Quote: 'Sitat',
56
+ Code: 'Kod',
57
+ Insert: 'Əlavə et',
58
+ 'Insert table': 'Cədvəl əlavə et',
59
+ 'Decrease Indent': 'Girintini azalt',
60
+ 'Increase Indent': 'Girintini artır',
61
+ 'Select Special Character': 'Xüsusi simvol seç',
62
+ 'Insert Special Character': 'Xüsusi simvol əlavə et',
63
+ 'Paint format': 'Format fırçası',
64
+ 'Change mode': 'Rejimi dəyiş',
65
+ Margins: 'Kənar boşluqlar',
66
+ top: 'Yuxarı',
67
+ right: 'Sağ',
68
+ bottom: 'Aşağı',
69
+ left: 'Sol',
70
+ Styles: 'Üslublar',
71
+ Classes: 'CSS Klasları',
72
+ Align: 'Düzləndirmə',
73
+ Right: 'Sağ',
74
+ Center: 'Mərkəz',
75
+ Left: 'Sol',
76
+ '--Not Set--': '--Təyin edilməyib--',
77
+ Src: 'Mənbə',
78
+ Title: 'Başlıq',
79
+ Alternative: 'Alternativ mətn',
80
+ Link: 'Keçid',
81
+ 'Open link in new tab': 'Keçidi yeni vərəqdə aç',
82
+ Image: 'Şəkil',
83
+ file: 'Fayl',
84
+ 'Image properties': 'Şəkil xassələri',
85
+ Cancel: 'Ləğv et',
86
+ Ok: 'OK',
87
+ 'Your code is similar to HTML. Keep as HTML?':
88
+ 'Kodunuz HTML-ə bənzəyir. HTML kimi saxlanılsın?',
89
+ 'Paste as HTML': 'HTML kimi yerləşdir',
90
+ Keep: 'Saxla',
91
+ Clean: 'Təmizlə',
92
+ 'Insert as Text': 'Mətn kimi əlavə et',
93
+ 'Word Paste Detected': 'Word-dən yapışdırma aşkarlandı',
94
+ 'The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?':
95
+ 'Yerləşdirdiyiniz məzmun Microsoft Word/Excel sənədindəndir. Formatı saxlamaq, yoxsa təmizləmək istəyirsiniz?',
96
+ 'Insert only Text': 'Yalnız mətni əlavə et',
97
+ 'File Browser': 'Fayl brauzeri',
98
+ 'Error on load list': 'Siyahının yüklənməsində xəta',
99
+ 'Error on load folders': 'Qovluqların yüklənməsində xəta',
100
+ 'Are you sure?': 'Əminsiniz?',
101
+ 'Enter Directory name': 'Qovluq adını daxil edin',
102
+ 'Create directory': 'Qovluq yarat',
103
+ 'type name': 'adı yazın',
104
+ 'type dir name': 'qovluq adını yazın',
105
+ 'Drop image': 'Şəkli buraya buraxın',
106
+ 'Drop file': 'Faylı buraya buraxın',
107
+ 'or click': 'və ya buraya klikləyin',
108
+ 'Alternative text': 'Alternativ mətn',
109
+ Browse: 'Seç',
110
+ Upload: 'Yüklə',
111
+ Background: 'Arxa fon',
112
+ Text: 'Mətn',
113
+ Top: 'Yuxarı',
114
+ Middle: 'Orta',
115
+ Bottom: 'Aşağı',
116
+ 'Insert column before': 'Əvvəlinə sütun əlavə et',
117
+ 'Insert column after': 'Sonrasına sütun əlavə et',
118
+ 'Insert row above': 'Yuxarıya sətir əlavə et',
119
+ 'Insert row below': 'Aşağıya sətir əlavə et',
120
+ 'Delete table': 'Cədvəli sil',
121
+ 'Delete row': 'Sətri sil',
122
+ 'Delete column': 'Sütunu sil',
123
+ 'Empty cell': 'Xananı boşalt',
124
+ Delete: 'Sil',
125
+ 'Strike through': 'Üstündən xətt çək',
126
+ Underline: 'Altından xətt çək',
127
+ Break: 'Fasilə',
128
+ 'Search for': 'Axtar',
129
+ 'Replace with': 'Bununla əvəz et',
130
+ Replace: 'Əvəz et',
131
+ Edit: 'Redaktə et',
132
+ 'Vertical align': 'Şaquli düzləndirmə',
133
+ 'Horizontal align': 'Üfüqi düzləndirmə',
134
+ Filter: 'Süzgəc',
135
+ 'Sort by changed': 'Dəyişməyə görə sırala',
136
+ 'Sort by name': 'Ada görə sırala',
137
+ 'Sort by size': 'Ölçüyə görə sırala',
138
+ 'Add folder': 'Qovluq əlavə et',
139
+ 'Split vertical': 'Şaquli böl',
140
+ 'Split horizontal': 'Üfüqi böl',
141
+ Split: 'Böl',
142
+ Merge: 'Birləşdir',
143
+ 'Add column': 'Sütun əlavə et',
144
+ 'Add row': 'Sətir əlavə et',
145
+ Border: 'Haşiyə',
146
+ 'Embed code': 'Kodu daxil et',
147
+ Update: 'Yenilə',
148
+ superscript: 'Yuxarı indeks',
149
+ subscript: 'Aşağı indeks',
150
+ 'Cut selection': 'Seçimi kəs',
151
+ Paste: 'Yerləşdir',
152
+ 'Choose Content to Paste': 'Yerləşdiriləcək məzmunu seçin',
153
+ 'Chars: %d': 'Simvol: %d',
154
+ 'Words: %d': 'Söz: %d',
155
+ All: 'Hamısını seç',
156
+ 'Select %s': 'Seç: %s',
157
+ 'Select all': 'Hamısını seç',
158
+ source: 'HTML',
159
+ bold: 'Qalın',
160
+ italic: 'Kursiv',
161
+ brush: 'Fırça',
162
+ link: 'Keçid',
163
+ undo: 'Geri qaytar',
164
+ redo: 'Təkrarla',
165
+ table: 'Cədvəl',
166
+ image: 'Şəkil',
167
+ eraser: 'Silgi',
168
+ paragraph: 'Abzas',
169
+ fontsize: 'Şrift ölçüsü',
170
+ video: 'Video',
171
+ font: 'Şrift',
172
+ about: 'Haqqında',
173
+ print: 'Çap et',
174
+ underline: 'Altından xətt çək',
175
+ strikethrough: 'Üstündən xətt çək',
176
+ indent: 'Girinti',
177
+ outdent: 'Çıxıntı',
178
+ fullsize: 'Tam ölçü',
179
+ shrink: 'Kiçilt',
180
+ hr: 'Xətt',
181
+ ul: 'Nizamsız siyahı',
182
+ ol: 'Nömrələnmiş siyahı',
183
+ 'Lower Alpha': 'Kiçik hərflər',
184
+ 'Upper Alpha': 'Böyük hərflər',
185
+ 'Lower Roman': 'Kiçik Roma rəqəmləri',
186
+ 'Upper Roman': 'Böyük Roma rəqəmləri',
187
+ 'Lower Greek': 'Yunan hərfləri',
188
+ cut: 'Kəs',
189
+ selectall: 'Hamısını seç',
190
+ 'Open link': 'Keçidi aç',
191
+ 'Edit link': 'Keçidi redaktə et',
192
+ 'No follow': 'Nofollow atributu',
193
+ Unlink: 'Keçidi ləğv et',
194
+ Eye: 'Bax',
195
+ pencil: 'Redaktə et',
196
+ ' URL': 'URL',
197
+ Reset: 'Sıfırla',
198
+ Save: 'Yadda saxla',
199
+ 'Save as ...': 'Fərqli yadda saxla...',
200
+ Resize: 'Ölçüsünü dəyiş',
201
+ Crop: 'Kəs',
202
+ Width: 'En',
203
+ Height: 'Hündürlük',
204
+ 'Keep Aspect Ratio': 'Nisbəti saxla',
205
+ Yes: 'Bəli',
206
+ No: 'Xeyr',
207
+ Remove: 'Çıxar',
208
+ Select: 'Seç',
209
+ 'You can only edit your own images. Download this image on the host?':
210
+ 'Siz yalnız öz şəkillərinizi redaktə edə bilərsiniz. Bu şəkil serverə yüklənsin?',
211
+ 'The image has been successfully uploaded to the host!':
212
+ 'Şəkil serverə uğurla yükləndi!',
213
+ palette: 'Palitra',
214
+ 'There are no files': 'Bu qovluqda fayl yoxdur.',
215
+ Rename: 'Adını dəyiş',
216
+ 'Enter new name': 'Yeni ad daxil edin',
217
+ preview: 'Önbaxış',
218
+ download: 'Endir',
219
+ 'Paste from clipboard': 'Mübadilə buferindən yerləşdir',
220
+ "Your browser doesn't support direct access to the clipboard.":
221
+ 'Brauzeriniz mübadilə buferinə birbaşa girişi dəstəkləmir.',
222
+ 'Copy selection': 'Seçimi kopyala',
223
+ copy: 'Kopyala',
224
+ 'Border radius': 'Haşiyə radiusu',
225
+ 'Show all': 'Hamısını göstər',
226
+ Apply: 'Tətbiq et',
227
+ 'Please fill out this field': 'Zəhmət olmasa bu xananı doldurun',
228
+ 'Please enter a web address': 'Zəhmət olmasa veb ünvan daxil edin',
229
+ Default: 'Standart',
230
+ Circle: 'Dairə',
231
+ Dot: 'Nöqtə',
232
+ Quadrate: 'Kvadrat',
233
+ Find: 'Tap',
234
+ 'Find Previous': 'Əvvəlkini tap',
235
+ 'Find Next': 'Növbətini tap',
236
+ 'Insert className': 'className (CSS) əlavə et',
237
+ 'Press Alt for custom resizing':
238
+ 'Fərdi ölçüləndirmə üçün Alt düyməsini basın',
239
+ 'License: %s': 'Lisenziya: %s'
240
+ };
package/esm/languages.js CHANGED
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { isArray } from "./core/helpers/checker/is-array.js";
7
7
  import ar from "./langs/ar.js";
8
+ import az from "./langs/az.js";
8
9
  import cs_cz from "./langs/cs_cz.js";
9
10
  import de from "./langs/de.js";
10
11
  import en from "./langs/en.js";
@@ -34,6 +35,7 @@ import zh_tw from "./langs/zh_tw.js";
34
35
  let exp = {};
35
36
  exp = {
36
37
  ar,
38
+ az,
37
39
  cs_cz,
38
40
  de,
39
41
  en,
@@ -27,7 +27,9 @@ export class Snapshot extends ViewComponent {
27
27
  */
28
28
  static equal(first, second) {
29
29
  return (first.html === second.html &&
30
- JSON.stringify(first.range) === JSON.stringify(second.range));
30
+ JSON.stringify(first.range) === JSON.stringify(second.range) &&
31
+ JSON.stringify(first.ranges) === JSON.stringify(second.ranges) &&
32
+ Boolean(first.backward) === Boolean(second.backward));
31
33
  }
32
34
  /**
33
35
  * Calc count element before some node in parentNode. All text nodes are joined
@@ -129,23 +131,36 @@ export class Snapshot extends ViewComponent {
129
131
  snapshot.html = this.__getCleanedEditorValue(this.j.editor);
130
132
  const sel = this.j.s.sel;
131
133
  if (sel && sel.rangeCount) {
132
- const range = sel.getRangeAt(0);
133
- const startContainer = this.calcHierarchyLadder(range.startContainer);
134
- const endContainer = this.calcHierarchyLadder(range.endContainer);
135
- let startOffset = Snapshot.strokeOffset(range.startContainer, range.startOffset), endOffset = Snapshot.strokeOffset(range.endContainer, range.endOffset);
136
- if (!startContainer.length &&
137
- range.startContainer !== this.j.editor) {
138
- startOffset = 0;
134
+ const ranges = [];
135
+ for (let i = 0; i < sel.rangeCount; i += 1) {
136
+ const range = sel.getRangeAt(i);
137
+ const startContainer = this.calcHierarchyLadder(range.startContainer);
138
+ const endContainer = this.calcHierarchyLadder(range.endContainer);
139
+ let startOffset = Snapshot.strokeOffset(range.startContainer, range.startOffset), endOffset = Snapshot.strokeOffset(range.endContainer, range.endOffset);
140
+ if (!startContainer.length &&
141
+ range.startContainer !== this.j.editor) {
142
+ startOffset = 0;
143
+ }
144
+ if (!endContainer.length &&
145
+ range.endContainer !== this.j.editor) {
146
+ endOffset = 0;
147
+ }
148
+ ranges.push({
149
+ startContainer,
150
+ startOffset,
151
+ endContainer,
152
+ endOffset
153
+ });
139
154
  }
140
- if (!endContainer.length && range.endContainer !== this.j.editor) {
141
- endOffset = 0;
155
+ snapshot.range = ranges[0];
156
+ if (ranges.length > 1) {
157
+ snapshot.ranges = ranges;
158
+ }
159
+ else if (!sel.isCollapsed &&
160
+ sel.anchorNode === sel.getRangeAt(0).endContainer &&
161
+ sel.anchorOffset === sel.getRangeAt(0).endOffset) {
162
+ snapshot.backward = true;
142
163
  }
143
- snapshot.range = {
144
- startContainer,
145
- startOffset,
146
- endContainer,
147
- endOffset
148
- };
149
164
  }
150
165
  return snapshot;
151
166
  }
@@ -181,12 +196,22 @@ export class Snapshot extends ViewComponent {
181
196
  * @see make
182
197
  */
183
198
  restoreOnlySelection(snapshot) {
199
+ var _a;
184
200
  try {
185
201
  if (snapshot.range) {
186
- const range = this.j.ed.createRange();
187
- range.setStart(this.getElementByLadder(snapshot.range.startContainer), snapshot.range.startOffset);
188
- range.setEnd(this.getElementByLadder(snapshot.range.endContainer), snapshot.range.endOffset);
189
- this.j.s.selectRange(range);
202
+ const ranges = ((_a = snapshot.ranges) !== null && _a !== void 0 ? _a : [snapshot.range]).map(saved => {
203
+ const range = this.j.ed.createRange();
204
+ range.setStart(this.getElementByLadder(saved.startContainer), saved.startOffset);
205
+ range.setEnd(this.getElementByLadder(saved.endContainer), saved.endOffset);
206
+ return range;
207
+ });
208
+ this.j.s.selectRange(ranges[0]);
209
+ const sel = this.j.s.sel;
210
+ ranges.slice(1).forEach(range => sel === null || sel === void 0 ? void 0 : sel.addRange(range));
211
+ if (snapshot.backward && ranges.length === 1) {
212
+ const range = ranges[0];
213
+ sel === null || sel === void 0 ? void 0 : sel.setBaseAndExtent(range.endContainer, range.endOffset, range.startContainer, range.startOffset);
214
+ }
190
215
  }
191
216
  }
192
217
  catch (__ignore) {
@@ -20,8 +20,8 @@ export interface IStyleOptions {
20
20
  hooks?: {
21
21
  beforeWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;
22
22
  afterWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;
23
- beforeToggleList?(mode: CommitMode, list: HTMLElement, style: ICommitStyle): void | CommitMode;
24
- beforeUnwrapList?(mode: 'unwrap', list: HTMLElement, style: ICommitStyle): void | CommitMode;
23
+ beforeToggleList?(mode: CommitMode, style: ICommitStyle, list: HTMLElement): void | CommitMode;
24
+ beforeUnwrapList?(mode: 'unwrap' | 'replace', list: HTMLElement, style: ICommitStyle): void | HTMLElement;
25
25
  afterToggleList?(mode: CommitMode, list: HTMLElement, style: ICommitStyle): void;
26
26
  afterToggleAttribute?(mode: CommitMode, elm: HTMLElement, key: string, value?: string | number | null | boolean): void;
27
27
  };
@@ -135,6 +135,9 @@ export interface RangeType {
135
135
  export interface SnapshotType {
136
136
  html: string;
137
137
  range: RangeType;
138
+ /** Additional native ranges, including the first, when supported. */
139
+ ranges?: RangeType[];
140
+ backward?: boolean;
138
141
  }
139
142
  export interface ImageEditorOptions {
140
143
  min_width: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.14.2",
3
+ "version": "4.14.3",
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",
@@ -90,9 +90,12 @@ export declare class Selection implements ISelect {
90
90
  * Restores user selections using marker invisible elements in the DOM.
91
91
  */
92
92
  restore(): void;
93
+ private __fakeSelections;
94
+ private __isBackward;
95
+ private __ranges;
93
96
  /**
94
97
  * Inserts invisible fake nodes on the boundaries of the current selection
95
- * and returns them. Unlike [[Select.save]] the selection stays valid while
98
+ * and returns the first pair as a restoration handle for all ranges. Unlike [[Select.save]] the selection stays valid while
96
99
  * the DOM around it is being modified. Restore it later with [[Select.restoreFakes]].
97
100
  */
98
101
  fakes(): [
@@ -102,10 +105,7 @@ export declare class Selection implements ISelect {
102
105
  Node,
103
106
  Node
104
107
  ];
105
- /**
106
- * Restores the selection previously saved with [[Select.fakes]]
107
- * and removes the fake nodes (disconnected fakes are ignored).
108
- */
108
+ /** Restore all ranges associated with the returned fake pair. */
109
109
  restoreFakes(fakes: [
110
110
  ] | [
111
111
  Node
@@ -166,6 +166,7 @@ export declare class Selection implements ISelect {
166
166
  * Call callback for all selection node
167
167
  */
168
168
  eachSelection(callback: (current: Node) => void): void;
169
+ private __eachRange;
169
170
  /**
170
171
  * Checks if the cursor is at the end(start) block
171
172
  *
@@ -208,6 +209,7 @@ export declare class Selection implements ISelect {
208
209
  * Set range selection
209
210
  */
210
211
  selectRange(range: Range, focus?: boolean): this;
212
+ private __selectRanges;
211
213
  /**
212
214
  * Select node
213
215
  * @param node - Node element
@@ -290,4 +292,5 @@ export declare class Selection implements ISelect {
290
292
  * becomes `<p>|<b>test</b>|</p>`)
291
293
  */
292
294
  expandSelection(): this;
295
+ private __expandRange;
293
296
  }
@@ -0,0 +1,223 @@
1
+ declare const _exports: {
2
+ 'Type something': string;
3
+ Advanced: string;
4
+ 'About Jodit': string;
5
+ 'Jodit Editor': string;
6
+ "Jodit User's Guide": string;
7
+ 'contains detailed help for using': string;
8
+ 'For information about the license, please go to our website:': string;
9
+ 'Buy full version': string;
10
+ 'Copyright \u00A9 XDSoft.net - Chupurnov Valeriy. All rights reserved.': string;
11
+ Anchor: string;
12
+ 'Open in new tab': string;
13
+ 'Open in fullsize': string;
14
+ 'Clear Formatting': string;
15
+ 'Fill color or set the text color': string;
16
+ Redo: string;
17
+ Undo: string;
18
+ Bold: string;
19
+ Italic: string;
20
+ 'Insert Unordered List': string;
21
+ 'Insert Ordered List': string;
22
+ 'Align Center': string;
23
+ 'Align Justify': string;
24
+ 'Align Left': string;
25
+ 'Align Right': string;
26
+ 'Insert Horizontal Line': string;
27
+ 'Insert Image': string;
28
+ 'Insert file': string;
29
+ 'Insert youtube/vimeo video': string;
30
+ 'Insert link': string;
31
+ 'Font size': string;
32
+ 'Font family': string;
33
+ 'Line height': string;
34
+ Spellcheck: string;
35
+ 'Speech Recognize': string;
36
+ newline: string;
37
+ 'Insert format block': string;
38
+ Normal: string;
39
+ 'Heading 1': string;
40
+ 'Heading 2': string;
41
+ 'Heading 3': string;
42
+ 'Heading 4': string;
43
+ Quote: string;
44
+ Code: string;
45
+ Insert: string;
46
+ 'Insert table': string;
47
+ 'Decrease Indent': string;
48
+ 'Increase Indent': string;
49
+ 'Select Special Character': string;
50
+ 'Insert Special Character': string;
51
+ 'Paint format': string;
52
+ 'Change mode': string;
53
+ Margins: string;
54
+ top: string;
55
+ right: string;
56
+ bottom: string;
57
+ left: string;
58
+ Styles: string;
59
+ Classes: string;
60
+ Align: string;
61
+ Right: string;
62
+ Center: string;
63
+ Left: string;
64
+ '--Not Set--': string;
65
+ Src: string;
66
+ Title: string;
67
+ Alternative: string;
68
+ Link: string;
69
+ 'Open link in new tab': string;
70
+ Image: string;
71
+ file: string;
72
+ 'Image properties': string;
73
+ Cancel: string;
74
+ Ok: string;
75
+ 'Your code is similar to HTML. Keep as HTML?': string;
76
+ 'Paste as HTML': string;
77
+ Keep: string;
78
+ Clean: string;
79
+ 'Insert as Text': string;
80
+ 'Word Paste Detected': string;
81
+ 'The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?': string;
82
+ 'Insert only Text': string;
83
+ 'File Browser': string;
84
+ 'Error on load list': string;
85
+ 'Error on load folders': string;
86
+ 'Are you sure?': string;
87
+ 'Enter Directory name': string;
88
+ 'Create directory': string;
89
+ 'type name': string;
90
+ 'type dir name': string;
91
+ 'Drop image': string;
92
+ 'Drop file': string;
93
+ 'or click': string;
94
+ 'Alternative text': string;
95
+ Browse: string;
96
+ Upload: string;
97
+ Background: string;
98
+ Text: string;
99
+ Top: string;
100
+ Middle: string;
101
+ Bottom: string;
102
+ 'Insert column before': string;
103
+ 'Insert column after': string;
104
+ 'Insert row above': string;
105
+ 'Insert row below': string;
106
+ 'Delete table': string;
107
+ 'Delete row': string;
108
+ 'Delete column': string;
109
+ 'Empty cell': string;
110
+ Delete: string;
111
+ 'Strike through': string;
112
+ Underline: string;
113
+ Break: string;
114
+ 'Search for': string;
115
+ 'Replace with': string;
116
+ Replace: string;
117
+ Edit: string;
118
+ 'Vertical align': string;
119
+ 'Horizontal align': string;
120
+ Filter: string;
121
+ 'Sort by changed': string;
122
+ 'Sort by name': string;
123
+ 'Sort by size': string;
124
+ 'Add folder': string;
125
+ 'Split vertical': string;
126
+ 'Split horizontal': string;
127
+ Split: string;
128
+ Merge: string;
129
+ 'Add column': string;
130
+ 'Add row': string;
131
+ Border: string;
132
+ 'Embed code': string;
133
+ Update: string;
134
+ superscript: string;
135
+ subscript: string;
136
+ 'Cut selection': string;
137
+ Paste: string;
138
+ 'Choose Content to Paste': string;
139
+ 'Chars: %d': string;
140
+ 'Words: %d': string;
141
+ All: string;
142
+ 'Select %s': string;
143
+ 'Select all': string;
144
+ source: string;
145
+ bold: string;
146
+ italic: string;
147
+ brush: string;
148
+ link: string;
149
+ undo: string;
150
+ redo: string;
151
+ table: string;
152
+ image: string;
153
+ eraser: string;
154
+ paragraph: string;
155
+ fontsize: string;
156
+ video: string;
157
+ font: string;
158
+ about: string;
159
+ print: string;
160
+ underline: string;
161
+ strikethrough: string;
162
+ indent: string;
163
+ outdent: string;
164
+ fullsize: string;
165
+ shrink: string;
166
+ hr: string;
167
+ ul: string;
168
+ ol: string;
169
+ 'Lower Alpha': string;
170
+ 'Upper Alpha': string;
171
+ 'Lower Roman': string;
172
+ 'Upper Roman': string;
173
+ 'Lower Greek': string;
174
+ cut: string;
175
+ selectall: string;
176
+ 'Open link': string;
177
+ 'Edit link': string;
178
+ 'No follow': string;
179
+ Unlink: string;
180
+ Eye: string;
181
+ pencil: string;
182
+ ' URL': string;
183
+ Reset: string;
184
+ Save: string;
185
+ 'Save as ...': string;
186
+ Resize: string;
187
+ Crop: string;
188
+ Width: string;
189
+ Height: string;
190
+ 'Keep Aspect Ratio': string;
191
+ Yes: string;
192
+ No: string;
193
+ Remove: string;
194
+ Select: string;
195
+ 'You can only edit your own images. Download this image on the host?': string;
196
+ 'The image has been successfully uploaded to the host!': string;
197
+ palette: string;
198
+ 'There are no files': string;
199
+ Rename: string;
200
+ 'Enter new name': string;
201
+ preview: string;
202
+ download: string;
203
+ 'Paste from clipboard': string;
204
+ "Your browser doesn't support direct access to the clipboard.": string;
205
+ 'Copy selection': string;
206
+ copy: string;
207
+ 'Border radius': string;
208
+ 'Show all': string;
209
+ Apply: string;
210
+ 'Please fill out this field': string;
211
+ 'Please enter a web address': string;
212
+ Default: string;
213
+ Circle: string;
214
+ Dot: string;
215
+ Quadrate: string;
216
+ Find: string;
217
+ 'Find Previous': string;
218
+ 'Find Next': string;
219
+ 'Insert className': string;
220
+ 'Press Alt for custom resizing': string;
221
+ 'License: %s': string;
222
+ };
223
+ export = _exports;
@@ -20,8 +20,8 @@ export interface IStyleOptions {
20
20
  hooks?: {
21
21
  beforeWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;
22
22
  afterWrapList?(mode: CommitMode, li: HTMLElement, style: ICommitStyle): void;
23
- beforeToggleList?(mode: CommitMode, list: HTMLElement, style: ICommitStyle): void | CommitMode;
24
- beforeUnwrapList?(mode: 'unwrap', list: HTMLElement, style: ICommitStyle): void | CommitMode;
23
+ beforeToggleList?(mode: CommitMode, style: ICommitStyle, list: HTMLElement): void | CommitMode;
24
+ beforeUnwrapList?(mode: 'unwrap' | 'replace', list: HTMLElement, style: ICommitStyle): void | HTMLElement;
25
25
  afterToggleList?(mode: CommitMode, list: HTMLElement, style: ICommitStyle): void;
26
26
  afterToggleAttribute?(mode: CommitMode, elm: HTMLElement, key: string, value?: string | number | null | boolean): void;
27
27
  };
@@ -135,6 +135,9 @@ export interface RangeType {
135
135
  export interface SnapshotType {
136
136
  html: string;
137
137
  range: RangeType;
138
+ /** Additional native ranges, including the first, when supported. */
139
+ ranges?: RangeType[];
140
+ backward?: boolean;
138
141
  }
139
142
  export interface ImageEditorOptions {
140
143
  min_width: number;