jodit 4.15.16 → 4.15.17
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 +9 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +61 -16
- 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.js +4 -4
- 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 +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +60 -16
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +60 -16
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +62 -16
- package/es5/jodit.min.css +2 -2
- 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/plugins/focus/focus.js +17 -1
- package/esm/plugins/image-processor/image-processor.js +20 -1
- package/esm/plugins/image-properties/writers/margin.js +5 -3
- package/esm/plugins/inline-popup/config/items/img.js +7 -0
- package/package.json +1 -1
package/es5/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.15.
|
|
4
|
+
* Version: v4.15.17
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2110,7 +2110,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2110
2110
|
* @packageDocumentation
|
|
2111
2111
|
* @module constants
|
|
2112
2112
|
*/
|
|
2113
|
-
var APP_VERSION = "4.15.
|
|
2113
|
+
var APP_VERSION = "4.15.17";
|
|
2114
2114
|
// prettier-ignore
|
|
2115
2115
|
var ES = "es5";
|
|
2116
2116
|
var IS_ES_MODERN = false;
|
|
@@ -38147,14 +38147,28 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
|
|
|
38147
38147
|
*/ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
|
|
38148
38148
|
function focus(editor) {
|
|
38149
38149
|
if (editor.o.saveSelectionOnBlur) {
|
|
38150
|
+
// A click that brings focus back places the caret itself, and Chrome
|
|
38151
|
+
// has already placed it when focus fires, so restoring would move it
|
|
38152
|
+
// back to the old selection. The saved markers are dropped instead.
|
|
38153
|
+
var focusByPointer = false;
|
|
38150
38154
|
editor.e.on('blur', function() {
|
|
38155
|
+
// A press that never brought the focus back must not decide
|
|
38156
|
+
// what the next focus does
|
|
38157
|
+
focusByPointer = false;
|
|
38151
38158
|
if (editor.isEditorMode()) {
|
|
38152
38159
|
editor.s.save(true);
|
|
38153
38160
|
}
|
|
38161
|
+
}).on('mousedown touchstart', function() {
|
|
38162
|
+
focusByPointer = !editor.editorIsActive;
|
|
38154
38163
|
}).on('focus', function() {
|
|
38155
38164
|
if (editor.isEditorMode()) {
|
|
38156
|
-
|
|
38165
|
+
if (focusByPointer) {
|
|
38166
|
+
editor.s.removeMarkers();
|
|
38167
|
+
} else {
|
|
38168
|
+
editor.s.restore();
|
|
38169
|
+
}
|
|
38157
38170
|
}
|
|
38171
|
+
focusByPointer = false;
|
|
38158
38172
|
});
|
|
38159
38173
|
}
|
|
38160
38174
|
var _$focus = function focus() {
|
|
@@ -39243,11 +39257,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39243
39257
|
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38574);
|
|
39244
39258
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(81937);
|
|
39245
39259
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84839);
|
|
39246
|
-
/* harmony import */ var
|
|
39247
|
-
/* harmony import */ var
|
|
39248
|
-
/* harmony import */ var
|
|
39249
|
-
/* harmony import */ var
|
|
39250
|
-
/* harmony import */ var
|
|
39260
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23211);
|
|
39261
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28077);
|
|
39262
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65946);
|
|
39263
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(91206);
|
|
39264
|
+
/* harmony import */ var jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(23112);
|
|
39265
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(51034);
|
|
39251
39266
|
/*!
|
|
39252
39267
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39253
39268
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39271,6 +39286,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39271
39286
|
|
|
39272
39287
|
|
|
39273
39288
|
|
|
39289
|
+
|
|
39274
39290
|
var JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
39275
39291
|
var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
39276
39292
|
/**
|
|
@@ -39373,9 +39389,9 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39373
39389
|
2
|
|
39374
39390
|
];
|
|
39375
39391
|
}
|
|
39376
|
-
;(0,
|
|
39377
|
-
if (!(0,
|
|
39378
|
-
(0,
|
|
39392
|
+
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.$$)('img', editor.editor).forEach(function(elm) {
|
|
39393
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
|
|
39394
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
39379
39395
|
if (!elm.complete) {
|
|
39380
39396
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
39381
39397
|
var _editor_e;
|
|
@@ -39387,6 +39403,7 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39387
39403
|
replaceDataURIToBlobUUID(editor, elm);
|
|
39388
39404
|
}
|
|
39389
39405
|
editor.e.on(elm, 'mousedown touchstart', function() {
|
|
39406
|
+
removeCaretText(elm);
|
|
39390
39407
|
editor.s.select(elm);
|
|
39391
39408
|
});
|
|
39392
39409
|
}
|
|
@@ -39400,7 +39417,7 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39400
39417
|
}
|
|
39401
39418
|
]);
|
|
39402
39419
|
return imageProcessor;
|
|
39403
|
-
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(
|
|
39420
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_7__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_13__.Plugin));
|
|
39404
39421
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
39405
39422
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.watch)(':afterGetValueFromEditor')
|
|
39406
39423
|
], imageProcessor.prototype, "onAfterGetValueFromEditor", null);
|
|
@@ -39415,6 +39432,25 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39415
39432
|
]),
|
|
39416
39433
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
39417
39434
|
], imageProcessor.prototype, "afterChange", null);
|
|
39435
|
+
/**
|
|
39436
|
+
* Remove the invisible-space text beside an image, which only held a caret.
|
|
39437
|
+
* Selecting the image replaces the caret, and with the text still after a
|
|
39438
|
+
* block image, Safari highlights the rest of the image's line. See #1512
|
|
39439
|
+
*/ function removeCaretText(elm) {
|
|
39440
|
+
for(var _i = 0, _iter = [
|
|
39441
|
+
'previousSibling',
|
|
39442
|
+
'nextSibling'
|
|
39443
|
+
]; _i < _iter.length; _i++){
|
|
39444
|
+
var side = _iter[_i];
|
|
39445
|
+
var _node_nodeValue;
|
|
39446
|
+
var node = elm[side];
|
|
39447
|
+
while(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isText(node) && !((_node_nodeValue = node.nodeValue) === null || _node_nodeValue === void 0 ? void 0 : _node_nodeValue.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_8__.INVISIBLE_SPACE_REG_EXP)(), ''))){
|
|
39448
|
+
var next = node[side];
|
|
39449
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.safeRemove(node);
|
|
39450
|
+
node = next;
|
|
39451
|
+
}
|
|
39452
|
+
}
|
|
39453
|
+
}
|
|
39418
39454
|
function replaceDataURIToBlobUUID(editor, elm) {
|
|
39419
39455
|
if (!editor.o.imageProcessor.replaceDataURIToBlobIdInView) {
|
|
39420
39456
|
return;
|
|
@@ -39425,7 +39461,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
39425
39461
|
var dataUri = elm.src;
|
|
39426
39462
|
var blob;
|
|
39427
39463
|
try {
|
|
39428
|
-
blob = (0,
|
|
39464
|
+
blob = (0,jodit_modules_uploader_helpers_data_uri_to_blob__WEBPACK_IMPORTED_MODULE_14__.dataURItoBlob)(dataUri);
|
|
39429
39465
|
} catch (unused) {
|
|
39430
39466
|
// A data URI the browser accepts but we cannot decode is not worth
|
|
39431
39467
|
// breaking the editor over — keep the image as it is
|
|
@@ -39438,7 +39474,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
39438
39474
|
list[elm.src] = dataUri;
|
|
39439
39475
|
editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
|
|
39440
39476
|
}
|
|
39441
|
-
|
|
39477
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_11__.pluginSystem.add('imageProcessor', imageProcessor);
|
|
39442
39478
|
|
|
39443
39479
|
|
|
39444
39480
|
/***/ }),
|
|
@@ -41250,10 +41286,12 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__
|
|
|
41250
41286
|
marginBottom,
|
|
41251
41287
|
marginLeft
|
|
41252
41288
|
];
|
|
41289
|
+
// Compared with the inline value, which is what `readMargins` showed, so a
|
|
41290
|
+
// margin from a stylesheet is not overwritten when the field is unchanged
|
|
41253
41291
|
var applyMargin = function applyMargin(key, value) {
|
|
41254
|
-
var oldValue = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.
|
|
41292
|
+
var oldValue = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, key) || 0);
|
|
41255
41293
|
var v = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)(value);
|
|
41256
|
-
if (oldValue
|
|
41294
|
+
if (oldValue !== v) {
|
|
41257
41295
|
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__.css)(image, key, v);
|
|
41258
41296
|
}
|
|
41259
41297
|
};
|
|
@@ -42122,6 +42160,14 @@ var align = {
|
|
|
42122
42160
|
'Normal'
|
|
42123
42161
|
],
|
|
42124
42162
|
tooltip: 'Vertical align',
|
|
42163
|
+
// `vertical-align` only moves an image in the line, not a floated or block one
|
|
42164
|
+
isDisabled: function isDisabled(editor, button) {
|
|
42165
|
+
var image = button.target;
|
|
42166
|
+
return Boolean(image && ([
|
|
42167
|
+
'left',
|
|
42168
|
+
'right'
|
|
42169
|
+
].includes((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
|
|
42170
|
+
},
|
|
42125
42171
|
exec: function exec(editor, image, param) {
|
|
42126
42172
|
var control = param.control;
|
|
42127
42173
|
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.15.
|
|
4
|
+
* Version: v4.15.17
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.15.
|
|
11
|
+
* Version: v4.15.17
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|