jodit 4.2.40 → 4.2.43
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 +52 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +118 -53
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +118 -53
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +1 -1
- 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 +118 -53
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +118 -53
- package/es2021.en/jodit.min.js +2 -2
- 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/164.fat.min.js +1 -1
- package/es5/164.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +119 -55
- 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/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/complete-url.d.ts +0 -3
- package/esm/core/helpers/utils/complete-url.js +1 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +7 -3
- package/esm/core/selection/style/api/extract.js +1 -0
- package/esm/jodit.d.ts +11 -1
- package/esm/jodit.js +11 -1
- package/esm/modules/history/snapshot.d.ts +1 -0
- package/esm/modules/history/snapshot.js +8 -1
- package/esm/modules/toolbar/button/button.js +18 -9
- package/esm/plugins/ai-assistant/langs/index.d.ts +3 -0
- package/esm/plugins/ai-assistant/langs/index.js +3 -0
- package/esm/plugins/clean-html/config.d.ts +9 -0
- package/esm/plugins/image-properties/readers/align.d.ts +3 -1
- package/esm/plugins/image-properties/readers/align.js +3 -1
- package/esm/plugins/image-properties/readers/index.d.ts +3 -0
- package/esm/plugins/image-properties/readers/link.d.ts +3 -0
- package/esm/plugins/image-properties/readers/margin.js +3 -0
- package/esm/plugins/image-properties/readers/size.js +3 -0
- package/esm/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
- package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
- package/esm/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
- package/esm/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
- package/esm/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
- package/esm/plugins/image-properties/utils/utils.js +3 -0
- package/esm/plugins/image-properties/writers/index.d.ts +3 -0
- package/esm/plugins/image-properties/writers/link.d.ts +3 -0
- package/esm/plugins/image-properties/writers/margin.d.ts +3 -0
- package/esm/plugins/image-properties/writers/size.js +3 -0
- package/esm/plugins/link/link.js +6 -2
- package/esm/plugins/symbols/config.js +6 -7
- package/esm/plugins/symbols/symbols.d.ts +1 -3
- package/esm/plugins/symbols/symbols.js +16 -11
- package/esm/plugins/video/config.d.ts +29 -0
- package/esm/plugins/video/config.js +26 -17
- package/esm/plugins/wrap-nodes/config.d.ts +5 -1
- package/esm/types/history.d.ts +3 -0
- package/package.json +1 -1
- package/types/core/helpers/utils/complete-url.d.ts +0 -3
- package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
- package/types/jodit.d.ts +11 -1
- package/types/modules/history/snapshot.d.ts +1 -0
- package/types/plugins/ai-assistant/langs/index.d.ts +3 -0
- package/types/plugins/clean-html/config.d.ts +9 -0
- package/types/plugins/image-properties/readers/align.d.ts +3 -1
- package/types/plugins/image-properties/readers/index.d.ts +3 -0
- package/types/plugins/image-properties/readers/link.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
- package/types/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
- package/types/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
- package/types/plugins/image-properties/writers/index.d.ts +3 -0
- package/types/plugins/image-properties/writers/link.d.ts +3 -0
- package/types/plugins/image-properties/writers/margin.d.ts +3 -0
- package/types/plugins/symbols/symbols.d.ts +1 -3
- package/types/plugins/video/config.d.ts +29 -0
- package/types/plugins/wrap-nodes/config.d.ts +5 -1
- package/types/types/history.d.ts +3 -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.2.
|
|
4
|
+
* Version: v4.2.43
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1838,7 +1838,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1838
1838
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1839
1839
|
*/
|
|
1840
1840
|
|
|
1841
|
-
var APP_VERSION = "4.2.
|
|
1841
|
+
var APP_VERSION = "4.2.43";
|
|
1842
1842
|
// prettier-ignore
|
|
1843
1843
|
var ES = "es5";
|
|
1844
1844
|
var IS_ES_MODERN = false;
|
|
@@ -7886,10 +7886,10 @@ var buildQuery = function (data, prefix) {
|
|
|
7886
7886
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7887
7887
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7888
7888
|
*/
|
|
7889
|
-
|
|
7890
7889
|
/**
|
|
7891
7890
|
* @module helpers/utils
|
|
7892
7891
|
*/
|
|
7892
|
+
|
|
7893
7893
|
var completeUrl = function (url) {
|
|
7894
7894
|
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7895
7895
|
url = 'https:' + url;
|
|
@@ -8028,13 +8028,13 @@ function ConfigFlatten(obj) {
|
|
|
8028
8028
|
/**
|
|
8029
8029
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
8030
8030
|
*/
|
|
8031
|
-
var convertMediaUrlToVideoEmbed = function (url,
|
|
8032
|
-
|
|
8033
|
-
if (height === void 0) { height = 345; }
|
|
8031
|
+
var convertMediaUrlToVideoEmbed = function (url, _a) {
|
|
8032
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.width, width = _c === void 0 ? 400 : _c, _d = _b.height, height = _d === void 0 ? 345 : _d;
|
|
8034
8033
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
8035
8034
|
return url;
|
|
8036
8035
|
}
|
|
8037
|
-
var parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
8036
|
+
var parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
8037
|
+
var pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
8038
8038
|
parser.href = url;
|
|
8039
8039
|
if (!width) {
|
|
8040
8040
|
width = 400;
|
|
@@ -8061,7 +8061,10 @@ var convertMediaUrlToVideoEmbed = function (url, width, height) {
|
|
|
8061
8061
|
case 'www.youtu.be': {
|
|
8062
8062
|
var query = parser.search
|
|
8063
8063
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
8064
|
-
: { v: parser.pathname.
|
|
8064
|
+
: { v: parser.pathname.substring(1) };
|
|
8065
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
8066
|
+
query.v = query.v.substring(6);
|
|
8067
|
+
}
|
|
8065
8068
|
return query.v
|
|
8066
8069
|
? '<iframe width="' +
|
|
8067
8070
|
width +
|
|
@@ -11848,6 +11851,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11848
11851
|
}
|
|
11849
11852
|
/**
|
|
11850
11853
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11854
|
+
* @private
|
|
11851
11855
|
*/
|
|
11852
11856
|
function extractAndMove(wrapper, range, left) {
|
|
11853
11857
|
var fragment = range.extractContents();
|
|
@@ -17281,7 +17285,17 @@ var Jodit = /** @class */ (function (_super) {
|
|
|
17281
17285
|
configurable: true
|
|
17282
17286
|
});
|
|
17283
17287
|
/**
|
|
17284
|
-
* Method wrap usual
|
|
17288
|
+
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
17289
|
+
* ```js
|
|
17290
|
+
* const editor = Jodit.make('#editor', {
|
|
17291
|
+
* controls: {
|
|
17292
|
+
* fontsize: {
|
|
17293
|
+
* list: Jodit.atom([8, 9, 10])
|
|
17294
|
+
* }
|
|
17295
|
+
* }
|
|
17296
|
+
* });
|
|
17297
|
+
* ```
|
|
17298
|
+
* In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
|
|
17285
17299
|
*/
|
|
17286
17300
|
Jodit.atom = function (object) {
|
|
17287
17301
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -22019,6 +22033,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22019
22033
|
function Snapshot() {
|
|
22020
22034
|
var _this = _super.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .zs)(arguments), false)) || this;
|
|
22021
22035
|
_this.__isBlocked = false;
|
|
22036
|
+
_this.__levelOfTransaction = 0;
|
|
22022
22037
|
return _this;
|
|
22023
22038
|
}
|
|
22024
22039
|
/** @override */
|
|
@@ -22104,6 +22119,7 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22104
22119
|
};
|
|
22105
22120
|
Snapshot.prototype.transaction = function (changes) {
|
|
22106
22121
|
this.__block(true);
|
|
22122
|
+
this.__levelOfTransaction += 1;
|
|
22107
22123
|
try {
|
|
22108
22124
|
changes();
|
|
22109
22125
|
}
|
|
@@ -22112,7 +22128,12 @@ var Snapshot = /** @class */ (function (_super) {
|
|
|
22112
22128
|
throw e;
|
|
22113
22129
|
}
|
|
22114
22130
|
}
|
|
22115
|
-
|
|
22131
|
+
finally {
|
|
22132
|
+
this.__levelOfTransaction -= 1;
|
|
22133
|
+
if (this.__levelOfTransaction === 0) {
|
|
22134
|
+
this.__block(false);
|
|
22135
|
+
}
|
|
22136
|
+
}
|
|
22116
22137
|
};
|
|
22117
22138
|
/**
|
|
22118
22139
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -24360,17 +24381,26 @@ var ToolbarButton = /** @class */ (function (_super) {
|
|
|
24360
24381
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
24361
24382
|
var popup = this.openPopup();
|
|
24362
24383
|
popup.parentElement = this;
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24384
|
+
try {
|
|
24385
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)("before-".concat(ctr.name, "-open-popup")), this.target, ctr, popup) !== false) {
|
|
24386
|
+
var target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
|
|
24387
|
+
var elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
24388
|
+
if (elm) {
|
|
24389
|
+
popup
|
|
24390
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
24391
|
+
.open(function () { return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(_this.container); }, false, this.j.o.allowTabNavigation
|
|
24392
|
+
? this.container
|
|
24393
|
+
: undefined);
|
|
24394
|
+
}
|
|
24395
|
+
else {
|
|
24396
|
+
this.__closePopup();
|
|
24397
|
+
}
|
|
24372
24398
|
}
|
|
24373
24399
|
}
|
|
24400
|
+
catch (e) {
|
|
24401
|
+
this.__closePopup();
|
|
24402
|
+
throw e;
|
|
24403
|
+
}
|
|
24374
24404
|
/**
|
|
24375
24405
|
* Fired after the popup was opened for some control button
|
|
24376
24406
|
*/
|
|
@@ -26842,6 +26872,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26842
26872
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
26843
26873
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
26844
26874
|
*/
|
|
26875
|
+
/**
|
|
26876
|
+
* @module plugins/ai-assistant
|
|
26877
|
+
*/
|
|
26845
26878
|
|
|
26846
26879
|
|
|
26847
26880
|
|
|
@@ -33010,7 +33043,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
33010
33043
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33011
33044
|
*/
|
|
33012
33045
|
|
|
33013
|
-
/**
|
|
33046
|
+
/**
|
|
33047
|
+
* @private
|
|
33048
|
+
*/
|
|
33014
33049
|
function readAlign(image, values) {
|
|
33015
33050
|
// Align
|
|
33016
33051
|
if (image.style.cssFloat &&
|
|
@@ -33138,6 +33173,9 @@ function readLink(state, j, values) {
|
|
|
33138
33173
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33139
33174
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33140
33175
|
*/
|
|
33176
|
+
/**
|
|
33177
|
+
* @module plugins/image-properties
|
|
33178
|
+
*/
|
|
33141
33179
|
|
|
33142
33180
|
/** @private */
|
|
33143
33181
|
function readMargins(image, values, state) {
|
|
@@ -33183,6 +33221,9 @@ function readMargins(image, values, state) {
|
|
|
33183
33221
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33184
33222
|
*/
|
|
33185
33223
|
|
|
33224
|
+
/**
|
|
33225
|
+
* @module plugins/image-properties
|
|
33226
|
+
*/
|
|
33186
33227
|
|
|
33187
33228
|
|
|
33188
33229
|
|
|
@@ -33967,6 +34008,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
33967
34008
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33968
34009
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33969
34010
|
*/
|
|
34011
|
+
/**
|
|
34012
|
+
* @module plugins/image-properties
|
|
34013
|
+
*/
|
|
33970
34014
|
|
|
33971
34015
|
|
|
33972
34016
|
/** @private */
|
|
@@ -34155,6 +34199,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
34155
34199
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
34156
34200
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
34157
34201
|
*/
|
|
34202
|
+
/**
|
|
34203
|
+
* @module plugins/image-properties
|
|
34204
|
+
*/
|
|
34158
34205
|
|
|
34159
34206
|
|
|
34160
34207
|
|
|
@@ -36355,13 +36402,17 @@ var link = /** @class */ (function (_super) {
|
|
|
36355
36402
|
}
|
|
36356
36403
|
};
|
|
36357
36404
|
link.prototype.onProcessPasteLink = function (ignore, html) {
|
|
36405
|
+
var _a, _b, _c, _d;
|
|
36358
36406
|
var jodit = this.jodit;
|
|
36359
36407
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
36360
36408
|
return;
|
|
36361
36409
|
}
|
|
36362
36410
|
jodit.e.stopPropagation('processPaste');
|
|
36363
36411
|
if (jodit.o.link.processVideoLink) {
|
|
36364
|
-
var embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
36412
|
+
var embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
36413
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
36414
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
36415
|
+
});
|
|
36365
36416
|
if (embed !== html) {
|
|
36366
36417
|
return jodit.createInside.fromHTML(embed);
|
|
36367
36418
|
}
|
|
@@ -43279,14 +43330,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
43279
43330
|
editor.e.on(container, 'close_dialog', close);
|
|
43280
43331
|
return box;
|
|
43281
43332
|
}
|
|
43282
|
-
|
|
43283
|
-
|
|
43284
|
-
|
|
43285
|
-
|
|
43286
|
-
|
|
43287
|
-
a && a.focus();
|
|
43288
|
-
}
|
|
43333
|
+
editor
|
|
43334
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
43335
|
+
.bindDestruct(editor);
|
|
43336
|
+
var a = container.querySelector('a');
|
|
43337
|
+
a && a.focus();
|
|
43289
43338
|
}
|
|
43339
|
+
return;
|
|
43290
43340
|
}
|
|
43291
43341
|
};
|
|
43292
43342
|
|
|
@@ -43806,25 +43856,28 @@ var symbols = /** @class */ (function (_super) {
|
|
|
43806
43856
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(symbols, _super);
|
|
43807
43857
|
function symbols(jodit) {
|
|
43808
43858
|
var _this = _super.call(this, jodit) || this;
|
|
43809
|
-
/** @override */
|
|
43810
43859
|
_this.buttons = [
|
|
43811
43860
|
{
|
|
43812
43861
|
name: 'symbols',
|
|
43813
43862
|
group: 'insert'
|
|
43814
43863
|
}
|
|
43815
43864
|
];
|
|
43816
|
-
_this.
|
|
43865
|
+
_this.__countInRow = 17;
|
|
43817
43866
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
43818
43867
|
return _this;
|
|
43819
43868
|
}
|
|
43820
|
-
/** @override */
|
|
43821
43869
|
symbols.prototype.afterInit = function (jodit) {
|
|
43822
43870
|
var _this = this;
|
|
43823
43871
|
jodit.e.on('generateSpecialCharactersTable.symbols', function () {
|
|
43824
|
-
var container = jodit.c.fromHTML("<div class=\"jodit-symbols__container\">\n\t\t\t\t\t\t<div class=\"jodit-symbols__container_table\">\n\t\t\t\t\t\t\t<table class=\"jodit-symbols__table\"><tbody></tbody></table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"jodit-symbols__container_preview\">\n\t\t\t\t\t\t\t<div class=\"jodit-symbols__preview\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>")
|
|
43872
|
+
var container = jodit.c.fromHTML("<div class=\"jodit-symbols__container\">\n\t\t\t\t\t\t<div class=\"jodit-symbols__container_table\">\n\t\t\t\t\t\t\t<table class=\"jodit-symbols__table\"><tbody></tbody></table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"jodit-symbols__container_preview\">\n\t\t\t\t\t\t\t<div class=\"jodit-symbols__preview\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>");
|
|
43873
|
+
var preview = container.querySelector('.jodit-symbols__preview');
|
|
43874
|
+
var table = container.querySelector('table');
|
|
43875
|
+
var body = table.tBodies[0];
|
|
43876
|
+
var chars = [];
|
|
43825
43877
|
for (var i = 0; i < jodit.o.specialCharacters.length;) {
|
|
43826
43878
|
var tr = jodit.c.element('tr');
|
|
43827
|
-
for (var j = 0; j < _this.
|
|
43879
|
+
for (var j = 0; j < _this.__countInRow &&
|
|
43880
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
43828
43881
|
var td = jodit.c.element('td'), a = jodit.c.fromHTML("<a\n\t\t\t\t\t\t\t\t\tdata-index=\"".concat(i, "\"\n\t\t\t\t\t\t\t\t\tdata-index-j=\"").concat(j, "\"\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t>").concat(jodit.o.specialCharacters[i], "</a>"));
|
|
43829
43882
|
chars.push(a);
|
|
43830
43883
|
td.appendChild(a);
|
|
@@ -43841,7 +43894,9 @@ var symbols = /** @class */ (function (_super) {
|
|
|
43841
43894
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
43842
43895
|
jodit.s.focus();
|
|
43843
43896
|
jodit.s.insertHTML(this.innerHTML);
|
|
43844
|
-
|
|
43897
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
43898
|
+
jodit.e.fire(this, 'close_dialog');
|
|
43899
|
+
}
|
|
43845
43900
|
e && e.preventDefault();
|
|
43846
43901
|
e && e.stopImmediatePropagation();
|
|
43847
43902
|
}
|
|
@@ -43861,18 +43916,18 @@ var symbols = /** @class */ (function (_super) {
|
|
|
43861
43916
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
43862
43917
|
newIndex =
|
|
43863
43918
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
43864
|
-
? index - self.
|
|
43865
|
-
: index + self.
|
|
43919
|
+
? index - self.__countInRow
|
|
43920
|
+
: index + self.__countInRow;
|
|
43866
43921
|
if (chars[newIndex] === undefined) {
|
|
43867
43922
|
newIndex =
|
|
43868
43923
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
43869
43924
|
? Math.floor(chars.length /
|
|
43870
|
-
self.
|
|
43871
|
-
self.
|
|
43925
|
+
self.__countInRow) *
|
|
43926
|
+
self.__countInRow +
|
|
43872
43927
|
jIndex
|
|
43873
43928
|
: jIndex;
|
|
43874
43929
|
if (newIndex > chars.length - 1) {
|
|
43875
|
-
newIndex -= self.
|
|
43930
|
+
newIndex -= self.__countInRow;
|
|
43876
43931
|
}
|
|
43877
43932
|
}
|
|
43878
43933
|
chars[newIndex] && chars[newIndex].focus();
|
|
@@ -44505,12 +44560,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
44505
44560
|
|
|
44506
44561
|
|
|
44507
44562
|
|
|
44563
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
44564
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
44565
|
+
defaultWidth: 400,
|
|
44566
|
+
defaultHeight: 345
|
|
44567
|
+
};
|
|
44508
44568
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
44509
44569
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
44510
|
-
popup: function (
|
|
44511
|
-
var formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
44512
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
44513
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
44570
|
+
popup: function (jodit, current, close) {
|
|
44571
|
+
var formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
44572
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
44573
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
44514
44574
|
name: 'url',
|
|
44515
44575
|
required: true,
|
|
44516
44576
|
label: 'URL',
|
|
@@ -44518,30 +44578,30 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
44518
44578
|
validators: ['url']
|
|
44519
44579
|
})
|
|
44520
44580
|
]),
|
|
44521
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
44522
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
44581
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
44582
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(function () {
|
|
44523
44583
|
return formLink.submit();
|
|
44524
44584
|
})
|
|
44525
44585
|
])
|
|
44526
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
44527
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
44528
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
44586
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
44587
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
44588
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
44529
44589
|
name: 'code',
|
|
44530
44590
|
required: true,
|
|
44531
44591
|
label: 'Embed code'
|
|
44532
44592
|
})
|
|
44533
44593
|
]),
|
|
44534
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
44535
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
44594
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
44595
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(function () {
|
|
44536
44596
|
return formCode.submit();
|
|
44537
44597
|
})
|
|
44538
44598
|
])
|
|
44539
44599
|
]), tabs = [], insertCode = function (code) {
|
|
44540
|
-
|
|
44541
|
-
|
|
44600
|
+
jodit.s.restore();
|
|
44601
|
+
jodit.s.insertHTML(code);
|
|
44542
44602
|
close();
|
|
44543
44603
|
};
|
|
44544
|
-
|
|
44604
|
+
jodit.s.save();
|
|
44545
44605
|
tabs.push({
|
|
44546
44606
|
icon: 'link',
|
|
44547
44607
|
name: 'Link',
|
|
@@ -44552,12 +44612,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
44552
44612
|
content: formCode.container
|
|
44553
44613
|
});
|
|
44554
44614
|
formLink.onSubmit(function (data) {
|
|
44555
|
-
|
|
44615
|
+
var _a, _b, _c, _d;
|
|
44616
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
44617
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
44618
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
44619
|
+
}));
|
|
44556
44620
|
});
|
|
44557
44621
|
formCode.onSubmit(function (data) {
|
|
44558
44622
|
insertCode(data.code);
|
|
44559
44623
|
});
|
|
44560
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
44624
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
44561
44625
|
},
|
|
44562
44626
|
tags: ['iframe'],
|
|
44563
44627
|
tooltip: 'Insert youtube/vimeo video'
|
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.2.
|
|
4
|
+
* Version: v4.2.43
|
|
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.2.
|
|
11
|
+
* Version: v4.2.43
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|