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/es2021/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
|
*/
|
|
@@ -1716,7 +1716,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1716
1716
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1717
1717
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1718
1718
|
*/
|
|
1719
|
-
const APP_VERSION = "4.0.0-beta.
|
|
1719
|
+
const APP_VERSION = "4.0.0-beta.98";
|
|
1720
1720
|
// prettier-ignore
|
|
1721
1721
|
const ES = "es2021";
|
|
1722
1722
|
const IS_ES_MODERN = true;
|
|
@@ -7042,7 +7042,7 @@ function ucfirst(value) {
|
|
|
7042
7042
|
if (!value.length) {
|
|
7043
7043
|
return '';
|
|
7044
7044
|
}
|
|
7045
|
-
return value[0].toUpperCase() + value.
|
|
7045
|
+
return value[0].toUpperCase() + value.substring(1);
|
|
7046
7046
|
}
|
|
7047
7047
|
|
|
7048
7048
|
|
|
@@ -8197,8 +8197,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8197
8197
|
/* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
|
|
8198
8198
|
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
|
|
8199
8199
|
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
|
|
8200
|
-
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
|
|
8201
|
-
/* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
|
|
8200
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
|
|
8202
8201
|
/* harmony export */ });
|
|
8203
8202
|
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
|
|
8204
8203
|
/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
|
|
@@ -8231,7 +8230,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8231
8230
|
/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
|
|
8232
8231
|
/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
|
|
8233
8232
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
|
|
8234
|
-
/* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
|
|
8235
8233
|
/*!
|
|
8236
8234
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8237
8235
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8267,7 +8265,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8267
8265
|
|
|
8268
8266
|
|
|
8269
8267
|
|
|
8270
|
-
|
|
8271
8268
|
|
|
8272
8269
|
|
|
8273
8270
|
/***/ }),
|
|
@@ -8982,35 +8979,6 @@ const getDataTransfer = (event) => {
|
|
|
8982
8979
|
};
|
|
8983
8980
|
|
|
8984
8981
|
|
|
8985
|
-
/***/ }),
|
|
8986
|
-
|
|
8987
|
-
/***/ 96416:
|
|
8988
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8989
|
-
|
|
8990
|
-
"use strict";
|
|
8991
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8992
|
-
/* harmony export */ P: function() { return /* binding */ val; }
|
|
8993
|
-
/* harmony export */ });
|
|
8994
|
-
/*!
|
|
8995
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8996
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8997
|
-
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
8998
|
-
*/
|
|
8999
|
-
/**
|
|
9000
|
-
* @module helpers/utils
|
|
9001
|
-
*/
|
|
9002
|
-
const val = (elm, selector, value) => {
|
|
9003
|
-
const child = elm.querySelector(selector);
|
|
9004
|
-
if (!child) {
|
|
9005
|
-
return '';
|
|
9006
|
-
}
|
|
9007
|
-
if (value) {
|
|
9008
|
-
child.value = value;
|
|
9009
|
-
}
|
|
9010
|
-
return child.value;
|
|
9011
|
-
};
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
8982
|
/***/ }),
|
|
9015
8983
|
|
|
9016
8984
|
/***/ 97800:
|
|
@@ -13720,7 +13688,7 @@ UIForm = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
|
13720
13688
|
var UITextArea_1;
|
|
13721
13689
|
|
|
13722
13690
|
/**
|
|
13723
|
-
* @module ui/form
|
|
13691
|
+
* @module ui/form
|
|
13724
13692
|
*/
|
|
13725
13693
|
|
|
13726
13694
|
|
|
@@ -13774,7 +13742,7 @@ UITextArea = UITextArea_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate
|
|
|
13774
13742
|
var UICheckbox_1;
|
|
13775
13743
|
|
|
13776
13744
|
/**
|
|
13777
|
-
* @module ui/form
|
|
13745
|
+
* @module ui/form
|
|
13778
13746
|
*/
|
|
13779
13747
|
|
|
13780
13748
|
|
|
@@ -13863,7 +13831,7 @@ UICheckbox = UICheckbox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate
|
|
|
13863
13831
|
*/
|
|
13864
13832
|
|
|
13865
13833
|
/**
|
|
13866
|
-
* @module ui/form
|
|
13834
|
+
* @module ui/form
|
|
13867
13835
|
*/
|
|
13868
13836
|
|
|
13869
13837
|
|
|
@@ -13940,7 +13908,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
|
13940
13908
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
13941
13909
|
*/
|
|
13942
13910
|
/**
|
|
13943
|
-
* @module ui/form
|
|
13911
|
+
* @module ui/form
|
|
13944
13912
|
*/
|
|
13945
13913
|
|
|
13946
13914
|
|
|
@@ -13974,7 +13942,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
|
13974
13942
|
var UIInput_1;
|
|
13975
13943
|
|
|
13976
13944
|
/**
|
|
13977
|
-
* @module ui/form
|
|
13945
|
+
* @module ui/form
|
|
13978
13946
|
*/
|
|
13979
13947
|
|
|
13980
13948
|
|
|
@@ -14213,7 +14181,7 @@ UIInput = UIInput_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn
|
|
|
14213
14181
|
var UISelect_1;
|
|
14214
14182
|
|
|
14215
14183
|
/**
|
|
14216
|
-
* @module ui/form
|
|
14184
|
+
* @module ui/form
|
|
14217
14185
|
*/
|
|
14218
14186
|
|
|
14219
14187
|
|
|
@@ -15775,7 +15743,10 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
|
|
|
15775
15743
|
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage */ .Ke.makeStorage();
|
|
15776
15744
|
}
|
|
15777
15745
|
get message() {
|
|
15778
|
-
return
|
|
15746
|
+
return this.getMessageModule(this.container);
|
|
15747
|
+
}
|
|
15748
|
+
getMessageModule(container) {
|
|
15749
|
+
return new jodit_modules_messages_messages__WEBPACK_IMPORTED_MODULE_8__/* .UIMessages */ .D(this, container);
|
|
15779
15750
|
}
|
|
15780
15751
|
/**
|
|
15781
15752
|
* Container for persistent set/get value
|
|
@@ -16166,6 +16137,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16166
16137
|
get workplace() {
|
|
16167
16138
|
return this.currentPlace.workplace;
|
|
16168
16139
|
}
|
|
16140
|
+
get message() {
|
|
16141
|
+
return this.getMessageModule(this.workplace);
|
|
16142
|
+
}
|
|
16169
16143
|
/**
|
|
16170
16144
|
* Statusbar module
|
|
16171
16145
|
*/
|
|
@@ -17253,6 +17227,9 @@ Jodit.core = {
|
|
|
17253
17227
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17254
17228
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17255
17229
|
], Jodit.prototype, "createInside", null);
|
|
17230
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17231
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17232
|
+
], Jodit.prototype, "message", null);
|
|
17256
17233
|
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
|
|
17257
17234
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
17258
17235
|
], Jodit.prototype, "s", null);
|
|
@@ -21815,15 +21792,43 @@ let UIMessages = class UIMessages extends jodit_core_ui_group_group__WEBPACK_IMP
|
|
|
21815
21792
|
this.options = options;
|
|
21816
21793
|
this.__messages = new Set();
|
|
21817
21794
|
}
|
|
21795
|
+
/**
|
|
21796
|
+
* Show popup info message in the lower right corner of the container
|
|
21797
|
+
* ```js
|
|
21798
|
+
* const jodit = Jodit.make('#editor');
|
|
21799
|
+
* jodit.info('Hello world', 3000);
|
|
21800
|
+
* ```
|
|
21801
|
+
*/
|
|
21818
21802
|
info(text, timeout) {
|
|
21819
21803
|
this.__message(text, 'info', timeout);
|
|
21820
21804
|
}
|
|
21805
|
+
/**
|
|
21806
|
+
* Show popup success message in the lower right corner of the container
|
|
21807
|
+
* ```js
|
|
21808
|
+
* const jodit = Jodit.make('#editor');
|
|
21809
|
+
* jodit.success('Hello world', 3000);
|
|
21810
|
+
* ```
|
|
21811
|
+
*/
|
|
21821
21812
|
success(text, timeout) {
|
|
21822
21813
|
this.__message(text, 'success', timeout);
|
|
21823
21814
|
}
|
|
21815
|
+
/**
|
|
21816
|
+
* Show popup error message in the lower right corner of the container
|
|
21817
|
+
* ```js
|
|
21818
|
+
* const jodit = Jodit.make('#editor');
|
|
21819
|
+
* jodit.error('Hello world', 3000);
|
|
21820
|
+
* ```
|
|
21821
|
+
*/
|
|
21824
21822
|
error(text, timeout) {
|
|
21825
21823
|
this.__message(text, 'error', timeout);
|
|
21826
21824
|
}
|
|
21825
|
+
/**
|
|
21826
|
+
* Show popup message in the lower right corner of the container
|
|
21827
|
+
* ```js
|
|
21828
|
+
* const jodit = Jodit.make('#editor');
|
|
21829
|
+
* jodit.message('Hello world', 'info', 3000);
|
|
21830
|
+
* ```
|
|
21831
|
+
*/
|
|
21827
21832
|
message(text, variant, timeout) {
|
|
21828
21833
|
this.__message(text, variant, timeout);
|
|
21829
21834
|
}
|
|
@@ -22151,9 +22156,11 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_3__/* .ViewCom
|
|
|
22151
22156
|
/**
|
|
22152
22157
|
* Inserts a new line after row what contains the selected cell
|
|
22153
22158
|
*
|
|
22159
|
+
* @param table - Working table
|
|
22154
22160
|
* @param line - Insert a new line after/before this
|
|
22155
22161
|
* line contains the selected cell
|
|
22156
22162
|
* @param after - Insert a new line after line contains the selected cell
|
|
22163
|
+
* @param create - Instance of Create class
|
|
22157
22164
|
*/
|
|
22158
22165
|
static appendRow(table, line, after, create) {
|
|
22159
22166
|
let row;
|
|
@@ -23983,7 +23990,12 @@ function send(uploader, data) {
|
|
|
23983
23990
|
.send()
|
|
23984
23991
|
.then(resp => resp.json())
|
|
23985
23992
|
.catch(error => {
|
|
23986
|
-
|
|
23993
|
+
return {
|
|
23994
|
+
success: false,
|
|
23995
|
+
data: {
|
|
23996
|
+
messages: [error]
|
|
23997
|
+
}
|
|
23998
|
+
};
|
|
23987
23999
|
})
|
|
23988
24000
|
.finally(() => {
|
|
23989
24001
|
ajax.destruct();
|
|
@@ -24250,7 +24262,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
|
|
|
24250
24262
|
* @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
|
|
24251
24263
|
* @example
|
|
24252
24264
|
* ```javascript
|
|
24253
|
-
*
|
|
24265
|
+
* const tabs = TabsWidget(editor, {
|
|
24254
24266
|
* 'Text' : ColorPickerWidget(editor, function (color) {
|
|
24255
24267
|
* box.style.color = color;
|
|
24256
24268
|
* }, box.style.color),
|
|
@@ -24350,27 +24362,10 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
24350
24362
|
* Generate 3 tabs
|
|
24351
24363
|
* upload - Use Drag and Drop
|
|
24352
24364
|
* url - By specifying the image url
|
|
24353
|
-
* filebrowser - After opening the file browser
|
|
24365
|
+
* filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
|
|
24354
24366
|
*
|
|
24355
24367
|
* @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
|
|
24356
24368
|
* functions with different parameters
|
|
24357
|
-
*
|
|
24358
|
-
* @example
|
|
24359
|
-
* ```javascript
|
|
24360
|
-
* let widget = new Jodit.modules.Widget(editor);
|
|
24361
|
-
*
|
|
24362
|
-
* return widget.c('ImageSelector', {
|
|
24363
|
-
* url: function (url, alt) {
|
|
24364
|
-
* editor.selections.insertImage(url);
|
|
24365
|
-
* },
|
|
24366
|
-
* upload: function (images) {
|
|
24367
|
-
* editor.selections.insertImage(images[0]);
|
|
24368
|
-
* },
|
|
24369
|
-
* filebrowser: function (images) {
|
|
24370
|
-
* editor.selections.insertImage(images[0]);
|
|
24371
|
-
* }
|
|
24372
|
-
* }, image);
|
|
24373
|
-
* ```
|
|
24374
24369
|
*/
|
|
24375
24370
|
const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
24376
24371
|
let currentImage;
|
|
@@ -24439,13 +24434,13 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24439
24434
|
!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
|
|
24440
24435
|
(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
|
|
24441
24436
|
currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
|
|
24442
|
-
|
|
24443
|
-
|
|
24437
|
+
val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
|
|
24438
|
+
val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
|
|
24444
24439
|
button.state.text = 'Update';
|
|
24445
24440
|
}
|
|
24446
24441
|
if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
|
|
24447
|
-
|
|
24448
|
-
|
|
24442
|
+
val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
|
|
24443
|
+
val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
|
|
24449
24444
|
button.state.text = 'Update';
|
|
24450
24445
|
}
|
|
24451
24446
|
form.onSubmit(data => {
|
|
@@ -24461,6 +24456,16 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24461
24456
|
}
|
|
24462
24457
|
return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
|
|
24463
24458
|
};
|
|
24459
|
+
function val(elm, selector, value) {
|
|
24460
|
+
const child = elm.querySelector(selector);
|
|
24461
|
+
if (!child) {
|
|
24462
|
+
return '';
|
|
24463
|
+
}
|
|
24464
|
+
if (value) {
|
|
24465
|
+
child.value = value;
|
|
24466
|
+
}
|
|
24467
|
+
return child.value;
|
|
24468
|
+
}
|
|
24464
24469
|
|
|
24465
24470
|
|
|
24466
24471
|
/***/ }),
|
|
@@ -24530,12 +24535,23 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
24530
24535
|
*
|
|
24531
24536
|
* @example
|
|
24532
24537
|
* ```javascript
|
|
24533
|
-
*
|
|
24534
|
-
*
|
|
24535
|
-
*
|
|
24536
|
-
*
|
|
24537
|
-
*
|
|
24538
|
-
*
|
|
24538
|
+
* const editor = Jodit.make('#editor');
|
|
24539
|
+
* const tabs = Jodit.modules.TabsWidget(editor, [
|
|
24540
|
+
* { name: 'Images', content: '<div>Images</div>' },
|
|
24541
|
+
* {
|
|
24542
|
+
* name: 'Title 2',
|
|
24543
|
+
* content: editor.c.fromHTML('<div>Some content</div>')
|
|
24544
|
+
* },
|
|
24545
|
+
* {
|
|
24546
|
+
* name: 'Color Picker',
|
|
24547
|
+
* content: ColorPickerWidget(
|
|
24548
|
+
* editor,
|
|
24549
|
+
* function (color) {
|
|
24550
|
+
* box.style.color = color;
|
|
24551
|
+
* },
|
|
24552
|
+
* box.style.color
|
|
24553
|
+
* )
|
|
24554
|
+
* }
|
|
24539
24555
|
* ]);
|
|
24540
24556
|
* ```
|
|
24541
24557
|
*/
|