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/es2021/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
  */
@@ -1822,7 +1822,7 @@ __webpack_require__.r(__webpack_exports__);
1822
1822
  * ```
1823
1823
  * @packageDocumentation
1824
1824
  * @module constants
1825
- */ const APP_VERSION = "4.18.7";
1825
+ */ const APP_VERSION = "4.18.8";
1826
1826
  // prettier-ignore
1827
1827
  const ES = "es2021";
1828
1828
  const IS_ES_MODERN = true;
@@ -19846,6 +19846,9 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__decorat
19846
19846
 
19847
19847
 
19848
19848
 
19849
+ /**
19850
+ * A position from 0 up to `max`, or 0 when the panel is larger than the window
19851
+ */ const clampToWindow = (value, max)=>Math.max(0, Math.min(value, max));
19849
19852
  jodit_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.dialog = {
19850
19853
  namespace: '',
19851
19854
  extraButtons: [],
@@ -19936,6 +19939,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
19936
19939
  this.startY = e.clientY;
19937
19940
  this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, 'left');
19938
19941
  this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, 'top');
19942
+ // Rounded up: at the right edge a fraction of a pixel less room would
19943
+ // wrap the header of a panel that has no width of its own
19944
+ const { width, height } = this.dialog.getBoundingClientRect();
19945
+ this.startPoint.w = Math.ceil(width);
19946
+ this.startPoint.h = Math.ceil(height);
19939
19947
  this.setMaxZIndex();
19940
19948
  if (e.cancelable) {
19941
19949
  e.preventDefault();
@@ -19951,7 +19959,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
19951
19959
  }
19952
19960
  __onMouseMove(e) {
19953
19961
  if (this.draggable && this.o.draggable) {
19954
- this.setPosition(this.startPoint.x + e.clientX - this.startX, this.startPoint.y + e.clientY - this.startY);
19962
+ const { documentElement } = this.od;
19963
+ // Keep the whole panel in the window at the size it had when the
19964
+ // drag began. A panel with no width of its own would otherwise
19965
+ // shrink as it neared the right edge, and then leave the window
19966
+ 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));
19955
19967
  if (this.e) {
19956
19968
  /**
19957
19969
  * Fired when dialog box is moved
@@ -20076,8 +20088,8 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
20076
20088
  }
20077
20089
  // strings on purpose: `css()` would truncate fractional pixels
20078
20090
  ;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, {
20079
- left: (x || left) + 'px',
20080
- top: (y || top) + 'px'
20091
+ left: (x ?? left) + 'px',
20092
+ top: (y ?? top) + 'px'
20081
20093
  });
20082
20094
  return this;
20083
20095
  }
@@ -28265,6 +28277,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28265
28277
  * Check if two separate elements can be connected
28266
28278
  * @private
28267
28279
  */ function checkJoinNeighbors(jodit, fakeNode, backspace) {
28280
+ if (checkJoinBareText(jodit, fakeNode, backspace)) {
28281
+ return true;
28282
+ }
28268
28283
  let nextBox = fakeNode, mainClosestBox = nextBox;
28269
28284
  // Find the main big closest element
28270
28285
  while(nextBox && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -28292,7 +28307,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28292
28307
  return true;
28293
28308
  }
28294
28309
  const box = findCaretBox(fakeNode, mainClosestBox);
28295
- if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
28310
+ 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))) {
28296
28311
  jodit.s.setCursorBefore(fakeNode);
28297
28312
  return true;
28298
28313
  }
@@ -28377,6 +28392,70 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28377
28392
  }
28378
28393
  return true;
28379
28394
  }
28395
+ /**
28396
+ * A block next to bare text in the same parent joins that text, as the
28397
+ * browsers do: `<li>one<p>|two</p></li>` gives `<li>one|two</li>`, and
28398
+ * `<li><p>one|</p>two</li>` gives `<li><p>one|two</p></li>`
28399
+ * @private
28400
+ */ function checkJoinInlineSibling(jodit, box, sibling, backspace) {
28401
+ 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>`
28402
+ box.parentNode !== sibling.parentNode || Array.from(box.childNodes).some((node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node))) {
28403
+ return false;
28404
+ }
28405
+ if (backspace) {
28406
+ // Text after the block keeps its own line
28407
+ const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(box, false);
28408
+ 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')) {
28409
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(box, jodit.createInside.element('br'));
28410
+ }
28411
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(box);
28412
+ return true;
28413
+ }
28414
+ const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
28415
+ for(let node = sibling; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
28416
+ const next = node.nextSibling;
28417
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
28418
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
28419
+ break;
28420
+ }
28421
+ 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);
28422
+ node = next;
28423
+ }
28424
+ return true;
28425
+ }
28426
+ /**
28427
+ * Bare text next to a block in the same parent, as the browsers join them:
28428
+ * Backspace in `<div><p>a</p>|b</div>` gives `<div><p>a|b</p></div>`, Delete
28429
+ * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
28430
+ */ function checkJoinBareText(jodit, fakeNode, backspace) {
28431
+ const block = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
28432
+ 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((node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node))) {
28433
+ return false;
28434
+ }
28435
+ const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
28436
+ if (backspace) {
28437
+ // The caret's line goes to the end of the block before it
28438
+ for(let node = fakeNode; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
28439
+ const next = node.nextSibling;
28440
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
28441
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
28442
+ break;
28443
+ }
28444
+ 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);
28445
+ node = next;
28446
+ }
28447
+ } else {
28448
+ // The block's content joins the caret's line, and text after the
28449
+ // block keeps its own line
28450
+ const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(block, false);
28451
+ 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')) {
28452
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, jodit.createInside.element('br'));
28453
+ }
28454
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(block);
28455
+ }
28456
+ jodit.s.setCursorBefore(fakeNode);
28457
+ return true;
28458
+ }
28380
28459
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
28381
28460
  // Process UL/LI/OL cases
28382
28461
  const siblingIsList = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -28588,10 +28667,11 @@ function getNextInlineSibling(sibling, backspace, root) {
28588
28667
  let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(sibling, backspace);
28589
28668
  if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
28590
28669
  nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__.findMostNestedNeighbor)(sibling, !backspace, root, true);
28591
- // Do not cross a list-item boundary. At the start of a list item the
28592
- // neighbor can be the text of the parent/previous item; deleting a char
28593
- // there is wrong — the list cases must handle the outdent/merge (#1277).
28594
- 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)) {
28670
+ // Do not cross a block boundary. At the start of a list item the
28671
+ // neighbor can be the text of the parent/previous item (#1277), and at
28672
+ // the start of a paragraph the text before it in the same parent
28673
+ // (#1693); deleting a char there is wrong — the join cases handle them.
28674
+ 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)) {
28595
28675
  return null;
28596
28676
  }
28597
28677
  }
@@ -28969,6 +29049,69 @@ function isSpace(char) {
28969
29049
  }
28970
29050
 
28971
29051
 
29052
+ /***/ }),
29053
+
29054
+ /***/ 88426:
29055
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
29056
+
29057
+ "use strict";
29058
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29059
+ /* harmony export */ checkUnwrapListItem: function() { return /* binding */ checkUnwrapListItem; }
29060
+ /* harmony export */ });
29061
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
29062
+ /*!
29063
+ * Jodit Editor (https://xdsoft.net/jodit/)
29064
+ * Released under MIT see LICENSE.txt in the project root for license information.
29065
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
29066
+ */ /**
29067
+ * @module plugins/backspace
29068
+ */
29069
+ /**
29070
+ * Backspace at the start of a later list item takes the bullet off, as Word
29071
+ * does: the item becomes a paragraph where it was, and the list is split
29072
+ * around it. A split `<ol>` carries its numbering on with `start`.
29073
+ *
29074
+ * @example
29075
+ * ```html
29076
+ * <ol><li>first</li><li>|second</li><li>third</li></ol>
29077
+ * ```
29078
+ * Result
29079
+ * ```html
29080
+ * <ol><li>first</li></ol><p>|second</p><ol start="2"><li>third</li></ol>
29081
+ * ```
29082
+ *
29083
+ * @private
29084
+ */ function checkUnwrapListItem(jodit, fakeNode, backspace) {
29085
+ if (!backspace) {
29086
+ return false;
29087
+ }
29088
+ const li = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(fakeNode, 'li', jodit.editor);
29089
+ const list = li ? li.parentElement : null;
29090
+ 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((node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(node)) || !jodit.s.cursorInTheEdge(true, li)) {
29091
+ return false;
29092
+ }
29093
+ const p = jodit.createInside.element(jodit.o.enterBlock);
29094
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(list, p);
29095
+ if (li.nextElementSibling) {
29096
+ const rest = list.cloneNode(false);
29097
+ // Two lists cannot share one id
29098
+ rest.removeAttribute('id');
29099
+ while(li.nextSibling){
29100
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(rest, li.nextSibling);
29101
+ }
29102
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol')) {
29103
+ const start = parseInt(list.getAttribute('start') || '1', 10) || 1;
29104
+ rest.setAttribute('start', String(start + list.children.length - 1));
29105
+ }
29106
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(p, rest);
29107
+ }
29108
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(li, p);
29109
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(li);
29110
+ jodit.s.setCursorBefore(fakeNode);
29111
+ return true;
29112
+ }
29113
+
29114
+
28972
29115
  /***/ }),
28973
29116
 
28974
29117
  /***/ 17523:
@@ -28985,6 +29128,7 @@ function isSpace(char) {
28985
29128
  /* harmony import */ var _check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93890);
28986
29129
  /* harmony import */ var _check_table_cell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12443);
28987
29130
  /* harmony import */ var _check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10157);
29131
+ /* harmony import */ var _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(88426);
28988
29132
  /*!
28989
29133
  * Jodit Editor (https://xdsoft.net/jodit/)
28990
29134
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29000,6 +29144,7 @@ function isSpace(char) {
29000
29144
 
29001
29145
 
29002
29146
 
29147
+
29003
29148
  /**
29004
29149
  * Ordered delete/backspace cases with stable keys. The first one returning
29005
29150
  * `true` wins. The keys are stable across minified builds (function names are
@@ -29034,6 +29179,10 @@ function isSpace(char) {
29034
29179
  'join-two-lists',
29035
29180
  _check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
29036
29181
  ],
29182
+ [
29183
+ 'unwrap-list-item',
29184
+ _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__.checkUnwrapListItem
29185
+ ],
29037
29186
  [
29038
29187
  'join-neighbors',
29039
29188
  _check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
@@ -32694,7 +32843,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('dtd', dtd);
32694
32843
  ]);
32695
32844
  let block = (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.getBlockWrapper)(fake, jodit);
32696
32845
  const isLi = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isLeaf(block);
32697
- // if use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
32846
+ // if use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
32698
32847
  if ((!isLi || event?.shiftKey) && (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.checkBR)(fake, jodit, event?.shiftKey, block)) {
32699
32848
  return false;
32700
32849
  }
@@ -32758,10 +32907,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
32758
32907
  * Checks the possibility and necessity of inserting a BR instead of a block
32759
32908
  * @private
32760
32909
  */ function checkBR(fake, jodit, shiftKeyPressed, block) {
32761
- const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, [
32762
- 'pre',
32763
- 'blockquote'
32764
- ], jodit.editor));
32910
+ // Text in a <pre>, or bare text in a quote, gets a BR. A real block inside
32911
+ // a quote (<p>, <h3>, ...) is split like anywhere else, as in a cell below.
32912
+ const 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)));
32765
32913
  // A cell itself can't be split into two cells, so bare cell content gets
32766
32914
  // a BR. But when the cell already holds a real block (<p>, <h3>, ...) that
32767
32915
  // block is split like anywhere else, otherwise every line of the cell
@@ -32771,7 +32919,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
32771
32919
  'th'
32772
32920
  ], jodit.editor)));
32773
32921
  const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
32774
- // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
32922
+ // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
32775
32923
  if (isBRMode || isCell || shiftKeyPressed && !isMultiLineBlock || !shiftKeyPressed && isMultiLineBlock) {
32776
32924
  // 2 BR before
32777
32925
  if (isMultiLineBlock && checkSeveralBR(fake)) {