jodit 3.8.1 → 3.8.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/.idea/codeStyles/Project.xml +68 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dictionaries/v_chupurnov.xml +10 -0
- package/.idea/encodings.xml +4 -0
- package/.idea/inspectionProfiles/Project_Default.xml +118 -0
- package/.idea/jodit.iml +12 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/markdown-navigator-enh.xml +29 -0
- package/.idea/markdown-navigator.xml +55 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/workspace.xml +1264 -0
- package/build/jodit.css +2 -2
- package/build/jodit.es2018.css +1 -1
- package/build/jodit.es2018.en.css +1 -1
- package/build/jodit.es2018.en.js +4 -4
- package/build/jodit.es2018.en.min.js +2 -2
- package/build/jodit.es2018.js +4 -4
- package/build/jodit.es2018.min.js +2 -2
- package/build/jodit.js +4 -4
- package/build/jodit.min.css +1 -1
- package/build/jodit.min.js +2 -2
- package/package.json +2 -2
- package/.travis.yml +0 -7
- package/bower.json +0 -33
- package/build.js +0 -39
- package/docker/Dockerfile +0 -11
- package/docker/README.md +0 -45
- package/docker/build +0 -3
- package/docker/install +0 -7
- package/docker/start +0 -3
- package/docker/test +0 -3
- package/docker/uninstall +0 -3
- package/examples/arabic.lang.html +0 -76
- package/examples/assets/app.css +0 -175
- package/examples/assets/app.js +0 -57
- package/examples/assets/download.jpg +0 -0
- package/examples/assets/icon.png +0 -0
- package/examples/assets/logo.png +0 -0
- package/examples/assets/prism.css +0 -200
- package/examples/assets/prism.js +0 -1254
- package/examples/color-picker.html +0 -139
- package/examples/custom-icons.html +0 -173
- package/examples/custom-toolbar.html +0 -80
- package/examples/example.default.html +0 -75
- package/examples/fullsize.html +0 -75
- package/examples/index.html +0 -176
- package/examples/inline-mode.html +0 -116
- package/examples/oneinstance.html +0 -125
- package/icons.html +0 -50
- package/karma.conf.js +0 -157
- package/make.js +0 -10
- package/server.js +0 -101
- package/test/bootstrap.js +0 -1167
- package/test/test.html +0 -102
- package/test/test.index.html +0 -11
- package/test/tests/acceptance/clipboardTest.js +0 -1234
- package/test/tests/acceptance/commandsTest.js +0 -647
- package/test/tests/acceptance/creatorTest.js +0 -103
- package/test/tests/acceptance/deleteBackSpaceTest.js +0 -1289
- package/test/tests/acceptance/dialogTest.js +0 -188
- package/test/tests/acceptance/editorTest.js +0 -855
- package/test/tests/acceptance/enterTest.js +0 -1088
- package/test/tests/acceptance/eventsTest.js +0 -1246
- package/test/tests/acceptance/filebrowserTest.js +0 -1309
- package/test/tests/acceptance/i18nTest.js +0 -81
- package/test/tests/acceptance/iframeTest.js +0 -306
- package/test/tests/acceptance/imageTest.js +0 -1649
- package/test/tests/acceptance/inlineModeTest.js +0 -826
- package/test/tests/acceptance/interfaceTest.js +0 -119
- package/test/tests/acceptance/mobileTest.js +0 -229
- package/test/tests/acceptance/plugins/classSpan.js +0 -220
- package/test/tests/acceptance/plugins/cleanHtml.js +0 -351
- package/test/tests/acceptance/plugins/color.js +0 -188
- package/test/tests/acceptance/plugins/dragAndDropElement.js +0 -172
- package/test/tests/acceptance/plugins/focus.js +0 -115
- package/test/tests/acceptance/plugins/font.js +0 -316
- package/test/tests/acceptance/plugins/image.js +0 -79
- package/test/tests/acceptance/plugins/indent.js +0 -179
- package/test/tests/acceptance/plugins/inline-popup.js +0 -578
- package/test/tests/acceptance/plugins/insert.js +0 -17
- package/test/tests/acceptance/plugins/limit.js +0 -164
- package/test/tests/acceptance/plugins/link.js +0 -1640
- package/test/tests/acceptance/plugins/orderedList.js +0 -290
- package/test/tests/acceptance/plugins/placeholder.js +0 -138
- package/test/tests/acceptance/plugins/resizer.js +0 -329
- package/test/tests/acceptance/plugins/search.js +0 -623
- package/test/tests/acceptance/plugins/size.js +0 -344
- package/test/tests/acceptance/plugins/source.js +0 -218
- package/test/tests/acceptance/plugins/stat.js +0 -120
- package/test/tests/acceptance/plugins/tooltip.js +0 -97
- package/test/tests/acceptance/plugins/wrapTextNodes.js +0 -105
- package/test/tests/acceptance/pluginsTest.js +0 -2219
- package/test/tests/acceptance/selectionTest.js +0 -862
- package/test/tests/acceptance/statesTest.js +0 -310
- package/test/tests/acceptance/tableTest.js +0 -1988
- package/test/tests/acceptance/toolbarTest.js +0 -1747
- package/test/tests/acceptance/undoredoTest.js +0 -217
- package/test/tests/acceptance/uploaderTest.js +0 -187
- package/test/tests/artio.jpg +0 -0
- package/test/tests/units/helpersTest.js +0 -771
- package/test/tests/units/modules/dom.js +0 -282
- package/test/tests/units/objectObserverTest.js +0 -533
- package/test/tests/units/popupTest.js +0 -211
- package/test/tests/units/positionTest.js +0 -238
- package/test/tests/units/styleTest.js +0 -1361
- package/webpack.config.js +0 -308
|
@@ -1,97 +0,0 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
-
*/
|
|
6
|
-
describe('Tooltip plugin tests', function () {
|
|
7
|
-
describe('Native tooltip', function () {
|
|
8
|
-
it('Should have different tooltip for each language', function () {
|
|
9
|
-
const area = appendTestArea();
|
|
10
|
-
|
|
11
|
-
const editor = new Jodit(area, {
|
|
12
|
-
toolbarAdaptive: false,
|
|
13
|
-
useNativeTooltip: true,
|
|
14
|
-
buttons: 'indent,outdent',
|
|
15
|
-
language: 'en'
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
expect(
|
|
19
|
-
getButton('outdent', editor).parentElement.getAttribute('title')
|
|
20
|
-
).is.not.null;
|
|
21
|
-
|
|
22
|
-
const title = getButton(
|
|
23
|
-
'outdent',
|
|
24
|
-
editor
|
|
25
|
-
).parentElement.getAttribute('title');
|
|
26
|
-
|
|
27
|
-
editor.destruct();
|
|
28
|
-
|
|
29
|
-
const editor2 = new Jodit(area, {
|
|
30
|
-
toolbarAdaptive: false,
|
|
31
|
-
useNativeTooltip: true,
|
|
32
|
-
buttons: 'indent,outdent',
|
|
33
|
-
language: 'ru'
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
expect(
|
|
37
|
-
getButton('outdent', editor2).parentElement.getAttribute(
|
|
38
|
-
'title'
|
|
39
|
-
)
|
|
40
|
-
).is.not.null;
|
|
41
|
-
|
|
42
|
-
expect(title).does.not.equal(
|
|
43
|
-
getButton('outdent', editor2).parentElement.getAttribute(
|
|
44
|
-
'title'
|
|
45
|
-
)
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
describe('Jodit tooltip', function () {
|
|
51
|
-
it('Should have different tooltip for each language', function () {
|
|
52
|
-
const area = appendTestArea();
|
|
53
|
-
|
|
54
|
-
let editor = new Jodit(area, {
|
|
55
|
-
toolbarAdaptive: false,
|
|
56
|
-
useNativeTooltip: false,
|
|
57
|
-
buttons: 'indent,outdent',
|
|
58
|
-
showTooltipDelay: 0,
|
|
59
|
-
language: 'en'
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
let button = getButton('indent', editor);
|
|
63
|
-
|
|
64
|
-
expect(button).is.not.null;
|
|
65
|
-
|
|
66
|
-
simulateEvent('mouseenter', 0, button);
|
|
67
|
-
|
|
68
|
-
let tooltip = editor.ownerDocument.querySelector('.jodit-tooltip');
|
|
69
|
-
expect(tooltip).is.not.null;
|
|
70
|
-
const title = tooltip.textContent;
|
|
71
|
-
editor.destruct();
|
|
72
|
-
|
|
73
|
-
editor = new Jodit(area, {
|
|
74
|
-
toolbarAdaptive: false,
|
|
75
|
-
useNativeTooltip: false,
|
|
76
|
-
showTooltipDelay: 0,
|
|
77
|
-
buttons: 'indent,outdent',
|
|
78
|
-
language: 'ru'
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
button = getButton('indent', editor);
|
|
82
|
-
expect(button).is.not.null;
|
|
83
|
-
|
|
84
|
-
simulateEvent('mousemove', button);
|
|
85
|
-
|
|
86
|
-
tooltip = editor.ownerDocument.querySelector('.jodit-tooltip');
|
|
87
|
-
|
|
88
|
-
expect(tooltip).is.not.null;
|
|
89
|
-
simulateEvent('mouseleave', button);
|
|
90
|
-
expect(tooltip.parentNode).is.not.null;
|
|
91
|
-
|
|
92
|
-
expect(parseInt(tooltip.style.left, 10)).equals(-5000);
|
|
93
|
-
|
|
94
|
-
expect(title).does.not.equal(tooltip.textContent);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
});
|
|
@@ -1,105 +0,0 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
describe('WrapTextNodes plugin test', function () {
|
|
8
|
-
describe('Simple text', function () {
|
|
9
|
-
it('Should wrap inside default block element', function () {
|
|
10
|
-
const editor = getJodit();
|
|
11
|
-
editor.value = 'test';
|
|
12
|
-
expect(editor.value).equals('<p>test</p>');
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
describe('For STYLE/SCRIPT elements', function () {
|
|
16
|
-
it('Should not wrap it', function () {
|
|
17
|
-
const editor = getJodit();
|
|
18
|
-
editor.value =
|
|
19
|
-
'test' +
|
|
20
|
-
'<style>.a{color: red;}</style>' +
|
|
21
|
-
'<script>console.log(111);</script>' +
|
|
22
|
-
'sdsdsd';
|
|
23
|
-
|
|
24
|
-
editor.selection.setCursorAfter(editor.editor.firstChild);
|
|
25
|
-
editor.setEditorValue();
|
|
26
|
-
|
|
27
|
-
expect(editor.value).equals(
|
|
28
|
-
'<p>test</p><style>.a{color: red;}</style><script>console.log(111);</script><p>sdsdsd</p>'
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
describe('Block elements', function () {
|
|
34
|
-
it('Should not wrap it', function () {
|
|
35
|
-
const editor = getJodit();
|
|
36
|
-
editor.value =
|
|
37
|
-
'<section>test</section>stop<p>post</p><article>yes</article>';
|
|
38
|
-
editor.selection.setCursorAfter(editor.editor.firstChild);
|
|
39
|
-
|
|
40
|
-
editor.selection.save();
|
|
41
|
-
editor.setEditorValue();
|
|
42
|
-
|
|
43
|
-
expect(editor.value).equals(
|
|
44
|
-
'<section>test</section><p>stop</p><p>post</p><article>yes</article>'
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
describe('Change selection marker', function () {
|
|
50
|
-
it('Should not wrap it', function () {
|
|
51
|
-
const editor = getJodit();
|
|
52
|
-
editor.value = 'test';
|
|
53
|
-
editor.selection.setCursorAfter(editor.editor.firstChild);
|
|
54
|
-
|
|
55
|
-
editor.selection.save();
|
|
56
|
-
editor.setEditorValue();
|
|
57
|
-
|
|
58
|
-
expect(editor.value).equals('<p>test</p>');
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
describe('Change default block tag', function () {
|
|
63
|
-
it('Should wrap inside default this element', function () {
|
|
64
|
-
const editor = getJodit({
|
|
65
|
-
enter: 'div'
|
|
66
|
-
});
|
|
67
|
-
editor.value = 'test';
|
|
68
|
-
expect(editor.value).equals('<div>test</div>');
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
describe('Several parts texts and elements nodes', function () {
|
|
74
|
-
it('Should wrap text and not change block elements', function () {
|
|
75
|
-
const editor = getJodit();
|
|
76
|
-
editor.value =
|
|
77
|
-
'test <span>one</span> <p>cool</p><div>cool</div><img src="/" alt="">text';
|
|
78
|
-
expect(editor.value).equals(
|
|
79
|
-
'<p>test <span>one</span> </p><p>cool</p><div>cool</div><p><img src="/" alt="">text</p>'
|
|
80
|
-
);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
describe('Undo/redo stack', function () {
|
|
85
|
-
it('Should not change', function () {
|
|
86
|
-
const editor = getJodit();
|
|
87
|
-
editor.value = 'test';
|
|
88
|
-
expect(editor.value).equals('<p>test</p>');
|
|
89
|
-
expect(editor.observer.stack.length).equals(1);
|
|
90
|
-
editor.observer.undo();
|
|
91
|
-
expect(editor.value).equals('');
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
describe('Disable plugin', function () {
|
|
96
|
-
it('Should not change anything', function () {
|
|
97
|
-
const editor = getJodit({
|
|
98
|
-
disablePlugins: ['WrapTextNodes']
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
editor.value = 'test';
|
|
102
|
-
expect(editor.value).equals('test');
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
});
|