jodit 4.0.0-beta.94 → 4.0.0-beta.98
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 +13 -5
- package/README.md +5 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +89 -73
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +89 -73
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.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 +2 -2
- package/es2021/jodit.js +89 -73
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +89 -73
- package/es2021.en/jodit.min.js +2 -2
- 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 +93 -73
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/core/helpers/string/ucfirst.js +1 -1
- package/esm/core/helpers/utils/index.d.ts +0 -1
- package/esm/core/helpers/utils/index.js +0 -1
- package/esm/core/selection/interface.d.ts +1 -1
- package/esm/core/ui/form/inputs/area/area.d.ts +1 -1
- package/esm/core/ui/form/inputs/area/area.js +1 -1
- package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
- package/esm/core/ui/form/inputs/checkbox/checkbox.js +1 -1
- package/esm/core/ui/form/inputs/file/file.d.ts +1 -1
- package/esm/core/ui/form/inputs/file/file.js +1 -1
- package/esm/core/ui/form/inputs/index.d.ts +1 -1
- package/esm/core/ui/form/inputs/index.js +1 -1
- package/esm/core/ui/form/inputs/input/input.d.ts +1 -1
- package/esm/core/ui/form/inputs/input/input.js +1 -1
- package/esm/core/ui/form/inputs/select/select.d.ts +1 -1
- package/esm/core/ui/form/inputs/select/select.js +1 -1
- package/esm/core/view/view.d.ts +1 -0
- package/esm/core/view/view.js +4 -1
- package/esm/jodit.d.ts +2 -1
- package/esm/jodit.js +6 -0
- package/esm/modules/messages/messages.d.ts +28 -0
- package/esm/modules/messages/messages.js +28 -0
- package/esm/modules/table/table.d.ts +4 -2
- package/esm/modules/table/table.js +2 -0
- package/esm/modules/uploader/helpers/send.js +6 -1
- package/esm/modules/widget/color-picker/color-picker.d.ts +1 -1
- package/esm/modules/widget/color-picker/color-picker.js +1 -1
- package/esm/modules/widget/file-selector/file-selector.d.ts +1 -18
- package/esm/modules/widget/file-selector/file-selector.js +12 -19
- package/esm/modules/widget/tabs/tabs.d.ts +17 -6
- package/esm/modules/widget/tabs/tabs.js +17 -6
- package/package.json +1 -1
- package/types/core/helpers/utils/index.d.ts +0 -1
- package/types/core/selection/interface.d.ts +1 -1
- package/types/core/ui/form/inputs/area/area.d.ts +1 -1
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
- package/types/core/ui/form/inputs/file/file.d.ts +1 -1
- package/types/core/ui/form/inputs/index.d.ts +1 -1
- package/types/core/ui/form/inputs/input/input.d.ts +1 -1
- package/types/core/ui/form/inputs/select/select.d.ts +1 -1
- package/types/core/view/view.d.ts +1 -0
- package/types/jodit.d.ts +2 -1
- package/types/modules/messages/messages.d.ts +28 -0
- package/types/modules/table/table.d.ts +4 -2
- package/types/modules/widget/color-picker/color-picker.d.ts +1 -1
- package/types/modules/widget/file-selector/file-selector.d.ts +1 -18
- package/types/modules/widget/tabs/tabs.d.ts +17 -6
- package/esm/core/helpers/utils/val.d.ts +0 -9
- package/esm/core/helpers/utils/val.js +0 -18
- package/types/core/helpers/utils/val.d.ts +0 -9
package/es2018/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.0.0-beta.
|
|
4
|
+
* Version: v4.0.0-beta.98
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1715,7 +1715,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1715
1715
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1716
1716
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1717
1717
|
*/
|
|
1718
|
-
const APP_VERSION = "4.0.0-beta.
|
|
1718
|
+
const APP_VERSION = "4.0.0-beta.98";
|
|
1719
1719
|
// prettier-ignore
|
|
1720
1720
|
const ES = "es2018";
|
|
1721
1721
|
const IS_ES_MODERN = true;
|
|
@@ -7058,7 +7058,7 @@ function ucfirst(value) {
|
|
|
7058
7058
|
if (!value.length) {
|
|
7059
7059
|
return '';
|
|
7060
7060
|
}
|
|
7061
|
-
return value[0].toUpperCase() + value.
|
|
7061
|
+
return value[0].toUpperCase() + value.substring(1);
|
|
7062
7062
|
}
|
|
7063
7063
|
|
|
7064
7064
|
|
|
@@ -8214,8 +8214,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8214
8214
|
/* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
|
|
8215
8215
|
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
|
|
8216
8216
|
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
|
|
8217
|
-
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
|
|
8218
|
-
/* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
|
|
8217
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
|
|
8219
8218
|
/* harmony export */ });
|
|
8220
8219
|
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
|
|
8221
8220
|
/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
|
|
@@ -8248,7 +8247,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8248
8247
|
/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
|
|
8249
8248
|
/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
|
|
8250
8249
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
|
|
8251
|
-
/* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
|
|
8252
8250
|
/*!
|
|
8253
8251
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8254
8252
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8284,7 +8282,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8284
8282
|
|
|
8285
8283
|
|
|
8286
8284
|
|
|
8287
|
-
|
|
8288
8285
|
|
|
8289
8286
|
|
|
8290
8287
|
/***/ }),
|
|
@@ -9002,35 +8999,6 @@ const getDataTransfer = (event) => {
|
|
|
9002
8999
|
};
|
|
9003
9000
|
|
|
9004
9001
|
|
|
9005
|
-
/***/ }),
|
|
9006
|
-
|
|
9007
|
-
/***/ 96416:
|
|
9008
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
9009
|
-
|
|
9010
|
-
"use strict";
|
|
9011
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9012
|
-
/* harmony export */ P: function() { return /* binding */ val; }
|
|
9013
|
-
/* harmony export */ });
|
|
9014
|
-
/*!
|
|
9015
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9016
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
9017
|
-
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
9018
|
-
*/
|
|
9019
|
-
/**
|
|
9020
|
-
* @module helpers/utils
|
|
9021
|
-
*/
|
|
9022
|
-
const val = (elm, selector, value) => {
|
|
9023
|
-
const child = elm.querySelector(selector);
|
|
9024
|
-
if (!child) {
|
|
9025
|
-
return '';
|
|
9026
|
-
}
|
|
9027
|
-
if (value) {
|
|
9028
|
-
child.value = value;
|
|
9029
|
-
}
|
|
9030
|
-
return child.value;
|
|
9031
|
-
};
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
9002
|
/***/ }),
|
|
9035
9003
|
|
|
9036
9004
|
/***/ 97800:
|
|
@@ -13763,7 +13731,7 @@ UIForm = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
|
13763
13731
|
var UITextArea_1;
|
|
13764
13732
|
|
|
13765
13733
|
/**
|
|
13766
|
-
* @module ui/form
|
|
13734
|
+
* @module ui/form
|
|
13767
13735
|
*/
|
|
13768
13736
|
|
|
13769
13737
|
|
|
@@ -13817,7 +13785,7 @@ UITextArea = UITextArea_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate
|
|
|
13817
13785
|
var UICheckbox_1;
|
|
13818
13786
|
|
|
13819
13787
|
/**
|
|
13820
|
-
* @module ui/form
|
|
13788
|
+
* @module ui/form
|
|
13821
13789
|
*/
|
|
13822
13790
|
|
|
13823
13791
|
|
|
@@ -13906,7 +13874,7 @@ UICheckbox = UICheckbox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate
|
|
|
13906
13874
|
*/
|
|
13907
13875
|
|
|
13908
13876
|
/**
|
|
13909
|
-
* @module ui/form
|
|
13877
|
+
* @module ui/form
|
|
13910
13878
|
*/
|
|
13911
13879
|
|
|
13912
13880
|
|
|
@@ -13983,7 +13951,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
|
13983
13951
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
13984
13952
|
*/
|
|
13985
13953
|
/**
|
|
13986
|
-
* @module ui/form
|
|
13954
|
+
* @module ui/form
|
|
13987
13955
|
*/
|
|
13988
13956
|
|
|
13989
13957
|
|
|
@@ -14017,7 +13985,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
|
14017
13985
|
var UIInput_1;
|
|
14018
13986
|
|
|
14019
13987
|
/**
|
|
14020
|
-
* @module ui/form
|
|
13988
|
+
* @module ui/form
|
|
14021
13989
|
*/
|
|
14022
13990
|
|
|
14023
13991
|
|
|
@@ -14258,7 +14226,7 @@ UIInput = UIInput_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn
|
|
|
14258
14226
|
var UISelect_1;
|
|
14259
14227
|
|
|
14260
14228
|
/**
|
|
14261
|
-
* @module ui/form
|
|
14229
|
+
* @module ui/form
|
|
14262
14230
|
*/
|
|
14263
14231
|
|
|
14264
14232
|
|
|
@@ -15824,7 +15792,10 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
|
|
|
15824
15792
|
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage */ .Ke.makeStorage();
|
|
15825
15793
|
}
|
|
15826
15794
|
get message() {
|
|
15827
|
-
return
|
|
15795
|
+
return this.getMessageModule(this.container);
|
|
15796
|
+
}
|
|
15797
|
+
getMessageModule(container) {
|
|
15798
|
+
return new jodit_modules_messages_messages__WEBPACK_IMPORTED_MODULE_8__/* .UIMessages */ .D(this, container);
|
|
15828
15799
|
}
|
|
15829
15800
|
/**
|
|
15830
15801
|
* Container for persistent set/get value
|
|
@@ -16216,6 +16187,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16216
16187
|
get workplace() {
|
|
16217
16188
|
return this.currentPlace.workplace;
|
|
16218
16189
|
}
|
|
16190
|
+
get message() {
|
|
16191
|
+
return this.getMessageModule(this.workplace);
|
|
16192
|
+
}
|
|
16219
16193
|
/**
|
|
16220
16194
|
* Statusbar module
|
|
16221
16195
|
*/
|
|
@@ -17303,6 +17277,9 @@ Jodit.core = {
|
|
|
17303
17277
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17304
17278
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17305
17279
|
], Jodit.prototype, "createInside", null);
|
|
17280
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17281
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17282
|
+
], Jodit.prototype, "message", null);
|
|
17306
17283
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17307
17284
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17308
17285
|
], Jodit.prototype, "s", null);
|
|
@@ -21876,15 +21853,43 @@ let UIMessages = class UIMessages extends jodit_core_ui_group_group__WEBPACK_IMP
|
|
|
21876
21853
|
this.options = options;
|
|
21877
21854
|
this.__messages = new Set();
|
|
21878
21855
|
}
|
|
21856
|
+
/**
|
|
21857
|
+
* Show popup info message in the lower right corner of the container
|
|
21858
|
+
* ```js
|
|
21859
|
+
* const jodit = Jodit.make('#editor');
|
|
21860
|
+
* jodit.info('Hello world', 3000);
|
|
21861
|
+
* ```
|
|
21862
|
+
*/
|
|
21879
21863
|
info(text, timeout) {
|
|
21880
21864
|
this.__message(text, 'info', timeout);
|
|
21881
21865
|
}
|
|
21866
|
+
/**
|
|
21867
|
+
* Show popup success message in the lower right corner of the container
|
|
21868
|
+
* ```js
|
|
21869
|
+
* const jodit = Jodit.make('#editor');
|
|
21870
|
+
* jodit.success('Hello world', 3000);
|
|
21871
|
+
* ```
|
|
21872
|
+
*/
|
|
21882
21873
|
success(text, timeout) {
|
|
21883
21874
|
this.__message(text, 'success', timeout);
|
|
21884
21875
|
}
|
|
21876
|
+
/**
|
|
21877
|
+
* Show popup error message in the lower right corner of the container
|
|
21878
|
+
* ```js
|
|
21879
|
+
* const jodit = Jodit.make('#editor');
|
|
21880
|
+
* jodit.error('Hello world', 3000);
|
|
21881
|
+
* ```
|
|
21882
|
+
*/
|
|
21885
21883
|
error(text, timeout) {
|
|
21886
21884
|
this.__message(text, 'error', timeout);
|
|
21887
21885
|
}
|
|
21886
|
+
/**
|
|
21887
|
+
* Show popup message in the lower right corner of the container
|
|
21888
|
+
* ```js
|
|
21889
|
+
* const jodit = Jodit.make('#editor');
|
|
21890
|
+
* jodit.message('Hello world', 'info', 3000);
|
|
21891
|
+
* ```
|
|
21892
|
+
*/
|
|
21888
21893
|
message(text, variant, timeout) {
|
|
21889
21894
|
this.__message(text, variant, timeout);
|
|
21890
21895
|
}
|
|
@@ -22214,9 +22219,11 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_3__/* .ViewCom
|
|
|
22214
22219
|
/**
|
|
22215
22220
|
* Inserts a new line after row what contains the selected cell
|
|
22216
22221
|
*
|
|
22222
|
+
* @param table - Working table
|
|
22217
22223
|
* @param line - Insert a new line after/before this
|
|
22218
22224
|
* line contains the selected cell
|
|
22219
22225
|
* @param after - Insert a new line after line contains the selected cell
|
|
22226
|
+
* @param create - Instance of Create class
|
|
22220
22227
|
*/
|
|
22221
22228
|
static appendRow(table, line, after, create) {
|
|
22222
22229
|
var _a;
|
|
@@ -24061,7 +24068,12 @@ function send(uploader, data) {
|
|
|
24061
24068
|
.send()
|
|
24062
24069
|
.then(resp => resp.json())
|
|
24063
24070
|
.catch(error => {
|
|
24064
|
-
|
|
24071
|
+
return {
|
|
24072
|
+
success: false,
|
|
24073
|
+
data: {
|
|
24074
|
+
messages: [error]
|
|
24075
|
+
}
|
|
24076
|
+
};
|
|
24065
24077
|
})
|
|
24066
24078
|
.finally(() => {
|
|
24067
24079
|
ajax.destruct();
|
|
@@ -24328,7 +24340,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
|
|
|
24328
24340
|
* @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
|
|
24329
24341
|
* @example
|
|
24330
24342
|
* ```javascript
|
|
24331
|
-
*
|
|
24343
|
+
* const tabs = TabsWidget(editor, {
|
|
24332
24344
|
* 'Text' : ColorPickerWidget(editor, function (color) {
|
|
24333
24345
|
* box.style.color = color;
|
|
24334
24346
|
* }, box.style.color),
|
|
@@ -24428,27 +24440,10 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
24428
24440
|
* Generate 3 tabs
|
|
24429
24441
|
* upload - Use Drag and Drop
|
|
24430
24442
|
* url - By specifying the image url
|
|
24431
|
-
* filebrowser - After opening the file browser
|
|
24443
|
+
* filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
|
|
24432
24444
|
*
|
|
24433
24445
|
* @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
|
|
24434
24446
|
* functions with different parameters
|
|
24435
|
-
*
|
|
24436
|
-
* @example
|
|
24437
|
-
* ```javascript
|
|
24438
|
-
* let widget = new Jodit.modules.Widget(editor);
|
|
24439
|
-
*
|
|
24440
|
-
* return widget.c('ImageSelector', {
|
|
24441
|
-
* url: function (url, alt) {
|
|
24442
|
-
* editor.selections.insertImage(url);
|
|
24443
|
-
* },
|
|
24444
|
-
* upload: function (images) {
|
|
24445
|
-
* editor.selections.insertImage(images[0]);
|
|
24446
|
-
* },
|
|
24447
|
-
* filebrowser: function (images) {
|
|
24448
|
-
* editor.selections.insertImage(images[0]);
|
|
24449
|
-
* }
|
|
24450
|
-
* }, image);
|
|
24451
|
-
* ```
|
|
24452
24447
|
*/
|
|
24453
24448
|
const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
24454
24449
|
let currentImage;
|
|
@@ -24517,13 +24512,13 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24517
24512
|
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
|
|
24518
24513
|
(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
|
|
24519
24514
|
currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
|
|
24520
|
-
|
|
24521
|
-
|
|
24515
|
+
val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
|
|
24516
|
+
val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
|
|
24522
24517
|
button.state.text = 'Update';
|
|
24523
24518
|
}
|
|
24524
24519
|
if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
|
|
24525
|
-
|
|
24526
|
-
|
|
24520
|
+
val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
|
|
24521
|
+
val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
|
|
24527
24522
|
button.state.text = 'Update';
|
|
24528
24523
|
}
|
|
24529
24524
|
form.onSubmit(data => {
|
|
@@ -24539,6 +24534,16 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24539
24534
|
}
|
|
24540
24535
|
return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
|
|
24541
24536
|
};
|
|
24537
|
+
function val(elm, selector, value) {
|
|
24538
|
+
const child = elm.querySelector(selector);
|
|
24539
|
+
if (!child) {
|
|
24540
|
+
return '';
|
|
24541
|
+
}
|
|
24542
|
+
if (value) {
|
|
24543
|
+
child.value = value;
|
|
24544
|
+
}
|
|
24545
|
+
return child.value;
|
|
24546
|
+
}
|
|
24542
24547
|
|
|
24543
24548
|
|
|
24544
24549
|
/***/ }),
|
|
@@ -24608,12 +24613,23 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24608
24613
|
*
|
|
24609
24614
|
* @example
|
|
24610
24615
|
* ```javascript
|
|
24611
|
-
*
|
|
24612
|
-
*
|
|
24613
|
-
*
|
|
24614
|
-
*
|
|
24615
|
-
*
|
|
24616
|
-
*
|
|
24616
|
+
* const editor = Jodit.make('#editor');
|
|
24617
|
+
* const tabs = Jodit.modules.TabsWidget(editor, [
|
|
24618
|
+
* { name: 'Images', content: '<div>Images</div>' },
|
|
24619
|
+
* {
|
|
24620
|
+
* name: 'Title 2',
|
|
24621
|
+
* content: editor.c.fromHTML('<div>Some content</div>')
|
|
24622
|
+
* },
|
|
24623
|
+
* {
|
|
24624
|
+
* name: 'Color Picker',
|
|
24625
|
+
* content: ColorPickerWidget(
|
|
24626
|
+
* editor,
|
|
24627
|
+
* function (color) {
|
|
24628
|
+
* box.style.color = color;
|
|
24629
|
+
* },
|
|
24630
|
+
* box.style.color
|
|
24631
|
+
* )
|
|
24632
|
+
* }
|
|
24617
24633
|
* ]);
|
|
24618
24634
|
* ```
|
|
24619
24635
|
*/
|