jodit 4.15.18 → 4.16.1
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 +18 -0
- package/es2015/jodit.css +11 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +10 -9
- package/es2015/jodit.js +116 -50
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +10 -9
- 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 +10 -9
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +10 -9
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +11 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +11 -10
- package/es2021/jodit.js +116 -50
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +11 -10
- 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 +11 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +11 -10
- package/es2021.en/jodit.js +116 -50
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +11 -10
- 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 +15 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +131 -56
- 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 +10 -4
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/group/group.d.ts +4 -0
- package/esm/core/ui/group/group.js +5 -1
- package/esm/core/ui/group/list.js +2 -2
- package/esm/modules/dialog/dialog.js +7 -0
- package/esm/modules/toolbar/button/content.d.ts +7 -0
- package/esm/modules/toolbar/button/content.js +9 -1
- package/esm/plugins/iframe/config.js +4 -0
- package/esm/plugins/image-processor/image-processor.d.ts +5 -0
- package/esm/plugins/image-processor/image-processor.js +29 -2
- package/esm/plugins/source/editor/engines/ace.js +13 -6
- package/esm/plugins/source/source.js +16 -1
- package/package.json +1 -1
- package/types/core/ui/group/group.d.ts +4 -0
- package/types/modules/toolbar/button/content.d.ts +7 -0
- package/types/plugins/image-processor/image-processor.d.ts +5 -0
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.
|
|
4
|
+
* Version: v4.16.1
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2129,7 +2129,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2129
2129
|
* @packageDocumentation
|
|
2130
2130
|
* @module constants
|
|
2131
2131
|
*/
|
|
2132
|
-
var APP_VERSION = "4.
|
|
2132
|
+
var APP_VERSION = "4.16.1";
|
|
2133
2133
|
// prettier-ignore
|
|
2134
2134
|
var ES = "es5";
|
|
2135
2135
|
var IS_ES_MODERN = false;
|
|
@@ -17125,6 +17125,7 @@ var UIButton = /*#__PURE__*/ function(UIElement) {
|
|
|
17125
17125
|
this.name = this.state.name;
|
|
17126
17126
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'data-ref', this.state.name);
|
|
17127
17127
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'ref', this.state.name);
|
|
17128
|
+
this.updateAriaLabel();
|
|
17128
17129
|
}
|
|
17129
17130
|
},
|
|
17130
17131
|
{
|
|
@@ -17142,9 +17143,12 @@ var UIButton = /*#__PURE__*/ function(UIElement) {
|
|
|
17142
17143
|
key: "updateAriaLabel",
|
|
17143
17144
|
value: function updateAriaLabel() {
|
|
17144
17145
|
var hasText = this.state.text.trim().length > 0;
|
|
17145
|
-
|
|
17146
|
-
(
|
|
17147
|
-
|
|
17146
|
+
// An icon-only button without a tooltip would have no accessible
|
|
17147
|
+
// name at all — fall back to its raw name (not translated: control
|
|
17148
|
+
// names are identifiers, not i18n keys).
|
|
17149
|
+
var label = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : !hasText && this.state.name ? this.state.name : null;
|
|
17150
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.container, 'aria-label', label);
|
|
17151
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_16__.attr)(this.button, 'aria-label', !hasText ? label : null);
|
|
17148
17152
|
}
|
|
17149
17153
|
},
|
|
17150
17154
|
{
|
|
@@ -18552,7 +18556,7 @@ var UIFileInput = /*#__PURE__*/ function(UIInput1) {
|
|
|
18552
18556
|
{
|
|
18553
18557
|
key: "createNativeInput",
|
|
18554
18558
|
value: function createNativeInput(options) {
|
|
18555
|
-
return this.j.create.fromHTML('<input\n type="file"\n accept="'.concat(options.onlyImages ? 'image/*' : '*', '"\n tabindex="-1"\n dir="auto"\n multiple=""\n />'));
|
|
18559
|
+
return this.j.create.fromHTML('<input\n type="file"\n accept="'.concat(options.onlyImages ? 'image/*' : '*', '"\n aria-label="').concat(this.j.i18n(options.tooltip || 'Upload'), '"\n tabindex="-1"\n dir="auto"\n multiple=""\n />'));
|
|
18556
18560
|
}
|
|
18557
18561
|
}
|
|
18558
18562
|
]);
|
|
@@ -19197,9 +19201,12 @@ var UIGroup = /*#__PURE__*/ function(UIElement) {
|
|
|
19197
19201
|
},
|
|
19198
19202
|
{
|
|
19199
19203
|
key: "getRole",
|
|
19200
|
-
value:
|
|
19204
|
+
value: /**
|
|
19205
|
+
* A generic container: `group` allows any children. Toolbar button groups
|
|
19206
|
+
* are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
|
|
19207
|
+
*/ function getRole() {
|
|
19201
19208
|
var _this_options;
|
|
19202
|
-
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || '
|
|
19209
|
+
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || 'group';
|
|
19203
19210
|
}
|
|
19204
19211
|
},
|
|
19205
19212
|
{
|
|
@@ -19463,10 +19470,11 @@ var UIList = /*#__PURE__*/ function(UIGroup1) {
|
|
|
19463
19470
|
key: "makeGroup",
|
|
19464
19471
|
value: /**
|
|
19465
19472
|
* Make new group and append it in list of elements
|
|
19466
|
-
*/ function makeGroup(
|
|
19467
|
-
|
|
19473
|
+
*/ function makeGroup() {
|
|
19474
|
+
var role = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'list';
|
|
19475
|
+
return new jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_13__.UIGroup(this.jodit, [], {
|
|
19468
19476
|
role: role
|
|
19469
|
-
}
|
|
19477
|
+
});
|
|
19470
19478
|
}
|
|
19471
19479
|
},
|
|
19472
19480
|
{
|
|
@@ -23293,13 +23301,14 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorat
|
|
|
23293
23301
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28077);
|
|
23294
23302
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45664);
|
|
23295
23303
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(28686);
|
|
23296
|
-
/* harmony import */ var
|
|
23297
|
-
/* harmony import */ var
|
|
23298
|
-
/* harmony import */ var
|
|
23299
|
-
/* harmony import */ var
|
|
23300
|
-
/* harmony import */ var
|
|
23301
|
-
/* harmony import */ var
|
|
23302
|
-
/* harmony import */ var
|
|
23304
|
+
/* harmony import */ var jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(22852);
|
|
23305
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(93640);
|
|
23306
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28712);
|
|
23307
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__);
|
|
23308
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(4099);
|
|
23309
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(35099);
|
|
23310
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(2222);
|
|
23311
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(5266);
|
|
23303
23312
|
/*!
|
|
23304
23313
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
23305
23314
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -23330,7 +23339,8 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorat
|
|
|
23330
23339
|
|
|
23331
23340
|
|
|
23332
23341
|
|
|
23333
|
-
|
|
23342
|
+
|
|
23343
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.dialog = {
|
|
23334
23344
|
namespace: '',
|
|
23335
23345
|
extraButtons: [],
|
|
23336
23346
|
/**
|
|
@@ -23346,7 +23356,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_22__.Config.prototype.dialog = {
|
|
|
23346
23356
|
toolbarButtonSize: 'middle',
|
|
23347
23357
|
zIndex: 'inherit'
|
|
23348
23358
|
};
|
|
23349
|
-
|
|
23359
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.controls.dialog = {
|
|
23350
23360
|
close: {
|
|
23351
23361
|
icon: 'cancel',
|
|
23352
23362
|
exec: function exec(dialog) {
|
|
@@ -23386,7 +23396,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23386
23396
|
* True, if dialog was opened
|
|
23387
23397
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "isOpened", false);
|
|
23388
23398
|
var self1 = _this;
|
|
23389
|
-
self1.options = (0,
|
|
23399
|
+
self1.options = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.ConfigProto)(options, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.ConfigProto)(jodit_config__WEBPACK_IMPORTED_MODULE_23__.Config.prototype.dialog, Dialog.defaultOptions));
|
|
23390
23400
|
// Attach event handlers passed via `options.events` to the dialog's own
|
|
23391
23401
|
// emitter (as FileBrowser already does), so a consumer — e.g. a plugin
|
|
23392
23402
|
// forwarding the editor's `events` config — can observe `afterOpen` /
|
|
@@ -23395,38 +23405,38 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23395
23405
|
self1.attachEvents(self1.options);
|
|
23396
23406
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__.Dom.safeRemove(self1.container);
|
|
23397
23407
|
var n = _this.getFullElName.bind(_this);
|
|
23398
|
-
self1.container = _this.c.fromHTML('<div class="jodit jodit-dialog '.concat(_this.componentName, '">\n <div class="').concat(n('overlay'), '"></div>\n <div class="').concat(_this.getFullElName('panel'), '">\n <div class="').concat(n('header'), '">\n <div class="').concat(n('header-title'), '"></div>\n <div class="').concat(n('header-toolbar'), '"></div>\n </div>\n <div class="').concat(n('content'), '"></div>\n <div class="').concat(n('footer'), '"></div>\n <div class="').concat(n('resizer'), '">').concat(
|
|
23408
|
+
self1.container = _this.c.fromHTML('<div class="jodit jodit-dialog '.concat(_this.componentName, '">\n <div class="').concat(n('overlay'), '"></div>\n <div class="').concat(_this.getFullElName('panel'), '">\n <div class="').concat(n('header'), '">\n <div class="').concat(n('header-title'), '"></div>\n <div class="').concat(n('header-toolbar'), '"></div>\n </div>\n <div class="').concat(n('content'), '"></div>\n <div class="').concat(n('footer'), '"></div>\n <div class="').concat(n('resizer'), '">').concat(jodit_core_ui__WEBPACK_IMPORTED_MODULE_20__.Icon.get('resize_handler'), "</div>\n </div>\n </div>"));
|
|
23399
23409
|
if (self1.options.direction === 'rtl') {
|
|
23400
|
-
(0,
|
|
23401
|
-
(0,
|
|
23410
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(self1.container, 'direction', 'rtl');
|
|
23411
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(self1.container, 'dir', 'rtl');
|
|
23402
23412
|
}
|
|
23403
23413
|
if (_this.o.zIndex) {
|
|
23404
|
-
(0,
|
|
23414
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(_this.container, 'zIndex', _this.o.zIndex.toString());
|
|
23405
23415
|
}
|
|
23406
|
-
;(0,
|
|
23416
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(self1.container, 'role', 'dialog');
|
|
23407
23417
|
Object.defineProperty(self1.container, 'component', {
|
|
23408
23418
|
value: _this
|
|
23409
23419
|
});
|
|
23410
23420
|
self1.setMod('theme', self1.o.theme || 'default').setMod('resizable', Boolean(self1.o.resizable));
|
|
23411
23421
|
var dialog = self1.getElm('panel');
|
|
23412
|
-
(0,
|
|
23422
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialog != null, 'Panel element does not exist');
|
|
23413
23423
|
var resizer = self1.getElm('resizer');
|
|
23414
|
-
(0,
|
|
23424
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(resizer != null, 'Resizer element does not exist');
|
|
23415
23425
|
var dialogbox_header = self1.getElm('header-title');
|
|
23416
|
-
(0,
|
|
23426
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_header != null, 'header-title element does not exist');
|
|
23417
23427
|
var dialogbox_content = self1.getElm('content');
|
|
23418
|
-
(0,
|
|
23428
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_content != null, 'Content element does not exist');
|
|
23419
23429
|
var dialogbox_footer = self1.getElm('footer');
|
|
23420
|
-
(0,
|
|
23430
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_footer != null, 'Footer element does not exist');
|
|
23421
23431
|
var dialogbox_toolbar = self1.getElm('header-toolbar');
|
|
23422
|
-
(0,
|
|
23432
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
|
|
23423
23433
|
_this.dialog = dialog;
|
|
23424
23434
|
_this.resizer = resizer;
|
|
23425
23435
|
_this.dialogbox_header = dialogbox_header;
|
|
23426
23436
|
_this.dialogbox_content = dialogbox_content;
|
|
23427
23437
|
_this.dialogbox_footer = dialogbox_footer;
|
|
23428
23438
|
_this.dialogbox_toolbar = dialogbox_toolbar;
|
|
23429
|
-
(0,
|
|
23439
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(self1.dialog, {
|
|
23430
23440
|
maxWidth: self1.options.maxWidth,
|
|
23431
23441
|
minHeight: self1.options.minHeight,
|
|
23432
23442
|
minWidth: self1.options.minWidth
|
|
@@ -23439,7 +23449,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23439
23449
|
_this.e.on(self1.container, 'close_dialog', self1.close).on(_this.ow, 'keydown', _this.__onEsc).on(_this.ow, 'resize', _this.__onResize);
|
|
23440
23450
|
if (_this.o.closeOnClickOverlay) {
|
|
23441
23451
|
var overlay = self1.getElm('overlay');
|
|
23442
|
-
(0,
|
|
23452
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_19__.assert)(overlay != null, 'Overlay element does not exist');
|
|
23443
23453
|
_this.e.on(overlay, 'click', self1.close);
|
|
23444
23454
|
}
|
|
23445
23455
|
return _this;
|
|
@@ -23523,8 +23533,8 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23523
23533
|
this.draggable = true;
|
|
23524
23534
|
this.startX = e.clientX;
|
|
23525
23535
|
this.startY = e.clientY;
|
|
23526
|
-
this.startPoint.x = (0,
|
|
23527
|
-
this.startPoint.y = (0,
|
|
23536
|
+
this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'left');
|
|
23537
|
+
this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, 'top');
|
|
23528
23538
|
this.setMaxZIndex();
|
|
23529
23539
|
if (e.cancelable) {
|
|
23530
23540
|
e.preventDefault();
|
|
@@ -23632,7 +23642,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23632
23642
|
if (h == null) {
|
|
23633
23643
|
h = this.dialog.offsetHeight;
|
|
23634
23644
|
}
|
|
23635
|
-
;(0,
|
|
23645
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, {
|
|
23636
23646
|
width: w,
|
|
23637
23647
|
height: h
|
|
23638
23648
|
});
|
|
@@ -23672,7 +23682,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23672
23682
|
this.moved = Math.abs(x - left) > 100 || Math.abs(y - top) > 100;
|
|
23673
23683
|
}
|
|
23674
23684
|
// strings on purpose: `css()` would truncate fractional pixels
|
|
23675
|
-
;(0,
|
|
23685
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.dialog, {
|
|
23676
23686
|
left: (x || left) + 'px',
|
|
23677
23687
|
top: (y || top) + 'px'
|
|
23678
23688
|
});
|
|
@@ -23695,6 +23705,12 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23695
23705
|
*/ key: "setHeader",
|
|
23696
23706
|
value: function setHeader(content) {
|
|
23697
23707
|
this.setElements(this.dialogbox_header, content);
|
|
23708
|
+
// `role="dialog"` needs an accessible name; a text title is the
|
|
23709
|
+
// natural one (element titles are left to the caller).
|
|
23710
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_16__.isString)(content)) {
|
|
23711
|
+
var name = (0,jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_17__.stripTags)(content, this.od).trim();
|
|
23712
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.attr)(this.container, 'aria-label', name || null);
|
|
23713
|
+
}
|
|
23698
23714
|
return this;
|
|
23699
23715
|
}
|
|
23700
23716
|
},
|
|
@@ -23761,7 +23777,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23761
23777
|
* Get zIndex from dialog
|
|
23762
23778
|
*/ key: "getZIndex",
|
|
23763
23779
|
value: function getZIndex() {
|
|
23764
|
-
return parseInt((0,
|
|
23780
|
+
return parseInt((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex'), 10) || 0;
|
|
23765
23781
|
}
|
|
23766
23782
|
},
|
|
23767
23783
|
{
|
|
@@ -23790,7 +23806,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23790
23806
|
this.__openedSiblings().forEach(function(dialog) {
|
|
23791
23807
|
maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
|
|
23792
23808
|
});
|
|
23793
|
-
(0,
|
|
23809
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
|
|
23794
23810
|
}
|
|
23795
23811
|
},
|
|
23796
23812
|
{
|
|
@@ -23846,7 +23862,7 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23846
23862
|
this.setPosition(this.offsetX, this.offsetY);
|
|
23847
23863
|
this.setMaxZIndex();
|
|
23848
23864
|
} else {
|
|
23849
|
-
(0,
|
|
23865
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_18__.css)(this.container, 'zIndex', null);
|
|
23850
23866
|
}
|
|
23851
23867
|
if (this.o.fullsize) {
|
|
23852
23868
|
this.toggleFullSize(true);
|
|
@@ -23951,12 +23967,12 @@ var Dialog = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
23951
23967
|
}
|
|
23952
23968
|
]);
|
|
23953
23969
|
return Dialog;
|
|
23954
|
-
}(
|
|
23970
|
+
}(jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_22__.ViewWithToolbar);
|
|
23955
23971
|
/**
|
|
23956
23972
|
* Registry of the currently opened dialogs. Replaces a DOM scan of the
|
|
23957
23973
|
* whole `destination` (usually `document.body`) for every z-index update.
|
|
23958
23974
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "__opened", new Set());
|
|
23959
|
-
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({},
|
|
23975
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_7__._)({}, jodit_core_view_view__WEBPACK_IMPORTED_MODULE_21__.View.defaultOptions), {
|
|
23960
23976
|
closeOnClickOverlay: false,
|
|
23961
23977
|
closeOnEsc: true
|
|
23962
23978
|
}));
|
|
@@ -30125,7 +30141,6 @@ var ToolbarContent = /*#__PURE__*/ function(UIButton) {
|
|
|
30125
30141
|
jodit
|
|
30126
30142
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "control", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "target", void 0), _this.control = control, _this.target = target;
|
|
30127
30143
|
_this.container.classList.add("".concat(_this.componentName, "_").concat(_this.clearName(control.name)));
|
|
30128
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.attr)(_this.container, 'role', 'content');
|
|
30129
30144
|
return _this;
|
|
30130
30145
|
}
|
|
30131
30146
|
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(ToolbarContent, [
|
|
@@ -30135,6 +30150,19 @@ var ToolbarContent = /*#__PURE__*/ function(UIButton) {
|
|
|
30135
30150
|
return 'ToolbarContent';
|
|
30136
30151
|
}
|
|
30137
30152
|
},
|
|
30153
|
+
{
|
|
30154
|
+
key: "getRole",
|
|
30155
|
+
value: /** A toolbar item like `ToolbarButton`: the parent group is a `list`. */ function getRole() {
|
|
30156
|
+
return 'listitem';
|
|
30157
|
+
}
|
|
30158
|
+
},
|
|
30159
|
+
{
|
|
30160
|
+
key: "onChangeActivated",
|
|
30161
|
+
value: /**
|
|
30162
|
+
* Arbitrary content is not a toggle button — `aria-pressed` is not
|
|
30163
|
+
* allowed on a `listitem`.
|
|
30164
|
+
*/ function onChangeActivated() {}
|
|
30165
|
+
},
|
|
30138
30166
|
{
|
|
30139
30167
|
key: "update",
|
|
30140
30168
|
value: /** @override */ function update() {
|
|
@@ -39103,7 +39131,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
|
|
|
39103
39131
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
|
|
39104
39132
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
|
|
39105
39133
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
|
|
39106
|
-
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_editor .jodit_iframe_wrapper{' + 'display: block;' + 'clear: both;' + 'user-select: none;' + 'position: relative;' + '}' + '.jodit_editor .jodit_iframe_wrapper:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
|
|
39134
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_editor .jodit_iframe_wrapper{' + 'display: block;' + 'clear: both;' + 'user-select: none;' + 'position: relative;' + '}' + '.jodit_editor .jodit_iframe_wrapper:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
|
|
39107
39135
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
|
|
39108
39136
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
39109
39137
|
|
|
@@ -39366,8 +39394,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39366
39394
|
|
|
39367
39395
|
|
|
39368
39396
|
|
|
39397
|
+
|
|
39369
39398
|
var JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
39370
39399
|
var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
39400
|
+
var IMAGE_SELECTED = 'jodit-wysiwyg_image-selected';
|
|
39371
39401
|
/**
|
|
39372
39402
|
* Change editor's size after load all images
|
|
39373
39403
|
*/ var imageProcessor = /*#__PURE__*/ function(Plugin) {
|
|
@@ -39380,11 +39410,15 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39380
39410
|
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_3__._)(imageProcessor, [
|
|
39381
39411
|
{
|
|
39382
39412
|
key: "afterInit",
|
|
39383
|
-
value: function afterInit(jodit) {
|
|
39413
|
+
value: function afterInit(jodit) {
|
|
39414
|
+
jodit.e.on(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
39415
|
+
}
|
|
39384
39416
|
},
|
|
39385
39417
|
{
|
|
39386
39418
|
key: "beforeDestruct",
|
|
39387
39419
|
value: function beforeDestruct(jodit) {
|
|
39420
|
+
jodit.e.off(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
39421
|
+
jodit.editor.classList.remove(IMAGE_SELECTED);
|
|
39388
39422
|
var buffer = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.cached)(jodit, 'buffer');
|
|
39389
39423
|
var list = buffer === null || buffer === void 0 ? void 0 : buffer.get(JODIT_IMAGE_BLOB_ID);
|
|
39390
39424
|
if (buffer && list) {
|
|
@@ -39456,6 +39490,16 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39456
39490
|
}
|
|
39457
39491
|
}
|
|
39458
39492
|
},
|
|
39493
|
+
{
|
|
39494
|
+
key: "onSelectionChange",
|
|
39495
|
+
value: /**
|
|
39496
|
+
* While the selection is an image, only the image is highlighted: Safari
|
|
39497
|
+
* paints the rest of a block image's line with its parent's highlight. See #1528
|
|
39498
|
+
*/ function onSelectionChange() {
|
|
39499
|
+
var jodit = this.jodit;
|
|
39500
|
+
jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
|
|
39501
|
+
}
|
|
39502
|
+
},
|
|
39459
39503
|
{
|
|
39460
39504
|
key: "afterChange",
|
|
39461
39505
|
value: function afterChange(data) {
|
|
@@ -39503,6 +39547,9 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39503
39547
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
39504
39548
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.watch)(':beforeSetElementValue')
|
|
39505
39549
|
], imageProcessor.prototype, "onBeforeSetElementValue", null);
|
|
39550
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
39551
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.autobind
|
|
39552
|
+
], imageProcessor.prototype, "onSelectionChange", null);
|
|
39506
39553
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
|
|
39507
39554
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.watch)([
|
|
39508
39555
|
':change',
|
|
@@ -39511,6 +39558,14 @@ var JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39511
39558
|
]),
|
|
39512
39559
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
39513
39560
|
], imageProcessor.prototype, "afterChange", null);
|
|
39561
|
+
function isImageSelected(jodit) {
|
|
39562
|
+
var sel = jodit.s.sel;
|
|
39563
|
+
if (!sel || !sel.rangeCount) {
|
|
39564
|
+
return false;
|
|
39565
|
+
}
|
|
39566
|
+
var _sel_getRangeAt = sel.getRangeAt(0), startContainer = _sel_getRangeAt.startContainer, startOffset = _sel_getRangeAt.startOffset, endContainer = _sel_getRangeAt.endContainer, endOffset = _sel_getRangeAt.endOffset;
|
|
39567
|
+
return startContainer === endContainer && endOffset === startOffset + 1 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isTag(startContainer.childNodes[startOffset], 'img') && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isOrContains(jodit.editor, startContainer);
|
|
39568
|
+
}
|
|
39514
39569
|
/**
|
|
39515
39570
|
* Remove the invisible-space text beside an image, which only held a caret.
|
|
39516
39571
|
* Selecting the image replaces the caret, and with the text still after a
|
|
@@ -50149,21 +50204,28 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50149
50204
|
onResize();
|
|
50150
50205
|
_this.onReady();
|
|
50151
50206
|
};
|
|
50152
|
-
var
|
|
50207
|
+
var loading = false;
|
|
50208
|
+
var initAceEditor = function initAceEditor1() {
|
|
50153
50209
|
if (editor.isInDestruct || editor.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.MODE_SPLIT) {
|
|
50154
50210
|
return;
|
|
50155
50211
|
}
|
|
50212
|
+
// ACE (~400 KiB from the CDN) is only needed once the source view
|
|
50213
|
+
// is actually shown — a page that stays in WYSIWYG must not
|
|
50214
|
+
// download it.
|
|
50215
|
+
if (!_this.aceExists()) {
|
|
50216
|
+
if (!loading) {
|
|
50217
|
+
loading = true;
|
|
50218
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50219
|
+
return null;
|
|
50220
|
+
});
|
|
50221
|
+
}
|
|
50222
|
+
return;
|
|
50223
|
+
}
|
|
50156
50224
|
_this.fromWYSIWYG();
|
|
50157
50225
|
tryInitAceEditor();
|
|
50158
50226
|
};
|
|
50159
50227
|
editor.e.on('afterSetMode', initAceEditor);
|
|
50160
50228
|
initAceEditor();
|
|
50161
|
-
// global add ace editor in browser
|
|
50162
|
-
if (!this.aceExists()) {
|
|
50163
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50164
|
-
return null;
|
|
50165
|
-
});
|
|
50166
|
-
}
|
|
50167
50229
|
}
|
|
50168
50230
|
},
|
|
50169
50231
|
{
|
|
@@ -50909,9 +50971,22 @@ var SourceEditor = /*#__PURE__*/ function() {
|
|
|
50909
50971
|
return false;
|
|
50910
50972
|
};
|
|
50911
50973
|
if (!addEventListener()) {
|
|
50912
|
-
|
|
50913
|
-
|
|
50914
|
-
|
|
50974
|
+
// js-beautify is only needed once the source view is shown —
|
|
50975
|
+
// do not download it for a page that stays in WYSIWYG.
|
|
50976
|
+
var loading = false;
|
|
50977
|
+
var loadBeautify = function loadBeautify() {
|
|
50978
|
+
if (loading || editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SPLIT) {
|
|
50979
|
+
return;
|
|
50980
|
+
}
|
|
50981
|
+
loading = true;
|
|
50982
|
+
// It formats the source view from the next time it opens:
|
|
50983
|
+
// filling it again now would replace what was typed there
|
|
50984
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener, function() {
|
|
50985
|
+
return null;
|
|
50986
|
+
});
|
|
50987
|
+
};
|
|
50988
|
+
editor.e.on('afterSetMode.source', loadBeautify);
|
|
50989
|
+
loadBeautify();
|
|
50915
50990
|
}
|
|
50916
50991
|
}
|
|
50917
50992
|
this.syncValueFromWYSIWYG(true);
|