jodit-pro 2.0.0-beta.18 → 2.0.0-beta.21
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +85 -58
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +85 -58
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/autocomplete/autocomplete.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.css +1 -1
- package/es2018/plugins/backup/backup.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.css +1 -1
- package/es2018/plugins/button-generator/button-generator.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.css +1 -1
- package/es2018/plugins/color-picker/color-picker.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.css +1 -1
- package/es2018/plugins/emoji/emoji.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.css +1 -1
- package/es2018/plugins/finder/finder.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.css +1 -1
- package/es2018/plugins/google-maps/google-maps.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.css +1 -1
- package/es2018/plugins/keyboard/keyboard.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.css +1 -1
- package/es2018/plugins/paste-code/paste-code.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.css +1 -1
- package/es2018/plugins/todo-list/todo-list.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.css +1 -1
- package/es2018/plugins/translate/translate.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.css +1 -1
- package/es2018/plugins/tune-block/tune-block.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +85 -57
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.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 +85 -57
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +90 -59
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/package.json +1 -1
package/es2021.en/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
-
* Version: v2.0.0-beta.
|
|
4
|
+
* Version: v2.0.0-beta.21
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -2269,7 +2269,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2269
2269
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2270
2270
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2271
2271
|
*/
|
|
2272
|
-
const APP_VERSION = "2.0.0-beta.
|
|
2272
|
+
const APP_VERSION = "2.0.0-beta.21";
|
|
2273
2273
|
// eslint-disable-next-line prettier/prettier
|
|
2274
2274
|
const ES = "es2021";
|
|
2275
2275
|
const IS_ES_MODERN = true;
|
|
@@ -3848,8 +3848,15 @@ class Dom {
|
|
|
3848
3848
|
static safeInsertNode(range, node) {
|
|
3849
3849
|
range.collapsed || range.deleteContents();
|
|
3850
3850
|
const child = Dom.isFragment(node) ? node.lastChild : node;
|
|
3851
|
-
range.
|
|
3852
|
-
|
|
3851
|
+
if (range.startContainer === range.endContainer &&
|
|
3852
|
+
range.collapsed &&
|
|
3853
|
+
Dom.isTag(range.startContainer, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
3854
|
+
Dom.after(range.startContainer, node);
|
|
3855
|
+
}
|
|
3856
|
+
else {
|
|
3857
|
+
range.insertNode(node);
|
|
3858
|
+
child && range.setStartBefore(child);
|
|
3859
|
+
}
|
|
3853
3860
|
range.collapse(true);
|
|
3854
3861
|
// https://developer.mozilla.org/en-US/docs/Web/API/Range/insertNode
|
|
3855
3862
|
// if the new node is to be added to a text Node, that Node is split at the
|
|
@@ -9125,25 +9132,29 @@ function reset(key) {
|
|
|
9125
9132
|
/**
|
|
9126
9133
|
* @module helpers/utils
|
|
9127
9134
|
*/
|
|
9128
|
-
|
|
9135
|
+
/**
|
|
9136
|
+
* Check if element is in view
|
|
9137
|
+
*/
|
|
9138
|
+
function inView(elm, root, doc) {
|
|
9129
9139
|
let rect = elm.getBoundingClientRect(), el = elm;
|
|
9130
9140
|
const top = rect.top, height = rect.height;
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
return false;
|
|
9137
|
-
}
|
|
9138
|
-
// Check if the element is out of view due to a container scrolling
|
|
9139
|
-
if (top + height <= rect.top) {
|
|
9140
|
-
return false;
|
|
9141
|
-
}
|
|
9141
|
+
while (el && el !== root && el.parentNode) {
|
|
9142
|
+
el = el.parentNode;
|
|
9143
|
+
rect = el.getBoundingClientRect();
|
|
9144
|
+
if (!(top <= rect.bottom)) {
|
|
9145
|
+
return false;
|
|
9142
9146
|
}
|
|
9143
|
-
|
|
9144
|
-
|
|
9147
|
+
// Check if the element is out of view due to a container scrolling
|
|
9148
|
+
if (top + height <= rect.top) {
|
|
9149
|
+
return false;
|
|
9150
|
+
}
|
|
9151
|
+
}
|
|
9152
|
+
// Check it's within the document viewport
|
|
9145
9153
|
return (top <= ((doc.documentElement && doc.documentElement.clientHeight) || 0));
|
|
9146
|
-
}
|
|
9154
|
+
}
|
|
9155
|
+
/**
|
|
9156
|
+
* Scroll element into view if it is not in view
|
|
9157
|
+
*/
|
|
9147
9158
|
function scrollIntoViewIfNeeded(elm, root, doc) {
|
|
9148
9159
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.isHTMLElement */ .i.isHTMLElement(elm) && !inView(elm, root, doc)) {
|
|
9149
9160
|
if (root.clientHeight !== root.scrollHeight) {
|
|
@@ -10669,14 +10680,14 @@ class Selection {
|
|
|
10669
10680
|
const left = range.cloneRange();
|
|
10670
10681
|
left.collapse(true);
|
|
10671
10682
|
const fakeLeft = this.j.createInside.fake();
|
|
10672
|
-
|
|
10683
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.safeInsertNode */ .i.safeInsertNode(left, fakeLeft);
|
|
10673
10684
|
range.setStartBefore(fakeLeft);
|
|
10674
10685
|
const result = [fakeLeft];
|
|
10675
10686
|
if (!range.collapsed) {
|
|
10676
10687
|
const right = range.cloneRange();
|
|
10677
10688
|
right.collapse(false);
|
|
10678
10689
|
const fakeRight = this.j.createInside.fake();
|
|
10679
|
-
|
|
10690
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.safeInsertNode */ .i.safeInsertNode(right, fakeRight);
|
|
10680
10691
|
range.setEndAfter(fakeRight);
|
|
10681
10692
|
result.push(fakeRight);
|
|
10682
10693
|
}
|
|
@@ -10900,13 +10911,7 @@ class Selection {
|
|
|
10900
10911
|
if (sel && sel.rangeCount) {
|
|
10901
10912
|
const range = sel.getRangeAt(0);
|
|
10902
10913
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.isOrContains */ .i.isOrContains(this.area, range.commonAncestorContainer)) {
|
|
10903
|
-
|
|
10904
|
-
range.collapsed) {
|
|
10905
|
-
range.startContainer.parentNode?.insertBefore(node, range.startContainer);
|
|
10906
|
-
}
|
|
10907
|
-
else {
|
|
10908
|
-
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.safeInsertNode */ .i.safeInsertNode(range, node);
|
|
10909
|
-
}
|
|
10914
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.safeInsertNode */ .i.safeInsertNode(range, node);
|
|
10910
10915
|
}
|
|
10911
10916
|
else {
|
|
10912
10917
|
this.area.appendChild(node);
|
|
@@ -10915,14 +10920,26 @@ class Selection {
|
|
|
10915
10920
|
else {
|
|
10916
10921
|
this.area.appendChild(node);
|
|
10917
10922
|
}
|
|
10923
|
+
const setCursor = (node) => {
|
|
10924
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.isBlock */ .i.isBlock(node)) {
|
|
10925
|
+
const child = node.lastChild;
|
|
10926
|
+
if (child) {
|
|
10927
|
+
return setCursor(child);
|
|
10928
|
+
}
|
|
10929
|
+
}
|
|
10930
|
+
this.setCursorAfter(node);
|
|
10931
|
+
};
|
|
10918
10932
|
if (insertCursorAfter) {
|
|
10919
10933
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom.isFragment */ .i.isFragment(node)) {
|
|
10920
|
-
child &&
|
|
10934
|
+
child && setCursor(child);
|
|
10921
10935
|
}
|
|
10922
10936
|
else {
|
|
10923
|
-
|
|
10937
|
+
setCursor(node);
|
|
10924
10938
|
}
|
|
10925
10939
|
}
|
|
10940
|
+
if (this.j.o.scrollToPastedContent) {
|
|
10941
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(child ?? node, this.j.editor, this.doc);
|
|
10942
|
+
}
|
|
10926
10943
|
});
|
|
10927
10944
|
if (fireChange && this.j.events) {
|
|
10928
10945
|
this.j.__imdSynchronizeValues();
|
|
@@ -15642,6 +15659,13 @@ Icon.__cache = new Map();
|
|
|
15642
15659
|
|
|
15643
15660
|
|
|
15644
15661
|
|
|
15662
|
+
const EVENTS_FOR_AUTOCLOSE = [
|
|
15663
|
+
'escape',
|
|
15664
|
+
'cut',
|
|
15665
|
+
'delete',
|
|
15666
|
+
'backSpaceAfterDelete',
|
|
15667
|
+
'beforeCommandDelete'
|
|
15668
|
+
];
|
|
15645
15669
|
class Popup extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_3__/* .UIElement */ .u {
|
|
15646
15670
|
/** @override */
|
|
15647
15671
|
className() {
|
|
@@ -15880,7 +15904,7 @@ class Popup extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_3__/* .UIElem
|
|
|
15880
15904
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_6__/* .eventEmitter.on */ .TB.on('closeAllPopups', this.close);
|
|
15881
15905
|
if (this.smart) {
|
|
15882
15906
|
this.j.e
|
|
15883
|
-
.on(
|
|
15907
|
+
.on(EVENTS_FOR_AUTOCLOSE, this.close)
|
|
15884
15908
|
.on('mousedown touchstart', this.closeOnOutsideClick)
|
|
15885
15909
|
.on(ow, 'mousedown touchstart', this.closeOnOutsideClick);
|
|
15886
15910
|
}
|
|
@@ -15899,7 +15923,7 @@ class Popup extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_3__/* .UIElem
|
|
|
15899
15923
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_6__/* .eventEmitter.off */ .TB.off('closeAllPopups', this.close);
|
|
15900
15924
|
if (this.smart) {
|
|
15901
15925
|
this.j.e
|
|
15902
|
-
.off(
|
|
15926
|
+
.off(EVENTS_FOR_AUTOCLOSE, this.close)
|
|
15903
15927
|
.off('mousedown touchstart', this.closeOnOutsideClick)
|
|
15904
15928
|
.off(ow, 'mousedown touchstart', this.closeOnOutsideClick);
|
|
15905
15929
|
}
|
|
@@ -17089,7 +17113,10 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17089
17113
|
* })
|
|
17090
17114
|
* ```
|
|
17091
17115
|
*/
|
|
17092
|
-
result = this.e.fire(
|
|
17116
|
+
result = this.e.fire(`beforeCommand${(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.ucfirst)(command)}`, showUI, value, ...args);
|
|
17117
|
+
if (result !== false) {
|
|
17118
|
+
result = this.e.fire('beforeCommand', command, showUI, value, ...args);
|
|
17119
|
+
}
|
|
17093
17120
|
if (result !== false) {
|
|
17094
17121
|
result = this.__execCustomCommands(command, showUI, value, ...args);
|
|
17095
17122
|
}
|
|
@@ -32029,7 +32056,7 @@ class inlinePopup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plug
|
|
|
32029
32056
|
* Hide opened popup
|
|
32030
32057
|
*/
|
|
32031
32058
|
hidePopup(type) {
|
|
32032
|
-
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(type) || type === this.type) {
|
|
32059
|
+
if (this.popup.isOpened && (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(type) || type === this.type)) {
|
|
32033
32060
|
this.popup.close();
|
|
32034
32061
|
}
|
|
32035
32062
|
}
|
|
@@ -32192,7 +32219,7 @@ inlinePopup.requires = ['select'];
|
|
|
32192
32219
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.wait)((ctx) => !ctx.j.isLocked)
|
|
32193
32220
|
], inlinePopup.prototype, "showPopup", null);
|
|
32194
32221
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
32195
|
-
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.watch)(':clickEditor'),
|
|
32222
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.watch)([':clickEditor', ':beforeCommandDelete', ':backSpaceAfterDelete']),
|
|
32196
32223
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.autobind
|
|
32197
32224
|
], inlinePopup.prototype, "hidePopup", null);
|
|
32198
32225
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
@@ -33863,6 +33890,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_5__/* .pluginSystem.add */ .pw.add('p
|
|
|
33863
33890
|
|
|
33864
33891
|
jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.askBeforePasteHTML = true;
|
|
33865
33892
|
jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.processPasteHTML = true;
|
|
33893
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.scrollToPastedContent = true;
|
|
33866
33894
|
jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.pasteHTMLActionList = [
|
|
33867
33895
|
{ value: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML, text: 'Keep' },
|
|
33868
33896
|
{ value: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_TEXT, text: 'Insert as Text' },
|
|
@@ -34164,7 +34192,7 @@ class paste extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plu
|
|
|
34164
34192
|
text = result;
|
|
34165
34193
|
}
|
|
34166
34194
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(text) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom.isNode */ .i.isNode(text)) {
|
|
34167
|
-
this.
|
|
34195
|
+
this.__insertByType(e, text, this.j.o.defaultActionOnPaste);
|
|
34168
34196
|
}
|
|
34169
34197
|
e.preventDefault();
|
|
34170
34198
|
e.stopPropagation();
|
|
@@ -34174,35 +34202,35 @@ class paste extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plu
|
|
|
34174
34202
|
* Process usual HTML text fragment
|
|
34175
34203
|
*/
|
|
34176
34204
|
processHTML(e, html) {
|
|
34177
|
-
if (this.j.o.askBeforePasteHTML) {
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34184
|
-
}
|
|
34185
|
-
if (this._isDialogOpened) {
|
|
34205
|
+
if (!this.j.o.askBeforePasteHTML) {
|
|
34206
|
+
return false;
|
|
34207
|
+
}
|
|
34208
|
+
if (this.j.o.memorizeChoiceWhenPasteFragment) {
|
|
34209
|
+
const cached = this.pasteStack.find(cachedItem => cachedItem.html === html);
|
|
34210
|
+
if (cached) {
|
|
34211
|
+
this.__insertByType(e, html, cached.action || this.j.o.defaultActionOnPaste);
|
|
34186
34212
|
return true;
|
|
34187
34213
|
}
|
|
34188
|
-
|
|
34189
|
-
|
|
34190
|
-
this.insertByType(e, html, insertType);
|
|
34191
|
-
}, this.j.o.pasteHTMLActionList);
|
|
34192
|
-
if (dialog) {
|
|
34193
|
-
this._isDialogOpened = true;
|
|
34194
|
-
dialog.e.on('beforeClose', () => {
|
|
34195
|
-
this._isDialogOpened = false;
|
|
34196
|
-
});
|
|
34197
|
-
}
|
|
34214
|
+
}
|
|
34215
|
+
if (this._isDialogOpened) {
|
|
34198
34216
|
return true;
|
|
34199
34217
|
}
|
|
34200
|
-
|
|
34218
|
+
const dialog = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__/* .askInsertTypeDialog */ .$t)(this.j, 'Your code is similar to HTML. Keep as HTML?', 'Paste as HTML', insertType => {
|
|
34219
|
+
this._isDialogOpened = false;
|
|
34220
|
+
this.__insertByType(e, html, insertType);
|
|
34221
|
+
}, this.j.o.pasteHTMLActionList);
|
|
34222
|
+
if (dialog) {
|
|
34223
|
+
this._isDialogOpened = true;
|
|
34224
|
+
dialog.e.on('beforeClose', () => {
|
|
34225
|
+
this._isDialogOpened = false;
|
|
34226
|
+
});
|
|
34227
|
+
}
|
|
34228
|
+
return true;
|
|
34201
34229
|
}
|
|
34202
34230
|
/**
|
|
34203
34231
|
* Insert HTML by option type
|
|
34204
34232
|
*/
|
|
34205
|
-
|
|
34233
|
+
__insertByType(e, html, action) {
|
|
34206
34234
|
this.pasteStack.push({ html, action });
|
|
34207
34235
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(html)) {
|
|
34208
34236
|
this.j.buffer.set(jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.CLIPBOARD_ID, html);
|