jodit-pro 4.19.3 → 4.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +20 -7
- package/es2015/jodit.js +853 -154
- package/es2015/jodit.min.js +20 -7
- 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.css +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/chart/chart.css +1 -1
- package/es2015/plugins/chart/chart.js +1 -1
- package/es2015/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2015/plugins/math/math.js +1 -1
- package/es2015/plugins/math/math.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 +20 -7
- package/es2018/jodit.min.js +25 -12
- 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/chart/chart.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/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.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 +21 -8
- package/es2021/jodit.js +853 -154
- package/es2021/jodit.min.js +32 -19
- 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.css +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/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.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 +21 -8
- package/es2021.en/jodit.js +853 -154
- package/es2021.en/jodit.min.js +31 -18
- 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.css +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/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.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 +1003 -159
- 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.css +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/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.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/es5/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.19.
|
|
4
|
+
* Version: v4.19.5
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -2333,7 +2333,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
2333
2333
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2334
2334
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
2335
2335
|
}
|
|
2336
|
-
var APP_VERSION = "4.19.
|
|
2336
|
+
var APP_VERSION = "4.19.5";
|
|
2337
2337
|
// prettier-ignore
|
|
2338
2338
|
var ES = "es5";
|
|
2339
2339
|
var IS_ES_MODERN = false;
|
|
@@ -14358,7 +14358,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
14358
14358
|
* When the cursor is positioned in its place, it must be inside the element and not outside its border.
|
|
14359
14359
|
* @private
|
|
14360
14360
|
*/ function moveNodeInsideStart(j, node, start) {
|
|
14361
|
-
|
|
14361
|
+
// A text node of non-breaking spaces trims to nothing, but it's text the
|
|
14362
|
+
// node mustn't move past
|
|
14363
|
+
var isContent = function isContent(n) {
|
|
14364
|
+
var _a;
|
|
14365
|
+
return !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(n) || Boolean((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.includes(_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
|
|
14366
|
+
};
|
|
14367
|
+
var sibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start, isContent), anotherSibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start, isContent);
|
|
14362
14368
|
while(_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, j.editor) && (!anotherSibling || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement, j.editor))){
|
|
14363
14369
|
if (start || !sibling.firstChild) {
|
|
14364
14370
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
|
|
@@ -17724,9 +17730,11 @@ var WRAP_NODES = new Set([
|
|
|
17724
17730
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17725
17731
|
/* harmony export */ ApplyStyle: function() { return /* binding */ ApplyStyle; }
|
|
17726
17732
|
/* harmony export */ });
|
|
17727
|
-
/* harmony import */ var
|
|
17728
|
-
/* harmony import */ var
|
|
17729
|
-
/* harmony import */ var
|
|
17733
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
17734
|
+
/* harmony import */ var _helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76078);
|
|
17735
|
+
/* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63687);
|
|
17736
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77361);
|
|
17737
|
+
/* harmony import */ var _transactions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55307);
|
|
17730
17738
|
/*!
|
|
17731
17739
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
17732
17740
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -17734,13 +17742,40 @@ var WRAP_NODES = new Set([
|
|
|
17734
17742
|
*/
|
|
17735
17743
|
|
|
17736
17744
|
|
|
17745
|
+
|
|
17746
|
+
|
|
17747
|
+
/**
|
|
17748
|
+
* Take a selected fragment out of the elements its style takes the place
|
|
17749
|
+
* of: one around it is split, so the fragment leaves it, and one in it is
|
|
17750
|
+
* unwrapped
|
|
17751
|
+
*/ function takeOutOf(jodit, font, tags) {
|
|
17752
|
+
var range = jodit.s.createRange();
|
|
17753
|
+
var outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
17754
|
+
while(outer){
|
|
17755
|
+
range.selectNodeContents(outer);
|
|
17756
|
+
range.setEndBefore(font);
|
|
17757
|
+
var before = range.cloneContents();
|
|
17758
|
+
range.selectNodeContents(outer);
|
|
17759
|
+
range.setStartAfter(font);
|
|
17760
|
+
// Split only when there's more in it, as a split leaves empty copies
|
|
17761
|
+
// of the elements between
|
|
17762
|
+
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(before) || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(range.cloneContents())) {
|
|
17763
|
+
(0,_api_index_js__WEBPACK_IMPORTED_MODULE_2__.extractSelectedPart)(outer, font, jodit);
|
|
17764
|
+
}
|
|
17765
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(outer);
|
|
17766
|
+
outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
17767
|
+
}
|
|
17768
|
+
;(0,_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__.$$)(tags.join(','), font).forEach(function(inner) {
|
|
17769
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(inner);
|
|
17770
|
+
});
|
|
17771
|
+
}
|
|
17737
17772
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
17738
|
-
var _a;
|
|
17773
|
+
var _a, _b;
|
|
17739
17774
|
var sel = jodit.s, editor = jodit.editor;
|
|
17740
17775
|
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
17741
17776
|
var fakes = sel.fakes();
|
|
17742
17777
|
var collapsed = sel.isCollapsed();
|
|
17743
|
-
var mode =
|
|
17778
|
+
var mode = _constants_js__WEBPACK_IMPORTED_MODULE_3__.INITIAL;
|
|
17744
17779
|
try {
|
|
17745
17780
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
17746
17781
|
try {
|
|
@@ -17748,16 +17783,19 @@ var WRAP_NODES = new Set([
|
|
|
17748
17783
|
// temporary wrapper before the selection is restored in finally.
|
|
17749
17784
|
for(var _iterator = sel.wrapInTagGen(fakes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
17750
17785
|
var font = _step.value;
|
|
17786
|
+
if ((_b = cs.options.exclude) === null || _b === void 0 ? void 0 : _b.length) {
|
|
17787
|
+
takeOutOf(jodit, font, cs.options.exclude);
|
|
17788
|
+
}
|
|
17751
17789
|
var state = {
|
|
17752
17790
|
collapsed: collapsed,
|
|
17753
17791
|
mode: mode,
|
|
17754
17792
|
element: font,
|
|
17755
|
-
next:
|
|
17793
|
+
next: _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START,
|
|
17756
17794
|
jodit: jodit,
|
|
17757
17795
|
style: cs
|
|
17758
17796
|
};
|
|
17759
|
-
var machine = new
|
|
17760
|
-
while(!jodit.isInDestruct && machine.getState() !==
|
|
17797
|
+
var machine = new _api_index_js__WEBPACK_IMPORTED_MODULE_2__.FiniteStateMachine(_transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START, _transactions_js__WEBPACK_IMPORTED_MODULE_4__.transactions);
|
|
17798
|
+
while(!jodit.isInDestruct && machine.getState() !== _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.END){
|
|
17761
17799
|
state = machine.dispatch('exec', state);
|
|
17762
17800
|
}
|
|
17763
17801
|
// The first selected fragment determines how later fragments toggle.
|
|
@@ -26493,6 +26531,20 @@ var FOCUS_EVENTS = new Set([
|
|
|
26493
26531
|
'focusin',
|
|
26494
26532
|
'focusout'
|
|
26495
26533
|
]);
|
|
26534
|
+
var EDITING_KEYS = new Set([
|
|
26535
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER,
|
|
26536
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE,
|
|
26537
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE
|
|
26538
|
+
]);
|
|
26539
|
+
/**
|
|
26540
|
+
* Whether the input method (IME) is using the key. Safari fires the keydown
|
|
26541
|
+
* that ends a composition, as the Enter that confirms Japanese text, after
|
|
26542
|
+
* `compositionend`, and types Korean without one, so `isComposing` is false and
|
|
26543
|
+
* only keyCode 229 tells. Only the keys the editor turns into edits are held
|
|
26544
|
+
* back: the handlers that follow typing still see the rest.
|
|
26545
|
+
*/ function isInputMethodKey(event) {
|
|
26546
|
+
return event.isComposing || event.keyCode === 229 && EDITING_KEYS.has(event.key);
|
|
26547
|
+
}
|
|
26496
26548
|
var __defaultStyleDisplayKey = 'data-jodit-default-style-display';
|
|
26497
26549
|
var __defaultClassesKey = 'data-jodit-default-classes';
|
|
26498
26550
|
var NOEDIT = {
|
|
@@ -27783,7 +27835,7 @@ var Jodit = Jodit_1 = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
27783
27835
|
}
|
|
27784
27836
|
}
|
|
27785
27837
|
var w = _this.ew;
|
|
27786
|
-
if (_instanceof(event, w.KeyboardEvent) && event
|
|
27838
|
+
if (_instanceof(event, w.KeyboardEvent) && isInputMethodKey(event)) {
|
|
27787
27839
|
return;
|
|
27788
27840
|
}
|
|
27789
27841
|
if (_this.e && _this.e.fire) {
|
|
@@ -47886,6 +47938,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
47886
47938
|
if (checkJoinBareText(jodit, fakeNode, backspace)) {
|
|
47887
47939
|
return true;
|
|
47888
47940
|
}
|
|
47941
|
+
// Old content can have an inline element round blocks beside the text:
|
|
47942
|
+
// moved inside them, the line joins the block as it would bare text
|
|
47943
|
+
// (#1781)
|
|
47944
|
+
var inline = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
47945
|
+
if (joinsBareText(jodit, edgeBlock(inline, backspace)) && moveInlineInside(inline, jodit.editor)) {
|
|
47946
|
+
return joinNeighbors(jodit, fakeNode, backspace, moved);
|
|
47947
|
+
}
|
|
47889
47948
|
var nextBox = fakeNode, mainClosestBox = nextBox;
|
|
47890
47949
|
// Find the main big closest element
|
|
47891
47950
|
while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
|
|
@@ -48193,9 +48252,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
48193
48252
|
* in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
|
|
48194
48253
|
*/ function checkJoinBareText(jodit, fakeNode, backspace) {
|
|
48195
48254
|
var block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
48196
|
-
if (!
|
|
48197
|
-
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
|
|
48198
|
-
})) {
|
|
48255
|
+
if (!joinsBareText(jodit, block)) {
|
|
48199
48256
|
return false;
|
|
48200
48257
|
}
|
|
48201
48258
|
var filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
@@ -48222,6 +48279,28 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
48222
48279
|
jodit.s.setCursorBefore(fakeNode);
|
|
48223
48280
|
return true;
|
|
48224
48281
|
}
|
|
48282
|
+
/**
|
|
48283
|
+
* Whether a block joins the bare text beside it: not a list, a table or a
|
|
48284
|
+
* cell, and holding no block of its own
|
|
48285
|
+
*/ function joinsBareText(jodit, block) {
|
|
48286
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'table') && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(block, jodit.editor) && !Array.from(block.childNodes).some(function(node) {
|
|
48287
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
|
|
48288
|
+
});
|
|
48289
|
+
}
|
|
48290
|
+
/**
|
|
48291
|
+
* The block an inline element holds on its side facing the caret, through
|
|
48292
|
+
* the inline elements in it: the `<p>` of `<span><strong><p>…</p></strong></span>`
|
|
48293
|
+
*/ function edgeBlock(node, backspace) {
|
|
48294
|
+
var _a;
|
|
48295
|
+
var edge = node;
|
|
48296
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(edge) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(edge)){
|
|
48297
|
+
var children = Array.from(edge.childNodes).filter(function(child) {
|
|
48298
|
+
return !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child);
|
|
48299
|
+
});
|
|
48300
|
+
edge = (_a = backspace ? children[children.length - 1] : children[0]) !== null && _a !== void 0 ? _a : null;
|
|
48301
|
+
}
|
|
48302
|
+
return edge === node ? null : edge;
|
|
48303
|
+
}
|
|
48225
48304
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
48226
48305
|
// Process UL/LI/OL cases
|
|
48227
48306
|
var siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -48658,7 +48737,6 @@ function isNotEditable(jodit, node) {
|
|
|
48658
48737
|
if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
|
|
48659
48738
|
return false;
|
|
48660
48739
|
}
|
|
48661
|
-
var neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
48662
48740
|
do {
|
|
48663
48741
|
if (prn && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(prn)) {
|
|
48664
48742
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
|
|
@@ -48675,6 +48753,9 @@ function isNotEditable(jodit, node) {
|
|
|
48675
48753
|
if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
|
|
48676
48754
|
return true;
|
|
48677
48755
|
}
|
|
48756
|
+
// Looked for once the empty elements have gone, as the one beside the
|
|
48757
|
+
// caret can be in them: the `<br>` that Delete in `<p>|<br></p>` leaves
|
|
48758
|
+
var neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
48678
48759
|
if (neighbor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
48679
48760
|
setCursorIn(neighbor, !backspace);
|
|
48680
48761
|
} else {
|
|
@@ -49190,8 +49271,15 @@ function _object_spread(target) {
|
|
|
49190
49271
|
}
|
|
49191
49272
|
cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
|
|
49192
49273
|
});
|
|
49274
|
+
var element = control.tags ? control.tags[0] : undefined;
|
|
49193
49275
|
editor.s.commitStyle({
|
|
49194
|
-
element:
|
|
49276
|
+
element: element,
|
|
49277
|
+
// As in the browsers and Word, each takes the other's place
|
|
49278
|
+
exclude: element === 'sub' ? [
|
|
49279
|
+
'sup'
|
|
49280
|
+
] : element === 'sup' ? [
|
|
49281
|
+
'sub'
|
|
49282
|
+
] : []
|
|
49195
49283
|
});
|
|
49196
49284
|
editor.synchronizeValues();
|
|
49197
49285
|
return false;
|
|
@@ -52313,11 +52401,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52313
52401
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
52314
52402
|
|
|
52315
52403
|
/* unused harmony export deleteCommand */
|
|
52316
|
-
/* harmony import */ var
|
|
52317
|
-
/* harmony import */ var
|
|
52318
|
-
/* harmony import */ var
|
|
52319
|
-
/* harmony import */ var
|
|
52320
|
-
/* harmony import */ var
|
|
52404
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
52405
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
52406
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
52407
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
52408
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
52409
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
52321
52410
|
function _array_like_to_array(arr, len) {
|
|
52322
52411
|
if (len == null || len > arr.length) len = arr.length;
|
|
52323
52412
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -52484,6 +52573,7 @@ function _wrap_native_super(Class) {
|
|
|
52484
52573
|
|
|
52485
52574
|
|
|
52486
52575
|
|
|
52576
|
+
|
|
52487
52577
|
var NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
52488
52578
|
'img',
|
|
52489
52579
|
'table',
|
|
@@ -52491,6 +52581,18 @@ var NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
|
52491
52581
|
'iframe',
|
|
52492
52582
|
'hr'
|
|
52493
52583
|
]);
|
|
52584
|
+
var KEEPS_SPACES = new Set([
|
|
52585
|
+
'pre',
|
|
52586
|
+
'pre-wrap',
|
|
52587
|
+
'break-spaces'
|
|
52588
|
+
]);
|
|
52589
|
+
/**
|
|
52590
|
+
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
52591
|
+
* line break, a block or text starting (or ending) with a plain space
|
|
52592
|
+
*/ function hidesSpace(neighbor, edge) {
|
|
52593
|
+
var _a;
|
|
52594
|
+
return !neighbor || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, 'br') || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(neighbor) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && edge.test((_a = neighbor.nodeValue) !== null && _a !== void 0 ? _a : '');
|
|
52595
|
+
}
|
|
52494
52596
|
var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
52495
52597
|
"use strict";
|
|
52496
52598
|
_inherits(deleteCommand, Plugin);
|
|
@@ -52528,13 +52630,13 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52528
52630
|
value: function __afterDeleteCommand() {
|
|
52529
52631
|
var jodit = this.j;
|
|
52530
52632
|
var current = jodit.s.current();
|
|
52531
|
-
if (current &&
|
|
52633
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current.firstChild, 'br')) {
|
|
52532
52634
|
jodit.s.removeNode(current.firstChild);
|
|
52533
52635
|
}
|
|
52534
|
-
if (!(0,
|
|
52535
|
-
return
|
|
52536
|
-
}) && (!current || !
|
|
52537
|
-
|
|
52636
|
+
if (!(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim)(jodit.editor.textContent || '') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(jodit.editor, function(node) {
|
|
52637
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS);
|
|
52638
|
+
}) && (!current || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'table', jodit.editor))) {
|
|
52639
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(jodit.editor);
|
|
52538
52640
|
var node = jodit.s.setCursorIn(jodit.editor);
|
|
52539
52641
|
jodit.s.removeNode(node);
|
|
52540
52642
|
}
|
|
@@ -52557,14 +52659,15 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52557
52659
|
range.deleteContents();
|
|
52558
52660
|
var fake = jodit.createInside.fake();
|
|
52559
52661
|
range.insertNode(fake);
|
|
52560
|
-
var leftSibling =
|
|
52561
|
-
var rightSibling =
|
|
52662
|
+
var leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, true);
|
|
52663
|
+
var rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, false);
|
|
52562
52664
|
this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
|
|
52665
|
+
this.__keepSpacesVisible(fake);
|
|
52563
52666
|
range.setStartBefore(fake);
|
|
52564
52667
|
range.collapse(true);
|
|
52565
52668
|
this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
|
|
52566
52669
|
this.__addBrInEmptyBlock(fake, range);
|
|
52567
|
-
|
|
52670
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
52568
52671
|
jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
|
|
52569
52672
|
return false;
|
|
52570
52673
|
}
|
|
@@ -52581,27 +52684,27 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52581
52684
|
*/ key: "__clearSelectedCells",
|
|
52582
52685
|
value: function __clearSelectedCells(range) {
|
|
52583
52686
|
var _this_j = this.j, editor = _this_j.editor, createInside = _this_j.createInside;
|
|
52584
|
-
var startCell =
|
|
52585
|
-
var endCell =
|
|
52687
|
+
var startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
52688
|
+
var endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
52586
52689
|
if (startCell === endCell) {
|
|
52587
52690
|
return null;
|
|
52588
52691
|
}
|
|
52589
|
-
var startTable =
|
|
52590
|
-
var endTable =
|
|
52692
|
+
var startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(startCell, 'table', editor);
|
|
52693
|
+
var endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(endCell, 'table', editor);
|
|
52591
52694
|
var caret = range.cloneRange();
|
|
52592
52695
|
caret.collapse(true);
|
|
52593
52696
|
var parts = [];
|
|
52594
52697
|
var addParts = function addParts(table) {
|
|
52595
|
-
(0,
|
|
52596
|
-
return (0,
|
|
52698
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(table.rows).flatMap(function(row) {
|
|
52699
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(row.cells);
|
|
52597
52700
|
}).filter(function(cell) {
|
|
52598
52701
|
return range.intersectsNode(cell);
|
|
52599
52702
|
}).forEach(function(cell) {
|
|
52600
52703
|
var part = range.cloneRange();
|
|
52601
|
-
if (!
|
|
52704
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.startContainer)) {
|
|
52602
52705
|
part.setStart(cell, 0);
|
|
52603
52706
|
}
|
|
52604
|
-
if (!
|
|
52707
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.endContainer)) {
|
|
52605
52708
|
part.setEnd(cell, cell.childNodes.length);
|
|
52606
52709
|
}
|
|
52607
52710
|
parts.push([
|
|
@@ -52625,9 +52728,9 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52625
52728
|
parts.forEach(function(param) {
|
|
52626
52729
|
var _param = _sliced_to_array(param, 2), cell = _param[0], part = _param[1];
|
|
52627
52730
|
part.deleteContents();
|
|
52628
|
-
if (
|
|
52629
|
-
|
|
52630
|
-
|
|
52731
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(cell)) {
|
|
52732
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(cell);
|
|
52733
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(cell, createInside.element('br'));
|
|
52631
52734
|
}
|
|
52632
52735
|
});
|
|
52633
52736
|
return startTable ? caret : null;
|
|
@@ -52638,49 +52741,89 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52638
52741
|
value: function __moveContentInLeftSibling(fake, leftSibling, rightSibling) {
|
|
52639
52742
|
leftSibling = this.__defineRightLeftBox(leftSibling);
|
|
52640
52743
|
// Nothing is moved into a table, and a block left empty after it goes
|
|
52641
|
-
if (
|
|
52642
|
-
if (
|
|
52643
|
-
|
|
52744
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(leftSibling, 'table')) {
|
|
52745
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
52746
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52644
52747
|
}
|
|
52645
52748
|
return;
|
|
52646
52749
|
}
|
|
52647
|
-
if (!
|
|
52648
|
-
|
|
52649
|
-
|
|
52650
|
-
|
|
52750
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(rightSibling, 'table') && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
|
|
52751
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
52752
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(rightSibling, leftSibling);
|
|
52753
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52651
52754
|
}
|
|
52652
|
-
if (
|
|
52755
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(rightSibling.firstElementChild)) {
|
|
52653
52756
|
var item = rightSibling.firstElementChild;
|
|
52654
52757
|
// What's left of the right list's first item joins the left block,
|
|
52655
52758
|
// up to a list nested in the item
|
|
52656
|
-
if (!
|
|
52657
|
-
|
|
52658
|
-
while(item.firstChild && !
|
|
52659
|
-
|
|
52759
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
|
|
52760
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
52761
|
+
while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(item.firstChild)){
|
|
52762
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, item.firstChild);
|
|
52660
52763
|
}
|
|
52661
52764
|
}
|
|
52662
52765
|
// Remove empty right LI
|
|
52663
|
-
if (
|
|
52664
|
-
|
|
52766
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item)) {
|
|
52767
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(item);
|
|
52665
52768
|
}
|
|
52666
|
-
if (
|
|
52667
|
-
|
|
52769
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
52770
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52668
52771
|
}
|
|
52669
52772
|
}
|
|
52670
52773
|
}
|
|
52671
52774
|
},
|
|
52672
52775
|
{
|
|
52673
52776
|
/**
|
|
52777
|
+
* A plain space the deletion leaves at an edge of the block, before a line
|
|
52778
|
+
* break or next to another space isn't shown, and the browser drops it when
|
|
52779
|
+
* the next char is typed. It becomes non-breaking, as in the browsers' own
|
|
52780
|
+
* delete and in Backspace without a selection (#1522)
|
|
52781
|
+
*/ key: "__keepSpacesVisible",
|
|
52782
|
+
value: function __keepSpacesVisible(fake) {
|
|
52783
|
+
var _a;
|
|
52784
|
+
var jodit = this.jodit;
|
|
52785
|
+
var block = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
|
|
52786
|
+
if (KEEPS_SPACES.has(jodit.ew.getComputedStyle(block).whiteSpace)) {
|
|
52787
|
+
return;
|
|
52788
|
+
}
|
|
52789
|
+
var before = this.__findNeighbor(fake, true, block);
|
|
52790
|
+
var after = this.__findNeighbor(fake, false, block);
|
|
52791
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
|
|
52792
|
+
before.nodeValue = before.nodeValue.replace(/ +$/, function(spaces) {
|
|
52793
|
+
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length);
|
|
52794
|
+
});
|
|
52795
|
+
}
|
|
52796
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
|
|
52797
|
+
after.nodeValue = after.nodeValue.replace(/^ +/, function(spaces) {
|
|
52798
|
+
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length);
|
|
52799
|
+
});
|
|
52800
|
+
}
|
|
52801
|
+
}
|
|
52802
|
+
},
|
|
52803
|
+
{
|
|
52804
|
+
/**
|
|
52805
|
+
* The text, line break or other element next to the caret in its block,
|
|
52806
|
+
* looking inside inline elements
|
|
52807
|
+
*/ key: "__findNeighbor",
|
|
52808
|
+
value: function __findNeighbor(fake, left, block) {
|
|
52809
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(left ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.next, fake, function(node) {
|
|
52810
|
+
var _a;
|
|
52811
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.trimInv)((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').length > 0 : !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isComment(node) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(node) && node.firstChild);
|
|
52812
|
+
}, block);
|
|
52813
|
+
}
|
|
52814
|
+
},
|
|
52815
|
+
{
|
|
52816
|
+
/**
|
|
52674
52817
|
* If left sibling is list - return last leaf
|
|
52675
52818
|
*/ key: "__defineRightLeftBox",
|
|
52676
52819
|
value: function __defineRightLeftBox(leftSibling) {
|
|
52677
|
-
if (!
|
|
52820
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(leftSibling)) {
|
|
52678
52821
|
return leftSibling;
|
|
52679
52822
|
}
|
|
52680
52823
|
var lastLeaf = leftSibling.lastElementChild;
|
|
52681
|
-
if (!
|
|
52824
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(lastLeaf)) {
|
|
52682
52825
|
lastLeaf = this.j.createInside.element('li');
|
|
52683
|
-
|
|
52826
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, lastLeaf);
|
|
52684
52827
|
}
|
|
52685
52828
|
return lastLeaf;
|
|
52686
52829
|
}
|
|
@@ -52691,9 +52834,9 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52691
52834
|
*/ key: "__addBrInEmptyBlock",
|
|
52692
52835
|
value: function __addBrInEmptyBlock(fake, range) {
|
|
52693
52836
|
var jodit = this.j;
|
|
52694
|
-
if (fake.isConnected &&
|
|
52837
|
+
if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
|
|
52695
52838
|
var br = jodit.createInside.element('br');
|
|
52696
|
-
|
|
52839
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fake, br);
|
|
52697
52840
|
range.setStartBefore(br);
|
|
52698
52841
|
range.collapse(true);
|
|
52699
52842
|
}
|
|
@@ -52703,24 +52846,24 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52703
52846
|
key: "__moveCursorInEditableSibling",
|
|
52704
52847
|
value: function __moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
52705
52848
|
var _a;
|
|
52706
|
-
if (!leftSibling || !
|
|
52707
|
-
var root = (_a =
|
|
52708
|
-
var leftText =
|
|
52849
|
+
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(leftSibling)) {
|
|
52850
|
+
var root = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
|
|
52851
|
+
var leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText, root);
|
|
52709
52852
|
if (leftText) {
|
|
52710
52853
|
range.setStartAfter(leftText);
|
|
52711
52854
|
range.collapse(true);
|
|
52712
|
-
|
|
52855
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
52713
52856
|
}
|
|
52714
52857
|
}
|
|
52715
52858
|
}
|
|
52716
52859
|
}
|
|
52717
52860
|
]);
|
|
52718
52861
|
return deleteCommand;
|
|
52719
|
-
}(_wrap_native_super(
|
|
52862
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin));
|
|
52720
52863
|
deleteCommand.requires = [
|
|
52721
52864
|
'backspace'
|
|
52722
52865
|
];
|
|
52723
|
-
|
|
52866
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
|
|
52724
52867
|
|
|
52725
52868
|
|
|
52726
52869
|
/***/ }),
|
|
@@ -64991,6 +65134,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
64991
65134
|
followOnDblClick: false,
|
|
64992
65135
|
processVideoLink: true,
|
|
64993
65136
|
processPastedLink: true,
|
|
65137
|
+
processTypedLink: false,
|
|
65138
|
+
typedLinkTlds: [],
|
|
65139
|
+
typedLinkFileEndings: [
|
|
65140
|
+
'zip',
|
|
65141
|
+
'mov',
|
|
65142
|
+
'md',
|
|
65143
|
+
'py',
|
|
65144
|
+
'sh',
|
|
65145
|
+
'pub'
|
|
65146
|
+
],
|
|
64994
65147
|
deriveUrlFromText: false,
|
|
64995
65148
|
noFollowCheckbox: true,
|
|
64996
65149
|
openInNewTabCheckbox: true,
|
|
@@ -65055,12 +65208,25 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
65055
65208
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
65056
65209
|
|
|
65057
65210
|
/* unused harmony export link */
|
|
65058
|
-
/* harmony import */ var
|
|
65059
|
-
/* harmony import */ var
|
|
65060
|
-
/* harmony import */ var
|
|
65061
|
-
/* harmony import */ var
|
|
65062
|
-
/* harmony import */ var
|
|
65063
|
-
/* harmony import */ var
|
|
65211
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
65212
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
65213
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
65214
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
65215
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
65216
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
65217
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
|
|
65218
|
+
/* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
|
|
65219
|
+
function _array_like_to_array(arr, len) {
|
|
65220
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
65221
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
65222
|
+
return arr2;
|
|
65223
|
+
}
|
|
65224
|
+
function _array_with_holes(arr) {
|
|
65225
|
+
if (Array.isArray(arr)) return arr;
|
|
65226
|
+
}
|
|
65227
|
+
function _array_without_holes(arr) {
|
|
65228
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
65229
|
+
}
|
|
65064
65230
|
function _assert_this_initialized(self) {
|
|
65065
65231
|
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
65066
65232
|
return self;
|
|
@@ -65132,6 +65298,41 @@ function _is_native_reflect_construct() {
|
|
|
65132
65298
|
return !!result;
|
|
65133
65299
|
})();
|
|
65134
65300
|
}
|
|
65301
|
+
function _iterable_to_array(iter) {
|
|
65302
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
65303
|
+
return Array.from(iter);
|
|
65304
|
+
}
|
|
65305
|
+
}
|
|
65306
|
+
function _iterable_to_array_limit(arr, i) {
|
|
65307
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
65308
|
+
if (_i == null) return;
|
|
65309
|
+
var _arr = [];
|
|
65310
|
+
var _n = true;
|
|
65311
|
+
var _d = false;
|
|
65312
|
+
var _s, _e;
|
|
65313
|
+
try {
|
|
65314
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
65315
|
+
_arr.push(_s.value);
|
|
65316
|
+
if (i && _arr.length === i) break;
|
|
65317
|
+
}
|
|
65318
|
+
} catch (err) {
|
|
65319
|
+
_d = true;
|
|
65320
|
+
_e = err;
|
|
65321
|
+
} finally{
|
|
65322
|
+
try {
|
|
65323
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
65324
|
+
} finally{
|
|
65325
|
+
if (_d) throw _e;
|
|
65326
|
+
}
|
|
65327
|
+
}
|
|
65328
|
+
return _arr;
|
|
65329
|
+
}
|
|
65330
|
+
function _non_iterable_rest() {
|
|
65331
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
65332
|
+
}
|
|
65333
|
+
function _non_iterable_spread() {
|
|
65334
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
65335
|
+
}
|
|
65135
65336
|
function _possible_constructor_return(self, call) {
|
|
65136
65337
|
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
65137
65338
|
return _assert_this_initialized(self);
|
|
@@ -65143,10 +65344,24 @@ function _set_prototype_of(o, p) {
|
|
|
65143
65344
|
};
|
|
65144
65345
|
return _set_prototype_of(o, p);
|
|
65145
65346
|
}
|
|
65347
|
+
function _sliced_to_array(arr, i) {
|
|
65348
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
65349
|
+
}
|
|
65350
|
+
function _to_consumable_array(arr) {
|
|
65351
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
65352
|
+
}
|
|
65146
65353
|
function _type_of(obj) {
|
|
65147
65354
|
"@swc/helpers - typeof";
|
|
65148
65355
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
65149
65356
|
}
|
|
65357
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
65358
|
+
if (!o) return;
|
|
65359
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
65360
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
65361
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
65362
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
65363
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
65364
|
+
}
|
|
65150
65365
|
function _wrap_native_super(Class) {
|
|
65151
65366
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
65152
65367
|
_wrap_native_super = function(Class) {
|
|
@@ -65187,6 +65402,8 @@ function _wrap_native_super(Class) {
|
|
|
65187
65402
|
|
|
65188
65403
|
|
|
65189
65404
|
|
|
65405
|
+
|
|
65406
|
+
|
|
65190
65407
|
/**
|
|
65191
65408
|
* Process link. Insert, dblclick or remove format
|
|
65192
65409
|
*/ var link = /*#__PURE__*/ function(Plugin) {
|
|
@@ -65202,6 +65419,16 @@ function _wrap_native_super(Class) {
|
|
|
65202
65419
|
group: 'insert'
|
|
65203
65420
|
}
|
|
65204
65421
|
];
|
|
65422
|
+
/**
|
|
65423
|
+
* Where the caret was when Enter was pressed. Enter splits the line in a
|
|
65424
|
+
* history transaction, so the link waits until it's over
|
|
65425
|
+
*/ _this.__enteredAt = null;
|
|
65426
|
+
_this.__linkAfterEnter = function() {};
|
|
65427
|
+
/**
|
|
65428
|
+
* The link just made, which Backspace straight after takes off again, as
|
|
65429
|
+
* in CKEditor 5. Any other key but a modifier, a click or a command
|
|
65430
|
+
* forgets it
|
|
65431
|
+
*/ _this.__justLinked = null;
|
|
65205
65432
|
return _this;
|
|
65206
65433
|
}
|
|
65207
65434
|
_create_class(link, [
|
|
@@ -65216,6 +65443,14 @@ function _wrap_native_super(Class) {
|
|
|
65216
65443
|
if (jodit.o.link.processPastedLink) {
|
|
65217
65444
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
65218
65445
|
}
|
|
65446
|
+
if (jodit.o.link.processTypedLink) {
|
|
65447
|
+
this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
|
|
65448
|
+
jodit.e.on('input.link', this.__onTypedSpace).on('beforeEnter.link', this.__onBeforeEnter).on('afterEnter.link', this.__onAfterEnter).on('mousedown.link blur.link beforeCommand.link', this.__forgetLink)// Without a namespace it runs ahead of table navigation,
|
|
65449
|
+
// which moves the caret on Tab, and of the backspace plugin
|
|
65450
|
+
.on('keydown', this.__onKeyDown, {
|
|
65451
|
+
top: true
|
|
65452
|
+
});
|
|
65453
|
+
}
|
|
65219
65454
|
jodit.e.on('generateLinkForm.link', this.__generateForm);
|
|
65220
65455
|
jodit.registerCommand('openLinkDialog', {
|
|
65221
65456
|
exec: function exec() {
|
|
@@ -65229,7 +65464,7 @@ function _wrap_native_super(Class) {
|
|
|
65229
65464
|
dialog.setContent(htmlForm);
|
|
65230
65465
|
dialog.open();
|
|
65231
65466
|
jodit.async.requestIdleCallback(function() {
|
|
65232
|
-
var url_input = (0,
|
|
65467
|
+
var url_input = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container).url_input;
|
|
65233
65468
|
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
65234
65469
|
});
|
|
65235
65470
|
},
|
|
@@ -65240,10 +65475,10 @@ function _wrap_native_super(Class) {
|
|
|
65240
65475
|
{
|
|
65241
65476
|
key: "__onDblClickOnLink",
|
|
65242
65477
|
value: function __onDblClickOnLink(e) {
|
|
65243
|
-
if (!
|
|
65478
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
65244
65479
|
return;
|
|
65245
65480
|
}
|
|
65246
|
-
var href = (0,
|
|
65481
|
+
var href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
|
|
65247
65482
|
if (href) {
|
|
65248
65483
|
location.href = href;
|
|
65249
65484
|
e.preventDefault();
|
|
@@ -65255,23 +65490,23 @@ function _wrap_native_super(Class) {
|
|
|
65255
65490
|
value: function onProcessPasteLink(ignore, html) {
|
|
65256
65491
|
var _a, _b, _c, _d;
|
|
65257
65492
|
var jodit = this.jodit;
|
|
65258
|
-
if (!(0,
|
|
65493
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
65259
65494
|
return;
|
|
65260
65495
|
}
|
|
65261
65496
|
jodit.e.stopPropagation('processPaste');
|
|
65262
65497
|
if (jodit.o.link.processVideoLink) {
|
|
65263
|
-
var embed = (0,
|
|
65498
|
+
var embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.convertMediaUrlToVideoEmbed, html, {
|
|
65264
65499
|
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
65265
65500
|
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
65266
65501
|
});
|
|
65267
65502
|
if (embed !== html) {
|
|
65268
|
-
var media = (0,
|
|
65269
|
-
return (0,
|
|
65503
|
+
var media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
|
|
65504
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
|
|
65270
65505
|
}
|
|
65271
65506
|
}
|
|
65272
65507
|
if (jodit.s.isCollapsed()) {
|
|
65273
65508
|
var a = jodit.createInside.element('a');
|
|
65274
|
-
(0,
|
|
65509
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
|
|
65275
65510
|
a.textContent = html;
|
|
65276
65511
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
65277
65512
|
return a;
|
|
@@ -65292,16 +65527,16 @@ function _wrap_native_super(Class) {
|
|
|
65292
65527
|
var i18n = jodit.i18n.bind(jodit);
|
|
65293
65528
|
var _jodit_o_link = jodit.o.link, openInNewTabCheckbox = _jodit_o_link.openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked = _jodit_o_link.openInNewTabCheckboxDefaultChecked, noFollowCheckbox = _jodit_o_link.noFollowCheckbox, formTemplate = _jodit_o_link.formTemplate, formClassName = _jodit_o_link.formClassName, modeClassName = _jodit_o_link.modeClassName;
|
|
65294
65529
|
var html = formTemplate(jodit);
|
|
65295
|
-
var form = (0,
|
|
65530
|
+
var form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
65296
65531
|
target_checkbox_box: openInNewTabCheckbox,
|
|
65297
65532
|
nofollow_checkbox_box: noFollowCheckbox
|
|
65298
65533
|
}) : html;
|
|
65299
|
-
var htmlForm =
|
|
65300
|
-
var elements = (0,
|
|
65534
|
+
var htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
|
|
65535
|
+
var elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
|
|
65301
65536
|
var insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box;
|
|
65302
65537
|
var target_checkbox = elements.target_checkbox, nofollow_checkbox = elements.nofollow_checkbox, url_input = elements.url_input;
|
|
65303
65538
|
var currentElement = current;
|
|
65304
|
-
var isImageContent =
|
|
65539
|
+
var isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
|
|
65305
65540
|
var content_input = elements.content_input;
|
|
65306
65541
|
var className_input = elements.className_input, className_select = elements.className_select, aria_label_input = elements.aria_label_input;
|
|
65307
65542
|
if (!content_input) {
|
|
@@ -65314,14 +65549,14 @@ function _wrap_native_super(Class) {
|
|
|
65314
65549
|
htmlForm.classList.add(formClassName);
|
|
65315
65550
|
}
|
|
65316
65551
|
if (isImageContent) {
|
|
65317
|
-
|
|
65552
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
|
|
65318
65553
|
}
|
|
65319
65554
|
var _$link;
|
|
65320
65555
|
var getSelectionText = function getSelectionText() {
|
|
65321
|
-
return _$link ? _$link.innerText : (0,
|
|
65556
|
+
return _$link ? _$link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
|
|
65322
65557
|
};
|
|
65323
|
-
if (current &&
|
|
65324
|
-
_$link =
|
|
65558
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
|
|
65559
|
+
_$link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
|
|
65325
65560
|
} else {
|
|
65326
65561
|
_$link = false;
|
|
65327
65562
|
}
|
|
@@ -65329,22 +65564,22 @@ function _wrap_native_super(Class) {
|
|
|
65329
65564
|
content_input.value = getSelectionText();
|
|
65330
65565
|
}
|
|
65331
65566
|
if (aria_label_input) {
|
|
65332
|
-
aria_label_input.value = _$link ? (0,
|
|
65567
|
+
aria_label_input.value = _$link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'aria-label') || '' : '';
|
|
65333
65568
|
}
|
|
65334
65569
|
if (_$link) {
|
|
65335
|
-
url_input.value = (0,
|
|
65570
|
+
url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'href') || '';
|
|
65336
65571
|
if (modeClassName) {
|
|
65337
65572
|
readClassnames(modeClassName, className_input, _$link, className_select);
|
|
65338
65573
|
}
|
|
65339
65574
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
65340
|
-
target_checkbox.checked = (0,
|
|
65575
|
+
target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'target') === '_blank';
|
|
65341
65576
|
}
|
|
65342
65577
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
65343
|
-
nofollow_checkbox.checked = ((0,
|
|
65578
|
+
nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(_$link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
65344
65579
|
}
|
|
65345
65580
|
insert.textContent = i18n('Update');
|
|
65346
65581
|
} else {
|
|
65347
|
-
|
|
65582
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
|
|
65348
65583
|
if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
|
|
65349
65584
|
url_input.value = guessUrlFromText(content_input.value);
|
|
65350
65585
|
}
|
|
@@ -65359,7 +65594,7 @@ function _wrap_native_super(Class) {
|
|
|
65359
65594
|
jodit.s.restore();
|
|
65360
65595
|
jodit.history.snapshot.restore(snapshot);
|
|
65361
65596
|
if (_$link) {
|
|
65362
|
-
|
|
65597
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(_$link);
|
|
65363
65598
|
}
|
|
65364
65599
|
jodit.synchronizeValues();
|
|
65365
65600
|
close();
|
|
@@ -65380,12 +65615,12 @@ function _wrap_native_super(Class) {
|
|
|
65380
65615
|
var textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
65381
65616
|
var ci = jodit.createInside;
|
|
65382
65617
|
var caretAfter = null;
|
|
65383
|
-
if (!_$link || !
|
|
65618
|
+
if (!_$link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, _$link)) {
|
|
65384
65619
|
if (!jodit.s.isCollapsed()) {
|
|
65385
65620
|
var node = jodit.s.current();
|
|
65386
|
-
if (
|
|
65621
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
|
|
65387
65622
|
links = [
|
|
65388
|
-
|
|
65623
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
|
|
65389
65624
|
];
|
|
65390
65625
|
} else {
|
|
65391
65626
|
links = jodit.s.wrapInTag('a');
|
|
@@ -65407,27 +65642,27 @@ function _wrap_native_super(Class) {
|
|
|
65407
65642
|
];
|
|
65408
65643
|
}
|
|
65409
65644
|
links.forEach(function(a) {
|
|
65410
|
-
;(0,
|
|
65645
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
|
|
65411
65646
|
writeClasses(modeClassName, className_input, className_select, a);
|
|
65412
65647
|
if (!isImageContent) {
|
|
65413
65648
|
writeImage(a, content_input, textWasChanged, url_input);
|
|
65414
65649
|
}
|
|
65415
65650
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
65416
|
-
(0,
|
|
65651
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
65417
65652
|
}
|
|
65418
65653
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
65419
|
-
var relParts = ((0,
|
|
65654
|
+
var relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
65420
65655
|
var hasNofollow = relParts.includes('nofollow');
|
|
65421
65656
|
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
65422
65657
|
relParts.push('nofollow');
|
|
65423
65658
|
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
65424
65659
|
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
65425
65660
|
}
|
|
65426
|
-
;(0,
|
|
65661
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
65427
65662
|
}
|
|
65428
65663
|
if (aria_label_input) {
|
|
65429
65664
|
var ariaLabel = aria_label_input.value.trim();
|
|
65430
|
-
(0,
|
|
65665
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
|
|
65431
65666
|
}
|
|
65432
65667
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
65433
65668
|
});
|
|
@@ -65442,7 +65677,7 @@ function _wrap_native_super(Class) {
|
|
|
65442
65677
|
close();
|
|
65443
65678
|
return false;
|
|
65444
65679
|
};
|
|
65445
|
-
if (
|
|
65680
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
|
|
65446
65681
|
jodit.e.on(form, 'submit', function(event) {
|
|
65447
65682
|
event.preventDefault();
|
|
65448
65683
|
event.stopImmediatePropagation();
|
|
@@ -65458,34 +65693,170 @@ function _wrap_native_super(Class) {
|
|
|
65458
65693
|
{
|
|
65459
65694
|
/** @override */ key: "beforeDestruct",
|
|
65460
65695
|
value: function beforeDestruct(jodit) {
|
|
65461
|
-
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
|
|
65696
|
+
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink).off('input.link', this.__onTypedSpace).off('beforeEnter.link', this.__onBeforeEnter).off('afterEnter.link', this.__onAfterEnter).off('mousedown.link blur.link beforeCommand.link', this.__forgetLink).off('keydown', this.__onKeyDown);
|
|
65697
|
+
}
|
|
65698
|
+
},
|
|
65699
|
+
{
|
|
65700
|
+
key: "__onTypedSpace",
|
|
65701
|
+
value: function __onTypedSpace(event) {
|
|
65702
|
+
if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
|
|
65703
|
+
return;
|
|
65704
|
+
}
|
|
65705
|
+
var range = this.j.s.range;
|
|
65706
|
+
if (range.collapsed) {
|
|
65707
|
+
this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
|
|
65708
|
+
}
|
|
65709
|
+
}
|
|
65710
|
+
},
|
|
65711
|
+
{
|
|
65712
|
+
key: "__onBeforeEnter",
|
|
65713
|
+
value: function __onBeforeEnter() {
|
|
65714
|
+
var range = this.j.s.range;
|
|
65715
|
+
this.__enteredAt = range.collapsed ? [
|
|
65716
|
+
range.startContainer,
|
|
65717
|
+
range.startOffset
|
|
65718
|
+
] : null;
|
|
65719
|
+
}
|
|
65720
|
+
},
|
|
65721
|
+
{
|
|
65722
|
+
key: "__onAfterEnter",
|
|
65723
|
+
value: function __onAfterEnter() {
|
|
65724
|
+
if (this.__enteredAt) {
|
|
65725
|
+
this.__linkAfterEnter.apply(this, _to_consumable_array(this.__enteredAt));
|
|
65726
|
+
this.__enteredAt = null;
|
|
65727
|
+
}
|
|
65728
|
+
}
|
|
65729
|
+
},
|
|
65730
|
+
{
|
|
65731
|
+
key: "__forgetLink",
|
|
65732
|
+
value: function __forgetLink() {
|
|
65733
|
+
this.__justLinked = null;
|
|
65734
|
+
}
|
|
65735
|
+
},
|
|
65736
|
+
{
|
|
65737
|
+
key: "__onKeyDown",
|
|
65738
|
+
value: function __onKeyDown(event) {
|
|
65739
|
+
var jodit = this.jodit;
|
|
65740
|
+
if (jodit.o.readonly) {
|
|
65741
|
+
return;
|
|
65742
|
+
}
|
|
65743
|
+
var _$link = this.__justLinked;
|
|
65744
|
+
var modified = event.ctrlKey || event.metaKey || event.altKey;
|
|
65745
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
65746
|
+
this.__justLinked = null;
|
|
65747
|
+
}
|
|
65748
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (_$link === null || _$link === void 0 ? void 0 : _$link.isConnected)) {
|
|
65749
|
+
this.__recordStep();
|
|
65750
|
+
jodit.s.save();
|
|
65751
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(_$link);
|
|
65752
|
+
jodit.s.restore();
|
|
65753
|
+
this.__recordStep();
|
|
65754
|
+
// Or the backspace plugin takes a character too
|
|
65755
|
+
jodit.e.stopPropagation('keydown');
|
|
65756
|
+
return false;
|
|
65757
|
+
}
|
|
65758
|
+
var range = jodit.s.range;
|
|
65759
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
|
|
65760
|
+
this.__linkTyped(range.startContainer, range.startOffset);
|
|
65761
|
+
}
|
|
65762
|
+
}
|
|
65763
|
+
},
|
|
65764
|
+
{
|
|
65765
|
+
/**
|
|
65766
|
+
* Links the address that ends at `end` in a text node, as a step of its
|
|
65767
|
+
* own in the history, so Undo straight after takes the link off and
|
|
65768
|
+
* leaves the text
|
|
65769
|
+
*/ key: "__linkTyped",
|
|
65770
|
+
value: function __linkTyped(node, end) {
|
|
65771
|
+
var jodit = this.jodit;
|
|
65772
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) || !node.isConnected || end < 0 || end > node.length || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, NO_TYPED_LINKS, jodit.editor)) {
|
|
65773
|
+
return;
|
|
65774
|
+
}
|
|
65775
|
+
var found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
|
|
65776
|
+
if (!found) {
|
|
65777
|
+
return;
|
|
65778
|
+
}
|
|
65779
|
+
var _found = _sliced_to_array(found, 3), start = _found[0], stop = _found[1], href = _found[2];
|
|
65780
|
+
this.__recordStep();
|
|
65781
|
+
// The text round the caret splits, and WebKit doesn't keep the caret
|
|
65782
|
+
// where it was
|
|
65783
|
+
jodit.s.save();
|
|
65784
|
+
var range = jodit.ed.createRange();
|
|
65785
|
+
range.setStart(node, start);
|
|
65786
|
+
range.setEnd(node, stop);
|
|
65787
|
+
var a = jodit.createInside.element('a');
|
|
65788
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
|
|
65789
|
+
range.surroundContents(a);
|
|
65790
|
+
jodit.s.restore();
|
|
65791
|
+
jodit.e.fire('applyLink', jodit, a, null);
|
|
65792
|
+
this.__recordStep();
|
|
65793
|
+
this.__justLinked = a;
|
|
65794
|
+
}
|
|
65795
|
+
},
|
|
65796
|
+
{
|
|
65797
|
+
/**
|
|
65798
|
+
* Reports what's changed and makes it a history step of its own
|
|
65799
|
+
*/ key: "__recordStep",
|
|
65800
|
+
value: function __recordStep() {
|
|
65801
|
+
this.j.setEditorValue();
|
|
65802
|
+
this.j.e.fire('internalChange');
|
|
65462
65803
|
}
|
|
65463
65804
|
},
|
|
65464
65805
|
{
|
|
65465
65806
|
key: "__onClickReadOnlyLink",
|
|
65466
65807
|
value: function __onClickReadOnlyLink(e) {
|
|
65467
65808
|
var jodit = this.jodit;
|
|
65468
|
-
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation &&
|
|
65809
|
+
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
65469
65810
|
e.preventDefault();
|
|
65470
65811
|
}
|
|
65471
65812
|
}
|
|
65472
65813
|
}
|
|
65473
65814
|
]);
|
|
65474
65815
|
return link;
|
|
65475
|
-
}(_wrap_native_super(
|
|
65816
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin));
|
|
65476
65817
|
__decorate([
|
|
65477
|
-
|
|
65818
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65478
65819
|
], link.prototype, "__onDblClickOnLink", null);
|
|
65479
65820
|
__decorate([
|
|
65480
|
-
|
|
65821
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65481
65822
|
], link.prototype, "onProcessPasteLink", null);
|
|
65482
65823
|
__decorate([
|
|
65483
|
-
|
|
65824
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65484
65825
|
], link.prototype, "__generateForm", null);
|
|
65485
65826
|
__decorate([
|
|
65486
|
-
|
|
65827
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65828
|
+
], link.prototype, "__onTypedSpace", null);
|
|
65829
|
+
__decorate([
|
|
65830
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65831
|
+
], link.prototype, "__onBeforeEnter", null);
|
|
65832
|
+
__decorate([
|
|
65833
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65834
|
+
], link.prototype, "__onAfterEnter", null);
|
|
65835
|
+
__decorate([
|
|
65836
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65837
|
+
], link.prototype, "__forgetLink", null);
|
|
65838
|
+
__decorate([
|
|
65839
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65840
|
+
], link.prototype, "__onKeyDown", null);
|
|
65841
|
+
__decorate([
|
|
65842
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65843
|
+
], link.prototype, "__linkTyped", null);
|
|
65844
|
+
__decorate([
|
|
65845
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
65487
65846
|
], link.prototype, "__onClickReadOnlyLink", null);
|
|
65488
|
-
|
|
65847
|
+
var NO_TYPED_LINKS = new Set([
|
|
65848
|
+
'a',
|
|
65849
|
+
'pre',
|
|
65850
|
+
'code'
|
|
65851
|
+
]);
|
|
65852
|
+
var MODIFIER_KEYS = new Set([
|
|
65853
|
+
'Shift',
|
|
65854
|
+
'Control',
|
|
65855
|
+
'Alt',
|
|
65856
|
+
'Meta',
|
|
65857
|
+
'CapsLock'
|
|
65858
|
+
]);
|
|
65859
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
|
|
65489
65860
|
/**
|
|
65490
65861
|
* Guess a usable `href` from the selected text for the link dialog.
|
|
65491
65862
|
* Returns an empty string when the text is not a plausible URL/email,
|
|
@@ -65500,7 +65871,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
|
|
|
65500
65871
|
return value;
|
|
65501
65872
|
}
|
|
65502
65873
|
// email address -> mailto:
|
|
65503
|
-
if (
|
|
65874
|
+
if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
|
|
65504
65875
|
return "mailto:".concat(value);
|
|
65505
65876
|
}
|
|
65506
65877
|
// bare domain like example.com or www.example.com/path -> https://
|
|
@@ -65514,14 +65885,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
65514
65885
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
65515
65886
|
if (modeClassName === 'input') {
|
|
65516
65887
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
65517
|
-
(0,
|
|
65888
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
65518
65889
|
}
|
|
65519
65890
|
if (className_input.value !== '') {
|
|
65520
|
-
(0,
|
|
65891
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
|
|
65521
65892
|
}
|
|
65522
65893
|
} else if (modeClassName === 'select') {
|
|
65523
65894
|
if (a.hasAttribute('class')) {
|
|
65524
|
-
(0,
|
|
65895
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
65525
65896
|
}
|
|
65526
65897
|
for(var i = 0; i < className_select.selectedOptions.length; i++){
|
|
65527
65898
|
var className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
@@ -65540,7 +65911,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
65540
65911
|
switch(modeClassName){
|
|
65541
65912
|
case 'input':
|
|
65542
65913
|
if (className_input) {
|
|
65543
|
-
className_input.value = (0,
|
|
65914
|
+
className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
65544
65915
|
}
|
|
65545
65916
|
break;
|
|
65546
65917
|
case 'select':
|
|
@@ -65551,7 +65922,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
65551
65922
|
option.selected = false;
|
|
65552
65923
|
}
|
|
65553
65924
|
}
|
|
65554
|
-
var classNames = (0,
|
|
65925
|
+
var classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
65555
65926
|
classNames.split(/\s+/).filter(function(cn) {
|
|
65556
65927
|
return cn.trim().length > 0;
|
|
65557
65928
|
}).forEach(function(className) {
|
|
@@ -65682,6 +66053,139 @@ var formTemplate = function formTemplate(editor) {
|
|
|
65682
66053
|
};
|
|
65683
66054
|
|
|
65684
66055
|
|
|
66056
|
+
/***/ }),
|
|
66057
|
+
|
|
66058
|
+
/***/ 67272:
|
|
66059
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
66060
|
+
|
|
66061
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66062
|
+
/* harmony export */ TLDS: function() { return /* binding */ TLDS; }
|
|
66063
|
+
/* harmony export */ });
|
|
66064
|
+
/*!
|
|
66065
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
66066
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
66067
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
66068
|
+
*/ /**
|
|
66069
|
+
* @module plugins/link
|
|
66070
|
+
*/ /**
|
|
66071
|
+
* The endings a bare domain links with, besides those `link.typedLinkTlds`
|
|
66072
|
+
* adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
|
|
66073
|
+
* million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
|
|
66074
|
+
* two-letter one in IANA's list (version 2026102900,
|
|
66075
|
+
* https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
|
|
66076
|
+
* endings of 96% of those sites
|
|
66077
|
+
* @private
|
|
66078
|
+
*/ var TLDS = new Set("\n app biz casino click cloud club com dev edu gov info live net online org pro\n shop site space store tech top vip xyz\n ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi\n bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu\n cv cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga\n gb gd ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id\n ie il im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la\n lb lc li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms\n mt mu mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph\n pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk\n sl sm sn so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt\n tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw\n".trim().split(/\s+/));
|
|
66079
|
+
|
|
66080
|
+
|
|
66081
|
+
/***/ }),
|
|
66082
|
+
|
|
66083
|
+
/***/ 58970:
|
|
66084
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
66085
|
+
|
|
66086
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66087
|
+
/* harmony export */ EMAIL: function() { return /* binding */ EMAIL; },
|
|
66088
|
+
/* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
|
|
66089
|
+
/* harmony export */ });
|
|
66090
|
+
/* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
|
|
66091
|
+
/* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
|
|
66092
|
+
/*!
|
|
66093
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
66094
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
66095
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
66096
|
+
*/ /**
|
|
66097
|
+
* @module plugins/link
|
|
66098
|
+
*/
|
|
66099
|
+
|
|
66100
|
+
/**
|
|
66101
|
+
* An email address, for `mailto:`
|
|
66102
|
+
* @private
|
|
66103
|
+
*/ var EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
66104
|
+
var OPENING = new Set([
|
|
66105
|
+
'(',
|
|
66106
|
+
'[',
|
|
66107
|
+
'"',
|
|
66108
|
+
"'",
|
|
66109
|
+
'“',
|
|
66110
|
+
'‘',
|
|
66111
|
+
'<'
|
|
66112
|
+
]);
|
|
66113
|
+
var CLOSING = new Set([
|
|
66114
|
+
'.',
|
|
66115
|
+
',',
|
|
66116
|
+
';',
|
|
66117
|
+
':',
|
|
66118
|
+
'!',
|
|
66119
|
+
'?',
|
|
66120
|
+
'"',
|
|
66121
|
+
"'",
|
|
66122
|
+
'”',
|
|
66123
|
+
'’',
|
|
66124
|
+
'>'
|
|
66125
|
+
]);
|
|
66126
|
+
var BRACKETS = {
|
|
66127
|
+
')': '(',
|
|
66128
|
+
']': '['
|
|
66129
|
+
};
|
|
66130
|
+
var LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
|
|
66131
|
+
/**
|
|
66132
|
+
* The address that ends at `end` in a line of text typed, back to the
|
|
66133
|
+
* whitespace before it, as `[start, end, href]`. Punctuation round it, such as
|
|
66134
|
+
* a sentence's full stop or a bracket the address doesn't open, stays out.
|
|
66135
|
+
* An address counts with a scheme, with `www.`, as an email address, or as a
|
|
66136
|
+
* bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
|
|
66137
|
+
* @private
|
|
66138
|
+
*/ function findTypedLink(text, end, tlds, fileEndings) {
|
|
66139
|
+
var start = end;
|
|
66140
|
+
while(start > 0 && !/\s/.test(text[start - 1])){
|
|
66141
|
+
start -= 1;
|
|
66142
|
+
}
|
|
66143
|
+
while(start < end && OPENING.has(text[start])){
|
|
66144
|
+
start += 1;
|
|
66145
|
+
}
|
|
66146
|
+
while(end > start){
|
|
66147
|
+
var char = text[end - 1];
|
|
66148
|
+
var opening = BRACKETS[char];
|
|
66149
|
+
if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
|
|
66150
|
+
end -= 1;
|
|
66151
|
+
} else {
|
|
66152
|
+
break;
|
|
66153
|
+
}
|
|
66154
|
+
}
|
|
66155
|
+
var href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
|
|
66156
|
+
return href ? [
|
|
66157
|
+
start,
|
|
66158
|
+
end,
|
|
66159
|
+
href
|
|
66160
|
+
] : null;
|
|
66161
|
+
}
|
|
66162
|
+
function typedLinkHref(address, tlds, fileEndings) {
|
|
66163
|
+
var email = address.replace(/^mailto:/i, '');
|
|
66164
|
+
if (EMAIL.test(email)) {
|
|
66165
|
+
return "mailto:".concat(email);
|
|
66166
|
+
}
|
|
66167
|
+
if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
|
|
66168
|
+
return "https://".concat(address);
|
|
66169
|
+
}
|
|
66170
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
|
|
66171
|
+
}
|
|
66172
|
+
/**
|
|
66173
|
+
* A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
|
|
66174
|
+
* or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
|
|
66175
|
+
* case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
|
|
66176
|
+
* not in `fileEndings`, as in `photos.zip`. The first part has a letter,
|
|
66177
|
+
* which leaves out a time or a numbered step such as `11.am`
|
|
66178
|
+
*/ function isBareDomain(address, tlds, fileEndings) {
|
|
66179
|
+
var cut = address.search(/[/?#]/);
|
|
66180
|
+
var host = cut < 0 ? address : address.slice(0, cut);
|
|
66181
|
+
var labels = host.split('.');
|
|
66182
|
+
var ending = labels[labels.length - 1];
|
|
66183
|
+
return labels.length > 1 && labels.every(function(label) {
|
|
66184
|
+
return LABEL.test(label) && !label.endsWith('-');
|
|
66185
|
+
}) && (_tlds_js__WEBPACK_IMPORTED_MODULE_1__.TLDS.has(ending) || tlds.includes(ending)) && !fileEndings.includes(ending) && /[a-z]/i.test(labels[0]);
|
|
66186
|
+
}
|
|
66187
|
+
|
|
66188
|
+
|
|
65685
66189
|
/***/ }),
|
|
65686
66190
|
|
|
65687
66191
|
/***/ 757:
|
|
@@ -69184,10 +69688,21 @@ var key = 'table_processor_observer-resize';
|
|
|
69184
69688
|
_this.startX = 0;
|
|
69185
69689
|
/**
|
|
69186
69690
|
* The table's and its cells' styles as a column drag started, put back
|
|
69187
|
-
* before
|
|
69691
|
+
* as it ends, before the final widths
|
|
69188
69692
|
*/ _this.startStyles = [];
|
|
69189
69693
|
_this.startLeft = 0;
|
|
69190
69694
|
_this.startEdge = 0;
|
|
69695
|
+
/**
|
|
69696
|
+
* For each of the two columns a drag resizes, the cell whose width
|
|
69697
|
+
* `setColumnWidthByDelta` sets, with its width as the drag started, and
|
|
69698
|
+
* the cells below it, whose widths it clears
|
|
69699
|
+
*/ _this.startWidths = [];
|
|
69700
|
+
/**
|
|
69701
|
+
* The table's width as the drag started, and for a drag of its edge, the
|
|
69702
|
+
* width inside what holds it and its margin on that side
|
|
69703
|
+
*/ _this.startTableWidth = 0;
|
|
69704
|
+
_this.startParentWidth = 0;
|
|
69705
|
+
_this.startMargin = 0;
|
|
69191
69706
|
/**
|
|
69192
69707
|
* The row whose height the handle sets, or null while it sets a width
|
|
69193
69708
|
*/ _this.workRow = null;
|
|
@@ -69249,7 +69764,7 @@ var key = 'table_processor_observer-resize';
|
|
|
69249
69764
|
*/ key: "onHandleMouseDown",
|
|
69250
69765
|
value: function onHandleMouseDown(event) {
|
|
69251
69766
|
var _this = this;
|
|
69252
|
-
if (this.j.isLocked) {
|
|
69767
|
+
if (this.j.isLocked || this.j.o.readonly) {
|
|
69253
69768
|
return;
|
|
69254
69769
|
}
|
|
69255
69770
|
this.drag = true;
|
|
@@ -69285,10 +69800,15 @@ var key = 'table_processor_observer-resize';
|
|
|
69285
69800
|
var box;
|
|
69286
69801
|
this.minX = 0;
|
|
69287
69802
|
this.maxX = 1000000;
|
|
69803
|
+
this.startTableWidth = this.workTable.offsetWidth;
|
|
69288
69804
|
if (this.wholeTable != null) {
|
|
69289
|
-
var
|
|
69805
|
+
var parent = this.workTable.parentNode;
|
|
69806
|
+
var tableBox = parent.getBoundingClientRect();
|
|
69290
69807
|
this.minX = tableBox.left;
|
|
69291
69808
|
this.maxX = this.minX + tableBox.width;
|
|
69809
|
+
var side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
69810
|
+
this.startParentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(parent, this.j.ew);
|
|
69811
|
+
this.startMargin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
69292
69812
|
} else {
|
|
69293
69813
|
// find maximum columns
|
|
69294
69814
|
var coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
|
|
@@ -69302,6 +69822,21 @@ var key = 'table_processor_observer-resize';
|
|
|
69302
69822
|
_this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, _this.maxX);
|
|
69303
69823
|
}
|
|
69304
69824
|
});
|
|
69825
|
+
var matrix = this.module.formalMatrix(this.workTable);
|
|
69826
|
+
this.startWidths = this.resizedColumns().map(function(column) {
|
|
69827
|
+
var cells = matrix.map(function(row) {
|
|
69828
|
+
return row[column];
|
|
69829
|
+
});
|
|
69830
|
+
var index = cells.findIndex(function(td) {
|
|
69831
|
+
return td.colSpan === 1 || cells.length === 1;
|
|
69832
|
+
});
|
|
69833
|
+
var cell = cells[index];
|
|
69834
|
+
return [
|
|
69835
|
+
cell,
|
|
69836
|
+
cell ? cell.offsetWidth : 0,
|
|
69837
|
+
cells.slice(Math.max(index, 0) + 1)
|
|
69838
|
+
];
|
|
69839
|
+
});
|
|
69305
69840
|
}
|
|
69306
69841
|
return false;
|
|
69307
69842
|
}
|
|
@@ -69333,8 +69868,11 @@ var key = 'table_processor_observer-resize';
|
|
|
69333
69868
|
x = this.maxX;
|
|
69334
69869
|
}
|
|
69335
69870
|
this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
69336
|
-
this.
|
|
69337
|
-
|
|
69871
|
+
if (this.wholeTable == null) {
|
|
69872
|
+
this.setColumnWidths();
|
|
69873
|
+
} else {
|
|
69874
|
+
this.resizeTable();
|
|
69875
|
+
}
|
|
69338
69876
|
var tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
|
|
69339
69877
|
Object.assign(this.resizeHandler.style, {
|
|
69340
69878
|
left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
|
|
@@ -69475,15 +70013,51 @@ var key = 'table_processor_observer-resize';
|
|
|
69475
70013
|
},
|
|
69476
70014
|
{
|
|
69477
70015
|
/**
|
|
70016
|
+
* The two columns a column drag resizes: the work cell's last, and the
|
|
70017
|
+
* next cell's first
|
|
70018
|
+
*/ key: "resizedColumns",
|
|
70019
|
+
value: function resizedColumns() {
|
|
70020
|
+
var nextTD = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(this.isRTL ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prev : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next, this.workCell, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, this.workCell.parentNode);
|
|
70021
|
+
return [
|
|
70022
|
+
this.module.formalCoordinate(this.workTable, this.workCell, true)[1],
|
|
70023
|
+
this.module.formalCoordinate(this.workTable, nextTD)[1]
|
|
70024
|
+
];
|
|
70025
|
+
}
|
|
70026
|
+
},
|
|
70027
|
+
{
|
|
70028
|
+
/**
|
|
69478
70029
|
* Resize only one column
|
|
69479
70030
|
*/ key: "resizeColumns",
|
|
69480
70031
|
value: function resizeColumns() {
|
|
69481
70032
|
var delta = this.resizeDelta;
|
|
69482
70033
|
var marked = [];
|
|
69483
70034
|
var tableModule = this.module;
|
|
69484
|
-
|
|
69485
|
-
|
|
69486
|
-
tableModule.setColumnWidthByDelta(this.workTable,
|
|
70035
|
+
var _this_resizedColumns = _sliced_to_array(this.resizedColumns(), 2), column = _this_resizedColumns[0], nextColumn = _this_resizedColumns[1];
|
|
70036
|
+
tableModule.setColumnWidthByDelta(this.workTable, column, delta, true, marked);
|
|
70037
|
+
tableModule.setColumnWidthByDelta(this.workTable, nextColumn, -delta, false, marked);
|
|
70038
|
+
}
|
|
70039
|
+
},
|
|
70040
|
+
{
|
|
70041
|
+
/**
|
|
70042
|
+
* Sets the widths `resizeColumns` would while the handle is dragged, from
|
|
70043
|
+
* the widths the drag started with, so that a move doesn't put back every
|
|
70044
|
+
* cell's style and lay the table out again to measure them
|
|
70045
|
+
*/ key: "setColumnWidths",
|
|
70046
|
+
value: function setColumnWidths() {
|
|
70047
|
+
var _this = this;
|
|
70048
|
+
this.startWidths.forEach(function(param, index) {
|
|
70049
|
+
var _param = _sliced_to_array(param, 3), cell = _param[0], width = _param[1], below = _param[2];
|
|
70050
|
+
var delta = index ? -_this.resizeDelta : _this.resizeDelta;
|
|
70051
|
+
if (cell) {
|
|
70052
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(cell, 'width', ((width + delta) / _this.startTableWidth * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.ACCURACY) + '%');
|
|
70053
|
+
}
|
|
70054
|
+
below.forEach(function(td) {
|
|
70055
|
+
td.style.removeProperty('width');
|
|
70056
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style')) {
|
|
70057
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style', null);
|
|
70058
|
+
}
|
|
70059
|
+
});
|
|
70060
|
+
});
|
|
69487
70061
|
}
|
|
69488
70062
|
},
|
|
69489
70063
|
{
|
|
@@ -69492,7 +70066,7 @@ var key = 'table_processor_observer-resize';
|
|
|
69492
70066
|
*/ key: "resizeTable",
|
|
69493
70067
|
value: function resizeTable() {
|
|
69494
70068
|
var delta = this.resizeDelta * (this.isRTL ? -1 : 1);
|
|
69495
|
-
var width = this.
|
|
70069
|
+
var width = this.startTableWidth, parentWidth = this.startParentWidth;
|
|
69496
70070
|
// for RTL use mirror logic
|
|
69497
70071
|
var rightSide = !this.wholeTable;
|
|
69498
70072
|
var needChangeWidth = this.isRTL ? !rightSide : rightSide;
|
|
@@ -69501,10 +70075,9 @@ var key = 'table_processor_observer-resize';
|
|
|
69501
70075
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
|
|
69502
70076
|
} else {
|
|
69503
70077
|
var side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
69504
|
-
var margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
69505
70078
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, _define_property({
|
|
69506
70079
|
width: (width - delta) / parentWidth * 100 + '%'
|
|
69507
|
-
}, side, (
|
|
70080
|
+
}, side, (this.startMargin + delta) / parentWidth * 100 + '%'));
|
|
69508
70081
|
}
|
|
69509
70082
|
}
|
|
69510
70083
|
},
|
|
@@ -69601,9 +70174,10 @@ var key = 'table_processor_observer-resize';
|
|
|
69601
70174
|
if (!editor.o.tableAllowCellResize) {
|
|
69602
70175
|
return;
|
|
69603
70176
|
}
|
|
69604
|
-
|
|
70177
|
+
var observeTables = function observeTables() {
|
|
69605
70178
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(_this.observe);
|
|
69606
|
-
}
|
|
70179
|
+
};
|
|
70180
|
+
editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', observeTables).on(this.j.ow, 'scroll.resize-cells', function() {
|
|
69607
70181
|
if (!_this.drag || _this.workRow) {
|
|
69608
70182
|
return;
|
|
69609
70183
|
}
|
|
@@ -69621,6 +70195,8 @@ var key = 'table_processor_observer-resize';
|
|
|
69621
70195
|
tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
|
|
69622
70196
|
});
|
|
69623
70197
|
});
|
|
70198
|
+
// None of those events comes with the editor's starting value
|
|
70199
|
+
observeTables();
|
|
69624
70200
|
}
|
|
69625
70201
|
},
|
|
69626
70202
|
{
|
|
@@ -69638,7 +70214,9 @@ var key = 'table_processor_observer-resize';
|
|
|
69638
70214
|
_this.hideResizeHandle();
|
|
69639
70215
|
}
|
|
69640
70216
|
}).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle(function(event) {
|
|
69641
|
-
|
|
70217
|
+
// A drag from a cell isn't a resize, and the handle on
|
|
70218
|
+
// a border it passes would take its moves (#1778)
|
|
70219
|
+
if (_this.j.isLocked || _this.j.o.readonly || event.buttons) {
|
|
69642
70220
|
return;
|
|
69643
70221
|
}
|
|
69644
70222
|
var cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(event.target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, table);
|
|
@@ -72816,7 +73394,6 @@ function _wrap_native_super(Class) {
|
|
|
72816
73394
|
|
|
72817
73395
|
|
|
72818
73396
|
var key = 'table_processor_observer';
|
|
72819
|
-
var MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
|
|
72820
73397
|
var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
72821
73398
|
"use strict";
|
|
72822
73399
|
_inherits(selectCells, Plugin);
|
|
@@ -72837,6 +73414,13 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
72837
73414
|
/**
|
|
72838
73415
|
* User is selecting cells now
|
|
72839
73416
|
*/ _this.__isSelectionMode = false;
|
|
73417
|
+
/**
|
|
73418
|
+
* The cell the marks were last drawn to
|
|
73419
|
+
*/ _this.__movedTo = null;
|
|
73420
|
+
/**
|
|
73421
|
+
* A drag let go outside the table ends in a click on the editor, which
|
|
73422
|
+
* would unmark its cells
|
|
73423
|
+
*/ _this.__keepMarks = false;
|
|
72840
73424
|
return _this;
|
|
72841
73425
|
}
|
|
72842
73426
|
_create_class(selectCells, [
|
|
@@ -72859,6 +73443,8 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
72859
73443
|
// move the caret, as table-keyboard-navigation's do
|
|
72860
73444
|
.on('keydown', this.__onKeyDown, {
|
|
72861
73445
|
top: true
|
|
73446
|
+
}).on('clickEditor', this.__onClickAfterDrag, {
|
|
73447
|
+
top: true
|
|
72862
73448
|
}).on('keydown.select-cells', function(event) {
|
|
72863
73449
|
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
72864
73450
|
_this.unselectCells();
|
|
@@ -73004,12 +73590,15 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73004
73590
|
}
|
|
73005
73591
|
this.__isSelectionMode = true;
|
|
73006
73592
|
this.__selectedCell = cell;
|
|
73593
|
+
this.__movedTo = cell;
|
|
73007
73594
|
this.__tableModule.addSelection(cell);
|
|
73008
|
-
this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells',
|
|
73009
|
-
|
|
73010
|
-
|
|
73011
|
-
|
|
73012
|
-
|
|
73595
|
+
this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', this.__onMove.bind(this, table)).on(table, 'mouseup.select-cells touchend.select-cells', this.__onStopSelection.bind(this, table));
|
|
73596
|
+
new Set([
|
|
73597
|
+
this.j.ew,
|
|
73598
|
+
this.j.ow
|
|
73599
|
+
]).forEach(function(win) {
|
|
73600
|
+
return _this.j.e.on(win, 'mouseup.select-cells touchend.select-cells', _this.__onRelease.bind(_this, table));
|
|
73601
|
+
});
|
|
73013
73602
|
return false;
|
|
73014
73603
|
}
|
|
73015
73604
|
},
|
|
@@ -73020,6 +73609,29 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73020
73609
|
this.__onRemoveSelection();
|
|
73021
73610
|
}
|
|
73022
73611
|
},
|
|
73612
|
+
{
|
|
73613
|
+
key: "onMouseDown",
|
|
73614
|
+
value: function onMouseDown() {
|
|
73615
|
+
this.__keepMarks = false;
|
|
73616
|
+
}
|
|
73617
|
+
},
|
|
73618
|
+
{
|
|
73619
|
+
/**
|
|
73620
|
+
* The click that ends a drag let go outside the table, and inside the
|
|
73621
|
+
* editor, lands on the editor. Taken on, it would unmark the cells and
|
|
73622
|
+
* close their popup. As for the click on a row after a drag over the
|
|
73623
|
+
* cells, the browser's own selection from the drag goes
|
|
73624
|
+
*/ key: "__onClickAfterDrag",
|
|
73625
|
+
value: function __onClickAfterDrag() {
|
|
73626
|
+
var _a;
|
|
73627
|
+
if (this.__keepMarks) {
|
|
73628
|
+
this.__keepMarks = false;
|
|
73629
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
73630
|
+
this.j.e.stopPropagation('clickEditor');
|
|
73631
|
+
return false;
|
|
73632
|
+
}
|
|
73633
|
+
}
|
|
73634
|
+
},
|
|
73023
73635
|
{
|
|
73024
73636
|
key: "onChange",
|
|
73025
73637
|
value: function onChange() {
|
|
@@ -73043,16 +73655,20 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73043
73655
|
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
73044
73656
|
// host, so the lookup must start from the shadow root
|
|
73045
73657
|
var node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
73046
|
-
|
|
73047
|
-
return;
|
|
73048
|
-
}
|
|
73049
|
-
var cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
73658
|
+
var cell = node && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
73050
73659
|
'td',
|
|
73051
73660
|
'th'
|
|
73052
73661
|
], table);
|
|
73053
73662
|
if (!cell || !this.__selectedCell) {
|
|
73054
73663
|
return;
|
|
73055
73664
|
}
|
|
73665
|
+
// The marks change only when the mouse goes into another cell, and then
|
|
73666
|
+
// at once rather than throttled, as the browser's own selection from
|
|
73667
|
+
// the drag shows in the cells between until they do (#1778)
|
|
73668
|
+
if (cell === this.__movedTo) {
|
|
73669
|
+
return;
|
|
73670
|
+
}
|
|
73671
|
+
this.__movedTo = cell;
|
|
73056
73672
|
if (cell !== this.__selectedCell) {
|
|
73057
73673
|
this.j.lock(key);
|
|
73058
73674
|
}
|
|
@@ -73095,8 +73711,7 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73095
73711
|
* Stop a selection process
|
|
73096
73712
|
*/ key: "__onStopSelection",
|
|
73097
73713
|
value: function __onStopSelection(table, e) {
|
|
73098
|
-
var
|
|
73099
|
-
var _a, _b, _c;
|
|
73714
|
+
var _a;
|
|
73100
73715
|
if (!this.__selectedCell) {
|
|
73101
73716
|
return;
|
|
73102
73717
|
}
|
|
@@ -73119,11 +73734,41 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73119
73734
|
if (ownTable && ownTable !== table) {
|
|
73120
73735
|
return; // Nested tables
|
|
73121
73736
|
}
|
|
73122
|
-
|
|
73737
|
+
this.__showCellsPopup(table, [
|
|
73123
73738
|
cell,
|
|
73124
73739
|
this.__selectedCell
|
|
73125
|
-
])
|
|
73126
|
-
|
|
73740
|
+
]);
|
|
73741
|
+
this.__stopListening();
|
|
73742
|
+
}
|
|
73743
|
+
},
|
|
73744
|
+
{
|
|
73745
|
+
/**
|
|
73746
|
+
* A drag let go outside the table doesn't reach the table's `mouseup`, so
|
|
73747
|
+
* the window's ends it, leaving the cells marked as they were (#1774)
|
|
73748
|
+
*/ key: "__onRelease",
|
|
73749
|
+
value: function __onRelease(table, e) {
|
|
73750
|
+
if (this.__isSelectionMode) {
|
|
73751
|
+
this.__isSelectionMode = false;
|
|
73752
|
+
if (!this.j.isLockedNotBy(key)) {
|
|
73753
|
+
this.j.unlock();
|
|
73754
|
+
}
|
|
73755
|
+
var cells = this.__tableModule.getAllSelectedCells();
|
|
73756
|
+
// One let go outside the editor clicks outside it, which unmarks them
|
|
73757
|
+
if (cells.length > 1 && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.j.editor, e.target)) {
|
|
73758
|
+
this.__keepMarks = true;
|
|
73759
|
+
this.__showCellsPopup(table, cells);
|
|
73760
|
+
}
|
|
73761
|
+
}
|
|
73762
|
+
this.__stopListening();
|
|
73763
|
+
}
|
|
73764
|
+
},
|
|
73765
|
+
{
|
|
73766
|
+
key: "__showCellsPopup",
|
|
73767
|
+
value: function __showCellsPopup(table, cells) {
|
|
73768
|
+
var _this = this;
|
|
73769
|
+
var _a, _b;
|
|
73770
|
+
var bound = this.__tableModule.getSelectedBound(table, cells), box = this.__tableModule.formalMatrix(table);
|
|
73771
|
+
var max = (_a = box[bound[1][0]]) === null || _a === void 0 ? void 0 : _a[bound[1][1]], min = (_b = box[bound[0][0]]) === null || _b === void 0 ? void 0 : _b[bound[0][1]];
|
|
73127
73772
|
// `getSelectedBound` keeps its `Infinity` sentinel when none of the
|
|
73128
73773
|
// selected cells belong to this table's matrix — e.g. after a
|
|
73129
73774
|
// drag-and-drop that moved/removed the cells, leaving a stale anchor and
|
|
@@ -73142,10 +73787,22 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73142
73787
|
height: maxOffset.top - minOffset.top + maxOffset.height
|
|
73143
73788
|
};
|
|
73144
73789
|
}, 'cells');
|
|
73790
|
+
}
|
|
73791
|
+
},
|
|
73792
|
+
{
|
|
73793
|
+
key: "__stopListening",
|
|
73794
|
+
value: function __stopListening() {
|
|
73795
|
+
var _this = this;
|
|
73145
73796
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach(function(table) {
|
|
73146
73797
|
_this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
|
|
73147
73798
|
});
|
|
73148
|
-
|
|
73799
|
+
new Set([
|
|
73800
|
+
this.j.ew,
|
|
73801
|
+
this.j.ow
|
|
73802
|
+
]).forEach(function(win) {
|
|
73803
|
+
return _this.j.e.off(win, 'mouseup.select-cells touchend.select-cells');
|
|
73804
|
+
});
|
|
73805
|
+
this.__movedTo = null;
|
|
73149
73806
|
}
|
|
73150
73807
|
},
|
|
73151
73808
|
{
|
|
@@ -73348,7 +74005,8 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73348
74005
|
/** @override */ key: "beforeDestruct",
|
|
73349
74006
|
value: function beforeDestruct(jodit) {
|
|
73350
74007
|
this.__onRemoveSelection();
|
|
73351
|
-
|
|
74008
|
+
this.__stopListening();
|
|
74009
|
+
jodit.e.off('.select-cells').off('keydown', this.__onKeyDown).off('clickEditor', this.__onClickAfterDrag);
|
|
73352
74010
|
}
|
|
73353
74011
|
}
|
|
73354
74012
|
]);
|
|
@@ -73369,6 +74027,15 @@ __decorate([
|
|
|
73369
74027
|
__decorate([
|
|
73370
74028
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
|
|
73371
74029
|
], selectCells.prototype, "onOutsideClick", null);
|
|
74030
|
+
__decorate([
|
|
74031
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
74032
|
+
':mousedown',
|
|
74033
|
+
':touchstart'
|
|
74034
|
+
])
|
|
74035
|
+
], selectCells.prototype, "onMouseDown", null);
|
|
74036
|
+
__decorate([
|
|
74037
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74038
|
+
], selectCells.prototype, "__onClickAfterDrag", null);
|
|
73372
74039
|
__decorate([
|
|
73373
74040
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
|
|
73374
74041
|
], selectCells.prototype, "onChange", null);
|
|
@@ -73416,10 +74083,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
73416
74083
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
73417
74084
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
73418
74085
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
73419
|
-
/* harmony import */ var
|
|
73420
|
-
/* harmony import */ var
|
|
73421
|
-
/* harmony import */ var
|
|
73422
|
-
/* harmony import */ var
|
|
74086
|
+
/* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4510);
|
|
74087
|
+
/* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87058);
|
|
74088
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
|
|
74089
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67510);
|
|
74090
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67215);
|
|
73423
74091
|
function _assert_this_initialized(self) {
|
|
73424
74092
|
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
73425
74093
|
return self;
|
|
@@ -73548,6 +74216,7 @@ function _wrap_native_super(Class) {
|
|
|
73548
74216
|
|
|
73549
74217
|
|
|
73550
74218
|
|
|
74219
|
+
|
|
73551
74220
|
/**
|
|
73552
74221
|
* A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
|
|
73553
74222
|
*
|
|
@@ -73577,6 +74246,10 @@ function _wrap_native_super(Class) {
|
|
|
73577
74246
|
* element and ends in another as a `click` on their common ancestor, so a
|
|
73578
74247
|
* press inside a popup is remembered to tell such a drag from a real click.
|
|
73579
74248
|
*/ _this.__pressTarget = null;
|
|
74249
|
+
/**
|
|
74250
|
+
* The row a press to its right was beside, and the caret it put there,
|
|
74251
|
+
* while the button is down
|
|
74252
|
+
*/ _this.__pressBesideRow = null;
|
|
73580
74253
|
return _this;
|
|
73581
74254
|
}
|
|
73582
74255
|
_create_class(select, [
|
|
@@ -73587,6 +74260,9 @@ function _wrap_native_super(Class) {
|
|
|
73587
74260
|
this.proxyEventsList.forEach(function(eventName) {
|
|
73588
74261
|
jodit.e.on(eventName + '.select', _this.onStartSelection);
|
|
73589
74262
|
});
|
|
74263
|
+
jodit.e.on('dblclick', this.__onDblClickBesideRow, {
|
|
74264
|
+
top: true
|
|
74265
|
+
});
|
|
73590
74266
|
}
|
|
73591
74267
|
},
|
|
73592
74268
|
{
|
|
@@ -73594,8 +74270,10 @@ function _wrap_native_super(Class) {
|
|
|
73594
74270
|
value: function beforeDestruct(jodit) {
|
|
73595
74271
|
var _this = this;
|
|
73596
74272
|
this.proxyEventsList.forEach(function(eventName) {
|
|
73597
|
-
jodit.e.
|
|
74273
|
+
jodit.e.off(eventName + '.select', _this.onStartSelection);
|
|
73598
74274
|
});
|
|
74275
|
+
this.__endPressBesideRow();
|
|
74276
|
+
jodit.e.off('dblclick', this.__onDblClickBesideRow);
|
|
73599
74277
|
}
|
|
73600
74278
|
},
|
|
73601
74279
|
{
|
|
@@ -73604,7 +74282,7 @@ function _wrap_native_super(Class) {
|
|
|
73604
74282
|
var j = this.j;
|
|
73605
74283
|
var result, target = e.target;
|
|
73606
74284
|
while(result === undefined && target && target !== j.editor){
|
|
73607
|
-
result = j.e.fire((0,
|
|
74285
|
+
result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
|
|
73608
74286
|
target = target.parentElement;
|
|
73609
74287
|
}
|
|
73610
74288
|
if (e.type === 'click' && result === undefined && target === j.editor) {
|
|
@@ -73633,10 +74311,10 @@ function _wrap_native_super(Class) {
|
|
|
73633
74311
|
}
|
|
73634
74312
|
// Selecting the text of a popup input with the mouse and releasing
|
|
73635
74313
|
// the button past the popup's edge is not a click outside of it.
|
|
73636
|
-
if (pressed &&
|
|
74314
|
+
if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
|
|
73637
74315
|
return;
|
|
73638
74316
|
}
|
|
73639
|
-
var box =
|
|
74317
|
+
var box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup);
|
|
73640
74318
|
if (!box) {
|
|
73641
74319
|
this.j.e.fire('outsideClick', e);
|
|
73642
74320
|
}
|
|
@@ -73696,6 +74374,160 @@ function _wrap_native_super(Class) {
|
|
|
73696
74374
|
},
|
|
73697
74375
|
{
|
|
73698
74376
|
/**
|
|
74377
|
+
* The table row the mouse is to the right of
|
|
74378
|
+
*/ key: "__rowBeside",
|
|
74379
|
+
value: function __rowBeside(e) {
|
|
74380
|
+
var _a;
|
|
74381
|
+
var j = this.j;
|
|
74382
|
+
var target = e.target;
|
|
74383
|
+
if (j.o.readonly || e.button !== 0 || e.detail > 2 || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(target) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, j.editor)) {
|
|
74384
|
+
return null;
|
|
74385
|
+
}
|
|
74386
|
+
var table = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(target.children).find(function(elm) {
|
|
74387
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table')) {
|
|
74388
|
+
return false;
|
|
74389
|
+
}
|
|
74390
|
+
var box = elm.getBoundingClientRect();
|
|
74391
|
+
return e.clientX >= box.right && e.clientY >= box.top && e.clientY < box.bottom;
|
|
74392
|
+
});
|
|
74393
|
+
var rows = table ? (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).filter(function(row) {
|
|
74394
|
+
return row.cells.length;
|
|
74395
|
+
}) : [];
|
|
74396
|
+
if (!table || !rows.length) {
|
|
74397
|
+
return null;
|
|
74398
|
+
}
|
|
74399
|
+
var row = (_a = rows.find(function(row) {
|
|
74400
|
+
return e.clientY < row.getBoundingClientRect().bottom;
|
|
74401
|
+
})) !== null && _a !== void 0 ? _a : rows[rows.length - 1];
|
|
74402
|
+
return {
|
|
74403
|
+
table: table,
|
|
74404
|
+
row: row
|
|
74405
|
+
};
|
|
74406
|
+
}
|
|
74407
|
+
},
|
|
74408
|
+
{
|
|
74409
|
+
/**
|
|
74410
|
+
* A press to the right of a table row puts the caret where Word's typing
|
|
74411
|
+
* goes from there: the start of the next row's first cell, or of the block
|
|
74412
|
+
* after the table for the last row (#1770). The browsers put it after the
|
|
74413
|
+
* table, whichever row it's beside, so typing starts a new line below it.
|
|
74414
|
+
* Their own press is stopped, as its drag would start after the table and
|
|
74415
|
+
* take in the rows below first
|
|
74416
|
+
*/ key: "onMouseDownBesideTableRow",
|
|
74417
|
+
value: function onMouseDownBesideTableRow(e) {
|
|
74418
|
+
var _this = this;
|
|
74419
|
+
var j = this.j;
|
|
74420
|
+
var beside = this.__rowBeside(e);
|
|
74421
|
+
if (!beside) {
|
|
74422
|
+
return;
|
|
74423
|
+
}
|
|
74424
|
+
// A press before the last one was let go must not stack its listeners
|
|
74425
|
+
this.__endPressBesideRow();
|
|
74426
|
+
e.preventDefault();
|
|
74427
|
+
this.__putCaretBesideRow(beside.table, beside.row);
|
|
74428
|
+
this.__pressBesideRow = {
|
|
74429
|
+
row: beside.row,
|
|
74430
|
+
caret: j.s.range.cloneRange()
|
|
74431
|
+
};
|
|
74432
|
+
j.e.on(j.ew, 'mousemove', this.__onDragFromRow);
|
|
74433
|
+
new Set([
|
|
74434
|
+
j.ew,
|
|
74435
|
+
j.ow
|
|
74436
|
+
]).forEach(function(win) {
|
|
74437
|
+
return j.e.on(win, 'mouseup', _this.__onReleaseFromRow);
|
|
74438
|
+
});
|
|
74439
|
+
}
|
|
74440
|
+
},
|
|
74441
|
+
{
|
|
74442
|
+
/**
|
|
74443
|
+
* A drag from beside a row selects from the end of the row to the mouse,
|
|
74444
|
+
* and back beside the row it's the caret again
|
|
74445
|
+
*/ key: "__onDragFromRow",
|
|
74446
|
+
value: function __onDragFromRow(e) {
|
|
74447
|
+
var _a, _b;
|
|
74448
|
+
var s = this.j.s;
|
|
74449
|
+
var press = this.__pressBesideRow;
|
|
74450
|
+
if (!press || !(e.buttons & 1)) {
|
|
74451
|
+
this.__endPressBesideRow();
|
|
74452
|
+
return;
|
|
74453
|
+
}
|
|
74454
|
+
if (((_a = this.__rowBeside(e)) === null || _a === void 0 ? void 0 : _a.row) === press.row) {
|
|
74455
|
+
if (!s.isCollapsed()) {
|
|
74456
|
+
s.selectRange(press.caret.cloneRange());
|
|
74457
|
+
}
|
|
74458
|
+
return;
|
|
74459
|
+
}
|
|
74460
|
+
var cells = press.row.cells;
|
|
74461
|
+
var last = cells[cells.length - 1];
|
|
74462
|
+
if (s.insertCursorAtPoint(e.clientX, e.clientY)) {
|
|
74463
|
+
var _s_range = s.range, startContainer = _s_range.startContainer, startOffset = _s_range.startOffset;
|
|
74464
|
+
(_b = s.sel) === null || _b === void 0 ? void 0 : _b.setBaseAndExtent(last, last.childNodes.length, startContainer, startOffset);
|
|
74465
|
+
}
|
|
74466
|
+
}
|
|
74467
|
+
},
|
|
74468
|
+
{
|
|
74469
|
+
/**
|
|
74470
|
+
* In iframe mode, a press in an editor without the focus puts the caret at
|
|
74471
|
+
* its end, so a release that selected nothing puts it back
|
|
74472
|
+
*/ key: "__onReleaseFromRow",
|
|
74473
|
+
value: function __onReleaseFromRow() {
|
|
74474
|
+
var press = this.__pressBesideRow;
|
|
74475
|
+
this.__endPressBesideRow();
|
|
74476
|
+
if (press && this.j.s.isCollapsed()) {
|
|
74477
|
+
this.j.s.selectRange(press.caret);
|
|
74478
|
+
}
|
|
74479
|
+
}
|
|
74480
|
+
},
|
|
74481
|
+
{
|
|
74482
|
+
key: "__endPressBesideRow",
|
|
74483
|
+
value: function __endPressBesideRow() {
|
|
74484
|
+
var _this = this;
|
|
74485
|
+
var j = this.j;
|
|
74486
|
+
this.__pressBesideRow = null;
|
|
74487
|
+
j.e.off(j.ew, 'mousemove', this.__onDragFromRow);
|
|
74488
|
+
new Set([
|
|
74489
|
+
j.ew,
|
|
74490
|
+
j.ow
|
|
74491
|
+
]).forEach(function(win) {
|
|
74492
|
+
return j.e.off(win, 'mouseup', _this.__onReleaseFromRow);
|
|
74493
|
+
});
|
|
74494
|
+
}
|
|
74495
|
+
},
|
|
74496
|
+
{
|
|
74497
|
+
/**
|
|
74498
|
+
* A double click beside a row is two clicks there, so add-new-line,
|
|
74499
|
+
* which adds a line on a double click with a caret, doesn't see it
|
|
74500
|
+
*/ key: "__onDblClickBesideRow",
|
|
74501
|
+
value: function __onDblClickBesideRow(e) {
|
|
74502
|
+
if (this.__rowBeside(e)) {
|
|
74503
|
+
this.j.e.stopPropagation('dblclick');
|
|
74504
|
+
return false;
|
|
74505
|
+
}
|
|
74506
|
+
}
|
|
74507
|
+
},
|
|
74508
|
+
{
|
|
74509
|
+
key: "__putCaretBesideRow",
|
|
74510
|
+
value: function __putCaretBesideRow(table, row) {
|
|
74511
|
+
var j = this.j;
|
|
74512
|
+
var rows = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
74513
|
+
var next = rows.slice(rows.indexOf(row) + 1).find(function(row) {
|
|
74514
|
+
return row.cells.length;
|
|
74515
|
+
});
|
|
74516
|
+
var after = table.nextSibling;
|
|
74517
|
+
while(after && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(after)){
|
|
74518
|
+
after = after.nextSibling;
|
|
74519
|
+
}
|
|
74520
|
+
if (next) {
|
|
74521
|
+
j.s.setCursorIn(next.cells[0], true);
|
|
74522
|
+
} else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(after) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(after, 'table') && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isContentEditable(after, j.editor)) {
|
|
74523
|
+
j.s.setCursorIn(after, true);
|
|
74524
|
+
} else {
|
|
74525
|
+
j.s.setCursorAfter(table);
|
|
74526
|
+
}
|
|
74527
|
+
}
|
|
74528
|
+
},
|
|
74529
|
+
{
|
|
74530
|
+
/**
|
|
73699
74531
|
* Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
|
|
73700
74532
|
* a collapsed cursor leaves empty marker elements with the caret inside; a
|
|
73701
74533
|
* click puts the caret right before them (outside), so they get cleaned up
|
|
@@ -73756,7 +74588,7 @@ function _wrap_native_super(Class) {
|
|
|
73756
74588
|
}
|
|
73757
74589
|
]);
|
|
73758
74590
|
return select;
|
|
73759
|
-
}(_wrap_native_super(
|
|
74591
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin));
|
|
73760
74592
|
__decorate([
|
|
73761
74593
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
73762
74594
|
], select.prototype, "onStartSelection", null);
|
|
@@ -73784,6 +74616,18 @@ __decorate([
|
|
|
73784
74616
|
':click'
|
|
73785
74617
|
])
|
|
73786
74618
|
], select.prototype, "onClickRightOfNestedListItem", null);
|
|
74619
|
+
__decorate([
|
|
74620
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':mousedown')
|
|
74621
|
+
], select.prototype, "onMouseDownBesideTableRow", null);
|
|
74622
|
+
__decorate([
|
|
74623
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74624
|
+
], select.prototype, "__onDragFromRow", null);
|
|
74625
|
+
__decorate([
|
|
74626
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74627
|
+
], select.prototype, "__onReleaseFromRow", null);
|
|
74628
|
+
__decorate([
|
|
74629
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74630
|
+
], select.prototype, "__onDblClickBesideRow", null);
|
|
73787
74631
|
__decorate([
|
|
73788
74632
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
73789
74633
|
':click'
|