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.en/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);
|
|
@@ -27674,7 +27675,43 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('color
|
|
|
27674
27675
|
|
|
27675
27676
|
|
|
27676
27677
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_2__/* .Icon */ .I.set('brush', (_brush_svg__WEBPACK_IMPORTED_MODULE_4___default()));
|
|
27678
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brushCell = {
|
|
27679
|
+
isVisible: (editor) => {
|
|
27680
|
+
return !editor.o.disablePlugins.includes('color');
|
|
27681
|
+
},
|
|
27682
|
+
icon: 'brush',
|
|
27683
|
+
popup: (editor, _, close) => {
|
|
27684
|
+
if (!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
|
|
27685
|
+
return;
|
|
27686
|
+
}
|
|
27687
|
+
const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
|
|
27688
|
+
if (!selected.length) {
|
|
27689
|
+
return false;
|
|
27690
|
+
}
|
|
27691
|
+
const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
|
|
27692
|
+
selected.forEach(cell => {
|
|
27693
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(cell, key, value);
|
|
27694
|
+
});
|
|
27695
|
+
editor.lock();
|
|
27696
|
+
editor.synchronizeValues();
|
|
27697
|
+
close();
|
|
27698
|
+
editor.unlock();
|
|
27699
|
+
}, (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(selected[0], key));
|
|
27700
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .Zg)(editor, [
|
|
27701
|
+
{
|
|
27702
|
+
name: 'Background',
|
|
27703
|
+
content: makeColorPicker('background-color')
|
|
27704
|
+
},
|
|
27705
|
+
{ name: 'Text', content: makeColorPicker('color') },
|
|
27706
|
+
{ name: 'Border', content: makeColorPicker('border-color') }
|
|
27707
|
+
]);
|
|
27708
|
+
},
|
|
27709
|
+
tooltip: 'Background'
|
|
27710
|
+
};
|
|
27677
27711
|
jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brush = {
|
|
27712
|
+
isVisible: (editor) => {
|
|
27713
|
+
return !editor.o.disablePlugins.includes('color');
|
|
27714
|
+
},
|
|
27678
27715
|
update(editor, button) {
|
|
27679
27716
|
const color = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color');
|
|
27680
27717
|
const update = (key, value) => {
|
|
@@ -31052,16 +31089,21 @@ function readMargins(image, values, state) {
|
|
|
31052
31089
|
/** @private */
|
|
31053
31090
|
async function readSizes(image, values, state) {
|
|
31054
31091
|
await image.decode();
|
|
31055
|
-
const width = (0,
|
|
31056
|
-
const height = (0,
|
|
31092
|
+
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;
|
|
31093
|
+
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;
|
|
31057
31094
|
values.imageWidth =
|
|
31058
31095
|
width !== false
|
|
31059
31096
|
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(width)
|
|
31060
31097
|
: image.offsetWidth || image.naturalWidth;
|
|
31061
|
-
values.
|
|
31062
|
-
|
|
31063
|
-
|
|
31064
|
-
|
|
31098
|
+
if ((0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(values.imageWidth)) {
|
|
31099
|
+
values.imageHeight =
|
|
31100
|
+
height !== false
|
|
31101
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(height)
|
|
31102
|
+
: image.offsetHeight || image.naturalHeight;
|
|
31103
|
+
}
|
|
31104
|
+
else {
|
|
31105
|
+
values.imageHeight = height || '';
|
|
31106
|
+
}
|
|
31065
31107
|
const { imageWidth, imageHeight } = values;
|
|
31066
31108
|
const w = parseFloat(imageWidth.toString());
|
|
31067
31109
|
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)) {
|
|
@@ -32032,6 +32074,7 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32032
32074
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32033
32075
|
/* harmony export */ q: function() { return /* binding */ applySize; }
|
|
32034
32076
|
/* harmony export */ });
|
|
32077
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12461);
|
|
32035
32078
|
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26150);
|
|
32036
32079
|
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
|
|
32037
32080
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9645);
|
|
@@ -32043,6 +32086,7 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32043
32086
|
|
|
32044
32087
|
|
|
32045
32088
|
|
|
32089
|
+
|
|
32046
32090
|
/** @private */
|
|
32047
32091
|
function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
32048
32092
|
// Size
|
|
@@ -32056,7 +32100,9 @@ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
|
32056
32100
|
width: updatedWidth,
|
|
32057
32101
|
height: updatedWidth && sizeIsLocked ? null : updatedHeight
|
|
32058
32102
|
});
|
|
32059
|
-
(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')
|
|
32103
|
+
(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')
|
|
32104
|
+
? updatedWidth
|
|
32105
|
+
: null);
|
|
32060
32106
|
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || sizeIsLocked) {
|
|
32061
32107
|
updatedHeight = null;
|
|
32062
32108
|
}
|
|
@@ -32566,8 +32612,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
|
|
|
32566
32612
|
|
|
32567
32613
|
"use strict";
|
|
32568
32614
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9823);
|
|
32569
|
-
/* harmony import */ var
|
|
32570
|
-
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16116);
|
|
32615
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38322);
|
|
32571
32616
|
/*!
|
|
32572
32617
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32573
32618
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -32575,41 +32620,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
|
|
|
32575
32620
|
*/
|
|
32576
32621
|
|
|
32577
32622
|
|
|
32578
|
-
|
|
32579
32623
|
const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(control.args[0])
|
|
32580
32624
|
? control.args[0].toLowerCase()
|
|
32581
32625
|
: '';
|
|
32582
32626
|
/* harmony default export */ __webpack_exports__.A = ([
|
|
32583
|
-
|
|
32584
|
-
name: 'brush',
|
|
32585
|
-
popup: (editor, _, close) => {
|
|
32586
|
-
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
|
|
32587
|
-
return;
|
|
32588
|
-
}
|
|
32589
|
-
const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
|
|
32590
|
-
if (!selected.length) {
|
|
32591
|
-
return false;
|
|
32592
|
-
}
|
|
32593
|
-
const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
|
|
32594
|
-
selected.forEach(cell => {
|
|
32595
|
-
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(cell, key, value);
|
|
32596
|
-
});
|
|
32597
|
-
editor.lock();
|
|
32598
|
-
editor.synchronizeValues();
|
|
32599
|
-
close();
|
|
32600
|
-
editor.unlock();
|
|
32601
|
-
}, (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(selected[0], key));
|
|
32602
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .TabsWidget */ .Zg)(editor, [
|
|
32603
|
-
{
|
|
32604
|
-
name: 'Background',
|
|
32605
|
-
content: makeColorPicker('background-color')
|
|
32606
|
-
},
|
|
32607
|
-
{ name: 'Text', content: makeColorPicker('color') },
|
|
32608
|
-
{ name: 'Border', content: makeColorPicker('border-color') }
|
|
32609
|
-
]);
|
|
32610
|
-
},
|
|
32611
|
-
tooltip: 'Background'
|
|
32612
|
-
},
|
|
32627
|
+
'brushCell',
|
|
32613
32628
|
{
|
|
32614
32629
|
name: 'valign',
|
|
32615
32630
|
list: ['Top', 'Middle', 'Bottom', 'Normal'],
|
|
@@ -32620,7 +32635,7 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
|
|
|
32620
32635
|
.getInstance('Table', editor.o)
|
|
32621
32636
|
.getAllSelectedCells()
|
|
32622
32637
|
.forEach((cell) => {
|
|
32623
|
-
(0,
|
|
32638
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(cell, 'vertical-align', command === 'normal' ? '' : command);
|
|
32624
32639
|
});
|
|
32625
32640
|
},
|
|
32626
32641
|
tooltip: 'Vertical align'
|