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
@@ -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;
@@ -19822,6 +19822,9 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__decorat
19822
19822
 
19823
19823
 
19824
19824
 
19825
+ /**
19826
+ * A position from 0 up to `max`, or 0 when the panel is larger than the window
19827
+ */ const clampToWindow = (value, max)=>Math.max(0, Math.min(value, max));
19825
19828
  jodit_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.dialog = {
19826
19829
  namespace: '',
19827
19830
  extraButtons: [],
@@ -19912,6 +19915,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
19912
19915
  this.startY = e.clientY;
19913
19916
  this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, 'left');
19914
19917
  this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, 'top');
19918
+ // Rounded up: at the right edge a fraction of a pixel less room would
19919
+ // wrap the header of a panel that has no width of its own
19920
+ const { width, height } = this.dialog.getBoundingClientRect();
19921
+ this.startPoint.w = Math.ceil(width);
19922
+ this.startPoint.h = Math.ceil(height);
19915
19923
  this.setMaxZIndex();
19916
19924
  if (e.cancelable) {
19917
19925
  e.preventDefault();
@@ -19927,7 +19935,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
19927
19935
  }
19928
19936
  __onMouseMove(e) {
19929
19937
  if (this.draggable && this.o.draggable) {
19930
- this.setPosition(this.startPoint.x + e.clientX - this.startX, this.startPoint.y + e.clientY - this.startY);
19938
+ const { documentElement } = this.od;
19939
+ // Keep the whole panel in the window at the size it had when the
19940
+ // drag began. A panel with no width of its own would otherwise
19941
+ // shrink as it neared the right edge, and then leave the window
19942
+ 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));
19931
19943
  if (this.e) {
19932
19944
  /**
19933
19945
  * Fired when dialog box is moved
@@ -20052,8 +20064,8 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
20052
20064
  }
20053
20065
  // strings on purpose: `css()` would truncate fractional pixels
20054
20066
  ;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_10__.css)(this.dialog, {
20055
- left: (x || left) + 'px',
20056
- top: (y || top) + 'px'
20067
+ left: (x ?? left) + 'px',
20068
+ top: (y ?? top) + 'px'
20057
20069
  });
20058
20070
  return this;
20059
20071
  }
@@ -28191,6 +28203,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28191
28203
  * Check if two separate elements can be connected
28192
28204
  * @private
28193
28205
  */ function checkJoinNeighbors(jodit, fakeNode, backspace) {
28206
+ if (checkJoinBareText(jodit, fakeNode, backspace)) {
28207
+ return true;
28208
+ }
28194
28209
  let nextBox = fakeNode, mainClosestBox = nextBox;
28195
28210
  // Find the main big closest element
28196
28211
  while(nextBox && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -28218,7 +28233,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28218
28233
  return true;
28219
28234
  }
28220
28235
  const box = findCaretBox(fakeNode, mainClosestBox);
28221
- if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
28236
+ 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))) {
28222
28237
  jodit.s.setCursorBefore(fakeNode);
28223
28238
  return true;
28224
28239
  }
@@ -28303,6 +28318,70 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
28303
28318
  }
28304
28319
  return true;
28305
28320
  }
28321
+ /**
28322
+ * A block next to bare text in the same parent joins that text, as the
28323
+ * browsers do: `<li>one<p>|two</p></li>` gives `<li>one|two</li>`, and
28324
+ * `<li><p>one|</p>two</li>` gives `<li><p>one|two</p></li>`
28325
+ * @private
28326
+ */ function checkJoinInlineSibling(jodit, box, sibling, backspace) {
28327
+ 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>`
28328
+ box.parentNode !== sibling.parentNode || Array.from(box.childNodes).some((node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node))) {
28329
+ return false;
28330
+ }
28331
+ if (backspace) {
28332
+ // Text after the block keeps its own line
28333
+ const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(box, false);
28334
+ 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')) {
28335
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(box, jodit.createInside.element('br'));
28336
+ }
28337
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(box);
28338
+ return true;
28339
+ }
28340
+ const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
28341
+ for(let node = sibling; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
28342
+ const next = node.nextSibling;
28343
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
28344
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
28345
+ break;
28346
+ }
28347
+ 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);
28348
+ node = next;
28349
+ }
28350
+ return true;
28351
+ }
28352
+ /**
28353
+ * Bare text next to a block in the same parent, as the browsers join them:
28354
+ * Backspace in `<div><p>a</p>|b</div>` gives `<div><p>a|b</p></div>`, Delete
28355
+ * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
28356
+ */ function checkJoinBareText(jodit, fakeNode, backspace) {
28357
+ const block = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
28358
+ 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))) {
28359
+ return false;
28360
+ }
28361
+ const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
28362
+ if (backspace) {
28363
+ // The caret's line goes to the end of the block before it
28364
+ for(let node = fakeNode; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
28365
+ const next = node.nextSibling;
28366
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
28367
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
28368
+ break;
28369
+ }
28370
+ 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);
28371
+ node = next;
28372
+ }
28373
+ } else {
28374
+ // The block's content joins the caret's line, and text after the
28375
+ // block keeps its own line
28376
+ const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(block, false);
28377
+ 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')) {
28378
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, jodit.createInside.element('br'));
28379
+ }
28380
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(block);
28381
+ }
28382
+ jodit.s.setCursorBefore(fakeNode);
28383
+ return true;
28384
+ }
28306
28385
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
28307
28386
  // Process UL/LI/OL cases
28308
28387
  const siblingIsList = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -28514,10 +28593,11 @@ function getNextInlineSibling(sibling, backspace, root) {
28514
28593
  let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(sibling, backspace);
28515
28594
  if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
28516
28595
  nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__.findMostNestedNeighbor)(sibling, !backspace, root, true);
28517
- // Do not cross a list-item boundary. At the start of a list item the
28518
- // neighbor can be the text of the parent/previous item; deleting a char
28519
- // there is wrong — the list cases must handle the outdent/merge (#1277).
28520
- 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)) {
28596
+ // Do not cross a block boundary. At the start of a list item the
28597
+ // neighbor can be the text of the parent/previous item (#1277), and at
28598
+ // the start of a paragraph the text before it in the same parent
28599
+ // (#1693); deleting a char there is wrong — the join cases handle them.
28600
+ 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)) {
28521
28601
  return null;
28522
28602
  }
28523
28603
  }
@@ -28895,6 +28975,69 @@ function isSpace(char) {
28895
28975
  }
28896
28976
 
28897
28977
 
28978
+ /***/ }),
28979
+
28980
+ /***/ 88426:
28981
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
28982
+
28983
+ "use strict";
28984
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28985
+ /* harmony export */ checkUnwrapListItem: function() { return /* binding */ checkUnwrapListItem; }
28986
+ /* harmony export */ });
28987
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
28988
+ /*!
28989
+ * Jodit Editor (https://xdsoft.net/jodit/)
28990
+ * Released under MIT see LICENSE.txt in the project root for license information.
28991
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
28992
+ */ /**
28993
+ * @module plugins/backspace
28994
+ */
28995
+ /**
28996
+ * Backspace at the start of a later list item takes the bullet off, as Word
28997
+ * does: the item becomes a paragraph where it was, and the list is split
28998
+ * around it. A split `<ol>` carries its numbering on with `start`.
28999
+ *
29000
+ * @example
29001
+ * ```html
29002
+ * <ol><li>first</li><li>|second</li><li>third</li></ol>
29003
+ * ```
29004
+ * Result
29005
+ * ```html
29006
+ * <ol><li>first</li></ol><p>|second</p><ol start="2"><li>third</li></ol>
29007
+ * ```
29008
+ *
29009
+ * @private
29010
+ */ function checkUnwrapListItem(jodit, fakeNode, backspace) {
29011
+ if (!backspace) {
29012
+ return false;
29013
+ }
29014
+ const li = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(fakeNode, 'li', jodit.editor);
29015
+ const list = li ? li.parentElement : null;
29016
+ 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)) {
29017
+ return false;
29018
+ }
29019
+ const p = jodit.createInside.element(jodit.o.enterBlock);
29020
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(list, p);
29021
+ if (li.nextElementSibling) {
29022
+ const rest = list.cloneNode(false);
29023
+ // Two lists cannot share one id
29024
+ rest.removeAttribute('id');
29025
+ while(li.nextSibling){
29026
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(rest, li.nextSibling);
29027
+ }
29028
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol')) {
29029
+ const start = parseInt(list.getAttribute('start') || '1', 10) || 1;
29030
+ rest.setAttribute('start', String(start + list.children.length - 1));
29031
+ }
29032
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(p, rest);
29033
+ }
29034
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(li, p);
29035
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(li);
29036
+ jodit.s.setCursorBefore(fakeNode);
29037
+ return true;
29038
+ }
29039
+
29040
+
28898
29041
  /***/ }),
28899
29042
 
28900
29043
  /***/ 17523:
@@ -28911,6 +29054,7 @@ function isSpace(char) {
28911
29054
  /* harmony import */ var _check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93890);
28912
29055
  /* harmony import */ var _check_table_cell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12443);
28913
29056
  /* harmony import */ var _check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10157);
29057
+ /* harmony import */ var _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(88426);
28914
29058
  /*!
28915
29059
  * Jodit Editor (https://xdsoft.net/jodit/)
28916
29060
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -28926,6 +29070,7 @@ function isSpace(char) {
28926
29070
 
28927
29071
 
28928
29072
 
29073
+
28929
29074
  /**
28930
29075
  * Ordered delete/backspace cases with stable keys. The first one returning
28931
29076
  * `true` wins. The keys are stable across minified builds (function names are
@@ -28960,6 +29105,10 @@ function isSpace(char) {
28960
29105
  'join-two-lists',
28961
29106
  _check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
28962
29107
  ],
29108
+ [
29109
+ 'unwrap-list-item',
29110
+ _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__.checkUnwrapListItem
29111
+ ],
28963
29112
  [
28964
29113
  'join-neighbors',
28965
29114
  _check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
@@ -32307,7 +32456,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('dtd', dtd);
32307
32456
  ]);
32308
32457
  let block = (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.getBlockWrapper)(fake, jodit);
32309
32458
  const isLi = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isLeaf(block);
32310
- // if use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
32459
+ // if use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
32311
32460
  if ((!isLi || event?.shiftKey) && (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.checkBR)(fake, jodit, event?.shiftKey, block)) {
32312
32461
  return false;
32313
32462
  }
@@ -32371,10 +32520,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
32371
32520
  * Checks the possibility and necessity of inserting a BR instead of a block
32372
32521
  * @private
32373
32522
  */ function checkBR(fake, jodit, shiftKeyPressed, block) {
32374
- const isMultiLineBlock = Boolean(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, [
32375
- 'pre',
32376
- 'blockquote'
32377
- ], jodit.editor));
32523
+ // Text in a <pre>, or bare text in a quote, gets a BR. A real block inside
32524
+ // a quote (<p>, <h3>, ...) is split like anywhere else, as in a cell below.
32525
+ 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)));
32378
32526
  // A cell itself can't be split into two cells, so bare cell content gets
32379
32527
  // a BR. But when the cell already holds a real block (<p>, <h3>, ...) that
32380
32528
  // block is split like anywhere else, otherwise every line of the cell
@@ -32384,7 +32532,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
32384
32532
  'th'
32385
32533
  ], jodit.editor)));
32386
32534
  const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
32387
- // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
32535
+ // if you use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
32388
32536
  if (isBRMode || isCell || shiftKeyPressed && !isMultiLineBlock || !shiftKeyPressed && isMultiLineBlock) {
32389
32537
  // 2 BR before
32390
32538
  if (isMultiLineBlock && checkSeveralBR(fake)) {