jodit 3.23.3 → 3.24.2
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.
- package/README.md +4 -4
- package/build/jodit.css +8 -3
- package/build/jodit.es2018.css +7 -2
- package/build/jodit.es2018.en.css +7 -2
- package/build/jodit.es2018.en.js +8384 -7869
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +8384 -7869
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +2954 -2414
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/build/plugins/debug/debug.es2018.en.js +8 -8
- package/build/plugins/debug/debug.es2018.en.min.js +1 -1
- package/build/plugins/debug/debug.es2018.js +8 -8
- package/build/plugins/debug/debug.es2018.min.js +1 -1
- package/build/plugins/debug/debug.js +8 -8
- package/build/plugins/debug/debug.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.js +38 -38
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.js +38 -38
- package/build/plugins/speech-recognize/speech-recognize.es2018.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.js +30 -30
- package/build/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/build/vdom.css +12 -1
- package/build/vdom.js +1445 -41
- package/package.json +23 -23
- package/src/core/constants.ts +10 -8
- package/src/core/dom/dom.test.js +25 -0
- package/src/core/dom/dom.ts +90 -41
- package/src/core/helpers/checker/has-browser-color-picker.ts +2 -2
- package/src/core/helpers/checker/index.ts +1 -0
- package/src/core/helpers/checker/is-boolean.ts +1 -1
- package/src/core/helpers/checker/is-marker.ts +20 -0
- package/src/core/helpers/normalize/normalize-css-value.ts +19 -0
- package/src/core/helpers/normalize/normalize-node.ts +2 -2
- package/src/core/helpers/size/position.test.js +198 -187
- package/src/core/helpers/utils/css.ts +7 -14
- package/src/core/plugin/plugin.ts +1 -1
- package/src/core/selection/interface.ts +24 -0
- package/src/core/selection/select.ts +69 -29
- package/src/core/selection/selection.test.js +5 -17
- package/src/core/selection/style/api/extract.ts +6 -7
- package/src/core/selection/style/api/finite-state-machine.ts +40 -35
- package/src/core/selection/style/api/get-suit-child.ts +3 -4
- package/src/core/selection/style/api/get-suit-parent.ts +3 -4
- package/src/core/selection/style/api/{element-has-same-style.ts → has-same-style.ts} +25 -6
- package/src/core/selection/style/api/index.ts +6 -6
- package/src/core/selection/style/api/is-inside-invisible-element.ts +1 -1
- package/src/core/selection/style/api/is-normal-node.ts +3 -3
- package/src/core/selection/style/api/is-same-attributes.ts +56 -0
- package/src/core/selection/style/api/is-suit-element.ts +22 -12
- package/src/core/selection/style/api/list/toggle-ordered-list.ts +100 -0
- package/src/core/selection/style/api/list/wrap-list.ts +71 -0
- package/src/core/selection/style/api/toggle-attributes.ts +251 -0
- package/src/core/selection/style/api/unwrap-children.ts +10 -8
- package/src/core/selection/style/api/wrap-unwrapped-text.ts +7 -8
- package/src/core/selection/style/api/{wrap-and-commit-style.ts → wrap.ts} +8 -11
- package/src/core/selection/style/apply-style.ts +32 -181
- package/src/core/selection/style/commit-style.ts +79 -4
- package/src/core/selection/style/style.test.js +457 -128
- package/src/core/selection/style/transactions.ts +256 -0
- package/src/core/ui/button/tooltip/tooltip.test.js +95 -76
- package/src/core/ui/popup/popup.test.js +158 -153
- package/src/{plugins/backspace/interface.d.ts → core/vdom/on-demand.ts} +7 -5
- package/src/core/vdom/render/index.ts +2 -4
- package/src/core/vdom/render/patcher.ts +14 -0
- package/src/core/vdom/v-dom-jodit.less +17 -0
- package/src/core/vdom/v-dom-jodit.ts +102 -3
- package/src/core/view/view.ts +2 -2
- package/src/index.ts +2 -0
- package/src/jodit.ts +5 -1
- package/src/langs/i18n.test.js +221 -216
- package/src/modules/dialog/dialog.less +9 -1
- package/src/modules/dialog/dialog.ts +25 -16
- package/src/modules/file-browser/data-provider.ts +44 -12
- package/src/modules/file-browser/file-browser.test.js +1019 -958
- package/src/modules/file-browser/file-browser.ts +0 -1
- package/src/modules/messages/messages.ts +3 -8
- package/src/plugins/backspace/backspace.test.js +2 -9
- package/src/plugins/backspace/backspace.ts +5 -0
- package/src/plugins/backspace/cases/check-join-neighbors.ts +7 -1
- package/src/plugins/backspace/cases/check-join-two-lists.ts +2 -1
- package/src/plugins/backspace/helpers.ts +9 -1
- package/src/plugins/backspace/interface.ts +31 -0
- package/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts +2 -1
- package/src/plugins/color/color.test.js +122 -119
- package/src/plugins/enter/enter.test.js +18 -5
- package/src/plugins/enter/enter.ts +9 -5
- package/src/plugins/enter/interface.ts +41 -0
- package/src/plugins/font/config.ts +8 -8
- package/src/plugins/font/font.test.js +18 -23
- package/src/plugins/hotkeys/hotkeys.test.js +35 -47
- package/src/plugins/iframe/iframe.test.js +206 -195
- package/src/plugins/image/image.ts +1 -1
- package/src/plugins/image-properties/config.ts +22 -0
- package/src/plugins/image-properties/image-properties.test.js +174 -93
- package/src/plugins/image-properties/templates/position-tab.ts +22 -1
- package/src/plugins/indent/indent.test.js +2 -8
- package/src/plugins/link/link.test.js +19 -0
- package/src/plugins/link/link.ts +25 -15
- package/src/plugins/placeholder/placeholder.ts +8 -7
- package/src/plugins/size/size.test.js +239 -225
- package/src/plugins/tab/cases/on-tab-inside-li.ts +131 -22
- package/src/plugins/tab/tab.test.js +95 -11
- package/src/plugins/tab/tab.ts +22 -2
- package/src/plugins/wrap-nodes/config.ts +11 -0
- package/src/plugins/wrap-nodes/wrap-nodes.ts +0 -1
- package/src/types/events.d.ts +4 -0
- package/src/types/file-browser.d.ts +17 -10
- package/src/types/select.d.ts +6 -1
- package/src/types/style.d.ts +72 -5
- package/src/types/uploader.d.ts +14 -0
- package/src/types/view.d.ts +2 -2
- package/types/core/async/async.d.ts +1 -1
- package/types/core/constants.d.ts +3 -3
- package/types/core/dom/dom.d.ts +6 -3
- package/types/core/helpers/checker/index.d.ts +1 -0
- package/types/core/helpers/checker/is-boolean.d.ts +1 -1
- package/types/core/helpers/checker/is-marker.d.ts +10 -0
- package/types/core/helpers/html/safe-html.d.ts +1 -1
- package/types/core/helpers/normalize/normalize-css-value.d.ts +2 -0
- package/types/core/helpers/normalize/normalize-node.d.ts +1 -1
- package/types/core/helpers/utils/append-script.d.ts +1 -1
- package/types/core/selection/interface.d.ts +19 -0
- package/types/core/selection/select.d.ts +22 -5
- package/types/core/selection/style/api/finite-state-machine.d.ts +10 -9
- package/types/core/selection/style/api/get-suit-child.d.ts +2 -3
- package/types/core/selection/style/api/get-suit-parent.d.ts +2 -3
- package/types/core/selection/style/api/{element-has-same-style.d.ts → has-same-style.d.ts} +2 -2
- package/types/core/selection/style/api/index.d.ts +6 -6
- package/types/core/selection/style/api/is-same-attributes.d.ts +12 -0
- package/types/core/selection/style/api/is-suit-element.d.ts +4 -4
- package/types/core/selection/style/api/{toggle → list}/toggle-ordered-list.d.ts +2 -3
- package/types/core/selection/style/api/{wrap-ordered-list.d.ts → list/wrap-list.d.ts} +2 -3
- package/types/core/selection/style/api/toggle-attributes.d.ts +11 -0
- package/types/core/selection/style/api/unwrap-children.d.ts +2 -2
- package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +2 -3
- package/types/core/selection/style/api/{wrap-and-commit-style.d.ts → wrap.d.ts} +2 -3
- package/types/core/selection/style/apply-style.d.ts +3 -3
- package/types/core/selection/style/commit-style.d.ts +6 -2
- package/types/core/selection/style/transactions.d.ts +29 -0
- package/types/core/ui/popup/popup.d.ts +1 -1
- package/types/core/view/view.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/modules/file-browser/builders/elements-map.d.ts +1 -1
- package/types/modules/file-browser/data-provider.d.ts +5 -0
- package/types/modules/messages/messages.d.ts +2 -1
- package/types/plugins/backspace/helpers.d.ts +5 -1
- package/types/plugins/backspace/interface.d.ts +21 -0
- package/types/plugins/enter/enter.d.ts +2 -0
- package/types/plugins/enter/interface.d.ts +32 -0
- package/types/plugins/image-properties/config.d.ts +19 -0
- package/types/plugins/link/link.d.ts +1 -1
- package/types/plugins/paste/interface.d.ts +2 -2
- package/types/plugins/tab/cases/on-tab-inside-li.d.ts +1 -1
- package/types/plugins/wrap-nodes/config.d.ts +10 -0
- package/types/types/events.d.ts +4 -0
- package/types/types/file-browser.d.ts +17 -10
- package/types/types/select.d.ts +6 -1
- package/types/types/storage.d.ts +1 -1
- package/types/types/style.d.ts +72 -5
- package/types/types/uploader.d.ts +14 -0
- package/types/types/view.d.ts +2 -2
- package/vdom.html +20 -0
- package/src/core/selection/style/api/toggle/toggle-css.ts +0 -136
- package/src/core/selection/style/api/toggle/toggle-ordered-list.ts +0 -54
- package/src/core/selection/style/api/toggle-commit-styles.ts +0 -35
- package/src/core/selection/style/api/wrap-ordered-list.ts +0 -42
- package/types/core/selection/style/api/toggle/toggle-css.d.ts +0 -12
- package/types/core/selection/style/api/toggle-commit-styles.d.ts +0 -13
|
@@ -114,13 +114,13 @@ Config.prototype.controls.font = {
|
|
|
114
114
|
|
|
115
115
|
list: {
|
|
116
116
|
'': 'Default',
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
'
|
|
117
|
+
'helvetica,sans-serif': 'Helvetica',
|
|
118
|
+
'arial,helvetica,sans-serif': 'Arial',
|
|
119
|
+
'georgia,palatino,serif': 'Georgia',
|
|
120
|
+
'impact,charcoal,sans-serif': 'Impact',
|
|
121
|
+
'tahoma,geneva,sans-serif': 'Tahoma',
|
|
122
|
+
'times new roman,times,serif': 'Times New Roman',
|
|
123
|
+
'verdana,geneva,sans-serif': 'Verdana'
|
|
124
124
|
},
|
|
125
125
|
|
|
126
126
|
childTemplate: (editor, key: string, value: string) => {
|
|
@@ -132,7 +132,7 @@ Config.prototype.controls.font = {
|
|
|
132
132
|
document.fonts.check(`16px ${key}`, value);
|
|
133
133
|
} catch {}
|
|
134
134
|
|
|
135
|
-
return `<span style="${
|
|
135
|
+
return `<span data-style="${key}" style="${
|
|
136
136
|
isAvailable ? `font-family: ${key}!important;` : ''
|
|
137
137
|
}">${value}</span>`;
|
|
138
138
|
},
|
|
@@ -27,18 +27,19 @@ describe('Font test', function () {
|
|
|
27
27
|
simulateEvent('mousedown', editor.editor);
|
|
28
28
|
|
|
29
29
|
Array.from(openFontNameList()).map(function (font) {
|
|
30
|
-
simulateEvent('click',
|
|
30
|
+
simulateEvent('click', font);
|
|
31
31
|
|
|
32
32
|
const fontFamily = font
|
|
33
33
|
.querySelector('span[style]')
|
|
34
|
-
.getAttribute('style')
|
|
34
|
+
.getAttribute('data-style')
|
|
35
35
|
.replace(/"/g, "'");
|
|
36
36
|
|
|
37
37
|
expect(sortAttributes(editor.value)).equals(
|
|
38
38
|
sortAttributes(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
39
|
+
`<p><span style="font-family:${fontFamily.replace(
|
|
40
|
+
'!important',
|
|
41
|
+
''
|
|
42
|
+
)}">test</span></p>`
|
|
42
43
|
)
|
|
43
44
|
);
|
|
44
45
|
});
|
|
@@ -99,12 +100,12 @@ describe('Font test', function () {
|
|
|
99
100
|
clickTrigger('font', editor);
|
|
100
101
|
const list2 = getOpenedPopup(editor);
|
|
101
102
|
|
|
102
|
-
clickButton('
|
|
103
|
+
clickButton('impact_charcoal_sans_serif', list2);
|
|
103
104
|
editor.s.insertHTML('stop');
|
|
104
105
|
|
|
105
106
|
expect(sortAttributes(editor.value)).equals(
|
|
106
107
|
'<p><span style="font-size:10px">test' +
|
|
107
|
-
'<span style="font-family:
|
|
108
|
+
'<span style="font-family:impact,charcoal,sans-serif">stop</span></span></p>'
|
|
108
109
|
);
|
|
109
110
|
});
|
|
110
111
|
});
|
|
@@ -153,9 +154,7 @@ describe('Font test', function () {
|
|
|
153
154
|
clickButton('8', popup);
|
|
154
155
|
|
|
155
156
|
expect(sortAttributes(editor.value)).equals(
|
|
156
|
-
|
|
157
|
-
point +
|
|
158
|
-
'">t2t</span>ext</p>'
|
|
157
|
+
`<p>tex<span style="font-size:8${point}">t2t</span>ext</p>`
|
|
159
158
|
);
|
|
160
159
|
|
|
161
160
|
const range2 = editor.s.createRange(true);
|
|
@@ -169,11 +168,7 @@ describe('Font test', function () {
|
|
|
169
168
|
expect(popup2).is.null;
|
|
170
169
|
|
|
171
170
|
expect(editor.value).equals(
|
|
172
|
-
|
|
173
|
-
point +
|
|
174
|
-
';">t2t</span>ext</p><p><span style="font-size: 8' +
|
|
175
|
-
point +
|
|
176
|
-
';"></span></p>'
|
|
171
|
+
`<p>tex<span style="font-size: 8${point};">t2t</span>ext</p><p><span style="font-size: 8${point};"></span></p>`
|
|
177
172
|
);
|
|
178
173
|
});
|
|
179
174
|
});
|
|
@@ -212,10 +207,10 @@ describe('Font test', function () {
|
|
|
212
207
|
|
|
213
208
|
expect(popup).is.not.null;
|
|
214
209
|
|
|
215
|
-
clickButton('
|
|
210
|
+
clickButton('impact_charcoal_sans_serif', popup);
|
|
216
211
|
|
|
217
212
|
expect(editor.value).equals(
|
|
218
|
-
'<p>tex<span style="font-family:
|
|
213
|
+
'<p>tex<span style="font-family: impact, charcoal, sans-serif;">t2t</span>ext</p>'
|
|
219
214
|
);
|
|
220
215
|
|
|
221
216
|
const range2 = editor.s.createRange(true);
|
|
@@ -229,7 +224,7 @@ describe('Font test', function () {
|
|
|
229
224
|
expect(popup2).is.null;
|
|
230
225
|
|
|
231
226
|
expect(editor.value).equals(
|
|
232
|
-
'<p>tex<span style="font-family:
|
|
227
|
+
'<p>tex<span style="font-family: impact, charcoal, sans-serif;">t2t</span>ext</p><p><span style="font-family: impact, charcoal, sans-serif;"></span></p>'
|
|
233
228
|
);
|
|
234
229
|
});
|
|
235
230
|
});
|
|
@@ -257,13 +252,13 @@ describe('Font test', function () {
|
|
|
257
252
|
expect(font).is.not.null;
|
|
258
253
|
|
|
259
254
|
editor.s.setCursorAfter(p.firstChild);
|
|
260
|
-
simulateEvent('mousedown',
|
|
255
|
+
simulateEvent('mousedown', p);
|
|
261
256
|
|
|
262
257
|
expect(font.getAttribute('aria-pressed')).equals('false');
|
|
263
258
|
|
|
264
259
|
editor.s.setCursorIn(p.lastChild);
|
|
265
260
|
|
|
266
|
-
simulateEvent('mousedown',
|
|
261
|
+
simulateEvent('mousedown', p);
|
|
267
262
|
|
|
268
263
|
clickTrigger('fontsize', editor);
|
|
269
264
|
|
|
@@ -285,7 +280,7 @@ describe('Font test', function () {
|
|
|
285
280
|
});
|
|
286
281
|
|
|
287
282
|
editor.value =
|
|
288
|
-
'<p>test<span style="font-family:
|
|
283
|
+
'<p>test<span style="font-family: georgia,palatino,serif;">bold</span></p>';
|
|
289
284
|
editor.s.focus();
|
|
290
285
|
|
|
291
286
|
const p = editor.editor.firstChild;
|
|
@@ -294,7 +289,7 @@ describe('Font test', function () {
|
|
|
294
289
|
expect(font).is.not.null;
|
|
295
290
|
|
|
296
291
|
editor.s.setCursorAfter(p.firstChild);
|
|
297
|
-
simulateEvent('mousedown',
|
|
292
|
+
simulateEvent('mousedown', p);
|
|
298
293
|
expect(font.getAttribute('aria-pressed')).equals('false');
|
|
299
294
|
|
|
300
295
|
editor.s.setCursorIn(p.lastChild);
|
|
@@ -306,7 +301,7 @@ describe('Font test', function () {
|
|
|
306
301
|
const popup = getOpenedPopup(editor);
|
|
307
302
|
|
|
308
303
|
const fontGeorgia = popup.querySelector(
|
|
309
|
-
'[class*=
|
|
304
|
+
'[class*=georgia_palatino]'
|
|
310
305
|
);
|
|
311
306
|
|
|
312
307
|
expect(fontGeorgia).does.not.equal(font);
|
|
@@ -7,19 +7,15 @@
|
|
|
7
7
|
describe('Hotkeys', function () {
|
|
8
8
|
describe('Override default shortcuts for some commands', function () {
|
|
9
9
|
it('Should work default shortcuts for another commands', function () {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
editor.value = 'test test test';
|
|
10
|
+
const editor = getJodit({
|
|
11
|
+
commandToHotkeys: {
|
|
12
|
+
bold: 'ctrl+shift+b',
|
|
13
|
+
italic: ['ctrl+i', 'ctrl+shift+i']
|
|
14
|
+
}
|
|
15
|
+
});
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
range.setEnd(editor.editor.firstChild.firstChild, 8);
|
|
17
|
+
editor.value = '<p>test| tes|t test</p>';
|
|
18
|
+
setCursorToChar(editor);
|
|
23
19
|
|
|
24
20
|
// standart ctrl+u
|
|
25
21
|
simulateEvent('keydown', 85, editor.editor, function (data) {
|
|
@@ -29,21 +25,18 @@ describe('Hotkeys', function () {
|
|
|
29
25
|
|
|
30
26
|
expect(editor.value).equals('<p>test<u> tes</u>t test</p>');
|
|
31
27
|
});
|
|
32
|
-
describe('Replace ctrl+b to ctrl+shift+b for bold command', function () {
|
|
33
|
-
it('Should not execute bold on ctrl+b', function () {
|
|
34
|
-
const area = appendTestArea(),
|
|
35
|
-
editor = new Jodit(area, {
|
|
36
|
-
commandToHotkeys: {
|
|
37
|
-
bold: 'ctrl+shift+b',
|
|
38
|
-
italic: ['ctrl+i', 'ctrl+shift+i']
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
28
|
|
|
42
|
-
|
|
29
|
+
describe('Replace ctrl+b to ctrl+alt+b for bold command', function () {
|
|
30
|
+
it('Should not execute bold on ctrl+b', function () {
|
|
31
|
+
const editor = getJodit({
|
|
32
|
+
commandToHotkeys: {
|
|
33
|
+
bold: 'ctrl+alt+b',
|
|
34
|
+
italic: ['ctrl+i', 'ctrl+shift+i']
|
|
35
|
+
}
|
|
36
|
+
});
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
range.setEnd(editor.editor.firstChild.firstChild, 8);
|
|
38
|
+
editor.value = '<p>test| tes|t test</p>';
|
|
39
|
+
setCursorToChar(editor);
|
|
47
40
|
|
|
48
41
|
// standart ctrl+b
|
|
49
42
|
simulateEvent('keydown', 66, editor.editor, function (data) {
|
|
@@ -54,7 +47,7 @@ describe('Hotkeys', function () {
|
|
|
54
47
|
expect(editor.value).equals('<p>test test test</p>'); // should not sork
|
|
55
48
|
|
|
56
49
|
simulateEvent('keydown', 66, editor.editor, function (data) {
|
|
57
|
-
data.
|
|
50
|
+
data.altKey = true;
|
|
58
51
|
data.ctrlKey = true;
|
|
59
52
|
});
|
|
60
53
|
|
|
@@ -63,23 +56,19 @@ describe('Hotkeys', function () {
|
|
|
63
56
|
);
|
|
64
57
|
});
|
|
65
58
|
|
|
66
|
-
it('Should execute bold on ctrl+
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
editor.value = 'test test test';
|
|
59
|
+
it('Should execute bold on ctrl+alt+b', function () {
|
|
60
|
+
const editor = getJodit({
|
|
61
|
+
commandToHotkeys: {
|
|
62
|
+
bold: 'ctrl+alt+b',
|
|
63
|
+
italic: ['ctrl+i', 'ctrl+shift+i']
|
|
64
|
+
}
|
|
65
|
+
});
|
|
76
66
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
range.setEnd(editor.editor.firstChild.firstChild, 8);
|
|
67
|
+
editor.value = '<p>test| tes|t test</p>';
|
|
68
|
+
setCursorToChar(editor);
|
|
80
69
|
|
|
81
70
|
simulateEvent('keydown', 66, editor.editor, function (data) {
|
|
82
|
-
data.
|
|
71
|
+
data.altKey = true;
|
|
83
72
|
data.ctrlKey = true;
|
|
84
73
|
});
|
|
85
74
|
|
|
@@ -106,13 +95,12 @@ describe('Hotkeys', function () {
|
|
|
106
95
|
|
|
107
96
|
describe('Add ctrl+shift+i to default ctrl+i shortcut for italic command', function () {
|
|
108
97
|
it('Should work with each of shortcuts', function () {
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
98
|
+
const editor = getJodit({
|
|
99
|
+
commandToHotkeys: {
|
|
100
|
+
bold: 'ctrl+shift+b',
|
|
101
|
+
italic: ['ctrl+i', 'ctrl+shift+i']
|
|
102
|
+
}
|
|
103
|
+
});
|
|
116
104
|
|
|
117
105
|
editor.value = '<p>test| tes|t test</p>';
|
|
118
106
|
setCursorToChar(editor);
|