jodit 4.13.12 → 4.13.13
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 +10 -0
- package/es2015/jodit.css +14 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +32 -3
- 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 +8 -8
- 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 +14 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +9 -9
- package/es2021/jodit.js +32 -3
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +4 -4
- 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 +14 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +32 -3
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +26 -26
- 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 +21 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +32 -3
- 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/modules/widget/color-picker/color-picker.js +35 -1
- package/package.json +1 -1
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.13.
|
|
4
|
+
* Version: v4.13.13
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1849,7 +1849,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1849
1849
|
* ```
|
|
1850
1850
|
* @packageDocumentation
|
|
1851
1851
|
* @module constants
|
|
1852
|
-
*/ const APP_VERSION = "4.13.
|
|
1852
|
+
*/ const APP_VERSION = "4.13.13";
|
|
1853
1853
|
// prettier-ignore
|
|
1854
1854
|
const ES = "es2015";
|
|
1855
1855
|
const IS_ES_MODERN = true;
|
|
@@ -25549,12 +25549,36 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
25549
25549
|
form.appendChild(editor.c.fromHTML(`<div class="${cn}__groups">${eachColor(editor.o.colors)}</div>`));
|
|
25550
25550
|
form.appendChild(editor.c.fromHTML(`<div data-ref="extra" class="${cn}__extra"></div>`));
|
|
25551
25551
|
const { extra } = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.refs)(form);
|
|
25552
|
+
extra.appendChild(editor.c.fromHTML(`<div class="${cn}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${valueHex || ''}"/></div>`));
|
|
25553
|
+
const { hexInput } = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.refs)(form);
|
|
25554
|
+
const applyHexInput = ()=>{
|
|
25555
|
+
const raw = hexInput.value.trim();
|
|
25556
|
+
const isHex = /^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(raw);
|
|
25557
|
+
const isRgb = /^rgba?\([\d\s.,%]+\)$/i.test(raw);
|
|
25558
|
+
if (!isHex && !isRgb) {
|
|
25559
|
+
return;
|
|
25560
|
+
}
|
|
25561
|
+
const color = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.normalizeColor)(isHex && !raw.startsWith('#') ? '#' + raw : raw);
|
|
25562
|
+
if (color && (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.isFunction)(callback)) {
|
|
25563
|
+
callback(color);
|
|
25564
|
+
}
|
|
25565
|
+
};
|
|
25566
|
+
editor.e.on(hexInput, 'keydown', (e)=>{
|
|
25567
|
+
e.stopPropagation();
|
|
25568
|
+
if (e.key === 'Enter') {
|
|
25569
|
+
e.preventDefault();
|
|
25570
|
+
applyHexInput();
|
|
25571
|
+
}
|
|
25572
|
+
}).on(hexInput, 'change', (e)=>{
|
|
25573
|
+
e.stopPropagation();
|
|
25574
|
+
applyHexInput();
|
|
25575
|
+
});
|
|
25552
25576
|
if (editor.o.showBrowserColorPicker && (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.hasBrowserColorPicker)()) {
|
|
25553
25577
|
extra.appendChild(editor.c.fromHTML(`<div class="${cn}__native">${iconPalette}<input type="color" value="#ffffff"/></div>`));
|
|
25554
25578
|
editor.e.on(form, 'change', (e)=>{
|
|
25555
25579
|
e.stopPropagation();
|
|
25556
25580
|
const target = e.target;
|
|
25557
|
-
if (!target || !target.tagName || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(target, 'input')) {
|
|
25581
|
+
if (!target || !target.tagName || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(target, 'input') || target.type !== 'color') {
|
|
25558
25582
|
return;
|
|
25559
25583
|
}
|
|
25560
25584
|
const color = target.value || '';
|
|
@@ -25565,6 +25589,11 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
25565
25589
|
});
|
|
25566
25590
|
}
|
|
25567
25591
|
editor.e.on(form, 'mousedown touchend', (e)=>{
|
|
25592
|
+
// let the hex/native inputs receive focus and clicks
|
|
25593
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(e.target, 'input')) {
|
|
25594
|
+
e.stopPropagation();
|
|
25595
|
+
return;
|
|
25596
|
+
}
|
|
25568
25597
|
e.stopPropagation();
|
|
25569
25598
|
e.preventDefault();
|
|
25570
25599
|
let target = e.target;
|