jodit 4.0.0-beta.86 → 4.0.0-beta.88
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 +42 -8
- package/README.md +5 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +46 -43
- 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 +46 -43
- 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 +43 -43
- 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 +43 -43
- 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 +85 -69
- 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/selection/interface.d.ts +5 -0
- package/esm/core/selection/interface.js +6 -1
- package/esm/core/selection/style/commit-style.js +2 -0
- package/esm/core/ui/button/button/button.js +2 -1
- package/esm/core/ui/button/group/group.js +2 -1
- package/esm/core/ui/button/tooltip/tooltip.js +2 -1
- package/esm/core/ui/element.js +2 -1
- package/esm/core/ui/form/block/block.js +2 -1
- package/esm/core/ui/form/form.js +2 -1
- package/esm/core/ui/form/inputs/area/area.js +2 -1
- package/esm/core/ui/form/inputs/checkbox/checkbox.js +2 -1
- package/esm/core/ui/form/inputs/file/file.js +2 -1
- package/esm/core/ui/form/inputs/input/input.js +2 -1
- package/esm/core/ui/form/inputs/select/select.js +2 -1
- package/esm/core/ui/group/group.js +2 -1
- package/esm/core/ui/group/list.js +2 -1
- package/esm/core/ui/group/separator.js +2 -1
- package/esm/core/ui/group/spacer.js +2 -1
- package/esm/core/ui/icon.js +4 -1
- package/esm/core/view/view.js +2 -1
- package/esm/jodit.js +3 -11
- package/esm/modules/context-menu/context-menu.js +2 -1
- package/esm/modules/dialog/dialog.js +2 -1
- package/esm/modules/file-browser/file-browser.js +2 -1
- package/esm/modules/image-editor/image-editor.js +2 -1
- package/esm/modules/messages/message.js +2 -1
- package/esm/modules/messages/messages.js +2 -1
- package/esm/modules/status-bar/status-bar.js +2 -1
- package/esm/modules/toolbar/button/button.js +2 -1
- package/esm/modules/toolbar/button/content.js +2 -1
- package/esm/modules/toolbar/button/select/select.js +2 -1
- package/esm/modules/toolbar/collection/collection.js +2 -1
- package/esm/modules/toolbar/collection/editor-collection.js +2 -1
- package/esm/plugins/backspace/interface.d.ts +9 -8
- package/esm/plugins/resize-handler/resize-handler.js +2 -1
- package/esm/plugins/search/ui/search.js +2 -1
- package/esm/plugins/size/size.js +2 -1
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +2 -1
- package/esm/plugins/wrap-nodes/wrap-nodes.js +34 -30
- package/examples/arabic.lang.html +111 -64
- package/examples/assets/app.css +1 -3
- package/examples/color-picker.html +122 -72
- package/examples/custom-icons.html +204 -157
- package/examples/custom-toolbar.html +110 -63
- package/examples/example.default.html +4 -3
- package/examples/fullsize.html +107 -60
- package/examples/index.html +6 -5
- package/examples/inline-mode.html +193 -92
- package/examples/oneinstance.html +138 -90
- package/examples/theme.html +6 -5
- package/package.json +1 -1
- package/types/core/selection/interface.d.ts +5 -0
- package/types/plugins/backspace/interface.d.ts +9 -8
- package/examples/assets/prism.css +0 -200
- package/examples/assets/prism.js +0 -1254
package/es5/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.88
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -360,7 +360,7 @@ var $TypeError = TypeError;
|
|
|
360
360
|
module.exports = function (argument) {
|
|
361
361
|
if (isCallable(argument))
|
|
362
362
|
return argument;
|
|
363
|
-
throw $TypeError(tryToString(argument) + ' is not a function');
|
|
363
|
+
throw new $TypeError(tryToString(argument) + ' is not a function');
|
|
364
364
|
};
|
|
365
365
|
|
|
366
366
|
|
|
@@ -377,7 +377,7 @@ var $TypeError = TypeError;
|
|
|
377
377
|
module.exports = function (argument) {
|
|
378
378
|
if (typeof argument == 'object' || isCallable(argument))
|
|
379
379
|
return argument;
|
|
380
|
-
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
380
|
+
throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
381
381
|
};
|
|
382
382
|
|
|
383
383
|
|
|
@@ -421,7 +421,7 @@ var $TypeError = TypeError;
|
|
|
421
421
|
module.exports = function (argument) {
|
|
422
422
|
if (isObject(argument))
|
|
423
423
|
return argument;
|
|
424
|
-
throw $TypeError($String(argument) + ' is not an object');
|
|
424
|
+
throw new $TypeError($String(argument) + ' is not an object');
|
|
425
425
|
};
|
|
426
426
|
|
|
427
427
|
|
|
@@ -765,8 +765,13 @@ try {
|
|
|
765
765
|
}
|
|
766
766
|
catch (error) { /* empty */ }
|
|
767
767
|
module.exports = function (exec, SKIP_CLOSING) {
|
|
768
|
-
|
|
768
|
+
try {
|
|
769
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING)
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
catch (error) {
|
|
769
773
|
return false;
|
|
774
|
+
} // workaround of old WebKit + `eval` bug
|
|
770
775
|
var ITERATION_SUPPORT = false;
|
|
771
776
|
try {
|
|
772
777
|
var object = {};
|
|
@@ -1452,7 +1457,7 @@ module.exports = function (argument, usingIterator) {
|
|
|
1452
1457
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
1453
1458
|
if (aCallable(iteratorMethod))
|
|
1454
1459
|
return anObject(call(iteratorMethod, argument));
|
|
1455
|
-
throw $TypeError(tryToString(argument) + ' is not iterable');
|
|
1460
|
+
throw new $TypeError(tryToString(argument) + ' is not iterable');
|
|
1456
1461
|
};
|
|
1457
1462
|
|
|
1458
1463
|
|
|
@@ -1664,7 +1669,7 @@ var getterFor = function (TYPE) {
|
|
|
1664
1669
|
return function (it) {
|
|
1665
1670
|
var state;
|
|
1666
1671
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
1667
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
1672
|
+
throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
1668
1673
|
}
|
|
1669
1674
|
return state;
|
|
1670
1675
|
};
|
|
@@ -1678,7 +1683,7 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
1678
1683
|
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
1679
1684
|
set = function (it, metadata) {
|
|
1680
1685
|
if (store.has(it))
|
|
1681
|
-
throw TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1686
|
+
throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1682
1687
|
metadata.facade = it;
|
|
1683
1688
|
store.set(it, metadata);
|
|
1684
1689
|
return metadata;
|
|
@@ -1695,7 +1700,7 @@ else {
|
|
|
1695
1700
|
hiddenKeys[STATE] = true;
|
|
1696
1701
|
set = function (it, metadata) {
|
|
1697
1702
|
if (hasOwn(it, STATE))
|
|
1698
|
-
throw TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1703
|
+
throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1699
1704
|
metadata.facade = it;
|
|
1700
1705
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
1701
1706
|
return metadata;
|
|
@@ -1785,7 +1790,7 @@ var empty = [];
|
|
|
1785
1790
|
var construct = getBuiltIn('Reflect', 'construct');
|
|
1786
1791
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1787
1792
|
var exec = uncurryThis(constructorRegExp.exec);
|
|
1788
|
-
var INCORRECT_TO_STRING = !constructorRegExp.
|
|
1793
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1789
1794
|
var isConstructorModern = function isConstructor(argument) {
|
|
1790
1795
|
if (!isCallable(argument))
|
|
1791
1796
|
return false;
|
|
@@ -2006,7 +2011,7 @@ module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, I
|
|
|
2006
2011
|
var getIterationMethod = function (KIND) {
|
|
2007
2012
|
if (KIND === DEFAULT && defaultIterator)
|
|
2008
2013
|
return defaultIterator;
|
|
2009
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype)
|
|
2014
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype)
|
|
2010
2015
|
return IterablePrototype[KIND];
|
|
2011
2016
|
switch (KIND) {
|
|
2012
2017
|
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
@@ -2406,7 +2411,7 @@ exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P
|
|
|
2406
2411
|
}
|
|
2407
2412
|
catch (error) { /* empty */ }
|
|
2408
2413
|
if ('get' in Attributes || 'set' in Attributes)
|
|
2409
|
-
throw $TypeError('Accessors not supported');
|
|
2414
|
+
throw new $TypeError('Accessors not supported');
|
|
2410
2415
|
if ('value' in Attributes)
|
|
2411
2416
|
O[P] = Attributes.value;
|
|
2412
2417
|
return O;
|
|
@@ -2685,7 +2690,7 @@ module.exports = function (input, pref) {
|
|
|
2685
2690
|
return val;
|
|
2686
2691
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
|
|
2687
2692
|
return val;
|
|
2688
|
-
throw $TypeError("Can't convert object to primitive value");
|
|
2693
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
2689
2694
|
};
|
|
2690
2695
|
|
|
2691
2696
|
|
|
@@ -2734,7 +2739,7 @@ var $TypeError = TypeError;
|
|
|
2734
2739
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
2735
2740
|
module.exports = function (it) {
|
|
2736
2741
|
if (isNullOrUndefined(it))
|
|
2737
|
-
throw $TypeError("Can't call method on " + it);
|
|
2742
|
+
throw new $TypeError("Can't call method on " + it);
|
|
2738
2743
|
return it;
|
|
2739
2744
|
};
|
|
2740
2745
|
|
|
@@ -2800,10 +2805,10 @@ var store = __webpack_require__(62511);
|
|
|
2800
2805
|
(module.exports = function (key, value) {
|
|
2801
2806
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
2802
2807
|
})('versions', []).push({
|
|
2803
|
-
version: '3.
|
|
2808
|
+
version: '3.33.0',
|
|
2804
2809
|
mode: IS_PURE ? 'pure' : 'global',
|
|
2805
2810
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
2806
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
2811
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE',
|
|
2807
2812
|
source: 'https://github.com/zloirock/core-js'
|
|
2808
2813
|
});
|
|
2809
2814
|
|
|
@@ -3026,7 +3031,7 @@ module.exports = function (input, pref) {
|
|
|
3026
3031
|
result = call(exoticToPrim, input, pref);
|
|
3027
3032
|
if (!isObject(result) || isSymbol(result))
|
|
3028
3033
|
return result;
|
|
3029
|
-
throw $TypeError("Can't convert object to primitive value");
|
|
3034
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
3030
3035
|
}
|
|
3031
3036
|
if (pref === undefined)
|
|
3032
3037
|
pref = 'number';
|
|
@@ -3076,7 +3081,7 @@ var classof = __webpack_require__(65356);
|
|
|
3076
3081
|
var $String = String;
|
|
3077
3082
|
module.exports = function (argument) {
|
|
3078
3083
|
if (classof(argument) === 'Symbol')
|
|
3079
|
-
throw TypeError('Cannot convert a Symbol value to a string');
|
|
3084
|
+
throw new TypeError('Cannot convert a Symbol value to a string');
|
|
3080
3085
|
return $String(argument);
|
|
3081
3086
|
};
|
|
3082
3087
|
|
|
@@ -3598,6 +3603,7 @@ var getInternalState = InternalStateModule.getterFor(SYMBOL);
|
|
|
3598
3603
|
var ObjectPrototype = Object[PROTOTYPE];
|
|
3599
3604
|
var $Symbol = global.Symbol;
|
|
3600
3605
|
var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
|
|
3606
|
+
var RangeError = global.RangeError;
|
|
3601
3607
|
var TypeError = global.TypeError;
|
|
3602
3608
|
var QObject = global.QObject;
|
|
3603
3609
|
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
@@ -3611,11 +3617,7 @@ var WellKnownSymbolsStore = shared('wks');
|
|
|
3611
3617
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
3612
3618
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
3613
3619
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
3614
|
-
var
|
|
3615
|
-
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
|
3616
|
-
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
|
3617
|
-
})).a !== 7;
|
|
3618
|
-
}) ? function (O, P, Attributes) {
|
|
3620
|
+
var fallbackDefineProperty = function (O, P, Attributes) {
|
|
3619
3621
|
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
|
|
3620
3622
|
if (ObjectPrototypeDescriptor)
|
|
3621
3623
|
delete ObjectPrototype[P];
|
|
@@ -3623,7 +3625,12 @@ var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
|
|
3623
3625
|
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
|
3624
3626
|
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
|
3625
3627
|
}
|
|
3626
|
-
}
|
|
3628
|
+
};
|
|
3629
|
+
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
|
3630
|
+
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
|
3631
|
+
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
|
3632
|
+
})).a !== 7;
|
|
3633
|
+
}) ? fallbackDefineProperty : nativeDefineProperty;
|
|
3627
3634
|
var wrap = function (tag, description) {
|
|
3628
3635
|
var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
|
|
3629
3636
|
setInternalState(symbol, {
|
|
@@ -3713,7 +3720,7 @@ var $getOwnPropertySymbols = function (O) {
|
|
|
3713
3720
|
if (!NATIVE_SYMBOL) {
|
|
3714
3721
|
$Symbol = function Symbol() {
|
|
3715
3722
|
if (isPrototypeOf(SymbolPrototype, this))
|
|
3716
|
-
throw TypeError('Symbol is not a constructor');
|
|
3723
|
+
throw new TypeError('Symbol is not a constructor');
|
|
3717
3724
|
var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
|
|
3718
3725
|
var tag = uid(description);
|
|
3719
3726
|
var setter = function (value) {
|
|
@@ -3721,7 +3728,15 @@ if (!NATIVE_SYMBOL) {
|
|
|
3721
3728
|
call(setter, ObjectPrototypeSymbols, value);
|
|
3722
3729
|
if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag))
|
|
3723
3730
|
this[HIDDEN][tag] = false;
|
|
3724
|
-
|
|
3731
|
+
var descriptor = createPropertyDescriptor(1, value);
|
|
3732
|
+
try {
|
|
3733
|
+
setSymbolDescriptor(this, tag, descriptor);
|
|
3734
|
+
}
|
|
3735
|
+
catch (error) {
|
|
3736
|
+
if (!(error instanceof RangeError))
|
|
3737
|
+
throw error;
|
|
3738
|
+
fallbackDefineProperty(this, tag, descriptor);
|
|
3739
|
+
}
|
|
3725
3740
|
};
|
|
3726
3741
|
if (DESCRIPTORS && USE_SETTER)
|
|
3727
3742
|
setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
|
@@ -3959,7 +3974,7 @@ var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
|
|
3959
3974
|
$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
|
|
3960
3975
|
keyFor: function keyFor(sym) {
|
|
3961
3976
|
if (!isSymbol(sym))
|
|
3962
|
-
throw TypeError(tryToString(sym) + ' is not a symbol');
|
|
3977
|
+
throw new TypeError(tryToString(sym) + ' is not a symbol');
|
|
3963
3978
|
if (hasOwn(SymbolToStringRegistry, sym))
|
|
3964
3979
|
return SymbolToStringRegistry[sym];
|
|
3965
3980
|
}
|
|
@@ -6910,7 +6925,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6910
6925
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
6911
6926
|
*/
|
|
6912
6927
|
|
|
6913
|
-
var APP_VERSION = "4.0.0-beta.
|
|
6928
|
+
var APP_VERSION = "4.0.0-beta.88";
|
|
6914
6929
|
// prettier-ignore
|
|
6915
6930
|
var ES = "es5";
|
|
6916
6931
|
var IS_ES_MODERN = false;
|
|
@@ -17961,6 +17976,8 @@ var CommitStyle = /** @class */ (function () {
|
|
|
17961
17976
|
});
|
|
17962
17977
|
this.__applyMap = new WeakMap();
|
|
17963
17978
|
}
|
|
17979
|
+
jodit.synchronizeValues();
|
|
17980
|
+
jodit.e.fire('afterCommitStyle', this);
|
|
17964
17981
|
};
|
|
17965
17982
|
return CommitStyle;
|
|
17966
17983
|
}());
|
|
@@ -20856,7 +20873,10 @@ var Icon = /** @class */ (function () {
|
|
|
20856
20873
|
var iconElement;
|
|
20857
20874
|
var name = icon.name, iconURL = icon.iconURL, fill = icon.fill;
|
|
20858
20875
|
var clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
20859
|
-
var iconFromEvent
|
|
20876
|
+
var iconFromEvent;
|
|
20877
|
+
if (!/<svg/.test(name)) {
|
|
20878
|
+
iconFromEvent = (_b = (_a = jodit.o).getIcon) === null || _b === void 0 ? void 0 : _b.call(_a, name, clearName);
|
|
20879
|
+
}
|
|
20860
20880
|
var cacheKey = "".concat(name).concat(iconURL).concat(fill).concat(iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : '');
|
|
20861
20881
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
20862
20882
|
return (_c = this.__cache.get(cacheKey)) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
|
|
@@ -23106,20 +23126,11 @@ var Jodit = /** @class */ (function (_super) {
|
|
|
23106
23126
|
if (_this.o.disabled) {
|
|
23107
23127
|
_this.setDisabled(true);
|
|
23108
23128
|
}
|
|
23109
|
-
// if enter plugin
|
|
23129
|
+
// if enter plugin isn't installed
|
|
23110
23130
|
try {
|
|
23111
23131
|
_this.ed.execCommand('defaultParagraphSeparator', false, _this.o.enter.toLowerCase());
|
|
23112
23132
|
}
|
|
23113
23133
|
catch (_a) { }
|
|
23114
|
-
// fix for native resizing
|
|
23115
|
-
try {
|
|
23116
|
-
_this.ed.execCommand('enableObjectResizing', false, 'false');
|
|
23117
|
-
}
|
|
23118
|
-
catch (_b) { }
|
|
23119
|
-
try {
|
|
23120
|
-
_this.ed.execCommand('enableInlineTableEditing', false, 'false');
|
|
23121
|
-
}
|
|
23122
|
-
catch (_c) { }
|
|
23123
23134
|
});
|
|
23124
23135
|
};
|
|
23125
23136
|
/**
|
|
@@ -47586,19 +47597,24 @@ var wrapNodes = /** @class */ (function (_super) {
|
|
|
47586
47597
|
* Found Node which should be wrapped
|
|
47587
47598
|
*/
|
|
47588
47599
|
_this.isSuitableStart = function (n) {
|
|
47589
|
-
|
|
47590
|
-
|
|
47600
|
+
var _a;
|
|
47601
|
+
return (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(n) &&
|
|
47602
|
+
(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_6__/* .isString */ .H)(n.nodeValue) &&
|
|
47603
|
+
(/[^\s]/.test(n.nodeValue) ||
|
|
47604
|
+
(((_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === n &&
|
|
47605
|
+
_this.isSuitable(n.nextSibling)))) ||
|
|
47606
|
+
(_this.isNotWrapped(n) && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTemporary(n));
|
|
47591
47607
|
};
|
|
47592
47608
|
/**
|
|
47593
|
-
* Node should add in block element
|
|
47609
|
+
* Node should add in a block element
|
|
47594
47610
|
*/
|
|
47595
47611
|
_this.isSuitable = function (n) {
|
|
47596
|
-
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(n) || _this.
|
|
47612
|
+
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(n) || _this.isNotWrapped(n);
|
|
47597
47613
|
};
|
|
47598
47614
|
/**
|
|
47599
|
-
* Some element which
|
|
47615
|
+
* Some element which needs to append in block
|
|
47600
47616
|
*/
|
|
47601
|
-
_this.
|
|
47617
|
+
_this.isNotWrapped = function (n) {
|
|
47602
47618
|
return jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isElement(n) &&
|
|
47603
47619
|
!(jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isBlock(n) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(n, _this.j.o.wrapNodes.exclude));
|
|
47604
47620
|
};
|
|
@@ -47613,7 +47629,7 @@ var wrapNodes = /** @class */ (function (_super) {
|
|
|
47613
47629
|
.on('drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn', this.preprocessInput, {
|
|
47614
47630
|
top: true
|
|
47615
47631
|
})
|
|
47616
|
-
.on('afterInit.wtn postProcessSetEditorValue.wtn', this.postProcessSetEditorValue);
|
|
47632
|
+
.on('afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn', this.postProcessSetEditorValue);
|
|
47617
47633
|
};
|
|
47618
47634
|
/** @override **/
|
|
47619
47635
|
wrapNodes.prototype.beforeDestruct = function (jodit) {
|
|
@@ -47629,7 +47645,7 @@ var wrapNodes = /** @class */ (function (_super) {
|
|
|
47629
47645
|
}
|
|
47630
47646
|
var child = jodit.editor.firstChild, isChanged = false;
|
|
47631
47647
|
while (child) {
|
|
47632
|
-
child =
|
|
47648
|
+
child = checkAloneListLeaf(child, jodit);
|
|
47633
47649
|
if (this.isSuitableStart(child)) {
|
|
47634
47650
|
if (!isChanged) {
|
|
47635
47651
|
jodit.s.save();
|
|
@@ -47654,28 +47670,6 @@ var wrapNodes = /** @class */ (function (_super) {
|
|
|
47654
47670
|
}
|
|
47655
47671
|
}
|
|
47656
47672
|
};
|
|
47657
|
-
wrapNodes.prototype.checkAloneListLeaf = function (child, jodit) {
|
|
47658
|
-
var result = child;
|
|
47659
|
-
var next = child;
|
|
47660
|
-
do {
|
|
47661
|
-
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isElement(next) &&
|
|
47662
|
-
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isLeaf(next) &&
|
|
47663
|
-
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isList(next.parentElement)) {
|
|
47664
|
-
var nextChild = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.findNotEmptySibling(next, false);
|
|
47665
|
-
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(result, 'ul')) {
|
|
47666
|
-
result.appendChild(next);
|
|
47667
|
-
}
|
|
47668
|
-
else {
|
|
47669
|
-
result = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.wrap(next, 'ul', jodit.createInside);
|
|
47670
|
-
}
|
|
47671
|
-
next = nextChild;
|
|
47672
|
-
}
|
|
47673
|
-
else {
|
|
47674
|
-
break;
|
|
47675
|
-
}
|
|
47676
|
-
} while (next);
|
|
47677
|
-
return result;
|
|
47678
|
-
};
|
|
47679
47673
|
/**
|
|
47680
47674
|
* Process input without parent box
|
|
47681
47675
|
*/
|
|
@@ -47701,6 +47695,28 @@ var wrapNodes = /** @class */ (function (_super) {
|
|
|
47701
47695
|
], wrapNodes.prototype, "preprocessInput", null);
|
|
47702
47696
|
return wrapNodes;
|
|
47703
47697
|
}(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */ .S));
|
|
47698
|
+
function checkAloneListLeaf(child, jodit) {
|
|
47699
|
+
var result = child;
|
|
47700
|
+
var next = child;
|
|
47701
|
+
do {
|
|
47702
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isElement(next) &&
|
|
47703
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isLeaf(next) &&
|
|
47704
|
+
!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isList(next.parentElement)) {
|
|
47705
|
+
var nextChild = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.findNotEmptySibling(next, false);
|
|
47706
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(result, 'ul')) {
|
|
47707
|
+
result.appendChild(next);
|
|
47708
|
+
}
|
|
47709
|
+
else {
|
|
47710
|
+
result = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.wrap(next, 'ul', jodit.createInside);
|
|
47711
|
+
}
|
|
47712
|
+
next = nextChild;
|
|
47713
|
+
}
|
|
47714
|
+
else {
|
|
47715
|
+
break;
|
|
47716
|
+
}
|
|
47717
|
+
} while (next);
|
|
47718
|
+
return result;
|
|
47719
|
+
}
|
|
47704
47720
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .pw.add('wrapNodes', wrapNodes);
|
|
47705
47721
|
|
|
47706
47722
|
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.88
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.0.0-beta.
|
|
11
|
+
* Version: v4.0.0-beta.88
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|