jodit-pro-react 5.6.10 → 5.6.12
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.
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.15.
|
|
196
|
+
APP_VERSION = "4.15.3";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -23499,9 +23499,9 @@ init_plugin();
|
|
|
23499
23499
|
init_constants();
|
|
23500
23500
|
init_dom();
|
|
23501
23501
|
init_scroll_into_view();
|
|
23502
|
-
function checkBR(fake, jodit, shiftKeyPressed) {
|
|
23502
|
+
function checkBR(fake, jodit, shiftKeyPressed, block) {
|
|
23503
23503
|
const isMultiLineBlock = Boolean(Dom.closest(fake, ["pre", "blockquote"], jodit.editor));
|
|
23504
|
-
const isCell = !isMultiLineBlock && Dom.closest(fake, ["td", "th"], jodit.editor);
|
|
23504
|
+
const isCell = !isMultiLineBlock && (block ? Dom.isCell(block) : Boolean(Dom.closest(fake, ["td", "th"], jodit.editor)));
|
|
23505
23505
|
const isBRMode = jodit.o.enter.toLowerCase() === BR.toLowerCase();
|
|
23506
23506
|
if (isBRMode || isCell || shiftKeyPressed && !isMultiLineBlock || !shiftKeyPressed && isMultiLineBlock) {
|
|
23507
23507
|
if (isMultiLineBlock && checkSeveralBR(fake)) {
|
|
@@ -23734,7 +23734,7 @@ var enter = class extends Plugin {
|
|
|
23734
23734
|
moveCursorOutFromSpecialTags(jodit, fake, ["a"]);
|
|
23735
23735
|
let block = getBlockWrapper(fake, jodit);
|
|
23736
23736
|
const isLi = Dom.isLeaf(block);
|
|
23737
|
-
if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) && checkBR(fake, jodit, event === null || event === void 0 ? void 0 : event.shiftKey)) {
|
|
23737
|
+
if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) && checkBR(fake, jodit, event === null || event === void 0 ? void 0 : event.shiftKey, block)) {
|
|
23738
23738
|
return false;
|
|
23739
23739
|
}
|
|
23740
23740
|
if (!block && !hasPreviousBlock(fake, jodit)) {
|
|
@@ -29192,6 +29192,14 @@ var __decorate59 = function(decorators, target, key3, desc) {
|
|
|
29192
29192
|
return c69 > 3 && r71 && Object.defineProperty(target, key3, r71), r71;
|
|
29193
29193
|
};
|
|
29194
29194
|
var keyBInd = "__jodit-resizer_binded";
|
|
29195
|
+
function attrPixelSize(element, key3) {
|
|
29196
|
+
var _a2;
|
|
29197
|
+
const value = (_a2 = attr(element, key3)) === null || _a2 === void 0 ? void 0 : _a2.trim();
|
|
29198
|
+
if (!value || !/^\d+(\.\d+)?(px)?$/i.test(value)) {
|
|
29199
|
+
return 0;
|
|
29200
|
+
}
|
|
29201
|
+
return parseFloat(value);
|
|
29202
|
+
}
|
|
29195
29203
|
var resizer = class extends Plugin {
|
|
29196
29204
|
constructor() {
|
|
29197
29205
|
super(...arguments);
|
|
@@ -29474,11 +29482,17 @@ var resizer = class extends Plugin {
|
|
|
29474
29482
|
"data-jodit_iframe_wrapper": 1
|
|
29475
29483
|
});
|
|
29476
29484
|
attr(wrapper, "style", attr(element, "style"));
|
|
29485
|
+
const width = element.offsetWidth || attrPixelSize(element, "width");
|
|
29486
|
+
const height = element.offsetHeight || attrPixelSize(element, "height");
|
|
29477
29487
|
css(wrapper, {
|
|
29478
|
-
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block"
|
|
29479
|
-
width: element.offsetWidth,
|
|
29480
|
-
height: element.offsetHeight
|
|
29488
|
+
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block"
|
|
29481
29489
|
});
|
|
29490
|
+
if (width) {
|
|
29491
|
+
css(wrapper, "width", width);
|
|
29492
|
+
}
|
|
29493
|
+
if (height) {
|
|
29494
|
+
css(wrapper, "height", height);
|
|
29495
|
+
}
|
|
29482
29496
|
if (element.parentNode) {
|
|
29483
29497
|
Dom.before(element, wrapper);
|
|
29484
29498
|
}
|