jodit 4.2.7 → 4.2.10
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 +23 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +62 -44
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +62 -44
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.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 +2 -2
- package/es2021/jodit.js +59 -44
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +59 -44
- package/es2021.en/jodit.min.js +2 -2
- 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 +62 -46
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/core/ui/group/list.js +2 -1
- package/esm/plugins/color/config.js +37 -1
- package/esm/plugins/image-properties/readers/size.js +11 -6
- package/esm/plugins/image-properties/writers/size.js +4 -1
- package/esm/plugins/inline-popup/config/items/cells.js +1 -31
- package/esm/types/toolbar.d.ts +1 -0
- package/package.json +1 -1
- package/types/types/toolbar.d.ts +1 -0
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.2.
|
|
4
|
+
* Version: v4.2.10
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1737,7 +1737,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1737
1737
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1738
1738
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1739
1739
|
*/
|
|
1740
|
-
const APP_VERSION = "4.2.
|
|
1740
|
+
const APP_VERSION = "4.2.10";
|
|
1741
1741
|
// prettier-ignore
|
|
1742
1742
|
const ES = "es2021";
|
|
1743
1743
|
const IS_ES_MODERN = true;
|
|
@@ -14752,7 +14752,8 @@ let UIList = class UIList extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MO
|
|
|
14752
14752
|
group.append(elm);
|
|
14753
14753
|
}
|
|
14754
14754
|
};
|
|
14755
|
-
const isNotRemoved = (b) => !this.removeButtons.includes(b.name)
|
|
14755
|
+
const isNotRemoved = (b) => !this.removeButtons.includes(b.name) &&
|
|
14756
|
+
(!b.isVisible || b.isVisible?.(this.j, b));
|
|
14756
14757
|
items.forEach(item => {
|
|
14757
14758
|
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item)) {
|
|
14758
14759
|
const buttons = item.buttons.filter(b => b);
|
|
@@ -27745,7 +27746,43 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('color
|
|
|
27745
27746
|
|
|
27746
27747
|
|
|
27747
27748
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_2__/* .Icon */ .I.set('brush', (_brush_svg__WEBPACK_IMPORTED_MODULE_4___default()));
|
|
27749
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brushCell = {
|
|
27750
|
+
isVisible: (editor) => {
|
|
27751
|
+
return !editor.o.disablePlugins.includes('color');
|
|
27752
|
+
},
|
|
27753
|
+
icon: 'brush',
|
|
27754
|
+
popup: (editor, _, close) => {
|
|
27755
|
+
if (!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
|
|
27756
|
+
return;
|
|
27757
|
+
}
|
|
27758
|
+
const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
|
|
27759
|
+
if (!selected.length) {
|
|
27760
|
+
return false;
|
|
27761
|
+
}
|
|
27762
|
+
const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
|
|
27763
|
+
selected.forEach(cell => {
|
|
27764
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(cell, key, value);
|
|
27765
|
+
});
|
|
27766
|
+
editor.lock();
|
|
27767
|
+
editor.synchronizeValues();
|
|
27768
|
+
close();
|
|
27769
|
+
editor.unlock();
|
|
27770
|
+
}, (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(selected[0], key));
|
|
27771
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .Zg)(editor, [
|
|
27772
|
+
{
|
|
27773
|
+
name: 'Background',
|
|
27774
|
+
content: makeColorPicker('background-color')
|
|
27775
|
+
},
|
|
27776
|
+
{ name: 'Text', content: makeColorPicker('color') },
|
|
27777
|
+
{ name: 'Border', content: makeColorPicker('border-color') }
|
|
27778
|
+
]);
|
|
27779
|
+
},
|
|
27780
|
+
tooltip: 'Background'
|
|
27781
|
+
};
|
|
27748
27782
|
jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brush = {
|
|
27783
|
+
isVisible: (editor) => {
|
|
27784
|
+
return !editor.o.disablePlugins.includes('color');
|
|
27785
|
+
},
|
|
27749
27786
|
update(editor, button) {
|
|
27750
27787
|
const color = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color');
|
|
27751
27788
|
const update = (key, value) => {
|
|
@@ -31520,16 +31557,21 @@ function readMargins(image, values, state) {
|
|
|
31520
31557
|
/** @private */
|
|
31521
31558
|
async function readSizes(image, values, state) {
|
|
31522
31559
|
await image.decode();
|
|
31523
|
-
const width = (0,
|
|
31524
|
-
const height = (0,
|
|
31560
|
+
const width = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, 'width', true) || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || false;
|
|
31561
|
+
const height = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, 'height', true) || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height') || false;
|
|
31525
31562
|
values.imageWidth =
|
|
31526
31563
|
width !== false
|
|
31527
31564
|
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(width)
|
|
31528
31565
|
: image.offsetWidth || image.naturalWidth;
|
|
31529
|
-
values.
|
|
31530
|
-
|
|
31531
|
-
|
|
31532
|
-
|
|
31566
|
+
if ((0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(values.imageWidth)) {
|
|
31567
|
+
values.imageHeight =
|
|
31568
|
+
height !== false
|
|
31569
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(height)
|
|
31570
|
+
: image.offsetHeight || image.naturalHeight;
|
|
31571
|
+
}
|
|
31572
|
+
else {
|
|
31573
|
+
values.imageHeight = height || '';
|
|
31574
|
+
}
|
|
31533
31575
|
const { imageWidth, imageHeight } = values;
|
|
31534
31576
|
const w = parseFloat(imageWidth.toString());
|
|
31535
31577
|
if (!(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(imageWidth) || !(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(imageHeight)) {
|
|
@@ -32500,6 +32542,7 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32500
32542
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32501
32543
|
/* harmony export */ q: function() { return /* binding */ applySize; }
|
|
32502
32544
|
/* harmony export */ });
|
|
32545
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12461);
|
|
32503
32546
|
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26150);
|
|
32504
32547
|
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
|
|
32505
32548
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9645);
|
|
@@ -32511,6 +32554,7 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32511
32554
|
|
|
32512
32555
|
|
|
32513
32556
|
|
|
32557
|
+
|
|
32514
32558
|
/** @private */
|
|
32515
32559
|
function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
32516
32560
|
// Size
|
|
@@ -32524,7 +32568,9 @@ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
|
32524
32568
|
width: updatedWidth,
|
|
32525
32569
|
height: updatedWidth && sizeIsLocked ? null : updatedHeight
|
|
32526
32570
|
});
|
|
32527
|
-
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width', (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width')
|
|
32571
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width', updatedWidth && (0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(imageWidth) && (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width')
|
|
32572
|
+
? updatedWidth
|
|
32573
|
+
: null);
|
|
32528
32574
|
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || sizeIsLocked) {
|
|
32529
32575
|
updatedHeight = null;
|
|
32530
32576
|
}
|
|
@@ -33034,8 +33080,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
|
|
|
33034
33080
|
|
|
33035
33081
|
"use strict";
|
|
33036
33082
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9823);
|
|
33037
|
-
/* harmony import */ var
|
|
33038
|
-
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16116);
|
|
33083
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38322);
|
|
33039
33084
|
/*!
|
|
33040
33085
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33041
33086
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -33043,41 +33088,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
|
|
|
33043
33088
|
*/
|
|
33044
33089
|
|
|
33045
33090
|
|
|
33046
|
-
|
|
33047
33091
|
const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(control.args[0])
|
|
33048
33092
|
? control.args[0].toLowerCase()
|
|
33049
33093
|
: '';
|
|
33050
33094
|
/* harmony default export */ __webpack_exports__.A = ([
|
|
33051
|
-
|
|
33052
|
-
name: 'brush',
|
|
33053
|
-
popup: (editor, _, close) => {
|
|
33054
|
-
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
33055
|
-
return;
|
|
33056
|
-
}
|
|
33057
|
-
const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
|
|
33058
|
-
if (!selected.length) {
|
|
33059
|
-
return false;
|
|
33060
|
-
}
|
|
33061
|
-
const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
|
|
33062
|
-
selected.forEach(cell => {
|
|
33063
|
-
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(cell, key, value);
|
|
33064
|
-
});
|
|
33065
|
-
editor.lock();
|
|
33066
|
-
editor.synchronizeValues();
|
|
33067
|
-
close();
|
|
33068
|
-
editor.unlock();
|
|
33069
|
-
}, (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(selected[0], key));
|
|
33070
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .TabsWidget */ .Zg)(editor, [
|
|
33071
|
-
{
|
|
33072
|
-
name: 'Background',
|
|
33073
|
-
content: makeColorPicker('background-color')
|
|
33074
|
-
},
|
|
33075
|
-
{ name: 'Text', content: makeColorPicker('color') },
|
|
33076
|
-
{ name: 'Border', content: makeColorPicker('border-color') }
|
|
33077
|
-
]);
|
|
33078
|
-
},
|
|
33079
|
-
tooltip: 'Background'
|
|
33080
|
-
},
|
|
33095
|
+
'brushCell',
|
|
33081
33096
|
{
|
|
33082
33097
|
name: 'valign',
|
|
33083
33098
|
list: ['Top', 'Middle', 'Bottom', 'Normal'],
|
|
@@ -33088,7 +33103,7 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
33088
33103
|
.getInstance('Table', editor.o)
|
|
33089
33104
|
.getAllSelectedCells()
|
|
33090
33105
|
.forEach((cell) => {
|
|
33091
|
-
(0,
|
|
33106
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(cell, 'vertical-align', command === 'normal' ? '' : command);
|
|
33092
33107
|
});
|
|
33093
33108
|
},
|
|
33094
33109
|
tooltip: 'Vertical align'
|