jodit 4.15.18 → 4.16.0
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 +11 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +9 -8
- package/es2015/jodit.js +94 -48
- package/es2015/jodit.min.js +9 -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 +9 -8
- package/es2018/jodit.min.js +9 -8
- 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 +10 -9
- package/es2021/jodit.js +94 -48
- package/es2021/jodit.min.js +10 -9
- 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 +10 -9
- package/es2021.en/jodit.js +94 -48
- package/es2021.en/jodit.min.js +10 -9
- 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 +106 -54
- 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/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/source/editor/engines/ace.js +13 -6
- package/esm/plugins/source/source.js +20 -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/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.0
|
|
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.0";
|
|
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() {
|
|
@@ -50149,21 +50177,28 @@ var AceEditor = /*#__PURE__*/ function(SourceEditor) {
|
|
|
50149
50177
|
onResize();
|
|
50150
50178
|
_this.onReady();
|
|
50151
50179
|
};
|
|
50152
|
-
var
|
|
50180
|
+
var loading = false;
|
|
50181
|
+
var initAceEditor = function initAceEditor1() {
|
|
50153
50182
|
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
50183
|
return;
|
|
50155
50184
|
}
|
|
50185
|
+
// ACE (~400 KiB from the CDN) is only needed once the source view
|
|
50186
|
+
// is actually shown — a page that stays in WYSIWYG must not
|
|
50187
|
+
// download it.
|
|
50188
|
+
if (!_this.aceExists()) {
|
|
50189
|
+
if (!loading) {
|
|
50190
|
+
loading = true;
|
|
50191
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(function() {
|
|
50192
|
+
return null;
|
|
50193
|
+
});
|
|
50194
|
+
}
|
|
50195
|
+
return;
|
|
50196
|
+
}
|
|
50156
50197
|
_this.fromWYSIWYG();
|
|
50157
50198
|
tryInitAceEditor();
|
|
50158
50199
|
};
|
|
50159
50200
|
editor.e.on('afterSetMode', initAceEditor);
|
|
50160
50201
|
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
50202
|
}
|
|
50168
50203
|
},
|
|
50169
50204
|
{
|
|
@@ -50909,9 +50944,26 @@ var SourceEditor = /*#__PURE__*/ function() {
|
|
|
50909
50944
|
return false;
|
|
50910
50945
|
};
|
|
50911
50946
|
if (!addEventListener()) {
|
|
50912
|
-
|
|
50913
|
-
|
|
50914
|
-
|
|
50947
|
+
// js-beautify is only needed once the source view is shown —
|
|
50948
|
+
// do not download it for a page that stays in WYSIWYG.
|
|
50949
|
+
var loading = false;
|
|
50950
|
+
var loadBeautify = function loadBeautify() {
|
|
50951
|
+
if (loading || editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.MODE_SPLIT) {
|
|
50952
|
+
return;
|
|
50953
|
+
}
|
|
50954
|
+
loading = true;
|
|
50955
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(function() {
|
|
50956
|
+
// The source view was filled before the
|
|
50957
|
+
// beautifier arrived — format it now.
|
|
50958
|
+
if (addEventListener()) {
|
|
50959
|
+
_this.syncValueFromWYSIWYG(true);
|
|
50960
|
+
}
|
|
50961
|
+
}, function() {
|
|
50962
|
+
return null;
|
|
50963
|
+
});
|
|
50964
|
+
};
|
|
50965
|
+
editor.e.on('afterSetMode.source', loadBeautify);
|
|
50966
|
+
loadBeautify();
|
|
50915
50967
|
}
|
|
50916
50968
|
}
|
|
50917
50969
|
this.syncValueFromWYSIWYG(true);
|
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.
|
|
4
|
+
* Version: v4.16.0
|
|
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.
|
|
11
|
+
* Version: v4.16.0
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|