jodit 4.15.3 → 4.15.5
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 +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +90 -27
- package/es2015/jodit.min.js +6 -6
- 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 +4 -4
- package/es2018/jodit.min.js +6 -6
- 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 +89 -27
- package/es2021/jodit.min.js +6 -6
- 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 +89 -27
- package/es2021.en/jodit.min.js +11 -11
- 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 +118 -48
- 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/config.d.ts +9 -0
- package/esm/core/constants.js +1 -1
- package/esm/modules/file-browser/data-provider.d.ts +9 -0
- package/esm/modules/file-browser/data-provider.js +45 -3
- package/esm/plugins/clean-html/clean-html.d.ts +9 -0
- package/esm/plugins/clean-html/clean-html.js +27 -0
- package/esm/plugins/clean-html/config.d.ts +9 -0
- package/esm/plugins/clean-html/config.js +1 -0
- package/package.json +1 -1
- package/types/config.d.ts +9 -0
- package/types/modules/file-browser/data-provider.d.ts +9 -0
- package/types/plugins/clean-html/clean-html.d.ts +9 -0
- package/types/plugins/clean-html/config.d.ts +9 -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.15.
|
|
4
|
+
* Version: v4.15.5
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.15.
|
|
2110
|
+
var APP_VERSION = "4.15.5";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -24732,6 +24732,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.filebrowser
|
|
|
24732
24732
|
/* harmony export */ DEFAULT_SOURCE_NAME: function() { return /* binding */ DEFAULT_SOURCE_NAME; },
|
|
24733
24733
|
/* harmony export */ "default": function() { return /* binding */ DataProvider; }
|
|
24734
24734
|
/* harmony export */ });
|
|
24735
|
+
/* unused harmony export assertSourcesAnswer */
|
|
24735
24736
|
/* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49376);
|
|
24736
24737
|
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
24737
24738
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
@@ -24740,15 +24741,18 @@ jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.filebrowser
|
|
|
24740
24741
|
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15366);
|
|
24741
24742
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
|
|
24742
24743
|
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3233);
|
|
24743
|
-
/* harmony import */ var
|
|
24744
|
-
/* harmony import */ var
|
|
24745
|
-
/* harmony import */ var
|
|
24746
|
-
/* harmony import */ var
|
|
24747
|
-
/* harmony import */ var
|
|
24748
|
-
/* harmony import */ var
|
|
24749
|
-
/* harmony import */ var
|
|
24750
|
-
/* harmony import */ var
|
|
24751
|
-
/* harmony import */ var
|
|
24744
|
+
/* harmony import */ var _swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77384);
|
|
24745
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81937);
|
|
24746
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49574);
|
|
24747
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17312);
|
|
24748
|
+
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91565);
|
|
24749
|
+
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(62101);
|
|
24750
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(96340);
|
|
24751
|
+
/* harmony import */ var jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(77483);
|
|
24752
|
+
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33201);
|
|
24753
|
+
/* harmony import */ var jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(52144);
|
|
24754
|
+
/* harmony import */ var jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(17338);
|
|
24755
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(58664);
|
|
24752
24756
|
/*!
|
|
24753
24757
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
24754
24758
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -24772,6 +24776,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_8__.Config.prototype.controls.filebrowser
|
|
|
24772
24776
|
|
|
24773
24777
|
|
|
24774
24778
|
|
|
24779
|
+
|
|
24780
|
+
|
|
24781
|
+
|
|
24775
24782
|
var DEFAULT_SOURCE_NAME = 'default';
|
|
24776
24783
|
var possibleRules = new Set([
|
|
24777
24784
|
'allowFiles',
|
|
@@ -24788,6 +24795,38 @@ var possibleRules = new Set([
|
|
|
24788
24795
|
'allowImageResize',
|
|
24789
24796
|
'allowImageCrop'
|
|
24790
24797
|
]);
|
|
24798
|
+
var DOCS_URL = 'https://xdsoft.net/jodit/docs/modules/file_browser.html';
|
|
24799
|
+
/**
|
|
24800
|
+
* Validate the connector answer for the `files` / `folders` actions and
|
|
24801
|
+
* normalise it. A hand-written backend that returns the wrong shape used to
|
|
24802
|
+
* crash deep inside the UI with a bare `TypeError: ... reading 'forEach'`;
|
|
24803
|
+
* now it fails right here with a message that names the action, the option
|
|
24804
|
+
* and the missing field. Missing `files` / `folders` lists are treated as
|
|
24805
|
+
* empty instead of throwing.
|
|
24806
|
+
*/ function assertSourcesAnswer(resp, action, option) {
|
|
24807
|
+
var fail = function fail(what) {
|
|
24808
|
+
throw new Error('File browser: the connector answer for action "'.concat(action, '" (option "filebrowser.').concat(option, '") ').concat(what, ". See ").concat(DOCS_URL));
|
|
24809
|
+
};
|
|
24810
|
+
if (!(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_13__.isPlainObject)(resp) || !(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_13__.isPlainObject)(resp.data)) {
|
|
24811
|
+
return fail('has no "data" object');
|
|
24812
|
+
}
|
|
24813
|
+
var sources = resp.data.sources;
|
|
24814
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_11__.isArray)(sources)) {
|
|
24815
|
+
return fail(sources === undefined ? 'has no "data.sources" array' : 'must contain "data.sources" as an array of sources, got '.concat((0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_13__.isPlainObject)(sources) ? 'an object keyed by source name' : typeof sources === "undefined" ? "undefined" : (0,_swc_helpers_type_of__WEBPACK_IMPORTED_MODULE_8__._)(sources)));
|
|
24816
|
+
}
|
|
24817
|
+
sources.forEach(function(source, index) {
|
|
24818
|
+
if (!(0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_13__.isPlainObject)(source)) {
|
|
24819
|
+
return fail('has a non-object entry at "data.sources['.concat(index, ']"'));
|
|
24820
|
+
}
|
|
24821
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_11__.isArray)(source.files)) {
|
|
24822
|
+
source.files = [];
|
|
24823
|
+
}
|
|
24824
|
+
if (!(0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_11__.isArray)(source.folders)) {
|
|
24825
|
+
source.folders = [];
|
|
24826
|
+
}
|
|
24827
|
+
});
|
|
24828
|
+
return resp;
|
|
24829
|
+
}
|
|
24791
24830
|
var DataProvider = /*#__PURE__*/ function() {
|
|
24792
24831
|
"use strict";
|
|
24793
24832
|
function DataProvider(parent, options) {
|
|
@@ -24822,13 +24861,13 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
24822
24861
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
24823
24862
|
instances.delete(name);
|
|
24824
24863
|
}
|
|
24825
|
-
var opts = (0,
|
|
24864
|
+
var opts = (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)({
|
|
24826
24865
|
onProgress: this.progressHandler
|
|
24827
24866
|
}, this.o.ajax));
|
|
24828
24867
|
if (opts.prepareData) {
|
|
24829
24868
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
24830
24869
|
}
|
|
24831
|
-
var ajax1 = new
|
|
24870
|
+
var ajax1 = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_18__.Ajax(opts);
|
|
24832
24871
|
instances.set(name, ajax1);
|
|
24833
24872
|
var promise = ajax1.send();
|
|
24834
24873
|
promise.finally(function() {
|
|
@@ -24876,15 +24915,18 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
24876
24915
|
2,
|
|
24877
24916
|
this.get('permissions').then(function(resp) {
|
|
24878
24917
|
if (_this.parent.isInDestruct) {
|
|
24879
|
-
throw (0,
|
|
24918
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.abort)();
|
|
24880
24919
|
}
|
|
24881
24920
|
var process = _this.o.permissions.process;
|
|
24882
24921
|
if (!process) {
|
|
24883
24922
|
process = _this.o.ajax.process;
|
|
24884
24923
|
}
|
|
24885
24924
|
if (process) {
|
|
24925
|
+
var _respData_data;
|
|
24886
24926
|
var respData = process.call(self, resp);
|
|
24887
|
-
|
|
24927
|
+
// The permissions answer is optional and may come back without
|
|
24928
|
+
// a `data` object at all from a minimal backend.
|
|
24929
|
+
if (respData === null || respData === void 0 ? void 0 : (_respData_data = respData.data) === null || _respData_data === void 0 ? void 0 : _respData_data.permissions) {
|
|
24888
24930
|
_this.parent.events.fire(_this, 'changePermissions', _this.__currentPermissions, respData.data.permissions);
|
|
24889
24931
|
_this.__currentPermissions = respData.data.permissions;
|
|
24890
24932
|
}
|
|
@@ -24905,9 +24947,9 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
24905
24947
|
key: "canI",
|
|
24906
24948
|
value: function canI(action) {
|
|
24907
24949
|
var rule = 'allow' + action;
|
|
24908
|
-
if (!
|
|
24950
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_9__.IS_PROD) {
|
|
24909
24951
|
if (!possibleRules.has(rule)) {
|
|
24910
|
-
throw (0,
|
|
24952
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)('Wrong action ' + action);
|
|
24911
24953
|
}
|
|
24912
24954
|
}
|
|
24913
24955
|
var presetValue = this.o.permissionsPresets[rule];
|
|
@@ -24936,7 +24978,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
24936
24978
|
if (process) {
|
|
24937
24979
|
resp = process.call(self, resp);
|
|
24938
24980
|
}
|
|
24939
|
-
return onResult(resp);
|
|
24981
|
+
return onResult(assertSourcesAnswer(resp, 'files', 'items'));
|
|
24940
24982
|
});
|
|
24941
24983
|
}
|
|
24942
24984
|
},
|
|
@@ -24988,14 +25030,14 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
24988
25030
|
sources.forEach(function(source) {
|
|
24989
25031
|
if (source.files && source.files.length) {
|
|
24990
25032
|
var sort = _this.o.sort;
|
|
24991
|
-
if ((0,
|
|
25033
|
+
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_12__.isFunction)(sort) && mods.sortBy) {
|
|
24992
25034
|
source.files.sort(function(a, b) {
|
|
24993
25035
|
return sort(a, b, mods.sortBy);
|
|
24994
25036
|
});
|
|
24995
25037
|
}
|
|
24996
25038
|
source.files.forEach(function(item) {
|
|
24997
25039
|
if (inFilter(item) && canBeFile(item)) {
|
|
24998
|
-
elements.push(
|
|
25040
|
+
elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_19__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_5__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_4__._)({}, item), {
|
|
24999
25041
|
sourceName: source.name,
|
|
25000
25042
|
source: source
|
|
25001
25043
|
})));
|
|
@@ -25015,7 +25057,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25015
25057
|
switch(_state.label){
|
|
25016
25058
|
case 0:
|
|
25017
25059
|
_this = this;
|
|
25018
|
-
path = (0,
|
|
25060
|
+
path = (0,jodit_core_helpers_normalize_normalize_relative_path__WEBPACK_IMPORTED_MODULE_14__.normalizeRelativePath)(path);
|
|
25019
25061
|
if (!this.o.folder) {
|
|
25020
25062
|
return [
|
|
25021
25063
|
2,
|
|
@@ -25040,7 +25082,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25040
25082
|
if (process) {
|
|
25041
25083
|
resp = process.call(self, resp);
|
|
25042
25084
|
}
|
|
25043
|
-
return resp.data.sources;
|
|
25085
|
+
return assertSourcesAnswer(resp, 'folders', 'folder').data.sources;
|
|
25044
25086
|
})
|
|
25045
25087
|
];
|
|
25046
25088
|
}
|
|
@@ -25054,12 +25096,12 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25054
25096
|
* Get path by url. You can use this method in another modules
|
|
25055
25097
|
*/ function getPathByUrl(url) {
|
|
25056
25098
|
var _this = this;
|
|
25057
|
-
(0,
|
|
25099
|
+
(0,jodit_core_helpers_utils_set__WEBPACK_IMPORTED_MODULE_17__.set)('options.getLocalFileByUrl.data.url', url, this);
|
|
25058
25100
|
return this.get('getLocalFileByUrl').then(function(resp) {
|
|
25059
25101
|
if (_this.isSuccess(resp)) {
|
|
25060
25102
|
return resp.data;
|
|
25061
25103
|
}
|
|
25062
|
-
throw (0,
|
|
25104
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)(_this.getMessage(resp));
|
|
25063
25105
|
});
|
|
25064
25106
|
}
|
|
25065
25107
|
},
|
|
@@ -25075,7 +25117,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25075
25117
|
var _this = this;
|
|
25076
25118
|
var create = this.o.create;
|
|
25077
25119
|
if (!create) {
|
|
25078
|
-
throw (0,
|
|
25120
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)('Set Create api options');
|
|
25079
25121
|
}
|
|
25080
25122
|
create.data.source = source;
|
|
25081
25123
|
create.data.path = path;
|
|
@@ -25084,7 +25126,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25084
25126
|
if (_this.isSuccess(resp)) {
|
|
25085
25127
|
return true;
|
|
25086
25128
|
}
|
|
25087
|
-
throw (0,
|
|
25129
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)(_this.getMessage(resp));
|
|
25088
25130
|
});
|
|
25089
25131
|
}
|
|
25090
25132
|
},
|
|
@@ -25100,7 +25142,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25100
25142
|
var mode = isFile ? 'fileMove' : 'folderMove';
|
|
25101
25143
|
var option = this.options[mode];
|
|
25102
25144
|
if (!option) {
|
|
25103
|
-
throw (0,
|
|
25145
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)('Set Move api options');
|
|
25104
25146
|
}
|
|
25105
25147
|
option.data.from = filepath;
|
|
25106
25148
|
option.data.path = path;
|
|
@@ -25109,7 +25151,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25109
25151
|
if (_this.isSuccess(resp)) {
|
|
25110
25152
|
return true;
|
|
25111
25153
|
}
|
|
25112
|
-
throw (0,
|
|
25154
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)(_this.getMessage(resp));
|
|
25113
25155
|
});
|
|
25114
25156
|
}
|
|
25115
25157
|
},
|
|
@@ -25125,7 +25167,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25125
25167
|
var _this = this;
|
|
25126
25168
|
var fr = this.o[action];
|
|
25127
25169
|
if (!fr) {
|
|
25128
|
-
throw (0,
|
|
25170
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)('Set "'.concat(action, '" api options'));
|
|
25129
25171
|
}
|
|
25130
25172
|
fr.data.path = path;
|
|
25131
25173
|
fr.data.name = file;
|
|
@@ -25175,7 +25217,7 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25175
25217
|
var _this = this;
|
|
25176
25218
|
var fr = this.o[action];
|
|
25177
25219
|
if (!fr) {
|
|
25178
|
-
throw (0,
|
|
25220
|
+
throw (0,jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_16__.error)('Set "'.concat(action, '" api options'));
|
|
25179
25221
|
}
|
|
25180
25222
|
fr.data.path = path;
|
|
25181
25223
|
fr.data.name = name;
|
|
@@ -25273,58 +25315,58 @@ var DataProvider = /*#__PURE__*/ function() {
|
|
|
25273
25315
|
}();
|
|
25274
25316
|
|
|
25275
25317
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25276
|
-
|
|
25318
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25277
25319
|
], DataProvider.prototype, "onProgress", null);
|
|
25278
25320
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25279
|
-
|
|
25321
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25280
25322
|
], DataProvider.prototype, "permissions", null);
|
|
25281
25323
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25282
|
-
|
|
25324
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25283
25325
|
], DataProvider.prototype, "canI", null);
|
|
25284
25326
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25285
|
-
|
|
25327
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25286
25328
|
], DataProvider.prototype, "items", null);
|
|
25287
25329
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25288
|
-
|
|
25330
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25289
25331
|
], DataProvider.prototype, "itemsEx", null);
|
|
25290
25332
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25291
|
-
|
|
25333
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25292
25334
|
], DataProvider.prototype, "tree", null);
|
|
25293
25335
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25294
|
-
|
|
25336
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25295
25337
|
], DataProvider.prototype, "getPathByUrl", null);
|
|
25296
25338
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25297
|
-
|
|
25339
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25298
25340
|
], DataProvider.prototype, "createFolder", null);
|
|
25299
25341
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25300
|
-
|
|
25342
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25301
25343
|
], DataProvider.prototype, "move", null);
|
|
25302
25344
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25303
|
-
|
|
25345
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25304
25346
|
], DataProvider.prototype, "fileRemove", null);
|
|
25305
25347
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25306
|
-
|
|
25348
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25307
25349
|
], DataProvider.prototype, "folderRemove", null);
|
|
25308
25350
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25309
|
-
|
|
25351
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25310
25352
|
], DataProvider.prototype, "folderRename", null);
|
|
25311
25353
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25312
|
-
|
|
25354
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25313
25355
|
], DataProvider.prototype, "fileRename", null);
|
|
25314
25356
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25315
|
-
|
|
25357
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25316
25358
|
], DataProvider.prototype, "crop", null);
|
|
25317
25359
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25318
|
-
|
|
25360
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25319
25361
|
], DataProvider.prototype, "resize", null);
|
|
25320
25362
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25321
|
-
|
|
25363
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25322
25364
|
], DataProvider.prototype, "getMessage", null);
|
|
25323
25365
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25324
|
-
|
|
25366
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25325
25367
|
], DataProvider.prototype, "isSuccess", null);
|
|
25326
25368
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
|
|
25327
|
-
|
|
25369
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
25328
25370
|
], DataProvider.prototype, "destruct", null);
|
|
25329
25371
|
|
|
25330
25372
|
|
|
@@ -34155,6 +34197,7 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__.Icon.set('class-span', (_class_
|
|
|
34155
34197
|
* `<p><br></p>` left after deleting all content) to an empty string —
|
|
34156
34198
|
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
34157
34199
|
*/ function onAfterGetValueFromEditor(data) {
|
|
34200
|
+
this.__singleQuotesInFontFamily(data);
|
|
34158
34201
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
34159
34202
|
return;
|
|
34160
34203
|
}
|
|
@@ -34163,6 +34206,32 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__.Icon.set('class-span', (_class_
|
|
|
34163
34206
|
}
|
|
34164
34207
|
}
|
|
34165
34208
|
},
|
|
34209
|
+
{
|
|
34210
|
+
key: "__singleQuotesInFontFamily",
|
|
34211
|
+
value: /**
|
|
34212
|
+
* Rewrite double-quoted font names inside `style` attributes with single
|
|
34213
|
+
* quotes. The DOM always serialises them as `"…"`, and back ends
|
|
34214
|
+
* that HTML-decode the value before storing it then produce
|
|
34215
|
+
* `style="font-family: "Open Sans", …"` — broken markup. Single quotes
|
|
34216
|
+
* survive that round trip. Names that already contain an apostrophe are
|
|
34217
|
+
* left alone.
|
|
34218
|
+
*/ function __singleQuotesInFontFamily(data) {
|
|
34219
|
+
if (!this.j.o.cleanHTML.singleQuotesInFontFamily || !data.value.includes('"')) {
|
|
34220
|
+
return;
|
|
34221
|
+
}
|
|
34222
|
+
data.value = data.value.replace(/\sstyle="([^"]*)"/gi, function(attribute, css) {
|
|
34223
|
+
if (!css.includes('"') || !/font-family/i.test(css)) {
|
|
34224
|
+
return attribute;
|
|
34225
|
+
}
|
|
34226
|
+
var normalized = css.replace(// `"` itself ends with `;`, so the entity has to be
|
|
34227
|
+
// consumed as a unit or the declaration stops inside it.
|
|
34228
|
+
/font-family\s*:(?:"|[^;])*/gi, function(declaration) {
|
|
34229
|
+
return declaration.includes("'") ? declaration : declaration.replace(/"/g, "'");
|
|
34230
|
+
});
|
|
34231
|
+
return attribute.replace(css, normalized);
|
|
34232
|
+
});
|
|
34233
|
+
}
|
|
34234
|
+
},
|
|
34166
34235
|
{
|
|
34167
34236
|
key: "onSafeHTML",
|
|
34168
34237
|
value: function onSafeHTML(sandBox) {
|
|
@@ -34233,6 +34302,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
34233
34302
|
removeEmptyElements: true,
|
|
34234
34303
|
fillEmptyParagraph: true,
|
|
34235
34304
|
collapseEmptyValueToEmptyString: false,
|
|
34305
|
+
singleQuotesInFontFamily: true,
|
|
34236
34306
|
replaceNBSP: true,
|
|
34237
34307
|
replaceOldTags: {
|
|
34238
34308
|
i: 'em',
|
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.15.
|
|
4
|
+
* Version: v4.15.5
|
|
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.15.
|
|
11
|
+
* Version: v4.15.5
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|