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,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
- });