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/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.
|
|
4
|
+
* Version: v4.12.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1758,7 +1758,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1758
1758
|
* ```
|
|
1759
1759
|
* @packageDocumentation
|
|
1760
1760
|
* @module constants
|
|
1761
|
-
*/ const APP_VERSION = "4.
|
|
1761
|
+
*/ const APP_VERSION = "4.12.2";
|
|
1762
1762
|
// prettier-ignore
|
|
1763
1763
|
const ES = "es2021";
|
|
1764
1764
|
const IS_ES_MODERN = true;
|
|
@@ -7512,6 +7512,7 @@ const completeUrl = (url)=>{
|
|
|
7512
7512
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7513
7513
|
/* harmony export */ ConfigDeepFlatten: function() { return /* binding */ ConfigDeepFlatten; },
|
|
7514
7514
|
/* harmony export */ ConfigFlatten: function() { return /* binding */ ConfigFlatten; },
|
|
7515
|
+
/* harmony export */ ConfigMerge: function() { return /* binding */ ConfigMerge; },
|
|
7515
7516
|
/* harmony export */ ConfigProto: function() { return /* binding */ ConfigProto; }
|
|
7516
7517
|
/* harmony export */ });
|
|
7517
7518
|
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17312);
|
|
@@ -7622,7 +7623,37 @@ function ConfigFlatten(obj) {
|
|
|
7622
7623
|
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
7623
7624
|
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
7624
7625
|
* ```
|
|
7625
|
-
*/
|
|
7626
|
+
*/ /**
|
|
7627
|
+
* Deep-merges `source` into `target` in-place.
|
|
7628
|
+
* Uses the same merge semantics as {@link ConfigProto}:
|
|
7629
|
+
* - Nested plain objects are merged recursively
|
|
7630
|
+
* - {@link isAtom | Atomic} values replace the target entirely
|
|
7631
|
+
* - Everything else (primitives, arrays, class instances) replaces the target value
|
|
7632
|
+
*
|
|
7633
|
+
* Designed for patching `Config.defaultOptions` without losing existing keys:
|
|
7634
|
+
*
|
|
7635
|
+
* ```js
|
|
7636
|
+
* Jodit.configure({
|
|
7637
|
+
* controls: {
|
|
7638
|
+
* someButton: { group: 'custom' }
|
|
7639
|
+
* }
|
|
7640
|
+
* });
|
|
7641
|
+
* // Only `controls.someButton` is touched — all other controls remain intact.
|
|
7642
|
+
* ```
|
|
7643
|
+
*
|
|
7644
|
+
* @see {@link ConfigProto} for the prototype-chain variant used at editor creation time
|
|
7645
|
+
*/ function ConfigMerge(target, source) {
|
|
7646
|
+
Object.keys(source).forEach((key)=>{
|
|
7647
|
+
const srcVal = source[key];
|
|
7648
|
+
const tgtVal = target[key];
|
|
7649
|
+
if ((0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(srcVal) && (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(tgtVal) && !(0,_extend__WEBPACK_IMPORTED_MODULE_5__.isAtom)(srcVal)) {
|
|
7650
|
+
ConfigMerge(tgtVal, srcVal);
|
|
7651
|
+
} else {
|
|
7652
|
+
target[key] = srcVal;
|
|
7653
|
+
}
|
|
7654
|
+
});
|
|
7655
|
+
}
|
|
7656
|
+
function ConfigDeepFlatten(obj) {
|
|
7626
7657
|
return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.keys)(obj, false).reduce((app, key)=>{
|
|
7627
7658
|
app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(obj[key]) ? ConfigDeepFlatten(obj[key]) : obj[key];
|
|
7628
7659
|
return app;
|
|
@@ -8207,6 +8238,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8207
8238
|
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
|
|
8208
8239
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
8209
8240
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
8241
|
+
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
8210
8242
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
8211
8243
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
8212
8244
|
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.LimitedStack; },
|
|
@@ -16532,6 +16564,51 @@ class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE_9__.ViewWithToolbar {
|
|
|
16532
16564
|
*/ static get defaultOptions() {
|
|
16533
16565
|
return jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.defaultOptions;
|
|
16534
16566
|
}
|
|
16567
|
+
/**
|
|
16568
|
+
* Deep-merges partial options into the global defaults without replacing
|
|
16569
|
+
* top-level objects. This lets you patch nested settings (e.g. a single
|
|
16570
|
+
* button inside `controls`) without losing the rest:
|
|
16571
|
+
*
|
|
16572
|
+
* ```js
|
|
16573
|
+
* // Add a custom button — all existing controls remain untouched
|
|
16574
|
+
* Jodit.configure({
|
|
16575
|
+
* controls: {
|
|
16576
|
+
* myButton: {
|
|
16577
|
+
* icon: 'pencil',
|
|
16578
|
+
* command: 'selectall'
|
|
16579
|
+
* }
|
|
16580
|
+
* }
|
|
16581
|
+
* });
|
|
16582
|
+
*
|
|
16583
|
+
* // Override only the `group` of an existing button
|
|
16584
|
+
* Jodit.configure({
|
|
16585
|
+
* controls: {
|
|
16586
|
+
* someButton: { group: 'custom' }
|
|
16587
|
+
* }
|
|
16588
|
+
* });
|
|
16589
|
+
*
|
|
16590
|
+
* // Works with any nested option
|
|
16591
|
+
* Jodit.configure({
|
|
16592
|
+
* createAttributes: {
|
|
16593
|
+
* div: { class: 'my-class' }
|
|
16594
|
+
* }
|
|
16595
|
+
* });
|
|
16596
|
+
*
|
|
16597
|
+
* // Use Jodit.atom() to replace a nested value entirely instead of merging
|
|
16598
|
+
* Jodit.configure({
|
|
16599
|
+
* controls: {
|
|
16600
|
+
* fontsize: {
|
|
16601
|
+
* list: Jodit.atom([8, 9, 10])
|
|
16602
|
+
* }
|
|
16603
|
+
* }
|
|
16604
|
+
* });
|
|
16605
|
+
* ```
|
|
16606
|
+
*
|
|
16607
|
+
* @see {@link ConfigMerge} for the merge algorithm
|
|
16608
|
+
* @see {@link ConfigProto} for per-instance prototype-based merge used at editor creation time
|
|
16609
|
+
*/ static configure(options) {
|
|
16610
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigMerge)(Jodit.defaultOptions, options);
|
|
16611
|
+
}
|
|
16535
16612
|
get createInside() {
|
|
16536
16613
|
return new jodit_modules__WEBPACK_IMPORTED_MODULE_9__.Create(()=>this.ed, this.o.createAttributes);
|
|
16537
16614
|
}
|
|
@@ -24633,7 +24710,8 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', (_palette_svg__WE
|
|
|
24633
24710
|
type: 'submit',
|
|
24634
24711
|
variant: 'primary',
|
|
24635
24712
|
text: 'Insert'
|
|
24636
|
-
})
|
|
24713
|
+
});
|
|
24714
|
+
const form = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.UIForm(editor, [
|
|
24637
24715
|
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__.UIInput(editor, {
|
|
24638
24716
|
required: true,
|
|
24639
24717
|
label: 'URL',
|
|
@@ -34815,7 +34893,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
34815
34893
|
}
|
|
34816
34894
|
__generateForm(current, close) {
|
|
34817
34895
|
const { jodit } = this;
|
|
34818
|
-
const i18n = jodit.i18n.bind(jodit)
|
|
34896
|
+
const i18n = jodit.i18n.bind(jodit);
|
|
34897
|
+
const { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
34819
34898
|
const html = formTemplate(jodit);
|
|
34820
34899
|
const form = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
34821
34900
|
target_checkbox_box: openInNewTabCheckbox,
|