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.
- package/CHANGELOG.md +9 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +164 -16
- package/es2015/jodit.min.js +5 -5
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.js +5 -5
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +9 -9
- package/es2021/jodit.js +164 -16
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +9 -9
- package/es2021.en/jodit.js +164 -16
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +172 -16
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/modules/dialog/dialog.js +18 -3
- package/esm/plugins/backspace/cases/check-join-neighbors.js +81 -0
- package/esm/plugins/backspace/cases/check-remove-char.js +6 -5
- package/esm/plugins/backspace/cases/check-unwrap-list-item.d.ts +26 -0
- package/esm/plugins/backspace/cases/check-unwrap-list-item.js +56 -0
- package/esm/plugins/backspace/cases/index.js +2 -0
- package/esm/plugins/backspace/config.d.ts +2 -2
- package/esm/plugins/enter/enter.js +1 -1
- package/esm/plugins/enter/helpers/check-br.js +7 -2
- package/package.json +1 -1
- package/types/config.d.ts +2 -2
- package/types/plugins/backspace/cases/check-unwrap-list-item.d.ts +26 -0
- package/types/plugins/backspace/config.d.ts +2 -2
package/es2015/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.
|
|
4
|
+
* Version: v4.18.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1828,7 +1828,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1828
1828
|
* ```
|
|
1829
1829
|
* @packageDocumentation
|
|
1830
1830
|
* @module constants
|
|
1831
|
-
*/ const APP_VERSION = "4.18.
|
|
1831
|
+
*/ const APP_VERSION = "4.18.8";
|
|
1832
1832
|
// prettier-ignore
|
|
1833
1833
|
const ES = "es2015";
|
|
1834
1834
|
const IS_ES_MODERN = true;
|
|
@@ -20006,6 +20006,9 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__decorat
|
|
|
20006
20006
|
|
|
20007
20007
|
|
|
20008
20008
|
|
|
20009
|
+
/**
|
|
20010
|
+
* A position from 0 up to `max`, or 0 when the panel is larger than the window
|
|
20011
|
+
*/ const clampToWindow = (value, max)=>Math.max(0, Math.min(value, max));
|
|
20009
20012
|
jodit_config__WEBPACK_IMPORTED_MODULE_17__.Config.prototype.dialog = {
|
|
20010
20013
|
namespace: '',
|
|
20011
20014
|
extraButtons: [],
|
|
@@ -20096,6 +20099,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
20096
20099
|
this.startY = e.clientY;
|
|
20097
20100
|
this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, 'left');
|
|
20098
20101
|
this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, 'top');
|
|
20102
|
+
// Rounded up: at the right edge a fraction of a pixel less room would
|
|
20103
|
+
// wrap the header of a panel that has no width of its own
|
|
20104
|
+
const { width, height } = this.dialog.getBoundingClientRect();
|
|
20105
|
+
this.startPoint.w = Math.ceil(width);
|
|
20106
|
+
this.startPoint.h = Math.ceil(height);
|
|
20099
20107
|
this.setMaxZIndex();
|
|
20100
20108
|
if (e.cancelable) {
|
|
20101
20109
|
e.preventDefault();
|
|
@@ -20111,7 +20119,11 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
20111
20119
|
}
|
|
20112
20120
|
__onMouseMove(e) {
|
|
20113
20121
|
if (this.draggable && this.o.draggable) {
|
|
20114
|
-
|
|
20122
|
+
const { documentElement } = this.od;
|
|
20123
|
+
// Keep the whole panel in the window at the size it had when the
|
|
20124
|
+
// drag began. A panel with no width of its own would otherwise
|
|
20125
|
+
// shrink as it neared the right edge, and then leave the window
|
|
20126
|
+
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));
|
|
20115
20127
|
if (this.e) {
|
|
20116
20128
|
/**
|
|
20117
20129
|
* Fired when dialog box is moved
|
|
@@ -20237,8 +20249,8 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
20237
20249
|
}
|
|
20238
20250
|
// strings on purpose: `css()` would truncate fractional pixels
|
|
20239
20251
|
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, {
|
|
20240
|
-
left: (x
|
|
20241
|
-
top: (y
|
|
20252
|
+
left: (x !== null && x !== void 0 ? x : left) + 'px',
|
|
20253
|
+
top: (y !== null && y !== void 0 ? y : top) + 'px'
|
|
20242
20254
|
});
|
|
20243
20255
|
return this;
|
|
20244
20256
|
}
|
|
@@ -28491,6 +28503,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
|
|
|
28491
28503
|
* Check if two separate elements can be connected
|
|
28492
28504
|
* @private
|
|
28493
28505
|
*/ function checkJoinNeighbors(jodit, fakeNode, backspace) {
|
|
28506
|
+
if (checkJoinBareText(jodit, fakeNode, backspace)) {
|
|
28507
|
+
return true;
|
|
28508
|
+
}
|
|
28494
28509
|
let nextBox = fakeNode, mainClosestBox = nextBox;
|
|
28495
28510
|
// Find the main big closest element
|
|
28496
28511
|
while(nextBox && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
|
|
@@ -28518,7 +28533,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
|
|
|
28518
28533
|
return true;
|
|
28519
28534
|
}
|
|
28520
28535
|
const box = findCaretBox(fakeNode, mainClosestBox);
|
|
28521
|
-
if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
|
|
28536
|
+
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))) {
|
|
28522
28537
|
jodit.s.setCursorBefore(fakeNode);
|
|
28523
28538
|
return true;
|
|
28524
28539
|
}
|
|
@@ -28603,6 +28618,70 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('backspace', bac
|
|
|
28603
28618
|
}
|
|
28604
28619
|
return true;
|
|
28605
28620
|
}
|
|
28621
|
+
/**
|
|
28622
|
+
* A block next to bare text in the same parent joins that text, as the
|
|
28623
|
+
* browsers do: `<li>one<p>|two</p></li>` gives `<li>one|two</li>`, and
|
|
28624
|
+
* `<li><p>one|</p>two</li>` gives `<li><p>one|two</p></li>`
|
|
28625
|
+
* @private
|
|
28626
|
+
*/ function checkJoinInlineSibling(jodit, box, sibling, backspace) {
|
|
28627
|
+
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>`
|
|
28628
|
+
box.parentNode !== sibling.parentNode || Array.from(box.childNodes).some((node)=>jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node))) {
|
|
28629
|
+
return false;
|
|
28630
|
+
}
|
|
28631
|
+
if (backspace) {
|
|
28632
|
+
// Text after the block keeps its own line
|
|
28633
|
+
const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(box, false);
|
|
28634
|
+
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')) {
|
|
28635
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(box, jodit.createInside.element('br'));
|
|
28636
|
+
}
|
|
28637
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(box);
|
|
28638
|
+
return true;
|
|
28639
|
+
}
|
|
28640
|
+
const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
28641
|
+
for(let node = sibling; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
|
|
28642
|
+
const next = node.nextSibling;
|
|
28643
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
|
|
28644
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
28645
|
+
break;
|
|
28646
|
+
}
|
|
28647
|
+
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);
|
|
28648
|
+
node = next;
|
|
28649
|
+
}
|
|
28650
|
+
return true;
|
|
28651
|
+
}
|
|
28652
|
+
/**
|
|
28653
|
+
* Bare text next to a block in the same parent, as the browsers join them:
|
|
28654
|
+
* Backspace in `<div><p>a</p>|b</div>` gives `<div><p>a|b</p></div>`, Delete
|
|
28655
|
+
* in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
|
|
28656
|
+
*/ function checkJoinBareText(jodit, fakeNode, backspace) {
|
|
28657
|
+
const block = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
28658
|
+
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))) {
|
|
28659
|
+
return false;
|
|
28660
|
+
}
|
|
28661
|
+
const filter = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
28662
|
+
if (backspace) {
|
|
28663
|
+
// The caret's line goes to the end of the block before it
|
|
28664
|
+
for(let node = fakeNode; node && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);){
|
|
28665
|
+
const next = node.nextSibling;
|
|
28666
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
|
|
28667
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
28668
|
+
break;
|
|
28669
|
+
}
|
|
28670
|
+
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);
|
|
28671
|
+
node = next;
|
|
28672
|
+
}
|
|
28673
|
+
} else {
|
|
28674
|
+
// The block's content joins the caret's line, and text after the
|
|
28675
|
+
// block keeps its own line
|
|
28676
|
+
const next = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(block, false);
|
|
28677
|
+
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')) {
|
|
28678
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, jodit.createInside.element('br'));
|
|
28679
|
+
}
|
|
28680
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(block);
|
|
28681
|
+
}
|
|
28682
|
+
jodit.s.setCursorBefore(fakeNode);
|
|
28683
|
+
return true;
|
|
28684
|
+
}
|
|
28606
28685
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
28607
28686
|
// Process UL/LI/OL cases
|
|
28608
28687
|
const siblingIsList = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -28815,10 +28894,11 @@ function getNextInlineSibling(sibling, backspace, root) {
|
|
|
28815
28894
|
let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(sibling, backspace);
|
|
28816
28895
|
if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
|
|
28817
28896
|
nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__.findMostNestedNeighbor)(sibling, !backspace, root, true);
|
|
28818
|
-
// Do not cross a
|
|
28819
|
-
// neighbor can be the text of the parent/previous item
|
|
28820
|
-
//
|
|
28821
|
-
|
|
28897
|
+
// Do not cross a block boundary. At the start of a list item the
|
|
28898
|
+
// neighbor can be the text of the parent/previous item (#1277), and at
|
|
28899
|
+
// the start of a paragraph the text before it in the same parent
|
|
28900
|
+
// (#1693); deleting a char there is wrong — the join cases handle them.
|
|
28901
|
+
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)) {
|
|
28822
28902
|
return null;
|
|
28823
28903
|
}
|
|
28824
28904
|
}
|
|
@@ -29198,6 +29278,69 @@ function isSpace(char) {
|
|
|
29198
29278
|
}
|
|
29199
29279
|
|
|
29200
29280
|
|
|
29281
|
+
/***/ }),
|
|
29282
|
+
|
|
29283
|
+
/***/ 88426:
|
|
29284
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
29285
|
+
|
|
29286
|
+
"use strict";
|
|
29287
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29288
|
+
/* harmony export */ checkUnwrapListItem: function() { return /* binding */ checkUnwrapListItem; }
|
|
29289
|
+
/* harmony export */ });
|
|
29290
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
29291
|
+
/*!
|
|
29292
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29293
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29294
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
29295
|
+
*/ /**
|
|
29296
|
+
* @module plugins/backspace
|
|
29297
|
+
*/
|
|
29298
|
+
/**
|
|
29299
|
+
* Backspace at the start of a later list item takes the bullet off, as Word
|
|
29300
|
+
* does: the item becomes a paragraph where it was, and the list is split
|
|
29301
|
+
* around it. A split `<ol>` carries its numbering on with `start`.
|
|
29302
|
+
*
|
|
29303
|
+
* @example
|
|
29304
|
+
* ```html
|
|
29305
|
+
* <ol><li>first</li><li>|second</li><li>third</li></ol>
|
|
29306
|
+
* ```
|
|
29307
|
+
* Result
|
|
29308
|
+
* ```html
|
|
29309
|
+
* <ol><li>first</li></ol><p>|second</p><ol start="2"><li>third</li></ol>
|
|
29310
|
+
* ```
|
|
29311
|
+
*
|
|
29312
|
+
* @private
|
|
29313
|
+
*/ function checkUnwrapListItem(jodit, fakeNode, backspace) {
|
|
29314
|
+
if (!backspace) {
|
|
29315
|
+
return false;
|
|
29316
|
+
}
|
|
29317
|
+
const li = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(fakeNode, 'li', jodit.editor);
|
|
29318
|
+
const list = li ? li.parentElement : null;
|
|
29319
|
+
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)) {
|
|
29320
|
+
return false;
|
|
29321
|
+
}
|
|
29322
|
+
const p = jodit.createInside.element(jodit.o.enterBlock);
|
|
29323
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(list, p);
|
|
29324
|
+
if (li.nextElementSibling) {
|
|
29325
|
+
const rest = list.cloneNode(false);
|
|
29326
|
+
// Two lists cannot share one id
|
|
29327
|
+
rest.removeAttribute('id');
|
|
29328
|
+
while(li.nextSibling){
|
|
29329
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(rest, li.nextSibling);
|
|
29330
|
+
}
|
|
29331
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol')) {
|
|
29332
|
+
const start = parseInt(list.getAttribute('start') || '1', 10) || 1;
|
|
29333
|
+
rest.setAttribute('start', String(start + list.children.length - 1));
|
|
29334
|
+
}
|
|
29335
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(p, rest);
|
|
29336
|
+
}
|
|
29337
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(li, p);
|
|
29338
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(li);
|
|
29339
|
+
jodit.s.setCursorBefore(fakeNode);
|
|
29340
|
+
return true;
|
|
29341
|
+
}
|
|
29342
|
+
|
|
29343
|
+
|
|
29201
29344
|
/***/ }),
|
|
29202
29345
|
|
|
29203
29346
|
/***/ 17523:
|
|
@@ -29214,6 +29357,7 @@ function isSpace(char) {
|
|
|
29214
29357
|
/* harmony import */ var _check_remove_unbreakable_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93890);
|
|
29215
29358
|
/* harmony import */ var _check_table_cell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12443);
|
|
29216
29359
|
/* harmony import */ var _check_unwrap_first_list_item__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10157);
|
|
29360
|
+
/* harmony import */ var _check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(88426);
|
|
29217
29361
|
/*!
|
|
29218
29362
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29219
29363
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -29229,6 +29373,7 @@ function isSpace(char) {
|
|
|
29229
29373
|
|
|
29230
29374
|
|
|
29231
29375
|
|
|
29376
|
+
|
|
29232
29377
|
/**
|
|
29233
29378
|
* Ordered delete/backspace cases with stable keys. The first one returning
|
|
29234
29379
|
* `true` wins. The keys are stable across minified builds (function names are
|
|
@@ -29263,6 +29408,10 @@ function isSpace(char) {
|
|
|
29263
29408
|
'join-two-lists',
|
|
29264
29409
|
_check_join_two_lists__WEBPACK_IMPORTED_MODULE_1__.checkJoinTwoLists
|
|
29265
29410
|
],
|
|
29411
|
+
[
|
|
29412
|
+
'unwrap-list-item',
|
|
29413
|
+
_check_unwrap_list_item__WEBPACK_IMPORTED_MODULE_9__.checkUnwrapListItem
|
|
29414
|
+
],
|
|
29266
29415
|
[
|
|
29267
29416
|
'join-neighbors',
|
|
29268
29417
|
_check_join_neighbors__WEBPACK_IMPORTED_MODULE_0__.checkJoinNeighbors
|
|
@@ -32935,7 +33084,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('dtd', dtd);
|
|
|
32935
33084
|
]);
|
|
32936
33085
|
let block = (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.getBlockWrapper)(fake, jodit);
|
|
32937
33086
|
const isLi = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isLeaf(block);
|
|
32938
|
-
// if use <br> defaultTag for break line or when was entered SHIFt key or in <td
|
|
33087
|
+
// if use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
|
|
32939
33088
|
if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) && (0,_helpers__WEBPACK_IMPORTED_MODULE_7__.checkBR)(fake, jodit, event === null || event === void 0 ? void 0 : event.shiftKey, block)) {
|
|
32940
33089
|
return false;
|
|
32941
33090
|
}
|
|
@@ -32999,10 +33148,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
|
|
|
32999
33148
|
* Checks the possibility and necessity of inserting a BR instead of a block
|
|
33000
33149
|
* @private
|
|
33001
33150
|
*/ function checkBR(fake, jodit, shiftKeyPressed, block) {
|
|
33002
|
-
|
|
33003
|
-
|
|
33004
|
-
|
|
33005
|
-
], jodit.editor));
|
|
33151
|
+
// Text in a <pre>, or bare text in a quote, gets a BR. A real block inside
|
|
33152
|
+
// a quote (<p>, <h3>, ...) is split like anywhere else, as in a cell below.
|
|
33153
|
+
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)));
|
|
33006
33154
|
// A cell itself can't be split into two cells, so bare cell content gets
|
|
33007
33155
|
// a BR. But when the cell already holds a real block (<p>, <h3>, ...) that
|
|
33008
33156
|
// block is split like anywhere else, otherwise every line of the cell
|
|
@@ -33012,7 +33160,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('enter', enter);
|
|
|
33012
33160
|
'th'
|
|
33013
33161
|
], jodit.editor)));
|
|
33014
33162
|
const isBRMode = jodit.o.enter.toLowerCase() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.BR.toLowerCase();
|
|
33015
|
-
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td
|
|
33163
|
+
// if you use <br> defaultTag for break line or when was entered SHIFt key or in <td>, <th> or <blockquote> without an inner block
|
|
33016
33164
|
if (isBRMode || isCell || shiftKeyPressed && !isMultiLineBlock || !shiftKeyPressed && isMultiLineBlock) {
|
|
33017
33165
|
// 2 BR before
|
|
33018
33166
|
if (isMultiLineBlock && checkSeveralBR(fake)) {
|