jodit-pro 4.12.25 → 4.12.27
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 +10 -10
- package/es2015/jodit.js +343 -82
- package/es2015/jodit.min.js +38 -38
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- 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/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.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.fat.min.js +12 -12
- package/es2018/jodit.min.js +11 -11
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.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 +15 -15
- package/es2021/jodit.js +342 -81
- package/es2021/jodit.min.js +14 -14
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- 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/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.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 +14 -14
- package/es2021.en/jodit.js +342 -81
- package/es2021.en/jodit.min.js +12 -12
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- 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/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.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 +396 -117
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- 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/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.12.
|
|
4
|
+
* Version: v4.12.27
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1696,6 +1696,14 @@ class ViewComponent extends _component_js__WEBPACK_IMPORTED_MODULE_0__.Component
|
|
|
1696
1696
|
* Attach component to View
|
|
1697
1697
|
*/ setParentView(jodit) {
|
|
1698
1698
|
this.jodit = jodit;
|
|
1699
|
+
// Inherit the owner window from the parent view — for an editor
|
|
1700
|
+
// created with a custom `ownerWindow` (e.g. inside an iframe) the
|
|
1701
|
+
// component default (the global `window`) is wrong: outside-click
|
|
1702
|
+
// handlers of dropdowns/popups listened to the wrong window. See
|
|
1703
|
+
// https://github.com/xdan/jodit/issues/965
|
|
1704
|
+
if (jodit.ow) {
|
|
1705
|
+
this.ownerWindow = jodit.ow;
|
|
1706
|
+
}
|
|
1699
1707
|
jodit.components.add(this);
|
|
1700
1708
|
return this;
|
|
1701
1709
|
}
|
|
@@ -1797,7 +1805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1797
1805
|
* ```
|
|
1798
1806
|
* @packageDocumentation
|
|
1799
1807
|
* @module constants
|
|
1800
|
-
*/ const APP_VERSION = "4.12.
|
|
1808
|
+
*/ const APP_VERSION = "4.12.27";
|
|
1801
1809
|
// prettier-ignore
|
|
1802
1810
|
const ES = "es2015";
|
|
1803
1811
|
const IS_ES_MODERN = true;
|
|
@@ -3152,12 +3160,12 @@ function wait(condition) {
|
|
|
3152
3160
|
/**
|
|
3153
3161
|
* Check if element is element node
|
|
3154
3162
|
*/ static isElement(node) {
|
|
3155
|
-
var _a;
|
|
3156
3163
|
if (!Dom.isNode(node)) {
|
|
3157
3164
|
return false;
|
|
3158
3165
|
}
|
|
3159
|
-
|
|
3160
|
-
|
|
3166
|
+
// no `defaultView` requirement — nodes of an inert document
|
|
3167
|
+
// (`DOMParser`, `implementation.createHTMLDocument`) are still elements
|
|
3168
|
+
return node.nodeType === Node.ELEMENT_NODE;
|
|
3161
3169
|
}
|
|
3162
3170
|
/**
|
|
3163
3171
|
* Check if element is document fragment
|
|
@@ -3176,8 +3184,10 @@ function wait(condition) {
|
|
|
3176
3184
|
if (!Dom.isNode(node)) {
|
|
3177
3185
|
return false;
|
|
3178
3186
|
}
|
|
3187
|
+
// an inert document has no browsing context (`defaultView` is null),
|
|
3188
|
+
// but its nodes are same-realm HTMLElements
|
|
3179
3189
|
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
3180
|
-
return
|
|
3190
|
+
return node instanceof (win ? win.HTMLElement : HTMLElement);
|
|
3181
3191
|
}
|
|
3182
3192
|
/**
|
|
3183
3193
|
* Check element is inline block
|
|
@@ -5079,9 +5089,15 @@ function isFastEqual(a, b) {
|
|
|
5079
5089
|
*/ /**
|
|
5080
5090
|
* @module helpers/checker
|
|
5081
5091
|
*/ /**
|
|
5082
|
-
* Detect if string is HTML from MS Word or
|
|
5092
|
+
* Detect if string is HTML from MS Word, Excel or LibreOffice/OpenOffice
|
|
5083
5093
|
*/ function isHtmlFromWord(data) {
|
|
5084
|
-
return data.search(/<meta.*?Microsoft Excel\s[\d].*?>/) !== -1 || data.search(/<meta.*?Microsoft Word\s[\d].*?>/) !== -1 ||
|
|
5094
|
+
return data.search(/<meta.*?Microsoft Excel\s[\d].*?>/) !== -1 || data.search(/<meta.*?Microsoft Word\s[\d].*?>/) !== -1 || // `<meta name=ProgId content=Word.Document>` — attribute values are
|
|
5095
|
+
// unquoted in the raw Word clipboard fragment
|
|
5096
|
+
data.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i) !== -1 || // LibreOffice/OpenOffice Writer & Calc
|
|
5097
|
+
data.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i) !== -1 || // Office namespaces on the root element of the clipboard fragment
|
|
5098
|
+
data.search(/urn:schemas-microsoft-com:office:(word|excel)/) !== -1 || // `class=MsoNormal` and friends (unquoted/quoted)
|
|
5099
|
+
data.search(/<\w[^>]*\sclass=("|')?Mso/) !== -1 || // the raw Word clipboard uses SINGLE quotes: style='mso-…'
|
|
5100
|
+
data.search(/style='[^']*mso-/) !== -1 || data.search(/style="[^"]*mso-/) !== -1 && data.search(/<font/) !== -1;
|
|
5085
5101
|
}
|
|
5086
5102
|
|
|
5087
5103
|
|
|
@@ -12300,8 +12316,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
12300
12316
|
/* harmony export */ });
|
|
12301
12317
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
12302
12318
|
/* harmony import */ var _helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
12303
|
-
/* harmony import */ var
|
|
12304
|
-
/* harmony import */ var
|
|
12319
|
+
/* harmony import */ var _helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
12320
|
+
/* harmony import */ var _list_wrap_list_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82515);
|
|
12321
|
+
/* harmony import */ var _wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6980);
|
|
12305
12322
|
/*!
|
|
12306
12323
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
12307
12324
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -12310,12 +12327,29 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
12310
12327
|
|
|
12311
12328
|
|
|
12312
12329
|
|
|
12330
|
+
|
|
12313
12331
|
/**
|
|
12314
12332
|
* Replaces the parent tag with the applicable one, or wraps the text and also replaces the tag
|
|
12315
12333
|
* @private
|
|
12316
12334
|
*/ function wrap(commitStyle, font, jodit) {
|
|
12317
12335
|
const wrapper = findOrCreateWrapper(commitStyle, font, jodit);
|
|
12318
|
-
|
|
12336
|
+
if (commitStyle.elementIsList) {
|
|
12337
|
+
return (0,_list_wrap_list_js__WEBPACK_IMPORTED_MODULE_3__.wrapList)(commitStyle, wrapper, jodit);
|
|
12338
|
+
}
|
|
12339
|
+
const newWrapper = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(wrapper, commitStyle.element, jodit.createInside, true);
|
|
12340
|
+
if (commitStyle.elementIsBlock) {
|
|
12341
|
+
// Inline font styles left over from pasted content visually override
|
|
12342
|
+
// the new block format — e.g. an h2 with `font-weight: normal;
|
|
12343
|
+
// font-size: 24px` does not look like a heading at all, so the
|
|
12344
|
+
// command seems to do nothing. See
|
|
12345
|
+
// https://github.com/xdan/jodit/issues/1063
|
|
12346
|
+
(0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(newWrapper, 'fontSize', null);
|
|
12347
|
+
(0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(newWrapper, 'fontWeight', null);
|
|
12348
|
+
if (!(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(newWrapper, 'style')) {
|
|
12349
|
+
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(newWrapper, 'style', null);
|
|
12350
|
+
}
|
|
12351
|
+
}
|
|
12352
|
+
return newWrapper;
|
|
12319
12353
|
}
|
|
12320
12354
|
const WRAP_NODES = new Set([
|
|
12321
12355
|
'td',
|
|
@@ -12336,7 +12370,7 @@ const WRAP_NODES = new Set([
|
|
|
12336
12370
|
if (box) {
|
|
12337
12371
|
return box;
|
|
12338
12372
|
}
|
|
12339
|
-
return (0,
|
|
12373
|
+
return (0,_wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_4__.wrapUnwrappedText)(commitStyle, font, jodit);
|
|
12340
12374
|
}
|
|
12341
12375
|
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(font, 'size', null);
|
|
12342
12376
|
return font;
|
|
@@ -16330,8 +16364,11 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_7__.UIGroup {
|
|
|
16330
16364
|
/**
|
|
16331
16365
|
* Calculate static bound for point
|
|
16332
16366
|
*/ getKeepBound(getBound) {
|
|
16367
|
+
var _a;
|
|
16333
16368
|
const oldBound = getBound();
|
|
16334
|
-
|
|
16369
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
16370
|
+
// host, so the lookup must start from the shadow root
|
|
16371
|
+
const elmUnderCursor = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.od).elementFromPoint(oldBound.left, oldBound.top);
|
|
16335
16372
|
if (!elmUnderCursor) {
|
|
16336
16373
|
return getBound;
|
|
16337
16374
|
}
|
|
@@ -18116,6 +18153,17 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18116
18153
|
const init = ()=>{
|
|
18117
18154
|
if (opt.enableDragAndDropFileToEditor && opt.uploader && (opt.uploader.url || opt.uploader.insertImageAsBase64URI)) {
|
|
18118
18155
|
this.uploader.bind(this.editor);
|
|
18156
|
+
} else if (!opt.enableDragAndDropFileToEditor) {
|
|
18157
|
+
// Without a bound uploader nobody cancels a file drop, and
|
|
18158
|
+
// Firefox inserts the dropped image natively — the option
|
|
18159
|
+
// must mean "do nothing". See
|
|
18160
|
+
// https://github.com/xdan/jodit/issues/1077
|
|
18161
|
+
this.e.on(editor, 'drop', (e)=>{
|
|
18162
|
+
var _a, _b;
|
|
18163
|
+
if ((_b = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) {
|
|
18164
|
+
e.preventDefault();
|
|
18165
|
+
}
|
|
18166
|
+
});
|
|
18119
18167
|
}
|
|
18120
18168
|
// in initEditor - the editor could change
|
|
18121
18169
|
if (!this.__elementToPlace.get(this.editor)) {
|
|
@@ -22662,7 +22710,7 @@ function addClassNames(className, elm) {
|
|
|
22662
22710
|
Clean: 'Temizle',
|
|
22663
22711
|
'Insert as Text': 'Yazı olarak ekle',
|
|
22664
22712
|
'Word Paste Detected': 'Word biçiminde yapıştırma algılandı',
|
|
22665
|
-
'The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?': '
|
|
22713
|
+
'The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?': 'Yapıştırılan içerik bir Microsoft Word/Excel belgesinden geliyor. Formatı korumak mı yoksa temizlemek mi istiyorsunuz?',
|
|
22666
22714
|
'Insert only Text': 'Sadece yazıyı ekle',
|
|
22667
22715
|
'File Browser': 'Dosya Listeleyici',
|
|
22668
22716
|
'Error on load list': 'Liste yüklenirken hata oluştu',
|
|
@@ -23992,7 +24040,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
|
|
|
23992
24040
|
e.stopImmediatePropagation();
|
|
23993
24041
|
}
|
|
23994
24042
|
if (this.resizable && this.o.resizable) {
|
|
23995
|
-
this.setSize(this.startPoint.w + e.clientX - this.startX, this.startPoint.h + e.clientY - this.startY);
|
|
24043
|
+
this.setSize(Math.max(this.startPoint.w + e.clientX - this.startX, this.minSize.w), Math.max(this.startPoint.h + e.clientY - this.startY, this.minSize.h));
|
|
23996
24044
|
if (this.e) {
|
|
23997
24045
|
/**
|
|
23998
24046
|
* Fired when dialog box is resized
|
|
@@ -24015,11 +24063,20 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
|
|
|
24015
24063
|
}
|
|
24016
24064
|
}
|
|
24017
24065
|
__onResizerMouseDown(e) {
|
|
24066
|
+
var _a, _b, _c;
|
|
24018
24067
|
this.resizable = true;
|
|
24019
24068
|
this.startX = e.clientX;
|
|
24020
24069
|
this.startY = e.clientY;
|
|
24021
24070
|
this.startPoint.w = this.dialog.offsetWidth;
|
|
24022
24071
|
this.startPoint.h = this.dialog.offsetHeight;
|
|
24072
|
+
const header = this.getElm('header');
|
|
24073
|
+
const footer = this.getElm('footer');
|
|
24074
|
+
const content = this.getElm('content');
|
|
24075
|
+
// the content area does not shrink below its CSS `min-height`,
|
|
24076
|
+
// so it is part of the smallest height the panel can take
|
|
24077
|
+
const contentMinHeight = content ? parseFloat(this.ow.getComputedStyle(content).minHeight) || 0 : 0;
|
|
24078
|
+
this.minSize.w = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minWidth) ? this.o.minWidth : Math.max(100, (_a = footer === null || footer === void 0 ? void 0 : footer.scrollWidth) !== null && _a !== void 0 ? _a : 0);
|
|
24079
|
+
this.minSize.h = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minHeight) ? this.o.minHeight : ((_b = header === null || header === void 0 ? void 0 : header.offsetHeight) !== null && _b !== void 0 ? _b : 0) + ((_c = footer === null || footer === void 0 ? void 0 : footer.offsetHeight) !== null && _c !== void 0 ? _c : 0) + contentMinHeight + this.resizer.offsetHeight;
|
|
24023
24080
|
this.lockSelect();
|
|
24024
24081
|
this.__addGlobalResizeListeners();
|
|
24025
24082
|
if (this.e) {
|
|
@@ -24325,6 +24382,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
|
|
|
24325
24382
|
this.setPosition();
|
|
24326
24383
|
}
|
|
24327
24384
|
};
|
|
24385
|
+
/**
|
|
24386
|
+
* Minimal size the dialog can be resized to — the header and the footer
|
|
24387
|
+
* (with its buttons) must always stay inside the panel
|
|
24388
|
+
*/ this.minSize = {
|
|
24389
|
+
w: 0,
|
|
24390
|
+
h: 0
|
|
24391
|
+
};
|
|
24328
24392
|
this.isModal = false;
|
|
24329
24393
|
/**
|
|
24330
24394
|
* True, if dialog was opened
|
|
@@ -29517,13 +29581,35 @@ let ToolbarContent = class ToolbarContent extends _core_ui_button_index_js__WEBP
|
|
|
29517
29581
|
return 'ToolbarContent';
|
|
29518
29582
|
}
|
|
29519
29583
|
/** @override */ update() {
|
|
29520
|
-
|
|
29584
|
+
var _a, _b, _c;
|
|
29585
|
+
const { control } = this;
|
|
29586
|
+
const content = control.getContent(this.j, this);
|
|
29521
29587
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(content) || content.parentNode !== this.container) {
|
|
29522
29588
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(this.container);
|
|
29523
29589
|
this.container.appendChild((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(content) ? this.j.create.fromHTML(content) : content);
|
|
29524
29590
|
}
|
|
29591
|
+
// Content controls never went through the ToolbarButton status
|
|
29592
|
+
// calculation, so `isDisabled`/`isActive`/`update` declared on the
|
|
29593
|
+
// control were silently ignored (e.g. the FileBrowser Upload button
|
|
29594
|
+
// ignored the backend permissions). See
|
|
29595
|
+
// https://github.com/xdan/jodit/issues/1094
|
|
29596
|
+
this.state.disabled = Boolean((_a = control.isDisabled) === null || _a === void 0 ? void 0 : _a.call(control, this.j, this));
|
|
29597
|
+
this.state.activated = Boolean((_b = control.isActive) === null || _b === void 0 ? void 0 : _b.call(control, this.j, this));
|
|
29598
|
+
(_c = control.update) === null || _c === void 0 ? void 0 : _c.call(control, this.j, this);
|
|
29599
|
+
// The first update() runs before the state watchers are attached, so
|
|
29600
|
+
// apply the calculated state explicitly (the calls are idempotent)
|
|
29601
|
+
this.onChangeDisabled();
|
|
29602
|
+
this.onChangeActivated();
|
|
29525
29603
|
super.update();
|
|
29526
29604
|
}
|
|
29605
|
+
/**
|
|
29606
|
+
* The content is arbitrary HTML — propagate the disabled state to the
|
|
29607
|
+
* nested form controls (e.g. the file input of the Upload button),
|
|
29608
|
+
* otherwise they stay interactive.
|
|
29609
|
+
*/ onChangeDisabled() {
|
|
29610
|
+
super.onChangeDisabled();
|
|
29611
|
+
this.container.querySelectorAll('input,button,select,textarea').forEach((elm)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'disabled', this.state.disabled || null));
|
|
29612
|
+
}
|
|
29527
29613
|
/** @override */ createContainer() {
|
|
29528
29614
|
return this.j.c.span(this.componentName);
|
|
29529
29615
|
}
|
|
@@ -31137,8 +31223,11 @@ const ns = 'addnewline';
|
|
|
31137
31223
|
}
|
|
31138
31224
|
}
|
|
31139
31225
|
__onMouseMove(e) {
|
|
31226
|
+
var _a;
|
|
31140
31227
|
const editor = this.j;
|
|
31141
|
-
|
|
31228
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
31229
|
+
// host, so the lookup must start from the shadow root
|
|
31230
|
+
let currentElement = ((_a = editor.o.shadowRoot) !== null && _a !== void 0 ? _a : editor.ed).elementFromPoint(e.clientX, e.clientY);
|
|
31142
31231
|
if (!_modules_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isHTMLElement(currentElement) || !_modules_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isOrContains(editor.editor, currentElement)) {
|
|
31143
31232
|
return;
|
|
31144
31233
|
}
|
|
@@ -31366,7 +31455,13 @@ function _async_to_generator(fn) {
|
|
|
31366
31455
|
return new _ui_ui_ai_assistant_js__WEBPACK_IMPORTED_MODULE_6__.UiAiAssistant(jodit, {
|
|
31367
31456
|
onInsertAfter (html) {
|
|
31368
31457
|
jodit.s.focus();
|
|
31369
|
-
|
|
31458
|
+
// `current()` returns a node of the selection START, so with
|
|
31459
|
+
// several selected paragraphs the result landed after the
|
|
31460
|
+
// first one — collapse the range to the END of the selection
|
|
31461
|
+
// instead. See https://github.com/xdan/jodit/issues/1263
|
|
31462
|
+
const range = jodit.s.range;
|
|
31463
|
+
range.collapse(false);
|
|
31464
|
+
jodit.s.selectRange(range);
|
|
31370
31465
|
jodit.s.insertHTML(html);
|
|
31371
31466
|
__dialog.close();
|
|
31372
31467
|
},
|
|
@@ -32136,13 +32231,26 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
32136
32231
|
jodit.s.setCursorBefore(fakeNode);
|
|
32137
32232
|
return true;
|
|
32138
32233
|
}
|
|
32139
|
-
if (sibling && (checkMoveListContent(jodit, mainClosestBox, sibling, backspace) || moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace))) {
|
|
32234
|
+
if (sibling && (checkMoveListContent(jodit, mainClosestBox, sibling, backspace) || moveContentAndRemoveEmpty(jodit, mainClosestBox, resolveTableSibling(sibling, backspace), backspace))) {
|
|
32140
32235
|
jodit.s.setCursorBefore(fakeNode);
|
|
32141
32236
|
return true;
|
|
32142
32237
|
}
|
|
32143
32238
|
}
|
|
32144
32239
|
return false;
|
|
32145
32240
|
}
|
|
32241
|
+
/**
|
|
32242
|
+
* Content cannot be merged into the `<table>` element itself — it would land
|
|
32243
|
+
* between the table sections (after `</tbody>`), which is invalid HTML and
|
|
32244
|
+
* gets foster-parented out of the table on the next parse. Merge into the
|
|
32245
|
+
* edge cell instead. See https://github.com/xdan/jodit/issues/1064
|
|
32246
|
+
* @private
|
|
32247
|
+
*/ function resolveTableSibling(sibling, backspace) {
|
|
32248
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, 'table')) {
|
|
32249
|
+
return sibling;
|
|
32250
|
+
}
|
|
32251
|
+
const cells = sibling.querySelectorAll('td,th');
|
|
32252
|
+
return cells.length ? cells[backspace ? cells.length - 1 : 0] : null;
|
|
32253
|
+
}
|
|
32146
32254
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
32147
32255
|
// Process UL/LI/OL cases
|
|
32148
32256
|
const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -33256,10 +33364,14 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
|
|
|
33256
33364
|
* Event handler when manually assigning a value to the HTML editor.
|
|
33257
33365
|
*/ onBeforeSetNativeEditorValue(data) {
|
|
33258
33366
|
const [sandBox, iframe] = this.j.o.cleanHTML.useIframeSandbox ? this.j.createInside.sandbox() : [
|
|
33259
|
-
|
|
33367
|
+
// an inert document never loads sub-resources, so the
|
|
33368
|
+
// images in the value are not re-requested from the
|
|
33369
|
+
// server on every assignment (e.g. on each change in
|
|
33370
|
+
// jodit-react). See #1237
|
|
33371
|
+
this.j.od.implementation.createHTMLDocument('').body
|
|
33260
33372
|
];
|
|
33261
33373
|
sandBox.innerHTML = data.value;
|
|
33262
|
-
this.
|
|
33374
|
+
this.j.e.fire('safeHTML', sandBox);
|
|
33263
33375
|
data.value = sandBox.innerHTML;
|
|
33264
33376
|
(0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, {
|
|
33265
33377
|
safeJavaScriptLink: true,
|
|
@@ -33588,12 +33700,19 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', _eraser_svg_js_
|
|
|
33588
33700
|
/**
|
|
33589
33701
|
* @private
|
|
33590
33702
|
*/ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
33591
|
-
|
|
33703
|
+
const allowedForTag = allow && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && allow[nodeElm.nodeName];
|
|
33704
|
+
if (allow && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && allowedForTag !== true) {
|
|
33705
|
+
// the tag is not in the allow list at all — attributes do not matter,
|
|
33706
|
+
// the element itself will be removed by the tags filter. Without this
|
|
33707
|
+
// check `allow[nodeName][attr]` threw on e.g. `<meta charset>`. See #1224
|
|
33708
|
+
if (!allowedForTag) {
|
|
33709
|
+
return hadEffect;
|
|
33710
|
+
}
|
|
33592
33711
|
const attrs = nodeElm.attributes;
|
|
33593
33712
|
if (attrs && attrs.length) {
|
|
33594
33713
|
const removeAttrs = [];
|
|
33595
33714
|
for(let i = 0; i < attrs.length; i += 1){
|
|
33596
|
-
const attr =
|
|
33715
|
+
const attr = allowedForTag[attrs[i].name];
|
|
33597
33716
|
if (!attr || attr !== true && attr !== attrs[i].value) {
|
|
33598
33717
|
removeAttrs.push(attrs[i].name);
|
|
33599
33718
|
}
|
|
@@ -34135,9 +34254,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
34135
34254
|
/* unused harmony export clipboard */
|
|
34136
34255
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
34137
34256
|
/* harmony import */ var _core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33433);
|
|
34138
|
-
/* harmony import */ var
|
|
34139
|
-
/* harmony import */ var
|
|
34140
|
-
/* harmony import */ var
|
|
34257
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
34258
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
34259
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
34260
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79419);
|
|
34141
34261
|
/*!
|
|
34142
34262
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
34143
34263
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -34147,6 +34267,7 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
34147
34267
|
|
|
34148
34268
|
|
|
34149
34269
|
|
|
34270
|
+
|
|
34150
34271
|
/**
|
|
34151
34272
|
* Clipboard plugin - cut and copy functionality
|
|
34152
34273
|
*/ class clipboard {
|
|
@@ -34155,10 +34276,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
34155
34276
|
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>editor.registerButton(btn));
|
|
34156
34277
|
editor.e.off(`copy.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID} cut.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID}`).on(`copy.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID} cut.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID}`, (event)=>{
|
|
34157
34278
|
var _a;
|
|
34158
|
-
const selectedText = editor.s.html;
|
|
34159
|
-
const clipboardData = (0,
|
|
34279
|
+
const selectedText = wrapWithInlineAncestors(editor, editor.s.html);
|
|
34280
|
+
const clipboardData = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(event) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(editor.ew) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(event.originalEvent);
|
|
34160
34281
|
if (clipboardData) {
|
|
34161
|
-
clipboardData.setData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN, (0,
|
|
34282
|
+
clipboardData.setData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(selectedText));
|
|
34162
34283
|
clipboardData.setData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML, selectedText);
|
|
34163
34284
|
}
|
|
34164
34285
|
editor.buffer.set(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, selectedText);
|
|
@@ -34200,7 +34321,30 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
34200
34321
|
];
|
|
34201
34322
|
}
|
|
34202
34323
|
}
|
|
34203
|
-
|
|
34324
|
+
/**
|
|
34325
|
+
* `Selection.html` clones only the range contents — when the selection sits
|
|
34326
|
+
* entirely inside the text of a formatted element (`<strong>te|st|</strong>`),
|
|
34327
|
+
* the clone is bare text and the formatting would be lost on paste. Native
|
|
34328
|
+
* browser copy keeps that context, so the interception must restore it: wrap
|
|
34329
|
+
* the fragment in shallow clones of the inline ancestors of the range. See #1202
|
|
34330
|
+
*/ function wrapWithInlineAncestors(editor, html) {
|
|
34331
|
+
if (!html || editor.s.isCollapsed()) {
|
|
34332
|
+
return html;
|
|
34333
|
+
}
|
|
34334
|
+
let node = editor.s.range.commonAncestorContainer;
|
|
34335
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node)) {
|
|
34336
|
+
node = node.parentElement;
|
|
34337
|
+
}
|
|
34338
|
+
let result = html;
|
|
34339
|
+
while(node && node !== editor.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(node)){
|
|
34340
|
+
const shell = node.cloneNode(false);
|
|
34341
|
+
shell.innerHTML = result;
|
|
34342
|
+
result = shell.outerHTML;
|
|
34343
|
+
node = node.parentElement;
|
|
34344
|
+
}
|
|
34345
|
+
return result;
|
|
34346
|
+
}
|
|
34347
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('clipboard', clipboard);
|
|
34204
34348
|
|
|
34205
34349
|
|
|
34206
34350
|
/***/ }),
|
|
@@ -34306,26 +34450,35 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_0__.Icon.set('copy', _icons_copy_svg_j
|
|
|
34306
34450
|
group: 'color'
|
|
34307
34451
|
});
|
|
34308
34452
|
const callback = (command, second, third)=>{
|
|
34453
|
+
var _a;
|
|
34309
34454
|
const colorHEX = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.normalizeColor)(third);
|
|
34310
|
-
|
|
34311
|
-
|
|
34312
|
-
|
|
34313
|
-
|
|
34314
|
-
|
|
34315
|
-
|
|
34316
|
-
|
|
34317
|
-
|
|
34318
|
-
|
|
34319
|
-
|
|
34320
|
-
|
|
34455
|
+
const value = !colorHEX ? '' : colorHEX;
|
|
34456
|
+
const style = command === 'background' ? {
|
|
34457
|
+
backgroundColor: value
|
|
34458
|
+
} : {
|
|
34459
|
+
color: value
|
|
34460
|
+
};
|
|
34461
|
+
// Cells selected with the `select-cells` plugin drop or collapse the
|
|
34462
|
+
// native range, so `commitStyle` would paint a pending caret format
|
|
34463
|
+
// outside the table instead of the selection the user sees. Apply the
|
|
34464
|
+
// style to the content of every selected cell instead. See #1250
|
|
34465
|
+
const selectedCells = editor.getInstance('Table', editor.o).getAllSelectedCells();
|
|
34466
|
+
if (selectedCells.length && editor.s.isCollapsed()) {
|
|
34467
|
+
selectedCells.forEach((cell)=>{
|
|
34468
|
+
editor.s.select(cell, true);
|
|
34321
34469
|
editor.s.commitStyle({
|
|
34322
34470
|
attributes: {
|
|
34323
|
-
style
|
|
34324
|
-
color: !colorHEX ? '' : colorHEX
|
|
34325
|
-
}
|
|
34471
|
+
style
|
|
34326
34472
|
}
|
|
34327
34473
|
});
|
|
34328
|
-
|
|
34474
|
+
});
|
|
34475
|
+
(_a = editor.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
34476
|
+
} else {
|
|
34477
|
+
editor.s.commitStyle({
|
|
34478
|
+
attributes: {
|
|
34479
|
+
style
|
|
34480
|
+
}
|
|
34481
|
+
});
|
|
34329
34482
|
}
|
|
34330
34483
|
editor.synchronizeValues();
|
|
34331
34484
|
return false;
|
|
@@ -40233,9 +40386,54 @@ const align = {
|
|
|
40233
40386
|
}).on([
|
|
40234
40387
|
this.j.ew,
|
|
40235
40388
|
this.j.ow
|
|
40236
|
-
], 'mouseup keyup', this.onSelectionEnd)
|
|
40389
|
+
], 'mouseup keyup', this.onSelectionEnd).on([
|
|
40390
|
+
this.j.ew,
|
|
40391
|
+
this.j.ow
|
|
40392
|
+
], 'mousedown touchstart', this.__onDocumentMouseDown).on('closeAllPopups', this.__onCloseAllPopups);
|
|
40237
40393
|
this.addListenersForElements();
|
|
40238
40394
|
}
|
|
40395
|
+
__onDocumentMouseDown(e) {
|
|
40396
|
+
if (this.popup.isOpened && this.type === 'selection' && e.target && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_5__.UIElement.closestElement(e.target, _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_6__.Popup)) {
|
|
40397
|
+
this.__reopenSelectionPopup = true;
|
|
40398
|
+
}
|
|
40399
|
+
}
|
|
40400
|
+
__onCloseAllPopups() {
|
|
40401
|
+
if (!this.__reopenSelectionPopup) {
|
|
40402
|
+
return;
|
|
40403
|
+
}
|
|
40404
|
+
this.__reopenSelectionPopup = false;
|
|
40405
|
+
if (!this.j.o.toolbarInlineForSelection) {
|
|
40406
|
+
return;
|
|
40407
|
+
}
|
|
40408
|
+
// a zero timeout would run synchronously — before the popup's own
|
|
40409
|
+
// `closeAllPopups` handler closes it; defer to the next macrotask
|
|
40410
|
+
this.j.async.setTimeout(()=>{
|
|
40411
|
+
const sel = this.j.s.sel;
|
|
40412
|
+
if (sel && !sel.isCollapsed) {
|
|
40413
|
+
this.showPopup(()=>this.__selectionBound(), 'selection');
|
|
40414
|
+
}
|
|
40415
|
+
}, 1);
|
|
40416
|
+
}
|
|
40417
|
+
/**
|
|
40418
|
+
* The selection rect comes from the editor document — in iframe mode its
|
|
40419
|
+
* coordinates are iframe-local, while the popup lives in the host
|
|
40420
|
+
* document, so the iframe offset must be added. See
|
|
40421
|
+
* https://github.com/xdan/jodit/issues/1058
|
|
40422
|
+
*/ __selectionBound() {
|
|
40423
|
+
const rect = this.j.s.range.getBoundingClientRect();
|
|
40424
|
+
let { left, top } = rect;
|
|
40425
|
+
if (this.j.iframe) {
|
|
40426
|
+
const offset = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(this.j.iframe, this.j, true);
|
|
40427
|
+
left += offset.left;
|
|
40428
|
+
top += offset.top;
|
|
40429
|
+
}
|
|
40430
|
+
return {
|
|
40431
|
+
left,
|
|
40432
|
+
top,
|
|
40433
|
+
width: rect.width,
|
|
40434
|
+
height: rect.height
|
|
40435
|
+
};
|
|
40436
|
+
}
|
|
40239
40437
|
onSelectionStart() {
|
|
40240
40438
|
this.snapRange = this.j.s.range.cloneRange();
|
|
40241
40439
|
}
|
|
@@ -40267,7 +40465,7 @@ const align = {
|
|
|
40267
40465
|
if (!node) {
|
|
40268
40466
|
return;
|
|
40269
40467
|
}
|
|
40270
|
-
this.showPopup(()=>
|
|
40468
|
+
this.showPopup(()=>this.__selectionBound(), type);
|
|
40271
40469
|
}
|
|
40272
40470
|
/**
|
|
40273
40471
|
* In not collapsed selection - only one image
|
|
@@ -40284,7 +40482,10 @@ const align = {
|
|
|
40284
40482
|
jodit.e.off('showPopup').off([
|
|
40285
40483
|
this.j.ew,
|
|
40286
40484
|
this.j.ow
|
|
40287
|
-
], 'mouseup keyup', this.onSelectionEnd)
|
|
40485
|
+
], 'mouseup keyup', this.onSelectionEnd).off([
|
|
40486
|
+
this.j.ew,
|
|
40487
|
+
this.j.ow
|
|
40488
|
+
], 'mousedown touchstart', this.__onDocumentMouseDown).off('closeAllPopups', this.__onCloseAllPopups);
|
|
40288
40489
|
this.removeListenersForElements();
|
|
40289
40490
|
}
|
|
40290
40491
|
_eventsList() {
|
|
@@ -40311,6 +40512,11 @@ const align = {
|
|
|
40311
40512
|
constructor(){
|
|
40312
40513
|
super(...arguments);
|
|
40313
40514
|
this.type = null;
|
|
40515
|
+
/**
|
|
40516
|
+
* The user pressed a button inside the selection toolbar — after the
|
|
40517
|
+
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
40518
|
+
* while the selection is still there. See #1238
|
|
40519
|
+
*/ this.__reopenSelectionPopup = false;
|
|
40314
40520
|
this.snapRange = null;
|
|
40315
40521
|
this.elmsList = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s));
|
|
40316
40522
|
}
|
|
@@ -40341,6 +40547,12 @@ __decorate([
|
|
|
40341
40547
|
__decorate([
|
|
40342
40548
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':outsideClick')
|
|
40343
40549
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
40550
|
+
__decorate([
|
|
40551
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
40552
|
+
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
40553
|
+
__decorate([
|
|
40554
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
40555
|
+
], inlinePopup.prototype, "__onCloseAllPopups", null);
|
|
40344
40556
|
__decorate([
|
|
40345
40557
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
40346
40558
|
], inlinePopup.prototype, "onSelectionStart", null);
|
|
@@ -40626,7 +40838,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.limitHTML = false;
|
|
|
40626
40838
|
jodit.e.fire('denyWords.limit limit.limit');
|
|
40627
40839
|
return true;
|
|
40628
40840
|
}
|
|
40629
|
-
|
|
40841
|
+
// with `countTextSpaces` enabled the limiter counts characters the
|
|
40842
|
+
// same way as the `stat` plugin's counter — including spaces. See #1144
|
|
40843
|
+
const charsCount = jodit.o.countTextSpaces ? text.replace((0,_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '').replace(/[\r\n]/g, '').length : words.join('').length;
|
|
40844
|
+
const should = Boolean(limitChars && isGt(charsCount, limitChars, strict));
|
|
40630
40845
|
if (should) {
|
|
40631
40846
|
jodit.e.fire('denyChars.limit limit.limit');
|
|
40632
40847
|
}
|
|
@@ -42585,6 +42800,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
42585
42800
|
tooltip: 'Paste from clipboard',
|
|
42586
42801
|
exec (_0, _1, _2) {
|
|
42587
42802
|
return _async_to_generator(function*(editor, _, { control }) {
|
|
42803
|
+
var _a;
|
|
42588
42804
|
if (control.name === psKey) {
|
|
42589
42805
|
editor.execCommand('showPasteStorage');
|
|
42590
42806
|
return;
|
|
@@ -42595,7 +42811,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
42595
42811
|
try {
|
|
42596
42812
|
const items = yield navigator.clipboard.read();
|
|
42597
42813
|
if (items && items.length) {
|
|
42598
|
-
const
|
|
42814
|
+
const item = items[0];
|
|
42815
|
+
// Prefer the HTML flavor so the button behaves like the
|
|
42816
|
+
// Ctrl+V shortcut (which receives text/html from the
|
|
42817
|
+
// native paste event). See
|
|
42818
|
+
// https://github.com/xdan/jodit/issues/1061
|
|
42819
|
+
const type = ((_a = item.types) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML)) ? _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN;
|
|
42820
|
+
const textBlob = yield item.getType(type);
|
|
42599
42821
|
text = yield new Response(textBlob).text();
|
|
42600
42822
|
}
|
|
42601
42823
|
error = false;
|
|
@@ -42796,9 +43018,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
42796
43018
|
*/ class paste extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
42797
43019
|
/** @override **/ afterInit(jodit) {
|
|
42798
43020
|
jodit.e.on('paste.paste', this.onPaste).on('pasteStack.paste', (item)=>this.pasteStack.push(item));
|
|
42799
|
-
|
|
42800
|
-
this.j.e.on('processPaste.paste', this.onProcessPasteReplaceNl2Br);
|
|
42801
|
-
}
|
|
43021
|
+
this.j.e.on('processPaste.paste', this.onProcessPasteReplaceNl2Br);
|
|
42802
43022
|
}
|
|
42803
43023
|
/** @override **/ beforeDestruct(jodit) {
|
|
42804
43024
|
jodit.e.off('paste.paste', this.onPaste).off('processPaste.paste', this.onProcessPasteReplaceNl2Br).off('.paste');
|
|
@@ -42918,10 +43138,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
42918
43138
|
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__.pasteInsertHtml)(e, this.j, html);
|
|
42919
43139
|
}
|
|
42920
43140
|
/**
|
|
42921
|
-
*
|
|
43141
|
+
* Escape plain text and replace all \\n chars with br
|
|
42922
43142
|
*/ onProcessPasteReplaceNl2Br(ignore, text, type) {
|
|
42923
43143
|
if (type === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN + ';' && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isHTML)(text)) {
|
|
42924
|
-
|
|
43144
|
+
// the clipboard contains only plain text — escape special chars
|
|
43145
|
+
// so a stray `<` is not parsed as an unclosed tag and does not
|
|
43146
|
+
// swallow the rest of the string. See #1227
|
|
43147
|
+
const escaped = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(text);
|
|
43148
|
+
return this.j.o.nl2brInPlainText ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.nl2br)(escaped) : escaped;
|
|
42925
43149
|
}
|
|
42926
43150
|
}
|
|
42927
43151
|
constructor(){
|
|
@@ -43785,9 +44009,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.allowResizeY = true;
|
|
|
43785
44009
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
|
|
43786
44010
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
43787
44011
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
43788
|
-
/* harmony import */ var
|
|
43789
|
-
/* harmony import */ var
|
|
43790
|
-
/* harmony import */ var
|
|
44012
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
44013
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
|
|
44014
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(67510);
|
|
44015
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68252);
|
|
43791
44016
|
/*!
|
|
43792
44017
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43793
44018
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -43804,7 +44029,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.allowResizeY = true;
|
|
|
43804
44029
|
|
|
43805
44030
|
|
|
43806
44031
|
|
|
43807
|
-
|
|
44032
|
+
|
|
44033
|
+
class resizeHandler extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
|
|
43808
44034
|
/** @override **/ afterInit(editor) {
|
|
43809
44035
|
const { height, width, allowResizeX } = editor.o;
|
|
43810
44036
|
let { allowResizeY } = editor.o;
|
|
@@ -43838,11 +44064,21 @@ class resizeHandler extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.P
|
|
|
43838
44064
|
if (!this.isResized) {
|
|
43839
44065
|
return;
|
|
43840
44066
|
}
|
|
44067
|
+
let { clientX, clientY } = e;
|
|
44068
|
+
if (e.view === this.j.ew && this.j.ew !== this.j.ow) {
|
|
44069
|
+
// the event was proxied from the editor's iframe — its client
|
|
44070
|
+
// coordinates are relative to the iframe viewport, while the
|
|
44071
|
+
// start point was captured on the host-document handle;
|
|
44072
|
+
// shift them into the host coordinate space
|
|
44073
|
+
const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.offset)(this.j.workplace, this.j, this.j.od, true);
|
|
44074
|
+
clientX += workplacePosition.left;
|
|
44075
|
+
clientY += workplacePosition.top;
|
|
44076
|
+
}
|
|
43841
44077
|
if (this.j.o.allowResizeY) {
|
|
43842
|
-
this.j.e.fire('setHeight', this.start.h +
|
|
44078
|
+
this.j.e.fire('setHeight', this.start.h + clientY - this.start.y);
|
|
43843
44079
|
}
|
|
43844
44080
|
if (this.j.o.allowResizeX) {
|
|
43845
|
-
this.j.e.fire('setWidth', this.start.w +
|
|
44081
|
+
this.j.e.fire('setWidth', this.start.w + clientX - this.start.x);
|
|
43846
44082
|
}
|
|
43847
44083
|
this.j.e.fire('resize');
|
|
43848
44084
|
}
|
|
@@ -43874,7 +44110,7 @@ class resizeHandler extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.P
|
|
|
43874
44110
|
};
|
|
43875
44111
|
/**
|
|
43876
44112
|
* Resize handle
|
|
43877
|
-
*/ this.handle = this.j.c.div('jodit-editor__resize',
|
|
44113
|
+
*/ this.handle = this.j.c.div('jodit-editor__resize', _core_ui_index_js__WEBPACK_IMPORTED_MODULE_5__.Icon.get('resize_handler'));
|
|
43878
44114
|
}
|
|
43879
44115
|
}
|
|
43880
44116
|
/** @override **/ resizeHandler.requires = [
|
|
@@ -44052,7 +44288,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
44052
44288
|
this.pointerX = e.clientX;
|
|
44053
44289
|
this.pointerY = e.clientY;
|
|
44054
44290
|
let diff_x, diff_y;
|
|
44055
|
-
if (this.j.options.iframe) {
|
|
44291
|
+
if (this.j.options.iframe && e.view === this.j.ew) {
|
|
44292
|
+
// the event was proxied from the editor's iframe — its client
|
|
44293
|
+
// coordinates are relative to the iframe viewport, while
|
|
44294
|
+
// `startX/startY` were captured on a host-document handle;
|
|
44295
|
+
// shift them into the host coordinate space
|
|
44056
44296
|
const workplacePosition = this.getWorkplacePosition();
|
|
44057
44297
|
diff_x = e.clientX + workplacePosition.left - this.startX;
|
|
44058
44298
|
diff_y = e.clientY + workplacePosition.top - this.startY;
|
|
@@ -45264,20 +45504,30 @@ let UISearch = class UISearch extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE
|
|
|
45264
45504
|
return false;
|
|
45265
45505
|
}).on(this.queryInput, 'input', ()=>{
|
|
45266
45506
|
this.setMod('empty-query', !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.trim)(this.queryInput.value).length);
|
|
45267
|
-
}).on(this.queryInput, 'keydown',
|
|
45268
|
-
|
|
45269
|
-
|
|
45270
|
-
|
|
45271
|
-
|
|
45272
|
-
|
|
45273
|
-
|
|
45274
|
-
|
|
45275
|
-
|
|
45276
|
-
|
|
45277
|
-
|
|
45278
|
-
|
|
45507
|
+
}).on(this.queryInput, 'keydown', (()=>{
|
|
45508
|
+
const debounced = this.j.async.debounce((e)=>_async_to_generator(function*() {
|
|
45509
|
+
switch(e.key){
|
|
45510
|
+
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
|
|
45511
|
+
if (yield jodit.e.fire('searchNext')) {
|
|
45512
|
+
_this.close();
|
|
45513
|
+
}
|
|
45514
|
+
break;
|
|
45515
|
+
default:
|
|
45516
|
+
jodit.e.fire(_this, 'needUpdateCounters');
|
|
45517
|
+
break;
|
|
45518
|
+
}
|
|
45519
|
+
})(), this.j.defaultTimeout);
|
|
45520
|
+
return (e)=>{
|
|
45521
|
+
// Must be canceled synchronously — inside the debounced
|
|
45522
|
+
// handler the browser has already submitted the parent
|
|
45523
|
+
// form. See https://github.com/xdan/jodit/issues/918
|
|
45524
|
+
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER) {
|
|
45525
|
+
e.preventDefault();
|
|
45526
|
+
e.stopImmediatePropagation();
|
|
45279
45527
|
}
|
|
45280
|
-
|
|
45528
|
+
debounced(e);
|
|
45529
|
+
};
|
|
45530
|
+
})());
|
|
45281
45531
|
}
|
|
45282
45532
|
};
|
|
45283
45533
|
__decorate([
|
|
@@ -45424,14 +45674,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
45424
45674
|
/**
|
|
45425
45675
|
* Mouse move inside the table
|
|
45426
45676
|
*/ __onMove(table, e) {
|
|
45427
|
-
var _a;
|
|
45677
|
+
var _a, _b;
|
|
45428
45678
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
45429
45679
|
return;
|
|
45430
45680
|
}
|
|
45431
45681
|
if (this.j.isLockedNotBy(key)) {
|
|
45432
45682
|
return;
|
|
45433
45683
|
}
|
|
45434
|
-
|
|
45684
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
45685
|
+
// host, so the lookup must start from the shadow root
|
|
45686
|
+
const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
45435
45687
|
if (!node) {
|
|
45436
45688
|
return;
|
|
45437
45689
|
}
|
|
@@ -45457,7 +45709,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
45457
45709
|
}
|
|
45458
45710
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
45459
45711
|
if (cellsCount > 1) {
|
|
45460
|
-
(
|
|
45712
|
+
(_b = this.j.s.sel) === null || _b === void 0 ? void 0 : _b.removeAllRanges();
|
|
45461
45713
|
}
|
|
45462
45714
|
this.j.e.fire('hidePopup');
|
|
45463
45715
|
e.stopPropagation();
|
|
@@ -45487,13 +45739,15 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
45487
45739
|
/**
|
|
45488
45740
|
* Stop a selection process
|
|
45489
45741
|
*/ __onStopSelection(table, e) {
|
|
45490
|
-
var _a, _b;
|
|
45742
|
+
var _a, _b, _c;
|
|
45491
45743
|
if (!this.__selectedCell) {
|
|
45492
45744
|
return;
|
|
45493
45745
|
}
|
|
45494
45746
|
this.__isSelectionMode = false;
|
|
45495
45747
|
this.j.unlock();
|
|
45496
|
-
|
|
45748
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
45749
|
+
// host, so the lookup must start from the shadow root
|
|
45750
|
+
const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
45497
45751
|
if (!node) {
|
|
45498
45752
|
return;
|
|
45499
45753
|
}
|
|
@@ -45512,7 +45766,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
45512
45766
|
cell,
|
|
45513
45767
|
this.__selectedCell
|
|
45514
45768
|
]), box = this.__tableModule.formalMatrix(table);
|
|
45515
|
-
const max = (
|
|
45769
|
+
const max = (_b = box[bound[1][0]]) === null || _b === void 0 ? void 0 : _b[bound[1][1]], min = (_c = box[bound[0][0]]) === null || _c === void 0 ? void 0 : _c[bound[0][1]];
|
|
45516
45770
|
// `getSelectedBound` keeps its `Infinity` sentinel when none of the
|
|
45517
45771
|
// selected cells belong to this table's matrix — e.g. after a
|
|
45518
45772
|
// drag-and-drop that moved/removed the cells, leaving a stale anchor and
|
|
@@ -46739,6 +46993,13 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
46739
46993
|
}
|
|
46740
46994
|
setFocusToMirror() {
|
|
46741
46995
|
var _a;
|
|
46996
|
+
const active = this.j.od.activeElement;
|
|
46997
|
+
// do not steal focus from another editor or control — e.g. when the
|
|
46998
|
+
// mode is switched programmatically (a Vue/React wrapper re-render)
|
|
46999
|
+
// while the user is already typing elsewhere. See #1356
|
|
47000
|
+
if (active && active !== this.j.od.body && !this.j.container.contains(active)) {
|
|
47001
|
+
return;
|
|
47002
|
+
}
|
|
46742
47003
|
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.focus();
|
|
46743
47004
|
}
|
|
46744
47005
|
saveSelection() {
|