jodit 4.11.15 → 4.12.2
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 +30 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +84 -5
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.js +3 -3
- 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 +4 -4
- package/es2021/jodit.js +84 -5
- package/es2021/jodit.min.js +4 -4
- 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 +4 -4
- package/es2021.en/jodit.js +84 -5
- 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 +87 -5
- 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/helpers/utils/config-proto.d.ts +21 -0
- package/esm/core/helpers/utils/config-proto.js +32 -0
- package/esm/jodit.d.ts +44 -0
- package/esm/jodit.js +47 -1
- package/esm/modules/widget/file-selector/file-selector.js +2 -1
- package/esm/plugins/link/link.js +2 -1
- package/esm/typings.d.ts +1 -0
- package/package.json +1 -1
- package/types/core/helpers/utils/config-proto.d.ts +21 -0
- package/types/jodit.d.ts +44 -0
- package/types/typings.d.ts +1 -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.12.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2022,7 +2022,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2022
2022
|
* @packageDocumentation
|
|
2023
2023
|
* @module constants
|
|
2024
2024
|
*/
|
|
2025
|
-
var APP_VERSION = "4.
|
|
2025
|
+
var APP_VERSION = "4.12.2";
|
|
2026
2026
|
// prettier-ignore
|
|
2027
2027
|
var ES = "es5";
|
|
2028
2028
|
var IS_ES_MODERN = false;
|
|
@@ -8532,6 +8532,7 @@ var completeUrl = function completeUrl(url) {
|
|
|
8532
8532
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8533
8533
|
/* harmony export */ ConfigDeepFlatten: function() { return /* binding */ ConfigDeepFlatten; },
|
|
8534
8534
|
/* harmony export */ ConfigFlatten: function() { return /* binding */ ConfigFlatten; },
|
|
8535
|
+
/* harmony export */ ConfigMerge: function() { return /* binding */ ConfigMerge; },
|
|
8535
8536
|
/* harmony export */ ConfigProto: function() { return /* binding */ ConfigProto; }
|
|
8536
8537
|
/* harmony export */ });
|
|
8537
8538
|
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
@@ -8642,7 +8643,37 @@ function ConfigFlatten(obj) {
|
|
|
8642
8643
|
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
8643
8644
|
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
8644
8645
|
* ```
|
|
8645
|
-
*/
|
|
8646
|
+
*/ /**
|
|
8647
|
+
* Deep-merges `source` into `target` in-place.
|
|
8648
|
+
* Uses the same merge semantics as {@link ConfigProto}:
|
|
8649
|
+
* - Nested plain objects are merged recursively
|
|
8650
|
+
* - {@link isAtom | Atomic} values replace the target entirely
|
|
8651
|
+
* - Everything else (primitives, arrays, class instances) replaces the target value
|
|
8652
|
+
*
|
|
8653
|
+
* Designed for patching `Config.defaultOptions` without losing existing keys:
|
|
8654
|
+
*
|
|
8655
|
+
* ```js
|
|
8656
|
+
* Jodit.configure({
|
|
8657
|
+
* controls: {
|
|
8658
|
+
* someButton: { group: 'custom' }
|
|
8659
|
+
* }
|
|
8660
|
+
* });
|
|
8661
|
+
* // Only `controls.someButton` is touched — all other controls remain intact.
|
|
8662
|
+
* ```
|
|
8663
|
+
*
|
|
8664
|
+
* @see {@link ConfigProto} for the prototype-chain variant used at editor creation time
|
|
8665
|
+
*/ function ConfigMerge(target, source) {
|
|
8666
|
+
Object.keys(source).forEach(function(key) {
|
|
8667
|
+
var srcVal = source[key];
|
|
8668
|
+
var tgtVal = target[key];
|
|
8669
|
+
if ((0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(srcVal) && (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(tgtVal) && !(0,_extend__WEBPACK_IMPORTED_MODULE_6__.isAtom)(srcVal)) {
|
|
8670
|
+
ConfigMerge(tgtVal, srcVal);
|
|
8671
|
+
} else {
|
|
8672
|
+
target[key] = srcVal;
|
|
8673
|
+
}
|
|
8674
|
+
});
|
|
8675
|
+
}
|
|
8676
|
+
function ConfigDeepFlatten(obj) {
|
|
8646
8677
|
return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.keys)(obj, false).reduce(function(app, key) {
|
|
8647
8678
|
app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj[key]) ? ConfigDeepFlatten(obj[key]) : obj[key];
|
|
8648
8679
|
return app;
|
|
@@ -9281,6 +9312,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9281
9312
|
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
|
|
9282
9313
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
9283
9314
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
9315
|
+
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
9284
9316
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
9285
9317
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
9286
9318
|
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.LimitedStack; },
|
|
@@ -21473,6 +21505,54 @@ var Jodit = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
21473
21505
|
*/ function get() {
|
|
21474
21506
|
return jodit_config__WEBPACK_IMPORTED_MODULE_18__.Config.defaultOptions;
|
|
21475
21507
|
}
|
|
21508
|
+
},
|
|
21509
|
+
{
|
|
21510
|
+
key: "configure",
|
|
21511
|
+
value: /**
|
|
21512
|
+
* Deep-merges partial options into the global defaults without replacing
|
|
21513
|
+
* top-level objects. This lets you patch nested settings (e.g. a single
|
|
21514
|
+
* button inside `controls`) without losing the rest:
|
|
21515
|
+
*
|
|
21516
|
+
* ```js
|
|
21517
|
+
* // Add a custom button — all existing controls remain untouched
|
|
21518
|
+
* Jodit.configure({
|
|
21519
|
+
* controls: {
|
|
21520
|
+
* myButton: {
|
|
21521
|
+
* icon: 'pencil',
|
|
21522
|
+
* command: 'selectall'
|
|
21523
|
+
* }
|
|
21524
|
+
* }
|
|
21525
|
+
* });
|
|
21526
|
+
*
|
|
21527
|
+
* // Override only the `group` of an existing button
|
|
21528
|
+
* Jodit.configure({
|
|
21529
|
+
* controls: {
|
|
21530
|
+
* someButton: { group: 'custom' }
|
|
21531
|
+
* }
|
|
21532
|
+
* });
|
|
21533
|
+
*
|
|
21534
|
+
* // Works with any nested option
|
|
21535
|
+
* Jodit.configure({
|
|
21536
|
+
* createAttributes: {
|
|
21537
|
+
* div: { class: 'my-class' }
|
|
21538
|
+
* }
|
|
21539
|
+
* });
|
|
21540
|
+
*
|
|
21541
|
+
* // Use Jodit.atom() to replace a nested value entirely instead of merging
|
|
21542
|
+
* Jodit.configure({
|
|
21543
|
+
* controls: {
|
|
21544
|
+
* fontsize: {
|
|
21545
|
+
* list: Jodit.atom([8, 9, 10])
|
|
21546
|
+
* }
|
|
21547
|
+
* }
|
|
21548
|
+
* });
|
|
21549
|
+
* ```
|
|
21550
|
+
*
|
|
21551
|
+
* @see {@link ConfigMerge} for the merge algorithm
|
|
21552
|
+
* @see {@link ConfigProto} for per-instance prototype-based merge used at editor creation time
|
|
21553
|
+
*/ function configure(options) {
|
|
21554
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_15__.ConfigMerge)(Jodit.defaultOptions, options);
|
|
21555
|
+
}
|
|
21476
21556
|
}
|
|
21477
21557
|
]);
|
|
21478
21558
|
return Jodit;
|
|
@@ -29923,7 +30003,8 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
29923
30003
|
type: 'submit',
|
|
29924
30004
|
variant: 'primary',
|
|
29925
30005
|
text: 'Insert'
|
|
29926
|
-
})
|
|
30006
|
+
});
|
|
30007
|
+
var form = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.UIForm(editor, [
|
|
29927
30008
|
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.UIInput(editor, {
|
|
29928
30009
|
required: true,
|
|
29929
30010
|
label: 'URL',
|
|
@@ -41459,7 +41540,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
41459
41540
|
key: "__generateForm",
|
|
41460
41541
|
value: function __generateForm(current, close) {
|
|
41461
41542
|
var jodit = this.jodit;
|
|
41462
|
-
var i18n = jodit.i18n.bind(jodit)
|
|
41543
|
+
var i18n = jodit.i18n.bind(jodit);
|
|
41544
|
+
var _jodit_o_link = jodit.o.link, openInNewTabCheckbox = _jodit_o_link.openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked = _jodit_o_link.openInNewTabCheckboxDefaultChecked, noFollowCheckbox = _jodit_o_link.noFollowCheckbox, formTemplate = _jodit_o_link.formTemplate, formClassName = _jodit_o_link.formClassName, modeClassName = _jodit_o_link.modeClassName;
|
|
41463
41545
|
var html = formTemplate(jodit);
|
|
41464
41546
|
var form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
41465
41547
|
target_checkbox_box: openInNewTabCheckbox,
|
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.12.2
|
|
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.12.2
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|