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.
Files changed (110) hide show
  1. package/.idea/codeStyles/Project.xml +68 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/dictionaries/v_chupurnov.xml +10 -0
  4. package/.idea/encodings.xml +4 -0
  5. package/.idea/inspectionProfiles/Project_Default.xml +118 -0
  6. package/.idea/jodit.iml +12 -0
  7. package/.idea/jsLibraryMappings.xml +6 -0
  8. package/.idea/markdown-navigator-enh.xml +29 -0
  9. package/.idea/markdown-navigator.xml +55 -0
  10. package/.idea/misc.xml +6 -0
  11. package/.idea/modules.xml +8 -0
  12. package/.idea/prettier.xml +6 -0
  13. package/.idea/vcs.xml +6 -0
  14. package/.idea/watcherTasks.xml +4 -0
  15. package/.idea/workspace.xml +1264 -0
  16. package/build/jodit.css +2 -2
  17. package/build/jodit.es2018.css +1 -1
  18. package/build/jodit.es2018.en.css +1 -1
  19. package/build/jodit.es2018.en.js +4 -4
  20. package/build/jodit.es2018.en.min.js +2 -2
  21. package/build/jodit.es2018.js +4 -4
  22. package/build/jodit.es2018.min.js +2 -2
  23. package/build/jodit.js +4 -4
  24. package/build/jodit.min.css +1 -1
  25. package/build/jodit.min.js +2 -2
  26. package/package.json +2 -2
  27. package/.travis.yml +0 -7
  28. package/bower.json +0 -33
  29. package/build.js +0 -39
  30. package/docker/Dockerfile +0 -11
  31. package/docker/README.md +0 -45
  32. package/docker/build +0 -3
  33. package/docker/install +0 -7
  34. package/docker/start +0 -3
  35. package/docker/test +0 -3
  36. package/docker/uninstall +0 -3
  37. package/examples/arabic.lang.html +0 -76
  38. package/examples/assets/app.css +0 -175
  39. package/examples/assets/app.js +0 -57
  40. package/examples/assets/download.jpg +0 -0
  41. package/examples/assets/icon.png +0 -0
  42. package/examples/assets/logo.png +0 -0
  43. package/examples/assets/prism.css +0 -200
  44. package/examples/assets/prism.js +0 -1254
  45. package/examples/color-picker.html +0 -139
  46. package/examples/custom-icons.html +0 -173
  47. package/examples/custom-toolbar.html +0 -80
  48. package/examples/example.default.html +0 -75
  49. package/examples/fullsize.html +0 -75
  50. package/examples/index.html +0 -176
  51. package/examples/inline-mode.html +0 -116
  52. package/examples/oneinstance.html +0 -125
  53. package/icons.html +0 -50
  54. package/karma.conf.js +0 -157
  55. package/make.js +0 -10
  56. package/server.js +0 -101
  57. package/test/bootstrap.js +0 -1167
  58. package/test/test.html +0 -102
  59. package/test/test.index.html +0 -11
  60. package/test/tests/acceptance/clipboardTest.js +0 -1234
  61. package/test/tests/acceptance/commandsTest.js +0 -647
  62. package/test/tests/acceptance/creatorTest.js +0 -103
  63. package/test/tests/acceptance/deleteBackSpaceTest.js +0 -1289
  64. package/test/tests/acceptance/dialogTest.js +0 -188
  65. package/test/tests/acceptance/editorTest.js +0 -855
  66. package/test/tests/acceptance/enterTest.js +0 -1088
  67. package/test/tests/acceptance/eventsTest.js +0 -1246
  68. package/test/tests/acceptance/filebrowserTest.js +0 -1309
  69. package/test/tests/acceptance/i18nTest.js +0 -81
  70. package/test/tests/acceptance/iframeTest.js +0 -306
  71. package/test/tests/acceptance/imageTest.js +0 -1649
  72. package/test/tests/acceptance/inlineModeTest.js +0 -826
  73. package/test/tests/acceptance/interfaceTest.js +0 -119
  74. package/test/tests/acceptance/mobileTest.js +0 -229
  75. package/test/tests/acceptance/plugins/classSpan.js +0 -220
  76. package/test/tests/acceptance/plugins/cleanHtml.js +0 -351
  77. package/test/tests/acceptance/plugins/color.js +0 -188
  78. package/test/tests/acceptance/plugins/dragAndDropElement.js +0 -172
  79. package/test/tests/acceptance/plugins/focus.js +0 -115
  80. package/test/tests/acceptance/plugins/font.js +0 -316
  81. package/test/tests/acceptance/plugins/image.js +0 -79
  82. package/test/tests/acceptance/plugins/indent.js +0 -179
  83. package/test/tests/acceptance/plugins/inline-popup.js +0 -578
  84. package/test/tests/acceptance/plugins/insert.js +0 -17
  85. package/test/tests/acceptance/plugins/limit.js +0 -164
  86. package/test/tests/acceptance/plugins/link.js +0 -1640
  87. package/test/tests/acceptance/plugins/orderedList.js +0 -290
  88. package/test/tests/acceptance/plugins/placeholder.js +0 -138
  89. package/test/tests/acceptance/plugins/resizer.js +0 -329
  90. package/test/tests/acceptance/plugins/search.js +0 -623
  91. package/test/tests/acceptance/plugins/size.js +0 -344
  92. package/test/tests/acceptance/plugins/source.js +0 -218
  93. package/test/tests/acceptance/plugins/stat.js +0 -120
  94. package/test/tests/acceptance/plugins/tooltip.js +0 -97
  95. package/test/tests/acceptance/plugins/wrapTextNodes.js +0 -105
  96. package/test/tests/acceptance/pluginsTest.js +0 -2219
  97. package/test/tests/acceptance/selectionTest.js +0 -862
  98. package/test/tests/acceptance/statesTest.js +0 -310
  99. package/test/tests/acceptance/tableTest.js +0 -1988
  100. package/test/tests/acceptance/toolbarTest.js +0 -1747
  101. package/test/tests/acceptance/undoredoTest.js +0 -217
  102. package/test/tests/acceptance/uploaderTest.js +0 -187
  103. package/test/tests/artio.jpg +0 -0
  104. package/test/tests/units/helpersTest.js +0 -771
  105. package/test/tests/units/modules/dom.js +0 -282
  106. package/test/tests/units/objectObserverTest.js +0 -533
  107. package/test/tests/units/popupTest.js +0 -211
  108. package/test/tests/units/positionTest.js +0 -238
  109. package/test/tests/units/styleTest.js +0 -1361
  110. package/webpack.config.js +0 -308
@@ -1,188 +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('Dialog system tests', function () {
7
- describe('About dialog', function () {
8
- it('Should be opened when use clicks on the About button', function () {
9
- getBox().style.width = '100%';
10
-
11
- const editor = getJodit({
12
- disablePlugins: 'mobile'
13
- });
14
-
15
- const about = getButton('about', editor);
16
- expect(about).is.not.null;
17
-
18
- simulateEvent('click', 0, about);
19
-
20
- const dialog = getOpenedDialog(editor);
21
- expect(dialog).is.not.null;
22
-
23
- expect(dialog.innerHTML.indexOf('xdsoft.net') !== -1).is.true;
24
- });
25
-
26
- describe('Close About dialog', function () {
27
- it('Should show Close button in right top corner and close dialog after click', function () {
28
- getBox().style.width = '100%';
29
- const editor = getJodit({
30
- disablePlugins: 'mobile'
31
- });
32
-
33
- const about = getButton('about', editor);
34
- expect(about).is.not.null;
35
-
36
- simulateEvent('click', 0, about);
37
-
38
- const dialog = getOpenedDialog(editor);
39
- expect(dialog).is.not.null;
40
-
41
- expect(dialog.innerHTML.indexOf('xdsoft.net') !== -1).is.true;
42
-
43
- const close = getButton('close', dialog);
44
- expect(close).is.not.null;
45
-
46
- simulateEvent('click', 0, close);
47
-
48
- expect(getOpenedDialog(editor)).is.null;
49
-
50
- expect(dialog.parentElement).is.null;
51
- });
52
- });
53
- });
54
-
55
- describe('Popup inside dialog', function () {
56
- it('Should be opened under dialog', function () {
57
- getBox().style.width = '100%';
58
-
59
- const editor = getJodit({
60
- filebrowser: {
61
- ajax: {
62
- url: 'https://xdsoft.net/jodit/connector/index.php'
63
- }
64
- }
65
- });
66
- editor.value = '<img alt="" src="../artio.jpg"/>';
67
- editor.s.focus();
68
-
69
- simulateEvent('click', editor.editor.querySelector('img'));
70
-
71
- const popup = getOpenedPopup(editor);
72
- clickButton('pencil', popup);
73
-
74
- const dialog = getOpenedDialog(editor);
75
- const changeImage = dialog.querySelector(
76
- 'a[data-ref="changeImage"]'
77
- );
78
- expect(changeImage).is.not.null;
79
-
80
- simulateEvent('click', changeImage);
81
-
82
- const popup2 = getOpenedPopup(editor);
83
- expect(popup2).is.not.null;
84
-
85
- const pos = Jodit.modules.Helpers.position(popup2),
86
- elm = document.elementFromPoint(pos.left + 20, pos.top + 20);
87
-
88
- expect(Jodit.modules.Dom.isOrContains(popup2, elm)).is.true;
89
- });
90
- });
91
-
92
- describe('Short Jodit.Alert etc static methods', function () {
93
- it('Should work without Jodit instance', function () {
94
- const dialog = Jodit.Alert('Hello');
95
- dialog.close();
96
- });
97
-
98
- it('Should return Dialog instance', function () {
99
- const dialog = Jodit.Alert('Hello');
100
- expect(dialog instanceof Jodit.modules.Dialog).is.true;
101
- dialog.close();
102
- });
103
-
104
- describe('Show not string', function () {
105
- it('Should show dialog with toString value', function () {
106
- const dialog = Jodit.Alert(111);
107
- expect(
108
- dialog.dialog.querySelector('.jodit-dialog__content')
109
- .textContent
110
- ).equals('111');
111
- dialog.close();
112
- });
113
- });
114
- it('Should get string or HTMLElement or array of string or array of HTMLElement in arguments', function () {
115
- const dialog = Jodit.Alert(['<div id="hello1">Hello</div>']);
116
- expect(document.getElementById('hello1')).is.not.null;
117
- dialog.close();
118
-
119
- const dialog2 = Jodit.Alert(document.createTextNode('Test'));
120
- expect(dialog2 instanceof Jodit.modules.Dialog).is.true;
121
- dialog2.close();
122
-
123
- const div = document.createElement('div');
124
- div.id = 'hello3';
125
- const dialog3 = Jodit.Alert(div);
126
- expect(div).equals(document.getElementById('hello3'));
127
- dialog3.close();
128
- });
129
- });
130
-
131
- describe('Dialog image', function () {
132
- describe('Opened dialog image', function () {
133
- it('Should disable margin inputs for left, bottom, right if element has equals margins(margin:10px;)', function () {
134
- const editor = getJodit({
135
- observer: {
136
- timeout: 0
137
- },
138
- image: {
139
- openOnDblClick: true
140
- }
141
- });
142
- editor.value =
143
- '<img src="https://xdsoft.net/jodit/build/images/artio.jpg" style="margin:10px;border:1px solid red;width:100px;height:100px;"/>';
144
- simulateEvent(
145
- 'dblclick',
146
- 0,
147
- editor.editor.querySelector('img')
148
- );
149
-
150
- const dialog = getOpenedDialog(editor);
151
-
152
- expect(dialog.style.display).does.not.equal('none');
153
- expect(
154
- dialog.querySelectorAll(
155
- '[data-ref="marginBottom"][disabled]'
156
- ).length
157
- ).equals(1);
158
- });
159
-
160
- it('Should enable margin inputs for left, bottom, right if element has not equals margins(margin:10px 5px;)', function () {
161
- const editor = getJodit({
162
- observer: {
163
- timeout: 0
164
- },
165
- image: {
166
- openOnDblClick: true
167
- }
168
- });
169
- editor.value =
170
- '<img src="https://xdsoft.net/jodit/build/images/artio.jpg" style="margin:10px 5px;border:1px solid red;width:100px;height:100px;"/>';
171
- simulateEvent(
172
- 'dblclick',
173
- 0,
174
- editor.editor.querySelector('img')
175
- );
176
-
177
- const dialog = getOpenedDialog(editor);
178
-
179
- expect(dialog.style.display).does.not.equal('none');
180
- expect(
181
- dialog.querySelectorAll(
182
- '[data-ref="marginBottom"][disabled]'
183
- ).length
184
- ).equals(0);
185
- });
186
- });
187
- });
188
- });