jodit 4.15.2 → 4.15.4
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 +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +5 -5
- package/es2015/jodit.js +95 -31
- package/es2015/jodit.min.js +5 -5
- 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 +5 -5
- package/es2018/jodit.min.js +5 -5
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +93 -31
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +93 -31
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +117 -51
- 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/modules/file-browser/data-provider.d.ts +9 -0
- package/esm/modules/file-browser/data-provider.js +45 -3
- package/esm/plugins/resizer/resizer.js +28 -3
- package/package.json +1 -1
- package/types/modules/file-browser/data-provider.d.ts +9 -0
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.15.
|
|
4
|
+
* Version: v4.15.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1779,7 +1779,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1779
1779
|
* ```
|
|
1780
1780
|
* @packageDocumentation
|
|
1781
1781
|
* @module constants
|
|
1782
|
-
*/ const APP_VERSION = "4.15.
|
|
1782
|
+
*/ const APP_VERSION = "4.15.4";
|
|
1783
1783
|
// prettier-ignore
|
|
1784
1784
|
const ES = "es2021";
|
|
1785
1785
|
const IS_ES_MODERN = true;
|
|
@@ -20416,17 +20416,20 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.filebrowser
|
|
|
20416
20416
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20417
20417
|
/* harmony export */ "default": function() { return /* binding */ DataProvider; }
|
|
20418
20418
|
/* harmony export */ });
|
|
20419
|
+
/* unused harmony export assertSourcesAnswer */
|
|
20419
20420
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
|
|
20420
20421
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
20421
20422
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81937);
|
|
20422
20423
|
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
20423
|
-
/* harmony import */ var
|
|
20424
|
-
/* harmony import */ var
|
|
20425
|
-
/* harmony import */ var
|
|
20426
|
-
/* harmony import */ var
|
|
20427
|
-
/* harmony import */ var
|
|
20428
|
-
/* harmony import */ var
|
|
20429
|
-
/* harmony import */ var
|
|
20424
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17312);
|
|
20425
|
+
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91565);
|
|
20426
|
+
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62101);
|
|
20427
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(96340);
|
|
20428
|
+
/* harmony import */ var jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77483);
|
|
20429
|
+
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(33201);
|
|
20430
|
+
/* harmony import */ var jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(52144);
|
|
20431
|
+
/* harmony import */ var jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17338);
|
|
20432
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(58664);
|
|
20430
20433
|
/*!
|
|
20431
20434
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
20432
20435
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -20444,6 +20447,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.filebrowser
|
|
|
20444
20447
|
|
|
20445
20448
|
|
|
20446
20449
|
|
|
20450
|
+
|
|
20451
|
+
|
|
20447
20452
|
const DEFAULT_SOURCE_NAME = 'default';
|
|
20448
20453
|
const possibleRules = new Set([
|
|
20449
20454
|
'allowFiles',
|
|
@@ -20460,6 +20465,38 @@ const possibleRules = new Set([
|
|
|
20460
20465
|
'allowImageResize',
|
|
20461
20466
|
'allowImageCrop'
|
|
20462
20467
|
]);
|
|
20468
|
+
const DOCS_URL = 'https://xdsoft.net/jodit/docs/modules/file_browser.html';
|
|
20469
|
+
/**
|
|
20470
|
+
* Validate the connector answer for the `files` / `folders` actions and
|
|
20471
|
+
* normalise it. A hand-written backend that returns the wrong shape used to
|
|
20472
|
+
* crash deep inside the UI with a bare `TypeError: ... reading 'forEach'`;
|
|
20473
|
+
* now it fails right here with a message that names the action, the option
|
|
20474
|
+
* and the missing field. Missing `files` / `folders` lists are treated as
|
|
20475
|
+
* empty instead of throwing.
|
|
20476
|
+
*/ function assertSourcesAnswer(resp, action, option) {
|
|
20477
|
+
const fail = (what)=>{
|
|
20478
|
+
throw new Error(`File browser: the connector answer for action "${action}" (option "filebrowser.${option}") ${what}. See ${DOCS_URL}`);
|
|
20479
|
+
};
|
|
20480
|
+
if (!(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(resp) || !(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(resp.data)) {
|
|
20481
|
+
return fail('has no "data" object');
|
|
20482
|
+
}
|
|
20483
|
+
const { sources } = resp.data;
|
|
20484
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__.isArray)(sources)) {
|
|
20485
|
+
return fail(sources === undefined ? 'has no "data.sources" array' : `must contain "data.sources" as an array of sources, got ${(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(sources) ? 'an object keyed by source name' : typeof sources}`);
|
|
20486
|
+
}
|
|
20487
|
+
sources.forEach((source, index)=>{
|
|
20488
|
+
if (!(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(source)) {
|
|
20489
|
+
return fail(`has a non-object entry at "data.sources[${index}]"`);
|
|
20490
|
+
}
|
|
20491
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__.isArray)(source.files)) {
|
|
20492
|
+
source.files = [];
|
|
20493
|
+
}
|
|
20494
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_4__.isArray)(source.folders)) {
|
|
20495
|
+
source.folders = [];
|
|
20496
|
+
}
|
|
20497
|
+
});
|
|
20498
|
+
return resp;
|
|
20499
|
+
}
|
|
20463
20500
|
class DataProvider {
|
|
20464
20501
|
/**
|
|
20465
20502
|
* Alias for options
|
|
@@ -20473,13 +20510,13 @@ class DataProvider {
|
|
|
20473
20510
|
ajax?.abort();
|
|
20474
20511
|
instances.delete(name);
|
|
20475
20512
|
}
|
|
20476
|
-
const opts = (0,
|
|
20513
|
+
const opts = (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)({
|
|
20477
20514
|
onProgress: this.progressHandler
|
|
20478
20515
|
}, this.o.ajax));
|
|
20479
20516
|
if (opts.prepareData) {
|
|
20480
20517
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
20481
20518
|
}
|
|
20482
|
-
const ajax = new
|
|
20519
|
+
const ajax = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__.Ajax(opts);
|
|
20483
20520
|
instances.set(name, ajax);
|
|
20484
20521
|
const promise = ajax.send();
|
|
20485
20522
|
promise.finally(()=>{
|
|
@@ -20508,7 +20545,7 @@ class DataProvider {
|
|
|
20508
20545
|
if (this.o.permissions.url) {
|
|
20509
20546
|
return this.get('permissions').then((resp)=>{
|
|
20510
20547
|
if (this.parent.isInDestruct) {
|
|
20511
|
-
throw (0,
|
|
20548
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.abort)();
|
|
20512
20549
|
}
|
|
20513
20550
|
let process = this.o.permissions.process;
|
|
20514
20551
|
if (!process) {
|
|
@@ -20516,7 +20553,9 @@ class DataProvider {
|
|
|
20516
20553
|
}
|
|
20517
20554
|
if (process) {
|
|
20518
20555
|
const respData = process.call(self, resp);
|
|
20519
|
-
|
|
20556
|
+
// The permissions answer is optional and may come back without
|
|
20557
|
+
// a `data` object at all from a minimal backend.
|
|
20558
|
+
if (respData?.data?.permissions) {
|
|
20520
20559
|
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
20521
20560
|
this.__currentPermissions = respData.data.permissions;
|
|
20522
20561
|
}
|
|
@@ -20530,7 +20569,7 @@ class DataProvider {
|
|
|
20530
20569
|
const rule = 'allow' + action;
|
|
20531
20570
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.IS_PROD) {
|
|
20532
20571
|
if (!possibleRules.has(rule)) {
|
|
20533
|
-
throw (0,
|
|
20572
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)('Wrong action ' + action);
|
|
20534
20573
|
}
|
|
20535
20574
|
}
|
|
20536
20575
|
const presetValue = this.o.permissionsPresets[rule];
|
|
@@ -20555,7 +20594,7 @@ class DataProvider {
|
|
|
20555
20594
|
if (process) {
|
|
20556
20595
|
resp = process.call(self, resp);
|
|
20557
20596
|
}
|
|
20558
|
-
return onResult(resp);
|
|
20597
|
+
return onResult(assertSourcesAnswer(resp, 'files', 'items'));
|
|
20559
20598
|
});
|
|
20560
20599
|
}
|
|
20561
20600
|
/**
|
|
@@ -20579,12 +20618,12 @@ class DataProvider {
|
|
|
20579
20618
|
sources.forEach((source)=>{
|
|
20580
20619
|
if (source.files && source.files.length) {
|
|
20581
20620
|
const { sort } = this.o;
|
|
20582
|
-
if ((0,
|
|
20621
|
+
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sort) && mods.sortBy) {
|
|
20583
20622
|
source.files.sort((a, b)=>sort(a, b, mods.sortBy));
|
|
20584
20623
|
}
|
|
20585
20624
|
source.files.forEach((item)=>{
|
|
20586
20625
|
if (inFilter(item) && canBeFile(item)) {
|
|
20587
|
-
elements.push(
|
|
20626
|
+
elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_12__.FileBrowserItem.create({
|
|
20588
20627
|
...item,
|
|
20589
20628
|
sourceName: source.name,
|
|
20590
20629
|
source
|
|
@@ -20596,7 +20635,7 @@ class DataProvider {
|
|
|
20596
20635
|
return elements;
|
|
20597
20636
|
}
|
|
20598
20637
|
async tree(path, source) {
|
|
20599
|
-
path = (0,
|
|
20638
|
+
path = (0,jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_7__.normalizeRelativePath)(path);
|
|
20600
20639
|
if (!this.o.folder) {
|
|
20601
20640
|
return Promise.reject(Error('Set Folder Api options'));
|
|
20602
20641
|
}
|
|
@@ -20611,18 +20650,18 @@ class DataProvider {
|
|
|
20611
20650
|
if (process) {
|
|
20612
20651
|
resp = process.call(self, resp);
|
|
20613
20652
|
}
|
|
20614
|
-
return resp.data.sources;
|
|
20653
|
+
return assertSourcesAnswer(resp, 'folders', 'folder').data.sources;
|
|
20615
20654
|
});
|
|
20616
20655
|
}
|
|
20617
20656
|
/**
|
|
20618
20657
|
* Get path by url. You can use this method in another modules
|
|
20619
20658
|
*/ getPathByUrl(url) {
|
|
20620
|
-
;(0,
|
|
20659
|
+
;(0,jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_10__.set)('options.getLocalFileByUrl.data.url', url, this);
|
|
20621
20660
|
return this.get('getLocalFileByUrl').then((resp)=>{
|
|
20622
20661
|
if (this.isSuccess(resp)) {
|
|
20623
20662
|
return resp.data;
|
|
20624
20663
|
}
|
|
20625
|
-
throw (0,
|
|
20664
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)(this.getMessage(resp));
|
|
20626
20665
|
});
|
|
20627
20666
|
}
|
|
20628
20667
|
/**
|
|
@@ -20634,7 +20673,7 @@ class DataProvider {
|
|
|
20634
20673
|
*/ createFolder(name, path, source) {
|
|
20635
20674
|
const { create } = this.o;
|
|
20636
20675
|
if (!create) {
|
|
20637
|
-
throw (0,
|
|
20676
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)('Set Create api options');
|
|
20638
20677
|
}
|
|
20639
20678
|
create.data.source = source;
|
|
20640
20679
|
create.data.path = path;
|
|
@@ -20643,7 +20682,7 @@ class DataProvider {
|
|
|
20643
20682
|
if (this.isSuccess(resp)) {
|
|
20644
20683
|
return true;
|
|
20645
20684
|
}
|
|
20646
|
-
throw (0,
|
|
20685
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)(this.getMessage(resp));
|
|
20647
20686
|
});
|
|
20648
20687
|
}
|
|
20649
20688
|
/**
|
|
@@ -20655,7 +20694,7 @@ class DataProvider {
|
|
|
20655
20694
|
const mode = isFile ? 'fileMove' : 'folderMove';
|
|
20656
20695
|
const option = this.options[mode];
|
|
20657
20696
|
if (!option) {
|
|
20658
|
-
throw (0,
|
|
20697
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)('Set Move api options');
|
|
20659
20698
|
}
|
|
20660
20699
|
option.data.from = filepath;
|
|
20661
20700
|
option.data.path = path;
|
|
@@ -20664,7 +20703,7 @@ class DataProvider {
|
|
|
20664
20703
|
if (this.isSuccess(resp)) {
|
|
20665
20704
|
return true;
|
|
20666
20705
|
}
|
|
20667
|
-
throw (0,
|
|
20706
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)(this.getMessage(resp));
|
|
20668
20707
|
});
|
|
20669
20708
|
}
|
|
20670
20709
|
/**
|
|
@@ -20676,7 +20715,7 @@ class DataProvider {
|
|
|
20676
20715
|
*/ __remove(action, path, file, source) {
|
|
20677
20716
|
const fr = this.o[action];
|
|
20678
20717
|
if (!fr) {
|
|
20679
|
-
throw (0,
|
|
20718
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)(`Set "${action}" api options`);
|
|
20680
20719
|
}
|
|
20681
20720
|
fr.data.path = path;
|
|
20682
20721
|
fr.data.name = file;
|
|
@@ -20716,7 +20755,7 @@ class DataProvider {
|
|
|
20716
20755
|
*/ __rename(action, path, name, newname, source) {
|
|
20717
20756
|
const fr = this.o[action];
|
|
20718
20757
|
if (!fr) {
|
|
20719
|
-
throw (0,
|
|
20758
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_9__.error)(`Set "${action}" api options`);
|
|
20720
20759
|
}
|
|
20721
20760
|
fr.data.path = path;
|
|
20722
20761
|
fr.data.name = name;
|
|
@@ -39266,11 +39305,22 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
39266
39305
|
|
|
39267
39306
|
|
|
39268
39307
|
const keyBInd = '__jodit-resizer_binded';
|
|
39308
|
+
/**
|
|
39309
|
+
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
39310
|
+
* Relative values such as `100%` are ignored — they cannot be turned into a
|
|
39311
|
+
* fixed pixel box for the wrapper.
|
|
39312
|
+
*/ function attrPixelSize(element, key) {
|
|
39313
|
+
const value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(element, key)?.trim();
|
|
39314
|
+
if (!value || !/^\d+(\.\d+)?(px)?$/i.test(value)) {
|
|
39315
|
+
return 0;
|
|
39316
|
+
}
|
|
39317
|
+
return parseFloat(value);
|
|
39318
|
+
}
|
|
39269
39319
|
/**
|
|
39270
39320
|
* The module creates a supporting frame for resizing of the elements img and table
|
|
39271
39321
|
*/ class resizer extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_8__.Plugin {
|
|
39272
39322
|
/** @override */ afterInit(editor) {
|
|
39273
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.$$)('div', this.rect).forEach((resizeHandle)=>{
|
|
39323
|
+
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.$$)('div', this.rect).forEach((resizeHandle)=>{
|
|
39274
39324
|
editor.e.on(resizeHandle, 'mousedown.resizer touchstart.resizer', this.onStartResizing.bind(this, resizeHandle));
|
|
39275
39325
|
});
|
|
39276
39326
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.eventEmitter.on('hideHelpers', this.hide);
|
|
@@ -39492,11 +39542,23 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
39492
39542
|
'data-jodit_iframe_wrapper': 1
|
|
39493
39543
|
});
|
|
39494
39544
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(wrapper, 'style', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(element, 'style'));
|
|
39545
|
+
// Inside a hidden container (`display:none` on any ancestor)
|
|
39546
|
+
// offsetWidth/offsetHeight are 0. Writing that into the wrapper
|
|
39547
|
+
// collapsed it to 0x0, the following content painted over the
|
|
39548
|
+
// iframe, and nothing corrected it once the container was shown.
|
|
39549
|
+
// Fall back to the iframe's own size attributes and, when there
|
|
39550
|
+
// is nothing measurable at all, let the wrapper size itself.
|
|
39551
|
+
const width = element.offsetWidth || attrPixelSize(element, 'width');
|
|
39552
|
+
const height = element.offsetHeight || attrPixelSize(element, 'height');
|
|
39495
39553
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(wrapper, {
|
|
39496
|
-
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(element, 'display') === 'inline-block' ? 'inline-block' : 'block'
|
|
39497
|
-
width: element.offsetWidth,
|
|
39498
|
-
height: element.offsetHeight
|
|
39554
|
+
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(element, 'display') === 'inline-block' ? 'inline-block' : 'block'
|
|
39499
39555
|
});
|
|
39556
|
+
if (width) {
|
|
39557
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(wrapper, 'width', width);
|
|
39558
|
+
}
|
|
39559
|
+
if (height) {
|
|
39560
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.css)(wrapper, 'height', height);
|
|
39561
|
+
}
|
|
39500
39562
|
if (element.parentNode) {
|
|
39501
39563
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.before(element, wrapper);
|
|
39502
39564
|
}
|