jodit 4.15.4 → 4.15.6
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 +34 -2
- 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 +34 -2
- 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 +34 -2
- 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 +39 -2
- 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/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/esm/plugins/link/link.js +9 -0
- package/package.json +1 -1
- package/types/config.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.6
|
|
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.6";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -34197,6 +34197,7 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__.Icon.set('class-span', (_class_
|
|
|
34197
34197
|
* `<p><br></p>` left after deleting all content) to an empty string —
|
|
34198
34198
|
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
34199
34199
|
*/ function onAfterGetValueFromEditor(data) {
|
|
34200
|
+
this.__singleQuotesInFontFamily(data);
|
|
34200
34201
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
34201
34202
|
return;
|
|
34202
34203
|
}
|
|
@@ -34205,6 +34206,32 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_10__.Icon.set('class-span', (_class_
|
|
|
34205
34206
|
}
|
|
34206
34207
|
}
|
|
34207
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
|
+
},
|
|
34208
34235
|
{
|
|
34209
34236
|
key: "onSafeHTML",
|
|
34210
34237
|
value: function onSafeHTML(sandBox) {
|
|
@@ -34275,6 +34302,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
34275
34302
|
removeEmptyElements: true,
|
|
34276
34303
|
fillEmptyParagraph: true,
|
|
34277
34304
|
collapseEmptyValueToEmptyString: false,
|
|
34305
|
+
singleQuotesInFontFamily: true,
|
|
34278
34306
|
replaceNBSP: true,
|
|
34279
34307
|
replaceOldTags: {
|
|
34280
34308
|
i: 'em',
|
|
@@ -43633,6 +43661,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
43633
43661
|
jodit.history.snapshot.restore(snapshot);
|
|
43634
43662
|
var textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
43635
43663
|
var ci = jodit.createInside;
|
|
43664
|
+
var caretAfter = null;
|
|
43636
43665
|
if (!_$link || !jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(jodit.editor, _$link)) {
|
|
43637
43666
|
if (!jodit.s.isCollapsed()) {
|
|
43638
43667
|
var node = jodit.s.current();
|
|
@@ -43649,6 +43678,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
43649
43678
|
links = [
|
|
43650
43679
|
a
|
|
43651
43680
|
];
|
|
43681
|
+
caretAfter = a;
|
|
43652
43682
|
}
|
|
43653
43683
|
links.forEach(function(link) {
|
|
43654
43684
|
return jodit.s.select(link);
|
|
@@ -43683,6 +43713,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
43683
43713
|
}
|
|
43684
43714
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
43685
43715
|
});
|
|
43716
|
+
// A brand-new link inserted at a collapsed caret used to stay
|
|
43717
|
+
// *selected*. Safari does not paint that selection, so the next
|
|
43718
|
+
// Enter silently replaced the link instead of starting a new line.
|
|
43719
|
+
// Put the caret right after the link instead.
|
|
43720
|
+
if (caretAfter) {
|
|
43721
|
+
jodit.s.setCursorAfter(caretAfter);
|
|
43722
|
+
}
|
|
43686
43723
|
jodit.synchronizeValues();
|
|
43687
43724
|
close();
|
|
43688
43725
|
return false;
|
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.6
|
|
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.6
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|