jodit 4.11.2 → 4.11.4
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 +41 -0
- package/es2015/jodit.css +5 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +6 -6
- package/es2015/jodit.js +35 -18
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +4 -4
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +6 -6
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +5 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +34 -17
- package/es2021/jodit.min.css +1 -1
- 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 +5 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +34 -17
- package/es2021.en/jodit.min.css +1 -1
- 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 +8 -5
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +38 -18
- package/es5/jodit.min.css +3 -3
- 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/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.js +2 -1
- package/esm/core/ui/icon.js +5 -2
- package/esm/modules/toolbar/button/button.d.ts +1 -0
- package/esm/modules/toolbar/button/button.js +29 -19
- package/esm/types/toolbar.d.ts +2 -2
- package/esm/types/ui.d.ts +1 -0
- package/package.json +1 -1
- package/types/modules/toolbar/button/button.d.ts +1 -0
- package/types/types/toolbar.d.ts +2 -2
- package/types/types/ui.d.ts +1 -0
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.11.
|
|
4
|
+
* Version: v4.11.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1764,7 +1764,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1764
1764
|
* ```
|
|
1765
1765
|
* @packageDocumentation
|
|
1766
1766
|
* @module constants
|
|
1767
|
-
*/ const APP_VERSION = "4.11.
|
|
1767
|
+
*/ const APP_VERSION = "4.11.4";
|
|
1768
1768
|
// prettier-ignore
|
|
1769
1769
|
const ES = "es2015";
|
|
1770
1770
|
const IS_ES_MODERN = true;
|
|
@@ -13212,7 +13212,8 @@ const UIButtonState = ()=>({
|
|
|
13212
13212
|
icon: {
|
|
13213
13213
|
name: 'empty',
|
|
13214
13214
|
fill: '',
|
|
13215
|
-
iconURL: ''
|
|
13215
|
+
iconURL: '',
|
|
13216
|
+
scale: undefined
|
|
13216
13217
|
},
|
|
13217
13218
|
tooltip: '',
|
|
13218
13219
|
text: '',
|
|
@@ -15385,14 +15386,14 @@ class Icon {
|
|
|
15385
15386
|
return;
|
|
15386
15387
|
}
|
|
15387
15388
|
let iconElement;
|
|
15388
|
-
const { name, iconURL, fill } = icon;
|
|
15389
|
+
const { name, iconURL, fill, scale } = icon;
|
|
15389
15390
|
const clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
15390
15391
|
let iconFromEvent;
|
|
15391
15392
|
if (!/<svg/.test(name)) {
|
|
15392
15393
|
var _jodit_o_getIcon, _jodit_o;
|
|
15393
15394
|
iconFromEvent = (_jodit_o_getIcon = (_jodit_o = jodit.o).getIcon) === null || _jodit_o_getIcon === void 0 ? void 0 : _jodit_o_getIcon.call(_jodit_o, name, clearName);
|
|
15394
15395
|
}
|
|
15395
|
-
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ''}`;
|
|
15396
|
+
const cacheKey = `${name}${iconURL}${fill}${scale !== null && scale !== void 0 ? scale : ''}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ''}`;
|
|
15396
15397
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
15397
15398
|
var _this___cache_get;
|
|
15398
15399
|
return (_this___cache_get = this.__cache.get(cacheKey)) === null || _this___cache_get === void 0 ? void 0 : _this___cache_get.cloneNode(true);
|
|
@@ -15413,6 +15414,9 @@ class Icon {
|
|
|
15413
15414
|
if (iconElement) {
|
|
15414
15415
|
iconElement.classList.add('jodit-icon');
|
|
15415
15416
|
iconElement.style.fill = fill;
|
|
15417
|
+
if (scale != null) {
|
|
15418
|
+
iconElement.style.transform = `scale(${scale})`;
|
|
15419
|
+
}
|
|
15416
15420
|
jodit.o.cache && this.__cache.set(cacheKey, iconElement.cloneNode(true));
|
|
15417
15421
|
}
|
|
15418
15422
|
return iconElement;
|
|
@@ -23047,26 +23051,39 @@ class ToolbarButton extends jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_20__.U
|
|
|
23047
23051
|
const { control: ctr, state } = this;
|
|
23048
23052
|
this.updateSize();
|
|
23049
23053
|
state.name = ctr.name;
|
|
23054
|
+
this.__initIconFromControl();
|
|
23055
|
+
if (ctr.tooltip) {
|
|
23056
|
+
state.tooltip = (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_11__.isFunction)(ctr.tooltip) ? ctr.tooltip(this.j, ctr, this) : ctr.tooltip;
|
|
23057
|
+
}
|
|
23058
|
+
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
23059
|
+
}
|
|
23060
|
+
__initIconFromControl() {
|
|
23061
|
+
const { control: ctr, state } = this;
|
|
23050
23062
|
const { textIcons } = this.j.o;
|
|
23051
23063
|
if (textIcons === true || (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_11__.isFunction)(textIcons) && textIcons(ctr.name) || ctr.template) {
|
|
23052
23064
|
state.icon = (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_20__.UIButtonState)().icon;
|
|
23053
23065
|
state.text = ctr.text || ctr.name;
|
|
23066
|
+
return;
|
|
23067
|
+
}
|
|
23068
|
+
if (!(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_14__.isString)(ctr.icon) && ctr.icon != null) {
|
|
23069
|
+
state.icon = {
|
|
23070
|
+
name: ctr.icon.name || ctr.name,
|
|
23071
|
+
iconURL: ctr.icon.iconURL || '',
|
|
23072
|
+
fill: ctr.icon.fill || '',
|
|
23073
|
+
scale: ctr.icon.scale
|
|
23074
|
+
};
|
|
23075
|
+
return;
|
|
23076
|
+
}
|
|
23077
|
+
if (ctr.iconURL) {
|
|
23078
|
+
state.icon.iconURL = ctr.iconURL;
|
|
23054
23079
|
} else {
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
var _this_j_o_extraIcons;
|
|
23059
|
-
const name = ctr.icon || ctr.name;
|
|
23060
|
-
state.icon.name = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_22__.Icon.exists(name) || ((_this_j_o_extraIcons = this.j.o.extraIcons) === null || _this_j_o_extraIcons === void 0 ? void 0 : _this_j_o_extraIcons[name]) ? name : '';
|
|
23061
|
-
}
|
|
23062
|
-
if (!ctr.iconURL && !state.icon.name) {
|
|
23063
|
-
state.text = ctr.text || ctr.name;
|
|
23064
|
-
}
|
|
23080
|
+
var _this_j_o_extraIcons;
|
|
23081
|
+
const name = ctr.icon || ctr.name;
|
|
23082
|
+
state.icon.name = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_22__.Icon.exists(name) || ((_this_j_o_extraIcons = this.j.o.extraIcons) === null || _this_j_o_extraIcons === void 0 ? void 0 : _this_j_o_extraIcons[name]) ? name : '';
|
|
23065
23083
|
}
|
|
23066
|
-
if (ctr.
|
|
23067
|
-
state.
|
|
23084
|
+
if (!ctr.iconURL && !state.icon.name) {
|
|
23085
|
+
state.text = ctr.text || ctr.name;
|
|
23068
23086
|
}
|
|
23069
|
-
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
23070
23087
|
}
|
|
23071
23088
|
/**
|
|
23072
23089
|
* Click on trigger button
|