jodit 4.18.7 → 4.18.8

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 (64) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +8 -8
  4. package/es2015/jodit.js +164 -16
  5. package/es2015/jodit.min.js +5 -5
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +8 -8
  13. package/es2018/jodit.min.js +5 -5
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +9 -9
  18. package/es2021/jodit.js +164 -16
  19. package/es2021/jodit.min.js +5 -5
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +9 -9
  28. package/es2021.en/jodit.js +164 -16
  29. package/es2021.en/jodit.min.js +5 -5
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +172 -16
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/config.d.ts +2 -2
  51. package/esm/core/constants.js +1 -1
  52. package/esm/modules/dialog/dialog.js +18 -3
  53. package/esm/plugins/backspace/cases/check-join-neighbors.js +81 -0
  54. package/esm/plugins/backspace/cases/check-remove-char.js +6 -5
  55. package/esm/plugins/backspace/cases/check-unwrap-list-item.d.ts +26 -0
  56. package/esm/plugins/backspace/cases/check-unwrap-list-item.js +56 -0
  57. package/esm/plugins/backspace/cases/index.js +2 -0
  58. package/esm/plugins/backspace/config.d.ts +2 -2
  59. package/esm/plugins/enter/enter.js +1 -1
  60. package/esm/plugins/enter/helpers/check-br.js +7 -2
  61. package/package.json +1 -1
  62. package/types/config.d.ts +2 -2
  63. package/types/plugins/backspace/cases/check-unwrap-list-item.d.ts +26 -0
  64. package/types/plugins/backspace/config.d.ts +2 -2
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.18.7
4
+ * Version: v4.18.8
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2152,7 +2152,7 @@ __webpack_require__.r(__webpack_exports__);
2152
2152
  * @packageDocumentation
2153
2153
  * @module constants
2154
2154
  */
2155
- var APP_VERSION = "4.18.7";
2155
+ var APP_VERSION = "4.18.8";
2156
2156
  // prettier-ignore
2157
2157
  var ES = "es5";
2158
2158
  var IS_ES_MODERN = false;
@@ -24100,6 +24100,11 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorat
24100
24100
 
24101
24101
 
24102
24102
 
24103
+ /**
24104
+ * A position from 0 up to `max`, or 0 when the panel is larger than the window
24105
+ */ var clampToWindow = function clampToWindow(value, max) {
24106
+ return Math.max(0, Math.min(value, max));
24107
+ };
24103
24108
  jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.dialog = {
24104
24109
  namespace: '',
24105
24110
  extraButtons: [],
@@ -24295,6 +24300,11 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
24295
24300
  this.startY = e.clientY;
24296
24301
  this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'left');
24297
24302
  this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'top');
24303
+ // Rounded up: at the right edge a fraction of a pixel less room would
24304
+ // wrap the header of a panel that has no width of its own
24305
+ var _this_dialog_getBoundingClientRect = this.dialog.getBoundingClientRect(), width = _this_dialog_getBoundingClientRect.width, height = _this_dialog_getBoundingClientRect.height;
24306
+ this.startPoint.w = Math.ceil(width);
24307
+ this.startPoint.h = Math.ceil(height);
24298
24308
  this.setMaxZIndex();
24299
24309
  if (e.cancelable) {
24300
24310
  e.preventDefault();
@@ -24313,7 +24323,11 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
24313
24323
  key: "__onMouseMove",
24314
24324
  value: function __onMouseMove(e) {
24315
24325
  if (this.draggable && this.o.draggable) {
24316
- this.setPosition(this.startPoint.x + e.clientX - this.startX, this.startPoint.y + e.clientY - this.startY);
24326
+ var documentElement = this.od.documentElement;
24327
+ // Keep the whole panel in the window at the size it had when the
24328
+ // drag began. A panel with no width of its own would otherwise
24329
+ // shrink as it neared the right edge, and then leave the window
24330
+ this.setPosition(clampToWindow(this.startPoint.x + e.clientX - this.startX, (documentElement.clientWidth || this.ow.innerWidth) - this.startPoint.w), clampToWindow(this.startPoint.y + e.clientY - this.startY, (documentElement.clientHeight || this.ow.innerHeight) - this.startPoint.h));
24317
24331
  if (this.e) {
24318
24332
  /**
24319
24333
  * Fired when dialog box is moved
@@ -24463,8 +24477,8 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
24463
24477
  }
24464
24478
  // strings on purpose: `css()` would truncate fractional pixels
24465
24479
  ;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, {
24466
- left: (x || left) + 'px',
24467
- top: (y || top) + 'px'
24480
+ left: (x !== null && x !== void 0 ? x : left) + 'px',
24481
+ top: (y !== null && y !== void 0 ? y : top) + 'px'
24468
24482
  });
24469
24483
  return this;
24470
24484
  }
@@ -34126,6 +34140,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('backspace', bac
34126
34140
  * Check if two separate elements can be connected
34127
34141
  * @private
34128
34142
  */ function checkJoinNeighbors(jodit, fakeNode, backspace) {
34143
+ if (checkJoinBareText(jodit, fakeNode, backspace)) {
34144
+ return true;
34145
+ }
34129
34146
  var nextBox = fakeNode, mainClosestBox = nextBox;
34130
34147
  // Find the main big closest element
34131
34148
  while(nextBox && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -34153,7 +34170,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('backspace', bac
34153
34170
  return true;
34154
34171
  }
34155
34172
  var box = findCaretBox(fakeNode, mainClosestBox);
34156
- if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
34173
+ if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || checkJoinInlineSibling(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
34157
34174
  jodit.s.setCursorBefore(fakeNode);
34158
34175
  return true;
34159
34176
  }
@@ -34240,6 +34257,74 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('backspace', bac
34240
34257
  }
34241
34258
  return true;
34242
34259
  }
34260
+ /**
34261
+ * A block next to bare text in the same parent joins that text, as the
34262
+ * browsers do: `<li>one<p>|two</p></li>` gives `<li>one|two</li>`, and
34263
+ * `<li><p>one|</p>two</li>` gives `<li><p>one|two</p></li>`
34264
+ * @private
34265
+ */ function checkJoinInlineSibling(jodit, box, sibling, backspace) {
34266
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(sibling) || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(box) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(box) || // The caret's block is nested deeper than the text: `text<div><p>|x</p></div>`
34267
+ box.parentNode !== sibling.parentNode || Array.from(box.childNodes).some(function(node) {
34268
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
34269
+ })) {
34270
+ return false;
34271
+ }
34272
+ if (backspace) {
34273
+ // Text after the block keeps its own line
34274
+ var next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(box, false);
34275
+ if (next && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(next) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(next, 'br')) {
34276
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(box, jodit.createInside.element('br'));
34277
+ }
34278
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(box);
34279
+ return true;
34280
+ }
34281
+ var filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
34282
+ for(var node = sibling; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
34283
+ var next1 = node.nextSibling;
34284
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
34285
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
34286
+ break;
34287
+ }
34288
+ filter(node) ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(box, node) : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
34289
+ node = next1;
34290
+ }
34291
+ return true;
34292
+ }
34293
+ /**
34294
+ * Bare text next to a block in the same parent, as the browsers join them:
34295
+ * Backspace in `<div><p>a</p>|b</div>` gives `<div><p>a|b</p></div>`, Delete
34296
+ * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
34297
+ */ function checkJoinBareText(jodit, fakeNode, backspace) {
34298
+ var block = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
34299
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(block) || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(block) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(block) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'table') || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(block) || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(block, jodit.editor) || Array.from(block.childNodes).some(function(node) {
34300
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
34301
+ })) {
34302
+ return false;
34303
+ }
34304
+ var filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
34305
+ if (backspace) {
34306
+ // The caret's line goes to the end of the block before it
34307
+ for(var node = fakeNode; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
34308
+ var next = node.nextSibling;
34309
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
34310
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
34311
+ break;
34312
+ }
34313
+ filter(node) ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.append(block, node) : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
34314
+ node = next;
34315
+ }
34316
+ } else {
34317
+ // The block's content joins the caret's line, and text after the
34318
+ // block keeps its own line
34319
+ var next1 = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(block, false);
34320
+ if (next1 && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(next1) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(next1, 'br')) {
34321
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, jodit.createInside.element('br'));
34322
+ }
34323
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(block);
34324
+ }
34325
+ jodit.s.setCursorBefore(fakeNode);
34326
+ return true;
34327
+ }
34243
34328
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
34244
34329
  // Process UL/LI/OL cases
34245
34330
  var siblingIsList = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -34455,10 +34540,11 @@ function getNextInlineSibling(sibling, backspace, root) {
34455
34540
  var nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(sibling, backspace);
34456
34541
  if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
34457
34542
  nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__.findMostNestedNeighbor)(sibling, !backspace, root, true);
34458
- // Do not cross a list-item boundary. At the start of a list item the
34459
- // neighbor can be the text of the parent/previous item; deleting a char
34460
- // there is wrong — the list cases must handle the outdent/merge (#1277).
34461
- if (nextSibling && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(sibling, 'li', root) !== jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(nextSibling, 'li', root)) {
34543
+ // Do not cross a block boundary. At the start of a list item the
34544
+ // neighbor can be the text of the parent/previous item (#1277), and at
34545
+ // the start of a paragraph the text before it in the same parent
34546
+ // (#1693); deleting a char there is wrong — the join cases handle them.
34547
+ if (nextSibling && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(sibling, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, root) !== jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(nextSibling, jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, root)) {
34462
34548
  return null;
34463
34549
  }
34464
34550
  }
@@ -34840,6 +34926,71 @@ function isSpace(char) {
34840
34926
  }
34841
34927
 
34842
34928
 
34929
+ /***/ }),
34930
+
34931
+ /***/ 88426:
34932
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
34933
+
34934
+ "use strict";
34935
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
34936
+ /* harmony export */ checkUnwrapListItem: function() { return /* binding */ checkUnwrapListItem; }
34937
+ /* harmony export */ });
34938
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
34939
+ /*!
34940
+ * Jodit Editor (https://xdsoft.net/jodit/)
34941
+ * Released under MIT see LICENSE.txt in the project root for license information.
34942
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
34943
+ */ /**
34944
+ * @module plugins/backspace
34945
+ */
34946
+ /**
34947
+ * Backspace at the start of a later list item takes the bullet off, as Word
34948
+ * does: the item becomes a paragraph where it was, and the list is split
34949
+ * around it. A split `<ol>` carries its numbering on with `start`.
34950
+ *
34951
+ * @example
34952
+ * ```html
34953
+ * <ol><li>first</li><li>|second</li><li>third</li></ol>
34954
+ * ```
34955
+ * Result
34956
+ * ```html
34957
+ * <ol><li>first</li></ol><p>|second</p><ol start="2"><li>third</li></ol>
34958
+ * ```
34959
+ *
34960
+ * @private
34961
+ */ function checkUnwrapListItem(jodit, fakeNode, backspace) {
34962
+ if (!backspace) {
34963
+ return false;
34964
+ }
34965
+ var li = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(fakeNode, 'li', jodit.editor);
34966
+ var list = li ? li.parentElement : null;
34967
+ if (!li || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(list) || !li.previousElementSibling || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(li) || Array.from(li.childNodes).some(function(node) {
34968
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(node);
34969
+ }) || !jodit.s.cursorInTheEdge(true, li)) {
34970
+ return false;
34971
+ }
34972
+ var p = jodit.createInside.element(jodit.o.enterBlock);
34973
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(list, p);
34974
+ if (li.nextElementSibling) {
34975
+ var rest = list.cloneNode(false);
34976
+ // Two lists cannot share one id
34977
+ rest.removeAttribute('id');
34978
+ while(li.nextSibling){
34979
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(rest, li.nextSibling);
34980
+ }
34981
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol')) {
34982
+ var start = parseInt(list.getAttribute('start') || '1', 10) || 1;
34983
+ rest.setAttribute('start', String(start + list.children.length - 1));
34984
+ }
34985
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(p, rest);
34986
+ }
34987
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(li, p);
34988
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(li);
34989
+ jodit.s.setCursorBefore(fakeNode);
34990
+ return true;
34991
+ }
34992
+
34993
+
34843
34994
  /***/ }),
34844
34995
 
34845
34996
  /***/ 17523:
@@ -34860,6 +35011,7 @@ function isSpace(char) {
34860
35011
  /* harmony import */ var _check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(93890);
34861
35012
  /* harmony import */ var _check_table_cell__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12443);
34862
35013
  /* harmony import */ var _check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(10157);
35014
+ /* harmony import */ var _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(88426);
34863
35015
  /*!
34864
35016
  * Jodit Editor (https://xdsoft.net/jodit/)
34865
35017
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34876,6 +35028,7 @@ function isSpace(char) {
34876
35028
 
34877
35029
 
34878
35030
 
35031
+
34879
35032
  /**
34880
35033
  * Ordered delete/backspace cases with stable keys. The first one returning
34881
35034
  * `true` wins. The keys are stable across minified builds (function names are
@@ -34910,6 +35063,10 @@ function isSpace(char) {
34910
35063
  'join-two-lists',
34911
35064
  _check_join_two_lists__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists
34912
35065
  ],
35066
+ [
35067
+ 'unwrap-list-item',
35068
+ _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_10__.checkUnwrapListItem
35069
+ ],
34913
35070
  [
34914
35071
  'join-neighbors',
34915
35072
  _check_join_neighbors__WEBPACK_IMPORTED_MODULE_1__.checkJoinNeighbors
@@ -38996,7 +39153,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_7__.pluginSystem.add('dtd', dtd);
38996
39153
  ]);
38997
39154
  var block = (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.getBlockWrapper)(fake, jodit);
38998
39155
  var isLi = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isLeaf(block);
38999
- // if use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
39156
+ // if use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
39000
39157
  if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) && (0,_helpers__WEBPACK_IMPORTED_MODULE_12__.checkBR)(fake, jodit, event === null || event === void 0 ? void 0 : event.shiftKey, block)) {
39001
39158
  return false;
39002
39159
  }
@@ -39069,10 +39226,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('enter', enter);
39069
39226
  * Checks the possibility and necessity of inserting a BR instead of a block
39070
39227
  * @private
39071
39228
  */ function checkBR(fake, jodit, shiftKeyPressed, block) {
39072
- var isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, [
39073
- 'pre',
39074
- 'blockquote'
39075
- ], jodit.editor));
39229
+ // Text in a <pre>, or bare text in a quote, gets a BR. A real block inside
39230
+ // a quote (<p>, <h3>, ...) is split like anywhere else, as in a cell below.
39231
+ var isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, 'pre', jodit.editor)) || (block ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'blockquote') : Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, 'blockquote', jodit.editor)));
39076
39232
  // A cell itself can't be split into two cells, so bare cell content gets
39077
39233
  // a BR. But when the cell already holds a real block (<p>, <h3>, ...) that
39078
39234
  // block is split like anywhere else, otherwise every line of the cell
@@ -39082,7 +39238,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('enter', enter);
39082
39238
  'th'
39083
39239
  ], jodit.editor)));
39084
39240
  var isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
39085
- // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
39241
+ // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
39086
39242
  if (isBRMode || isCell || shiftKeyPressed && !isMultiLineBlock || !shiftKeyPressed && isMultiLineBlock) {
39087
39243
  // 2 BR before
39088
39244
  if (isMultiLineBlock && checkSeveralBR(fake)) {
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.18.7
4
+ * Version: v4.18.8
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.18.7
11
+ * Version: v4.18.8
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */