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,103 +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('Test Creator module', function () {
|
|
7
|
-
describe('Create inside element', function () {
|
|
8
|
-
it('Should be different in iframe mode', function () {
|
|
9
|
-
const editor1 = getJodit();
|
|
10
|
-
const editor2 = Jodit.make(appendTestArea(), { iframe: true });
|
|
11
|
-
|
|
12
|
-
const div1 = editor1.createInside.div();
|
|
13
|
-
expect(div1.ownerDocument).equals(document);
|
|
14
|
-
|
|
15
|
-
const div2 = editor2.createInside.div();
|
|
16
|
-
expect(div2.ownerDocument).does.not.equal(document);
|
|
17
|
-
expect(div2.ownerDocument).equals(editor2.ed);
|
|
18
|
-
|
|
19
|
-
const div3 = editor2.create.div();
|
|
20
|
-
expect(div3.ownerDocument).equals(document);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
describe('createAttributes', function () {
|
|
25
|
-
it('Should add to every nodes some attributes', function () {
|
|
26
|
-
const editor = getJodit();
|
|
27
|
-
const div = editor.createInside.div();
|
|
28
|
-
expect(div.className).equals('');
|
|
29
|
-
|
|
30
|
-
const editor2 = Jodit.make(appendTestArea(), {
|
|
31
|
-
createAttributes: {
|
|
32
|
-
strong: function (elm) {
|
|
33
|
-
elm.setAttribute('test', 'true');
|
|
34
|
-
},
|
|
35
|
-
p: {
|
|
36
|
-
'data-attr': 'stop'
|
|
37
|
-
},
|
|
38
|
-
div: {
|
|
39
|
-
class: 'test'
|
|
40
|
-
},
|
|
41
|
-
ul: function (ul) {
|
|
42
|
-
ul.classList.add('ui-test');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const div2 = editor2.createInside.div();
|
|
48
|
-
expect(div2.className).equals('test');
|
|
49
|
-
|
|
50
|
-
const ul = editor2.createInside.element('ul');
|
|
51
|
-
expect(ul.className).equals('ui-test');
|
|
52
|
-
|
|
53
|
-
editor2.value = 'test';
|
|
54
|
-
editor2.s.setCursorAfter(editor2.editor.firstChild);
|
|
55
|
-
simulateEvent('keydown', 13, editor2.editor);
|
|
56
|
-
|
|
57
|
-
expect(editor2.value).equals(
|
|
58
|
-
'<p data-attr="stop">test</p><p data-attr="stop"><br></p>'
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
editor2.value = 'test';
|
|
62
|
-
editor2.s.select(editor2.editor.firstChild);
|
|
63
|
-
editor2.execCommand('bold');
|
|
64
|
-
|
|
65
|
-
expect(editor2.value).equals(
|
|
66
|
-
'<p data-attr="stop"><strong test="true">test</strong></p>'
|
|
67
|
-
);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
describe('For UL and LI', function () {
|
|
71
|
-
it('Should add to every nodes some attributes', function () {
|
|
72
|
-
const editor = getJodit({
|
|
73
|
-
createAttributes: {
|
|
74
|
-
ul: { class: 'indent_small list list_offset_left' },
|
|
75
|
-
li: { class: 'some_li' },
|
|
76
|
-
ol: { class: 'indent_small ollist list_offset_left' }
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const ul = editor.createInside.element('ul');
|
|
81
|
-
expect(ul.className).equals(
|
|
82
|
-
'indent_small list list_offset_left'
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
const li = editor.createInside.element('li');
|
|
86
|
-
expect(li.className).equals('some_li');
|
|
87
|
-
|
|
88
|
-
const ol = editor.createInside.element('ol');
|
|
89
|
-
expect(ol.className).equals(
|
|
90
|
-
'indent_small ollist list_offset_left'
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
editor.value = 'one';
|
|
94
|
-
editor.execCommand('selectall');
|
|
95
|
-
editor.execCommand('insertUnorderedList');
|
|
96
|
-
|
|
97
|
-
expect(editor.value).equals(
|
|
98
|
-
'<ul class="indent_small list list_offset_left"><li class="some_li">one</li></ul>'
|
|
99
|
-
);
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
});
|