jodit 4.12.21 → 4.12.22
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 +28 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +155 -36
- package/es2015/jodit.min.js +8 -8
- 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 +8 -8
- package/es2018/jodit.min.js +24 -24
- 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 +9 -9
- package/es2021/jodit.js +154 -35
- package/es2021/jodit.min.js +22 -22
- 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 +9 -9
- package/es2021.en/jodit.js +153 -34
- package/es2021.en/jodit.min.js +11 -11
- 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 +164 -36
- 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/core/dom/dom.js +6 -4
- package/esm/langs/tr.js +1 -1
- package/esm/modules/dialog/dialog.d.ts +5 -0
- package/esm/modules/dialog/dialog.js +25 -2
- package/esm/plugins/clean-html/clean-html.js +8 -2
- package/esm/plugins/clean-html/helpers/visitor/filters/allow-attributes.js +9 -2
- package/esm/plugins/clipboard/clipboard.js +29 -1
- package/esm/plugins/inline-popup/inline-popup.d.ts +8 -0
- package/esm/plugins/inline-popup/inline-popup.js +43 -2
- package/esm/plugins/limit/limit.js +7 -1
- package/esm/plugins/paste/paste.d.ts +1 -1
- package/esm/plugins/paste/paste.js +7 -5
- package/esm/plugins/resize-handler/resize-handler.js +13 -2
- package/esm/plugins/resizer/resizer.js +5 -1
- package/esm/plugins/source/source.js +9 -0
- package/package.json +1 -1
- package/types/modules/dialog/dialog.d.ts +5 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +8 -0
- package/types/plugins/paste/paste.d.ts +1 -1
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.12.
|
|
4
|
+
* Version: v4.12.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1802,7 +1802,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1802
1802
|
* ```
|
|
1803
1803
|
* @packageDocumentation
|
|
1804
1804
|
* @module constants
|
|
1805
|
-
*/ const APP_VERSION = "4.12.
|
|
1805
|
+
*/ const APP_VERSION = "4.12.22";
|
|
1806
1806
|
// prettier-ignore
|
|
1807
1807
|
const ES = "es2021";
|
|
1808
1808
|
const IS_ES_MODERN = true;
|
|
@@ -3218,8 +3218,9 @@ function wait(condition) {
|
|
|
3218
3218
|
if (!Dom.isNode(node)) {
|
|
3219
3219
|
return false;
|
|
3220
3220
|
}
|
|
3221
|
-
|
|
3222
|
-
|
|
3221
|
+
// no `defaultView` requirement — nodes of an inert document
|
|
3222
|
+
// (`DOMParser`, `implementation.createHTMLDocument`) are still elements
|
|
3223
|
+
return node.nodeType === Node.ELEMENT_NODE;
|
|
3223
3224
|
}
|
|
3224
3225
|
/**
|
|
3225
3226
|
* Check if element is document fragment
|
|
@@ -3236,8 +3237,10 @@ function wait(condition) {
|
|
|
3236
3237
|
if (!Dom.isNode(node)) {
|
|
3237
3238
|
return false;
|
|
3238
3239
|
}
|
|
3240
|
+
// an inert document has no browsing context (`defaultView` is null),
|
|
3241
|
+
// but its nodes are same-realm HTMLElements
|
|
3239
3242
|
const win = node.ownerDocument?.defaultView;
|
|
3240
|
-
return
|
|
3243
|
+
return node instanceof (win ? win.HTMLElement : HTMLElement);
|
|
3241
3244
|
}
|
|
3242
3245
|
/**
|
|
3243
3246
|
* Check element is inline block
|
|
@@ -18430,7 +18433,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
18430
18433
|
e.stopImmediatePropagation();
|
|
18431
18434
|
}
|
|
18432
18435
|
if (this.resizable && this.o.resizable) {
|
|
18433
|
-
this.setSize(this.startPoint.w + e.clientX - this.startX, this.startPoint.h + e.clientY - this.startY);
|
|
18436
|
+
this.setSize(Math.max(this.startPoint.w + e.clientX - this.startX, this.minSize.w), Math.max(this.startPoint.h + e.clientY - this.startY, this.minSize.h));
|
|
18434
18437
|
if (this.e) {
|
|
18435
18438
|
/**
|
|
18436
18439
|
* Fired when dialog box is resized
|
|
@@ -18458,6 +18461,14 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
18458
18461
|
this.startY = e.clientY;
|
|
18459
18462
|
this.startPoint.w = this.dialog.offsetWidth;
|
|
18460
18463
|
this.startPoint.h = this.dialog.offsetHeight;
|
|
18464
|
+
const header = this.getElm('header');
|
|
18465
|
+
const footer = this.getElm('footer');
|
|
18466
|
+
const content = this.getElm('content');
|
|
18467
|
+
// the content area does not shrink below its CSS `min-height`,
|
|
18468
|
+
// so it is part of the smallest height the panel can take
|
|
18469
|
+
const contentMinHeight = content ? parseFloat(this.ow.getComputedStyle(content).minHeight) || 0 : 0;
|
|
18470
|
+
this.minSize.w = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_8__.isNumber)(this.o.minWidth) ? this.o.minWidth : Math.max(100, footer?.scrollWidth ?? 0);
|
|
18471
|
+
this.minSize.h = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_8__.isNumber)(this.o.minHeight) ? this.o.minHeight : (header?.offsetHeight ?? 0) + (footer?.offsetHeight ?? 0) + contentMinHeight + this.resizer.offsetHeight;
|
|
18461
18472
|
this.lockSelect();
|
|
18462
18473
|
this.__addGlobalResizeListeners();
|
|
18463
18474
|
if (this.e) {
|
|
@@ -18752,6 +18763,12 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
18752
18763
|
if (this.options && this.o.resizable && !this.moved && this.isOpened && !this.offsetX && !this.offsetY) {
|
|
18753
18764
|
this.setPosition();
|
|
18754
18765
|
}
|
|
18766
|
+
}), /**
|
|
18767
|
+
* Minimal size the dialog can be resized to — the header and the footer
|
|
18768
|
+
* (with its buttons) must always stay inside the panel
|
|
18769
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "minSize", {
|
|
18770
|
+
w: 0,
|
|
18771
|
+
h: 0
|
|
18755
18772
|
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "dialog", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "workplace", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "dialogbox_header", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "dialogbox_content", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "dialogbox_footer", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "dialogbox_toolbar", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isModal", false), /**
|
|
18756
18773
|
* True, if dialog was opened
|
|
18757
18774
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isOpened", false);
|
|
@@ -27278,10 +27295,14 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
27278
27295
|
* Event handler when manually assigning a value to the HTML editor.
|
|
27279
27296
|
*/ onBeforeSetNativeEditorValue(data) {
|
|
27280
27297
|
const [sandBox, iframe] = this.j.o.cleanHTML.useIframeSandbox ? this.j.createInside.sandbox() : [
|
|
27281
|
-
|
|
27298
|
+
// an inert document never loads sub-resources, so the
|
|
27299
|
+
// images in the value are not re-requested from the
|
|
27300
|
+
// server on every assignment (e.g. on each change in
|
|
27301
|
+
// jodit-react). See #1237
|
|
27302
|
+
this.j.od.implementation.createHTMLDocument('').body
|
|
27282
27303
|
];
|
|
27283
27304
|
sandBox.innerHTML = data.value;
|
|
27284
|
-
this.
|
|
27305
|
+
this.j.e.fire('safeHTML', sandBox);
|
|
27285
27306
|
data.value = sandBox.innerHTML;
|
|
27286
27307
|
(0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, {
|
|
27287
27308
|
safeJavaScriptLink: true,
|
|
@@ -27616,12 +27637,19 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
|
|
|
27616
27637
|
/**
|
|
27617
27638
|
* @private
|
|
27618
27639
|
*/ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
27619
|
-
|
|
27640
|
+
const allowedForTag = allow && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && allow[nodeElm.nodeName];
|
|
27641
|
+
if (allow && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && allowedForTag !== true) {
|
|
27642
|
+
// the tag is not in the allow list at all — attributes do not matter,
|
|
27643
|
+
// the element itself will be removed by the tags filter. Without this
|
|
27644
|
+
// check `allow[nodeName][attr]` threw on e.g. `<meta charset>`. See #1224
|
|
27645
|
+
if (!allowedForTag) {
|
|
27646
|
+
return hadEffect;
|
|
27647
|
+
}
|
|
27620
27648
|
const attrs = nodeElm.attributes;
|
|
27621
27649
|
if (attrs && attrs.length) {
|
|
27622
27650
|
const removeAttrs = [];
|
|
27623
27651
|
for(let i = 0; i < attrs.length; i += 1){
|
|
27624
|
-
const attr =
|
|
27652
|
+
const attr = allowedForTag[attrs[i].name];
|
|
27625
27653
|
if (!attr || attr !== true && attr !== attrs[i].value) {
|
|
27626
27654
|
removeAttrs.push(attrs[i].name);
|
|
27627
27655
|
}
|
|
@@ -28199,9 +28227,10 @@ const keys = Object.keys(_filters__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
28199
28227
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
28200
28228
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81937);
|
|
28201
28229
|
/* harmony import */ var jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51676);
|
|
28202
|
-
/* harmony import */ var
|
|
28203
|
-
/* harmony import */ var
|
|
28204
|
-
/* harmony import */ var
|
|
28230
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23211);
|
|
28231
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28077);
|
|
28232
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
|
|
28233
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81008);
|
|
28205
28234
|
/*!
|
|
28206
28235
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28207
28236
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28216,16 +28245,17 @@ const keys = Object.keys(_filters__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
28216
28245
|
|
|
28217
28246
|
|
|
28218
28247
|
|
|
28248
|
+
|
|
28219
28249
|
/**
|
|
28220
28250
|
* Clipboard plugin - cut and copy functionality
|
|
28221
28251
|
*/ class clipboard {
|
|
28222
28252
|
init(editor) {
|
|
28223
28253
|
this.buttons?.forEach((btn)=>editor.registerButton(btn));
|
|
28224
28254
|
editor.e.off(`copy.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID} cut.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID}`).on(`copy.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID} cut.${jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID}`, (event)=>{
|
|
28225
|
-
const selectedText = editor.s.html;
|
|
28226
|
-
const clipboardData = (0,
|
|
28255
|
+
const selectedText = wrapWithInlineAncestors(editor, editor.s.html);
|
|
28256
|
+
const clipboardData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getDataTransfer)(event) || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getDataTransfer)(editor.ew) || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.getDataTransfer)(event.originalEvent);
|
|
28227
28257
|
if (clipboardData) {
|
|
28228
|
-
clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.TEXT_PLAIN, (0,
|
|
28258
|
+
clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.TEXT_PLAIN, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.stripTags)(selectedText));
|
|
28229
28259
|
clipboardData.setData(jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.TEXT_HTML, selectedText);
|
|
28230
28260
|
}
|
|
28231
28261
|
editor.buffer.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID, selectedText);
|
|
@@ -28267,7 +28297,30 @@ const keys = Object.keys(_filters__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
28267
28297
|
]);
|
|
28268
28298
|
}
|
|
28269
28299
|
}
|
|
28270
|
-
|
|
28300
|
+
/**
|
|
28301
|
+
* `Selection.html` clones only the range contents — when the selection sits
|
|
28302
|
+
* entirely inside the text of a formatted element (`<strong>te|st|</strong>`),
|
|
28303
|
+
* the clone is bare text and the formatting would be lost on paste. Native
|
|
28304
|
+
* browser copy keeps that context, so the interception must restore it: wrap
|
|
28305
|
+
* the fragment in shallow clones of the inline ancestors of the range. See #1202
|
|
28306
|
+
*/ function wrapWithInlineAncestors(editor, html) {
|
|
28307
|
+
if (!html || editor.s.isCollapsed()) {
|
|
28308
|
+
return html;
|
|
28309
|
+
}
|
|
28310
|
+
let node = editor.s.range.commonAncestorContainer;
|
|
28311
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isElement(node)) {
|
|
28312
|
+
node = node.parentElement;
|
|
28313
|
+
}
|
|
28314
|
+
let result = html;
|
|
28315
|
+
while(node && node !== editor.editor && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isElement(node) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isBlock(node)){
|
|
28316
|
+
const shell = node.cloneNode(false);
|
|
28317
|
+
shell.innerHTML = result;
|
|
28318
|
+
result = shell.outerHTML;
|
|
28319
|
+
node = node.parentElement;
|
|
28320
|
+
}
|
|
28321
|
+
return result;
|
|
28322
|
+
}
|
|
28323
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('clipboard', clipboard);
|
|
28271
28324
|
|
|
28272
28325
|
|
|
28273
28326
|
/***/ }),
|
|
@@ -34128,9 +34181,34 @@ const align = {
|
|
|
34128
34181
|
}).on([
|
|
34129
34182
|
this.j.ew,
|
|
34130
34183
|
this.j.ow
|
|
34131
|
-
], 'mouseup keyup', this.onSelectionEnd)
|
|
34184
|
+
], 'mouseup keyup', this.onSelectionEnd).on([
|
|
34185
|
+
this.j.ew,
|
|
34186
|
+
this.j.ow
|
|
34187
|
+
], 'mousedown touchstart', this.__onDocumentMouseDown).on('closeAllPopups', this.__onCloseAllPopups);
|
|
34132
34188
|
this.addListenersForElements();
|
|
34133
34189
|
}
|
|
34190
|
+
__onDocumentMouseDown(e) {
|
|
34191
|
+
if (this.popup.isOpened && this.type === 'selection' && e.target && jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target, jodit_core_ui_popup__WEBPACK_IMPORTED_MODULE_8__.Popup)) {
|
|
34192
|
+
this.__reopenSelectionPopup = true;
|
|
34193
|
+
}
|
|
34194
|
+
}
|
|
34195
|
+
__onCloseAllPopups() {
|
|
34196
|
+
if (!this.__reopenSelectionPopup) {
|
|
34197
|
+
return;
|
|
34198
|
+
}
|
|
34199
|
+
this.__reopenSelectionPopup = false;
|
|
34200
|
+
if (!this.j.o.toolbarInlineForSelection) {
|
|
34201
|
+
return;
|
|
34202
|
+
}
|
|
34203
|
+
// a zero timeout would run synchronously — before the popup's own
|
|
34204
|
+
// `closeAllPopups` handler closes it; defer to the next macrotask
|
|
34205
|
+
this.j.async.setTimeout(()=>{
|
|
34206
|
+
const sel = this.j.s.sel;
|
|
34207
|
+
if (sel && !sel.isCollapsed) {
|
|
34208
|
+
this.showPopup(()=>this.j.s.range.getBoundingClientRect(), 'selection');
|
|
34209
|
+
}
|
|
34210
|
+
}, 1);
|
|
34211
|
+
}
|
|
34134
34212
|
onSelectionStart() {
|
|
34135
34213
|
this.snapRange = this.j.s.range.cloneRange();
|
|
34136
34214
|
}
|
|
@@ -34179,7 +34257,10 @@ const align = {
|
|
|
34179
34257
|
jodit.e.off('showPopup').off([
|
|
34180
34258
|
this.j.ew,
|
|
34181
34259
|
this.j.ow
|
|
34182
|
-
], 'mouseup keyup', this.onSelectionEnd)
|
|
34260
|
+
], 'mouseup keyup', this.onSelectionEnd).off([
|
|
34261
|
+
this.j.ew,
|
|
34262
|
+
this.j.ow
|
|
34263
|
+
], 'mousedown touchstart', this.__onDocumentMouseDown).off('closeAllPopups', this.__onCloseAllPopups);
|
|
34183
34264
|
this.removeListenersForElements();
|
|
34184
34265
|
}
|
|
34185
34266
|
_eventsList() {
|
|
@@ -34204,7 +34285,11 @@ const align = {
|
|
|
34204
34285
|
}, 'toolbar');
|
|
34205
34286
|
}
|
|
34206
34287
|
constructor(...args){
|
|
34207
|
-
super(...args), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "type", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "previousTarget", void 0),
|
|
34288
|
+
super(...args), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "type", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "previousTarget", void 0), /**
|
|
34289
|
+
* The user pressed a button inside the selection toolbar — after the
|
|
34290
|
+
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
34291
|
+
* while the selection is still there. See #1238
|
|
34292
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__reopenSelectionPopup", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "snapRange", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "elmsList", (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s)));
|
|
34208
34293
|
}
|
|
34209
34294
|
}
|
|
34210
34295
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(inlinePopup, "requires", [
|
|
@@ -34233,6 +34318,12 @@ const align = {
|
|
|
34233
34318
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
34234
34319
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':outsideClick')
|
|
34235
34320
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
34321
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
34322
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
34323
|
+
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
34324
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
34325
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
34326
|
+
], inlinePopup.prototype, "__onCloseAllPopups", null);
|
|
34236
34327
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
34237
34328
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
34238
34329
|
], inlinePopup.prototype, "onSelectionStart", null);
|
|
@@ -34518,7 +34609,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.limitHTML = false;
|
|
|
34518
34609
|
jodit.e.fire('denyWords.limit limit.limit');
|
|
34519
34610
|
return true;
|
|
34520
34611
|
}
|
|
34521
|
-
|
|
34612
|
+
// with `countTextSpaces` enabled the limiter counts characters the
|
|
34613
|
+
// same way as the `stat` plugin's counter — including spaces. See #1144
|
|
34614
|
+
const charsCount = jodit.o.countTextSpaces ? text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.INVISIBLE_SPACE_REG_EXP)(), '').replace(/[\r\n]/g, '').length : words.join('').length;
|
|
34615
|
+
const should = Boolean(limitChars && isGt(charsCount, limitChars, strict));
|
|
34522
34616
|
if (should) {
|
|
34523
34617
|
jodit.e.fire('denyChars.limit limit.limit');
|
|
34524
34618
|
}
|
|
@@ -36638,9 +36732,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
36638
36732
|
*/ class paste extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin {
|
|
36639
36733
|
/** @override **/ afterInit(jodit) {
|
|
36640
36734
|
jodit.e.on('paste.paste', this.onPaste).on('pasteStack.paste', (item)=>this.pasteStack.push(item));
|
|
36641
|
-
|
|
36642
|
-
this.j.e.on('processPaste.paste', this.onProcessPasteReplaceNl2Br);
|
|
36643
|
-
}
|
|
36735
|
+
this.j.e.on('processPaste.paste', this.onProcessPasteReplaceNl2Br);
|
|
36644
36736
|
}
|
|
36645
36737
|
/** @override **/ beforeDestruct(jodit) {
|
|
36646
36738
|
jodit.e.off('paste.paste', this.onPaste).off('processPaste.paste', this.onProcessPasteReplaceNl2Br).off('.paste');
|
|
@@ -36760,10 +36852,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
36760
36852
|
(0,_helpers__WEBPACK_IMPORTED_MODULE_9__.pasteInsertHtml)(e, this.j, html);
|
|
36761
36853
|
}
|
|
36762
36854
|
/**
|
|
36763
|
-
*
|
|
36855
|
+
* Escape plain text and replace all \\n chars with br
|
|
36764
36856
|
*/ onProcessPasteReplaceNl2Br(ignore, text, type) {
|
|
36765
36857
|
if (type === jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.TEXT_PLAIN + ';' && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.isHTML)(text)) {
|
|
36766
|
-
|
|
36858
|
+
// the clipboard contains only plain text — escape special chars
|
|
36859
|
+
// so a stray `<` is not parsed as an unclosed tag and does not
|
|
36860
|
+
// swallow the rest of the string. See #1227
|
|
36861
|
+
const escaped = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.htmlspecialchars)(text);
|
|
36862
|
+
return this.j.o.nl2brInPlainText ? (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.nl2br)(escaped) : escaped;
|
|
36767
36863
|
}
|
|
36768
36864
|
}
|
|
36769
36865
|
constructor(...args){
|
|
@@ -37631,9 +37727,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.allowResizeY = true;
|
|
|
37631
37727
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84839);
|
|
37632
37728
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27795);
|
|
37633
37729
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28077);
|
|
37634
|
-
/* harmony import */ var
|
|
37635
|
-
/* harmony import */ var
|
|
37636
|
-
/* harmony import */ var
|
|
37730
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
|
|
37731
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91206);
|
|
37732
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4099);
|
|
37733
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(58293);
|
|
37637
37734
|
/*!
|
|
37638
37735
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37639
37736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37650,7 +37747,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.allowResizeY = true;
|
|
|
37650
37747
|
|
|
37651
37748
|
|
|
37652
37749
|
|
|
37653
|
-
|
|
37750
|
+
|
|
37751
|
+
class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
37654
37752
|
/** @override **/ afterInit(editor) {
|
|
37655
37753
|
const { height, width, allowResizeX } = editor.o;
|
|
37656
37754
|
let { allowResizeY } = editor.o;
|
|
@@ -37684,11 +37782,21 @@ class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugi
|
|
|
37684
37782
|
if (!this.isResized) {
|
|
37685
37783
|
return;
|
|
37686
37784
|
}
|
|
37785
|
+
let { clientX, clientY } = e;
|
|
37786
|
+
if (e.view === this.j.ew && this.j.ew !== this.j.ow) {
|
|
37787
|
+
// the event was proxied from the editor's iframe — its client
|
|
37788
|
+
// coordinates are relative to the iframe viewport, while the
|
|
37789
|
+
// start point was captured on the host-document handle;
|
|
37790
|
+
// shift them into the host coordinate space
|
|
37791
|
+
const workplacePosition = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.offset)(this.j.workplace, this.j, this.j.od, true);
|
|
37792
|
+
clientX += workplacePosition.left;
|
|
37793
|
+
clientY += workplacePosition.top;
|
|
37794
|
+
}
|
|
37687
37795
|
if (this.j.o.allowResizeY) {
|
|
37688
|
-
this.j.e.fire('setHeight', this.start.h +
|
|
37796
|
+
this.j.e.fire('setHeight', this.start.h + clientY - this.start.y);
|
|
37689
37797
|
}
|
|
37690
37798
|
if (this.j.o.allowResizeX) {
|
|
37691
|
-
this.j.e.fire('setWidth', this.start.w +
|
|
37799
|
+
this.j.e.fire('setWidth', this.start.w + clientX - this.start.x);
|
|
37692
37800
|
}
|
|
37693
37801
|
this.j.e.fire('resize');
|
|
37694
37802
|
}
|
|
@@ -37717,7 +37825,7 @@ class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugi
|
|
|
37717
37825
|
h: 0
|
|
37718
37826
|
}), /**
|
|
37719
37827
|
* Resize handle
|
|
37720
|
-
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "handle", this.j.c.div('jodit-editor__resize',
|
|
37828
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "handle", this.j.c.div('jodit-editor__resize', jodit_core_ui__WEBPACK_IMPORTED_MODULE_7__.Icon.get('resize_handler')));
|
|
37721
37829
|
}
|
|
37722
37830
|
}
|
|
37723
37831
|
/** @override **/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(resizeHandler, "requires", [
|
|
@@ -37902,7 +38010,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
37902
38010
|
this.pointerX = e.clientX;
|
|
37903
38011
|
this.pointerY = e.clientY;
|
|
37904
38012
|
let diff_x, diff_y;
|
|
37905
|
-
if (this.j.options.iframe) {
|
|
38013
|
+
if (this.j.options.iframe && e.view === this.j.ew) {
|
|
38014
|
+
// the event was proxied from the editor's iframe — its client
|
|
38015
|
+
// coordinates are relative to the iframe viewport, while
|
|
38016
|
+
// `startX/startY` were captured on a host-document handle;
|
|
38017
|
+
// shift them into the host coordinate space
|
|
37906
38018
|
const workplacePosition = this.getWorkplacePosition();
|
|
37907
38019
|
diff_x = e.clientX + workplacePosition.left - this.startX;
|
|
37908
38020
|
diff_y = e.clientY + workplacePosition.top - this.startY;
|
|
@@ -40518,6 +40630,13 @@ class SourceEditor {
|
|
|
40518
40630
|
this.sourceEditor?.setValue(value);
|
|
40519
40631
|
}
|
|
40520
40632
|
setFocusToMirror() {
|
|
40633
|
+
const active = this.j.od.activeElement;
|
|
40634
|
+
// do not steal focus from another editor or control — e.g. when the
|
|
40635
|
+
// mode is switched programmatically (a Vue/React wrapper re-render)
|
|
40636
|
+
// while the user is already typing elsewhere. See #1356
|
|
40637
|
+
if (active && active !== this.j.od.body && !this.j.container.contains(active)) {
|
|
40638
|
+
return;
|
|
40639
|
+
}
|
|
40521
40640
|
this.sourceEditor?.focus();
|
|
40522
40641
|
}
|
|
40523
40642
|
saveSelection() {
|
|
@@ -43514,7 +43633,7 @@ module.exports["default"] = ["Напишите что-либо","О Jodit","Ре
|
|
|
43514
43633
|
/***/ 68368:
|
|
43515
43634
|
/***/ (function(module) {
|
|
43516
43635
|
|
|
43517
|
-
module.exports["default"] = ["Bir şeyler yaz","Jodit Hakkında","Jodit Editor","Jodit Kullanım Kılavuzu","kullanım için detaylı bilgiler içerir","Lisans hakkında bilgi için lütfen web sitemize gidin:","Tam versiyonunu satın al","Copyright © XDSoft.net - Chupurnov Valeriy. Tüm hakları saklıdır.","Bağlantı","Yeni sekmede aç","Editörü tam ekranda aç","Stili temizle","Renk doldur veya yazı rengi seç","Yinele","Geri Al","Kalın","İtalik","Sırasız Liste Ekle","Sıralı Liste Ekle","Ortala","Kenarlara Yasla","Sola Yasla","Sağa Yasla","Yatay Çizgi Ekle","Resim Ekle","Dosya Ekle","Youtube/Vimeo Videosu Ekle","Bağlantı Ekle","Font Boyutu","Font Ailesi","Blok Ekle","Normal","Başlık 1","Başlık 2","Başlık 3","Başlık 4","Alıntı","Kod","Ekle","Tablo Ekle","Girintiyi Azalt","Girintiyi Arttır","Özel Karakter Seç","Özel Karakter Ekle","Resim Biçimi","Mod Değiştir","Boşluklar","Üst","Sağ","Alt","Sol","CSS Stilleri","CSS Sınıfları","Hizalama","Sağ","Ortalı","Sol","Belirsiz","Kaynak","Başlık","Alternatif Yazı","Link","Bağlantıyı yeni sekmede aç","Resim","Dosya","Gelişmiş","Resim özellikleri","İptal","Tamam","Dosya Listeleyici","Liste yüklenirken hata oluştu","Klasörler yüklenirken hata oluştur","Emin misiniz?","Dizin yolu giriniz","Dizin oluştur","İsim yaz","Resim bırak","Dosya bırak","veya tıkla","Alternatif yazı","Yükle","Gözat","Arka plan","Yazı","Üst","Orta","Aşağı","Öncesine kolon ekle","Sonrasına kolon ekle","Üstüne satır ekle","Altına satır ekle","Tabloyu sil","Satırı sil","Kolonu sil","Hücreyi temizle","Harfler: %d","Kelimeler: %d","Üstü çizili","Alt çizgi","Üst yazı","Alt yazı","Seçilimi kes","Tümünü seç","Satır sonu","Ara","Şununla değiştir","Değiştir","Yapıştır","Yapıştırılacak içerik seç","Kaynak","Kalın","italik","Fırça","Bağlantı","Geri al","Yinele","Tablo","Resim","Silgi","Paragraf","Font boyutu","Video","Font","Hakkında","Yazdır","Alt çizgi","Üstü çizili","Girinti","Çıkıntı","Tam ekran","Küçült","Ayraç","Sırasız liste","Sıralı liste","Kes","Tümünü seç","Kod ekle","Bağlantıyı aç","Bağlantıyı düzenle","Nofollow özelliği","Bağlantıyı kaldır","Güncelle","Düzenlemek için","Yorumu","URL","Düzenle","Yatay hizala","Filtre","Değişime göre sırala","İsme göre sırala","Boyuta göre sırala","Klasör ekle","Sıfırla","Kaydet","Farklı kaydet","Boyutlandır","Kırp","Genişlik","Yükseklik","En boy oranını koru","Evet","Hayır","Sil","Seç","Seç: %s","Dikey hizala","Ayır","Birleştir","Kolon ekle","Satır ekle","Lisans: %s","Sil","Dikey ayır","Yatay ayır","Kenarlık","Kodunuz HTML koduna benziyor. HTML olarak devam etmek ister misiniz?","HTML olarak yapıştır","Sakla","Yazı olarak ekle","Sadece yazıyı ekle","Sadece kendi resimlerinizi düzenleyebilirsiniz. Bu görseli kendi hostunuza indirmek ister misiniz?","Görsel başarıyla hostunuza yüklendi","Palet","Bu dizinde dosya yok","Yeniden isimlendir","Yeni isim girin","Ön izleme","İndir","Panodan yapıştır ","Tarayıcınız panoya doğrudan erişimi desteklemiyor.","Seçimi kopyala","Kopyala","Sınır yarıçapı","Tümünü Göster","Uygula","Lütfen bu alanı doldurun","Lütfen bir web adresi girin","Varsayılan","Daire","Nokta","Kare","Bul","Öncekini Bul","Sonrakini Bul","
|
|
43636
|
+
module.exports["default"] = ["Bir şeyler yaz","Jodit Hakkında","Jodit Editor","Jodit Kullanım Kılavuzu","kullanım için detaylı bilgiler içerir","Lisans hakkında bilgi için lütfen web sitemize gidin:","Tam versiyonunu satın al","Copyright © XDSoft.net - Chupurnov Valeriy. Tüm hakları saklıdır.","Bağlantı","Yeni sekmede aç","Editörü tam ekranda aç","Stili temizle","Renk doldur veya yazı rengi seç","Yinele","Geri Al","Kalın","İtalik","Sırasız Liste Ekle","Sıralı Liste Ekle","Ortala","Kenarlara Yasla","Sola Yasla","Sağa Yasla","Yatay Çizgi Ekle","Resim Ekle","Dosya Ekle","Youtube/Vimeo Videosu Ekle","Bağlantı Ekle","Font Boyutu","Font Ailesi","Blok Ekle","Normal","Başlık 1","Başlık 2","Başlık 3","Başlık 4","Alıntı","Kod","Ekle","Tablo Ekle","Girintiyi Azalt","Girintiyi Arttır","Özel Karakter Seç","Özel Karakter Ekle","Resim Biçimi","Mod Değiştir","Boşluklar","Üst","Sağ","Alt","Sol","CSS Stilleri","CSS Sınıfları","Hizalama","Sağ","Ortalı","Sol","Belirsiz","Kaynak","Başlık","Alternatif Yazı","Link","Bağlantıyı yeni sekmede aç","Resim","Dosya","Gelişmiş","Resim özellikleri","İptal","Tamam","Dosya Listeleyici","Liste yüklenirken hata oluştu","Klasörler yüklenirken hata oluştur","Emin misiniz?","Dizin yolu giriniz","Dizin oluştur","İsim yaz","Resim bırak","Dosya bırak","veya tıkla","Alternatif yazı","Yükle","Gözat","Arka plan","Yazı","Üst","Orta","Aşağı","Öncesine kolon ekle","Sonrasına kolon ekle","Üstüne satır ekle","Altına satır ekle","Tabloyu sil","Satırı sil","Kolonu sil","Hücreyi temizle","Harfler: %d","Kelimeler: %d","Üstü çizili","Alt çizgi","Üst yazı","Alt yazı","Seçilimi kes","Tümünü seç","Satır sonu","Ara","Şununla değiştir","Değiştir","Yapıştır","Yapıştırılacak içerik seç","Kaynak","Kalın","italik","Fırça","Bağlantı","Geri al","Yinele","Tablo","Resim","Silgi","Paragraf","Font boyutu","Video","Font","Hakkında","Yazdır","Alt çizgi","Üstü çizili","Girinti","Çıkıntı","Tam ekran","Küçült","Ayraç","Sırasız liste","Sıralı liste","Kes","Tümünü seç","Kod ekle","Bağlantıyı aç","Bağlantıyı düzenle","Nofollow özelliği","Bağlantıyı kaldır","Güncelle","Düzenlemek için","Yorumu","URL","Düzenle","Yatay hizala","Filtre","Değişime göre sırala","İsme göre sırala","Boyuta göre sırala","Klasör ekle","Sıfırla","Kaydet","Farklı kaydet","Boyutlandır","Kırp","Genişlik","Yükseklik","En boy oranını koru","Evet","Hayır","Sil","Seç","Seç: %s","Dikey hizala","Ayır","Birleştir","Kolon ekle","Satır ekle","Lisans: %s","Sil","Dikey ayır","Yatay ayır","Kenarlık","Kodunuz HTML koduna benziyor. HTML olarak devam etmek ister misiniz?","HTML olarak yapıştır","Sakla","Yazı olarak ekle","Sadece yazıyı ekle","Sadece kendi resimlerinizi düzenleyebilirsiniz. Bu görseli kendi hostunuza indirmek ister misiniz?","Görsel başarıyla hostunuza yüklendi","Palet","Bu dizinde dosya yok","Yeniden isimlendir","Yeni isim girin","Ön izleme","İndir","Panodan yapıştır ","Tarayıcınız panoya doğrudan erişimi desteklemiyor.","Seçimi kopyala","Kopyala","Sınır yarıçapı","Tümünü Göster","Uygula","Lütfen bu alanı doldurun","Lütfen bir web adresi girin","Varsayılan","Daire","Nokta","Kare","Bul","Öncekini Bul","Sonrakini Bul","Yapıştırılan içerik bir Microsoft Word/Excel belgesinden geliyor. Formatı korumak mı yoksa temizlemek mi istiyorsunuz?","Word biçiminde yapıştırma algılandı","Temizle","Sınıf adı girin","Özel yeniden boyutlandırma için Alt tuşuna basın",null,null,null,"Tümü"]
|
|
43518
43637
|
|
|
43519
43638
|
/***/ }),
|
|
43520
43639
|
|