jodit 4.6.19 → 4.7.3

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 (77) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +248 -4
  4. package/es2015/jodit.js +35172 -37099
  5. package/es2015/jodit.min.js +248 -4
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +44 -74
  8. package/es2015/plugins/debug/debug.min.js +5 -4
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +616 -714
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -4
  12. package/es2018/jodit.fat.min.js +248 -4
  13. package/es2018/jodit.min.js +248 -4
  14. package/es2018/plugins/debug/debug.min.js +5 -4
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -4
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +262 -4
  18. package/es2021/jodit.js +34762 -36981
  19. package/es2021/jodit.min.js +262 -4
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +42 -72
  22. package/es2021/plugins/debug/debug.min.js +5 -4
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +614 -712
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -4
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +262 -4
  28. package/es2021.en/jodit.js +33513 -35465
  29. package/es2021.en/jodit.min.js +262 -4
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +42 -72
  32. package/es2021.en/plugins/debug/debug.min.js +5 -4
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +318 -347
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -4
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -4
  38. package/es5/jodit.js +42977 -39182
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -4
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +152 -163
  43. package/es5/plugins/debug/debug.min.js +2 -4
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +755 -777
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -4
  47. package/es5/polyfills.fat.min.js +8 -0
  48. package/es5/{415.js → polyfills.js} +177 -5
  49. package/es5/polyfills.min.js +8 -0
  50. package/esm/config.js +3 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/helpers/utils/assert.js +4 -0
  53. package/esm/core/ui/form/inputs/input/input.d.ts +1 -0
  54. package/esm/core/view/view.d.ts +1 -1
  55. package/esm/core/view/view.js +1 -1
  56. package/esm/jodit.js +6 -1
  57. package/esm/modules/dialog/dialog.js +5 -5
  58. package/esm/modules/status-bar/status-bar.d.ts +1 -1
  59. package/esm/plugins/tab/cases/on-tab-inside-li.js +1 -1
  60. package/esm/tsconfig.json +1 -1
  61. package/package.json +3 -5
  62. package/types/core/ui/form/inputs/input/input.d.ts +1 -0
  63. package/types/core/view/view.d.ts +1 -1
  64. package/types/modules/status-bar/status-bar.d.ts +1 -1
  65. package/types/tsconfig.json +1 -1
  66. package/es2018/jodit.css +0 -5386
  67. package/es2018/jodit.js +0 -45274
  68. package/es2018/plugins/debug/debug.css +0 -53
  69. package/es2018/plugins/debug/debug.js +0 -236
  70. package/es2018/plugins/speech-recognize/speech-recognize.css +0 -43
  71. package/es2018/plugins/speech-recognize/speech-recognize.js +0 -1199
  72. package/es5/415.fat.min.js +0 -10
  73. package/es5/415.min.js +0 -10
  74. package/es5/5.fat.min.js +0 -10
  75. package/es5/5.js +0 -76
  76. package/es5/5.min.js +0 -10
  77. package/esm/polyfills.js +0 -54
@@ -1,53 +0,0 @@
1
- /*!
2
- * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
- * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.6.19
5
- * Url: https://xdsoft.net/jodit/
6
- * License(s): MIT
7
- */
8
-
9
- .jodit-debug {
10
- background: #f6f6f6;
11
- position: relative;
12
- padding: 0;
13
- display: flex;
14
- justify-content: space-between;
15
- align-items: stretch;
16
- }
17
- .jodit-debug > * {
18
- padding: var(--jd-padding-default);
19
- }
20
- .jodit-debug__tree {
21
- width: 40%;
22
- }
23
- .jodit-debug__tree .jodit-debug__tree-elm-name {
24
- color: #052e88;
25
- }
26
- .jodit-debug__tree .jodit-debug__tree-element_selected {
27
- background: #1e7e34;
28
- color: #fff;
29
- }
30
- .jodit-debug__tree .jodit-debug__tree-cursor {
31
- background: #dc3232;
32
- color: #fff;
33
- }
34
- .jodit-debug__events {
35
- width: 40%;
36
- max-height: 500px;
37
- overflow: auto;
38
- background: #1e7e34;
39
- color: #fff;
40
- }
41
- .jodit-debug__events span {
42
- color: #cacaca;
43
- font-size: 0.8em;
44
- }
45
- .jodit-debug__events .jodit-debug__events-clear {
46
- position: absolute;
47
- top: 0;
48
- right: 0;
49
- padding: 5px;
50
- cursor: pointer;
51
- color: red;
52
- }
53
-
@@ -1,236 +0,0 @@
1
- /*!
2
- * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
- * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.6.19
5
- * Url: https://xdsoft.net/jodit/
6
- * License(s): MIT
7
- */
8
-
9
- "use strict";
10
- (function webpackUniversalModuleDefinition(root, factory) {
11
- if(typeof exports === 'object' && typeof module === 'object')
12
- module.exports = factory();
13
- else if(typeof define === 'function' && define.amd)
14
- define([], factory);
15
- else {
16
- var a = factory();
17
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
18
- }
19
- })(self, function() {
20
- return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[486],{
21
-
22
- /***/ 40773:
23
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
24
-
25
- __webpack_require__.r(__webpack_exports__);
26
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27
- /* harmony export */ Debug: function() { return /* binding */ Debug; }
28
- /* harmony export */ });
29
- /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
30
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
31
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
32
- /* harmony import */ var jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(61793);
33
- /* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29866);
34
- /*!
35
- * Jodit Editor (https://xdsoft.net/jodit/)
36
- * Released under MIT see LICENSE.txt in the project root for license information.
37
- * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
38
- */
39
-
40
-
41
- // @ts-ignore
42
-
43
-
44
-
45
-
46
- class Debug extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
47
- afterInit(jodit) {
48
- const mirror = jodit.create.div('jodit-debug');
49
- const tree = jodit.create.div('jodit-debug__tree');
50
- const events = jodit.create.div('jodit-debug__events');
51
- const clear = jodit.create.div('jodit-debug__events-clear', ['x']);
52
- const sel = jodit.create.div('jodit-debug__sel');
53
- mirror.appendChild(tree);
54
- mirror.appendChild(events);
55
- events.appendChild(clear);
56
- mirror.appendChild(sel);
57
- clear.addEventListener('click', () => {
58
- events.innerHTML = '';
59
- events.appendChild(clear);
60
- });
61
- jodit.workplace.appendChild(mirror);
62
- const allEvents = [
63
- 'activate',
64
- 'afterInit',
65
- 'beforeactivate',
66
- 'beforeblur',
67
- 'beforedeactivate',
68
- 'beforefocus',
69
- 'beforeinput',
70
- 'blur',
71
- 'change',
72
- 'click',
73
- 'compositionend',
74
- 'compositionstart',
75
- 'compositionupdate',
76
- 'contextmenu',
77
- 'copy',
78
- 'cut',
79
- 'dblclick',
80
- 'deactivate',
81
- 'focus',
82
- 'focusin',
83
- 'focusout',
84
- 'focusout',
85
- 'input',
86
- 'keydown',
87
- 'keypress',
88
- 'keyup',
89
- 'mousedown',
90
- 'mouseup',
91
- 'paste',
92
- 'selectionchange',
93
- 'selectionstart',
94
- 'dragstart',
95
- 'drop',
96
- 'dragover',
97
- 'resize touchstart touchend',
98
- 'updateDebug',
99
- 'beforeCommand',
100
- 'afterCommand',
101
- 'wheel'
102
- ];
103
- function updateTree() {
104
- const range = jodit.selection.range;
105
- tree.innerHTML = render(jodit.editor, 0, range);
106
- sel.innerHTML = `start ${range.startContainer.nodeName} ${range.startOffset}<br>end ${range.endContainer.nodeName} ${range.endOffset}`;
107
- }
108
- function onSomeEvent(e) {
109
- const event = jodit.e.current;
110
- const div = jodit.create.div();
111
- div.innerHTML = `<span>${new Date().toLocaleTimeString()}</span> ${renderEvent(event, e)}`;
112
- events.appendChild(div);
113
- events.scrollTop = events.scrollHeight;
114
- jodit.async.setTimeout(() => {
115
- events.children.length > 100 &&
116
- events.removeChild(events.children[0]);
117
- }, 100);
118
- }
119
- function renderEvent(event, e) {
120
- const result = [event !== null && event !== void 0 ? event : e.type];
121
- switch (event) {
122
- case 'beforeCommand':
123
- case 'afterCommand':
124
- result.push(`<span>${e.toString()}</span>`);
125
- break;
126
- case 'keydown':
127
- case 'keyup':
128
- case 'keypress':
129
- if (e.shiftKey &&
130
- e.key !== 'Shift') {
131
- result.push('Shift+');
132
- }
133
- if (e.ctrlKey &&
134
- e.key !== 'Control') {
135
- result.push('Ctrl+');
136
- }
137
- if (e.altKey &&
138
- e.key !== 'Alt') {
139
- result.push('Alt');
140
- }
141
- result.push(`${e.key}`);
142
- break;
143
- }
144
- if (e && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isNode(e.target)) {
145
- result.push(`<span>${e.target.nodeName}</span>`);
146
- }
147
- return result.join(' ');
148
- }
149
- jodit.e
150
- .on('keydown keyup keypress change afterInit updateDebug', updateTree)
151
- .on(allEvents, onSomeEvent)
152
- .on(jodit.od, 'selectionchange', onSomeEvent)
153
- .on(jodit.od, 'selectionchange', updateTree);
154
- }
155
- beforeDestruct(jodit) { }
156
- }
157
- function renderText(elm, range) {
158
- if (!elm.nodeValue) {
159
- return "<span style='color:red'>empty</span>";
160
- }
161
- let value = elm.nodeValue;
162
- if (range.collapsed) {
163
- if (elm === range.startContainer) {
164
- value =
165
- value.slice(0, range.startOffset) +
166
- '%CURSOR%' +
167
- value.slice(range.startOffset);
168
- }
169
- }
170
- else {
171
- if (elm === range.startContainer && elm === range.endContainer) {
172
- value =
173
- value.slice(0, range.startOffset) +
174
- '%START-CURSOR%' +
175
- value.slice(range.startOffset, range.endOffset) +
176
- '%END-CURSOR%' +
177
- value.slice(range.endOffset);
178
- }
179
- else if (elm === range.startContainer) {
180
- value =
181
- value.slice(0, range.startOffset) +
182
- '%CURSOR%' +
183
- value.slice(range.startOffset);
184
- }
185
- else if (elm === range.endContainer) {
186
- value =
187
- value.slice(0, range.endOffset) +
188
- '%CURSOR%' +
189
- value.slice(range.endOffset);
190
- }
191
- }
192
- return (0,jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_3__/* .stripTags */ .K)(value.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), 'INV'))
193
- .replace(/%CURSOR%/, '<span class="jodit-debug__tree-cursor">|</span>')
194
- .replace(/%START-CURSOR%/, '<span class="jodit-debug__tree-cursor">|')
195
- .replace(/%END-CURSOR%/, '|</span>');
196
- }
197
- function render(elm, level, range) {
198
- var _a;
199
- const isSelected = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.containsNode(elm);
200
- const content = [
201
- `<span class="jodit-debug__tree-elm-name">${elm.nodeName}</span>`,
202
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(elm) ? `- ${renderText(elm, range)}` : ''
203
- ]
204
- .map(i => i.trim())
205
- .filter(Boolean);
206
- return `<div class="${isSelected ? 'jodit-debug__tree-element_selected' : ''}" style='padding-left: ${level * 5}px'>
207
- ${content.join('&nbsp;')}
208
- ${Array.from(elm.childNodes)
209
- .map((ch, index) => {
210
- const result = [];
211
- if (range.startContainer === elm && index === range.startOffset) {
212
- result.push('<span class="jodit-debug__tree-cursor">|</span>');
213
- }
214
- result.push(render(ch, level + 1, range));
215
- if (range.endContainer === elm && index === range.endOffset) {
216
- result.push('<span class="jodit-debug__tree-cursor">|</span>');
217
- }
218
- return result;
219
- })
220
- .flat()
221
- .join('')}
222
- </div>`;
223
- }
224
- // pluginSystem.add('debug', Debug);
225
-
226
-
227
- /***/ })
228
-
229
- },
230
- /******/ function(__webpack_require__) { // webpackRuntimeModules
231
- /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
232
- /******/ var __webpack_exports__ = (__webpack_exec__(40773));
233
- /******/ return __webpack_exports__;
234
- /******/ }
235
- ]);
236
- });
@@ -1,43 +0,0 @@
1
- /*!
2
- * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
- * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.6.19
5
- * Url: https://xdsoft.net/jodit/
6
- * License(s): MIT
7
- */
8
-
9
- @keyframes jd-speak-animation {
10
- 0% {
11
- fill: green;
12
- opacity: 0.3;
13
- }
14
- 100% {
15
- fill: #4285f4;
16
- }
17
- }
18
- svg.jodit-icon_speechRecognize {
19
- stroke: none !important;
20
- }
21
- .jodit-toolbar-button_pulse_true svg {
22
- animation-duration: 0.7s;
23
- animation-iteration-count: infinite;
24
- animation-name: jd-speak-animation;
25
- }
26
- .jodit-speech-recognize__list-item {
27
- display: flex;
28
- padding: var(--jd-padding-default);
29
- }
30
- .jodit-speech-recognize__popup {
31
- font-family: var(--jd-font-default);
32
- font-size: var(--jd-font-size-default);
33
- position: absolute;
34
- top: 50%;
35
- left: 50%;
36
- padding: 8px 16px;
37
- border-radius: 8px;
38
- background-color: rgba(240, 240, 240, 0.4);
39
- font-size: 32px;
40
- line-height: 1.5;
41
- transform: translate(-50%, -50%);
42
- }
43
-