jodit-pro 4.19.4 → 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 +6 -6
- package/es2015/jodit.js +500 -102
- package/es2015/jodit.min.js +41 -41
- 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 +6 -6
- package/es2018/jodit.min.js +7 -7
- 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 +7 -7
- package/es2021/jodit.js +500 -102
- package/es2021/jodit.min.js +19 -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 +7 -7
- package/es2021.en/jodit.js +500 -102
- package/es2021.en/jodit.min.js +7 -7
- 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 +584 -107
- 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/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.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
|
*/
|
|
@@ -1816,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1816
1816
|
* ```
|
|
1817
1817
|
* @packageDocumentation
|
|
1818
1818
|
* @module constants
|
|
1819
|
-
*/ const APP_VERSION = "4.19.
|
|
1819
|
+
*/ const APP_VERSION = "4.19.5";
|
|
1820
1820
|
// prettier-ignore
|
|
1821
1821
|
const ES = "es2015";
|
|
1822
1822
|
const IS_ES_MODERN = true;
|
|
@@ -13869,9 +13869,11 @@ const WRAP_NODES = new Set([
|
|
|
13869
13869
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13870
13870
|
/* harmony export */ ApplyStyle: function() { return /* binding */ ApplyStyle; }
|
|
13871
13871
|
/* harmony export */ });
|
|
13872
|
-
/* harmony import */ var
|
|
13873
|
-
/* harmony import */ var
|
|
13874
|
-
/* harmony import */ var
|
|
13872
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
13873
|
+
/* harmony import */ var _helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76078);
|
|
13874
|
+
/* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63687);
|
|
13875
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77361);
|
|
13876
|
+
/* harmony import */ var _transactions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55307);
|
|
13875
13877
|
/*!
|
|
13876
13878
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
13877
13879
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -13879,27 +13881,55 @@ const WRAP_NODES = new Set([
|
|
|
13879
13881
|
*/
|
|
13880
13882
|
|
|
13881
13883
|
|
|
13884
|
+
|
|
13885
|
+
|
|
13886
|
+
/**
|
|
13887
|
+
* Take a selected fragment out of the elements its style takes the place
|
|
13888
|
+
* of: one around it is split, so the fragment leaves it, and one in it is
|
|
13889
|
+
* unwrapped
|
|
13890
|
+
*/ function takeOutOf(jodit, font, tags) {
|
|
13891
|
+
const range = jodit.s.createRange();
|
|
13892
|
+
let outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
13893
|
+
while(outer){
|
|
13894
|
+
range.selectNodeContents(outer);
|
|
13895
|
+
range.setEndBefore(font);
|
|
13896
|
+
const before = range.cloneContents();
|
|
13897
|
+
range.selectNodeContents(outer);
|
|
13898
|
+
range.setStartAfter(font);
|
|
13899
|
+
// Split only when there's more in it, as a split leaves empty copies
|
|
13900
|
+
// of the elements between
|
|
13901
|
+
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(before) || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(range.cloneContents())) {
|
|
13902
|
+
(0,_api_index_js__WEBPACK_IMPORTED_MODULE_2__.extractSelectedPart)(outer, font, jodit);
|
|
13903
|
+
}
|
|
13904
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(outer);
|
|
13905
|
+
outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
13906
|
+
}
|
|
13907
|
+
;(0,_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__.$$)(tags.join(','), font).forEach((inner)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(inner));
|
|
13908
|
+
}
|
|
13882
13909
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
13883
|
-
var _a;
|
|
13910
|
+
var _a, _b;
|
|
13884
13911
|
const { s: sel, editor } = jodit;
|
|
13885
13912
|
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
13886
13913
|
const fakes = sel.fakes();
|
|
13887
13914
|
const collapsed = sel.isCollapsed();
|
|
13888
|
-
let mode =
|
|
13915
|
+
let mode = _constants_js__WEBPACK_IMPORTED_MODULE_3__.INITIAL;
|
|
13889
13916
|
try {
|
|
13890
13917
|
// for...of closes the generator on an exception, releasing every
|
|
13891
13918
|
// temporary wrapper before the selection is restored in finally.
|
|
13892
13919
|
for (const font of sel.wrapInTagGen(fakes)){
|
|
13920
|
+
if ((_b = cs.options.exclude) === null || _b === void 0 ? void 0 : _b.length) {
|
|
13921
|
+
takeOutOf(jodit, font, cs.options.exclude);
|
|
13922
|
+
}
|
|
13893
13923
|
let state = {
|
|
13894
13924
|
collapsed,
|
|
13895
13925
|
mode,
|
|
13896
13926
|
element: font,
|
|
13897
|
-
next:
|
|
13927
|
+
next: _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START,
|
|
13898
13928
|
jodit,
|
|
13899
13929
|
style: cs
|
|
13900
13930
|
};
|
|
13901
|
-
const machine = new
|
|
13902
|
-
while(!jodit.isInDestruct && machine.getState() !==
|
|
13931
|
+
const 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);
|
|
13932
|
+
while(!jodit.isInDestruct && machine.getState() !== _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.END){
|
|
13903
13933
|
state = machine.dispatch('exec', state);
|
|
13904
13934
|
}
|
|
13905
13935
|
// The first selected fragment determines how later fragments toggle.
|
|
@@ -18856,6 +18886,20 @@ const FOCUS_EVENTS = new Set([
|
|
|
18856
18886
|
'focusin',
|
|
18857
18887
|
'focusout'
|
|
18858
18888
|
]);
|
|
18889
|
+
const EDITING_KEYS = new Set([
|
|
18890
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER,
|
|
18891
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE,
|
|
18892
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE
|
|
18893
|
+
]);
|
|
18894
|
+
/**
|
|
18895
|
+
* Whether the input method (IME) is using the key. Safari fires the keydown
|
|
18896
|
+
* that ends a composition, as the Enter that confirms Japanese text, after
|
|
18897
|
+
* `compositionend`, and types Korean without one, so `isComposing` is false and
|
|
18898
|
+
* only keyCode 229 tells. Only the keys the editor turns into edits are held
|
|
18899
|
+
* back: the handlers that follow typing still see the rest.
|
|
18900
|
+
*/ function isInputMethodKey(event) {
|
|
18901
|
+
return event.isComposing || event.keyCode === 229 && EDITING_KEYS.has(event.key);
|
|
18902
|
+
}
|
|
18859
18903
|
const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
|
|
18860
18904
|
const __defaultClassesKey = 'data-jodit-default-classes';
|
|
18861
18905
|
const NOEDIT = {
|
|
@@ -19914,7 +19958,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19914
19958
|
}
|
|
19915
19959
|
}
|
|
19916
19960
|
const w = this.ew;
|
|
19917
|
-
if (event instanceof w.KeyboardEvent && event
|
|
19961
|
+
if (event instanceof w.KeyboardEvent && isInputMethodKey(event)) {
|
|
19918
19962
|
return;
|
|
19919
19963
|
}
|
|
19920
19964
|
if (this.e && this.e.fire) {
|
|
@@ -35888,6 +35932,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
35888
35932
|
if (checkJoinBareText(jodit, fakeNode, backspace)) {
|
|
35889
35933
|
return true;
|
|
35890
35934
|
}
|
|
35935
|
+
// Old content can have an inline element round blocks beside the text:
|
|
35936
|
+
// moved inside them, the line joins the block as it would bare text
|
|
35937
|
+
// (#1781)
|
|
35938
|
+
const inline = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
35939
|
+
if (joinsBareText(jodit, edgeBlock(inline, backspace)) && moveInlineInside(inline, jodit.editor)) {
|
|
35940
|
+
return joinNeighbors(jodit, fakeNode, backspace, moved);
|
|
35941
|
+
}
|
|
35891
35942
|
let nextBox = fakeNode, mainClosestBox = nextBox;
|
|
35892
35943
|
// Find the main big closest element
|
|
35893
35944
|
while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
|
|
@@ -36168,7 +36219,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
36168
36219
|
* in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
|
|
36169
36220
|
*/ function checkJoinBareText(jodit, fakeNode, backspace) {
|
|
36170
36221
|
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
36171
|
-
if (!
|
|
36222
|
+
if (!joinsBareText(jodit, block)) {
|
|
36172
36223
|
return false;
|
|
36173
36224
|
}
|
|
36174
36225
|
const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
@@ -36195,6 +36246,24 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
36195
36246
|
jodit.s.setCursorBefore(fakeNode);
|
|
36196
36247
|
return true;
|
|
36197
36248
|
}
|
|
36249
|
+
/**
|
|
36250
|
+
* Whether a block joins the bare text beside it: not a list, a table or a
|
|
36251
|
+
* cell, and holding no block of its own
|
|
36252
|
+
*/ function joinsBareText(jodit, block) {
|
|
36253
|
+
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((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node));
|
|
36254
|
+
}
|
|
36255
|
+
/**
|
|
36256
|
+
* The block an inline element holds on its side facing the caret, through
|
|
36257
|
+
* the inline elements in it: the `<p>` of `<span><strong><p>…</p></strong></span>`
|
|
36258
|
+
*/ function edgeBlock(node, backspace) {
|
|
36259
|
+
var _a;
|
|
36260
|
+
let edge = node;
|
|
36261
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(edge) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(edge)){
|
|
36262
|
+
const children = Array.from(edge.childNodes).filter((child)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child));
|
|
36263
|
+
edge = (_a = backspace ? children[children.length - 1] : children[0]) !== null && _a !== void 0 ? _a : null;
|
|
36264
|
+
}
|
|
36265
|
+
return edge === node ? null : edge;
|
|
36266
|
+
}
|
|
36198
36267
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
36199
36268
|
// Process UL/LI/OL cases
|
|
36200
36269
|
const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -36628,7 +36697,6 @@ function isNotEditable(jodit, node) {
|
|
|
36628
36697
|
if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
|
|
36629
36698
|
return false;
|
|
36630
36699
|
}
|
|
36631
|
-
const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
36632
36700
|
do {
|
|
36633
36701
|
if (prn && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(prn)) {
|
|
36634
36702
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
|
|
@@ -36643,6 +36711,9 @@ function isNotEditable(jodit, node) {
|
|
|
36643
36711
|
if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
|
|
36644
36712
|
return true;
|
|
36645
36713
|
}
|
|
36714
|
+
// Looked for once the empty elements have gone, as the one beside the
|
|
36715
|
+
// caret can be in them: the `<br>` that Delete in `<p>|<br></p>` leaves
|
|
36716
|
+
const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
36646
36717
|
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)) {
|
|
36647
36718
|
setCursorIn(neighbor, !backspace);
|
|
36648
36719
|
} else {
|
|
@@ -37103,8 +37174,15 @@ function _object_spread(target) {
|
|
|
37103
37174
|
}
|
|
37104
37175
|
cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
|
|
37105
37176
|
});
|
|
37177
|
+
const element = control.tags ? control.tags[0] : undefined;
|
|
37106
37178
|
editor.s.commitStyle({
|
|
37107
|
-
element
|
|
37179
|
+
element,
|
|
37180
|
+
// As in the browsers and Word, each takes the other's place
|
|
37181
|
+
exclude: element === 'sub' ? [
|
|
37182
|
+
'sup'
|
|
37183
|
+
] : element === 'sup' ? [
|
|
37184
|
+
'sub'
|
|
37185
|
+
] : []
|
|
37108
37186
|
});
|
|
37109
37187
|
editor.synchronizeValues();
|
|
37110
37188
|
return false;
|
|
@@ -39703,11 +39781,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39703
39781
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
39704
39782
|
|
|
39705
39783
|
/* unused harmony export deleteCommand */
|
|
39706
|
-
/* harmony import */ var
|
|
39707
|
-
/* harmony import */ var
|
|
39708
|
-
/* harmony import */ var
|
|
39709
|
-
/* harmony import */ var
|
|
39710
|
-
/* harmony import */ var
|
|
39784
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
39785
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
39786
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
39787
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
39788
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
39789
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
39711
39790
|
/*!
|
|
39712
39791
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39713
39792
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39718,6 +39797,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39718
39797
|
|
|
39719
39798
|
|
|
39720
39799
|
|
|
39800
|
+
|
|
39721
39801
|
const NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
39722
39802
|
'img',
|
|
39723
39803
|
'table',
|
|
@@ -39725,7 +39805,19 @@ const NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
|
39725
39805
|
'iframe',
|
|
39726
39806
|
'hr'
|
|
39727
39807
|
]);
|
|
39728
|
-
|
|
39808
|
+
const KEEPS_SPACES = new Set([
|
|
39809
|
+
'pre',
|
|
39810
|
+
'pre-wrap',
|
|
39811
|
+
'break-spaces'
|
|
39812
|
+
]);
|
|
39813
|
+
/**
|
|
39814
|
+
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
39815
|
+
* line break, a block or text starting (or ending) with a plain space
|
|
39816
|
+
*/ function hidesSpace(neighbor, edge) {
|
|
39817
|
+
var _a;
|
|
39818
|
+
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 : '');
|
|
39819
|
+
}
|
|
39820
|
+
class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
39729
39821
|
afterInit(jodit) {
|
|
39730
39822
|
jodit.e.on('afterCommand.delete', (command)=>{
|
|
39731
39823
|
if (command === 'delete') {
|
|
@@ -39746,11 +39838,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39746
39838
|
*/ __afterDeleteCommand() {
|
|
39747
39839
|
const jodit = this.j;
|
|
39748
39840
|
const current = jodit.s.current();
|
|
39749
|
-
if (current &&
|
|
39841
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current.firstChild, 'br')) {
|
|
39750
39842
|
jodit.s.removeNode(current.firstChild);
|
|
39751
39843
|
}
|
|
39752
|
-
if (!(0,
|
|
39753
|
-
|
|
39844
|
+
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, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS)) && (!current || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'table', jodit.editor))) {
|
|
39845
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(jodit.editor);
|
|
39754
39846
|
const node = jodit.s.setCursorIn(jodit.editor);
|
|
39755
39847
|
jodit.s.removeNode(node);
|
|
39756
39848
|
}
|
|
@@ -39770,14 +39862,15 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39770
39862
|
range.deleteContents();
|
|
39771
39863
|
const fake = jodit.createInside.fake();
|
|
39772
39864
|
range.insertNode(fake);
|
|
39773
|
-
const leftSibling =
|
|
39774
|
-
const rightSibling =
|
|
39865
|
+
const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, true);
|
|
39866
|
+
const rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, false);
|
|
39775
39867
|
this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
|
|
39868
|
+
this.__keepSpacesVisible(fake);
|
|
39776
39869
|
range.setStartBefore(fake);
|
|
39777
39870
|
range.collapse(true);
|
|
39778
39871
|
this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
|
|
39779
39872
|
this.__addBrInEmptyBlock(fake, range);
|
|
39780
|
-
|
|
39873
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
39781
39874
|
jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
|
|
39782
39875
|
return false;
|
|
39783
39876
|
}
|
|
@@ -39791,23 +39884,23 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39791
39884
|
* Returns where the caret goes, or null when no table is involved
|
|
39792
39885
|
*/ __clearSelectedCells(range) {
|
|
39793
39886
|
const { editor, createInside } = this.j;
|
|
39794
|
-
const startCell =
|
|
39795
|
-
const endCell =
|
|
39887
|
+
const startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
39888
|
+
const endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
39796
39889
|
if (startCell === endCell) {
|
|
39797
39890
|
return null;
|
|
39798
39891
|
}
|
|
39799
|
-
const startTable =
|
|
39800
|
-
const endTable =
|
|
39892
|
+
const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(startCell, 'table', editor);
|
|
39893
|
+
const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(endCell, 'table', editor);
|
|
39801
39894
|
const caret = range.cloneRange();
|
|
39802
39895
|
caret.collapse(true);
|
|
39803
39896
|
const parts = [];
|
|
39804
39897
|
const addParts = (table)=>{
|
|
39805
|
-
(0,
|
|
39898
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(table.rows).flatMap((row)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(row.cells)).filter((cell)=>range.intersectsNode(cell)).forEach((cell)=>{
|
|
39806
39899
|
const part = range.cloneRange();
|
|
39807
|
-
if (!
|
|
39900
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.startContainer)) {
|
|
39808
39901
|
part.setStart(cell, 0);
|
|
39809
39902
|
}
|
|
39810
|
-
if (!
|
|
39903
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.endContainer)) {
|
|
39811
39904
|
part.setEnd(cell, cell.childNodes.length);
|
|
39812
39905
|
}
|
|
39813
39906
|
parts.push([
|
|
@@ -39830,9 +39923,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39830
39923
|
}
|
|
39831
39924
|
parts.forEach(([cell, part])=>{
|
|
39832
39925
|
part.deleteContents();
|
|
39833
|
-
if (
|
|
39834
|
-
|
|
39835
|
-
|
|
39926
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(cell)) {
|
|
39927
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(cell);
|
|
39928
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(cell, createInside.element('br'));
|
|
39836
39929
|
}
|
|
39837
39930
|
});
|
|
39838
39931
|
return startTable ? caret : null;
|
|
@@ -39840,46 +39933,76 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39840
39933
|
__moveContentInLeftSibling(fake, leftSibling, rightSibling) {
|
|
39841
39934
|
leftSibling = this.__defineRightLeftBox(leftSibling);
|
|
39842
39935
|
// Nothing is moved into a table, and a block left empty after it goes
|
|
39843
|
-
if (
|
|
39844
|
-
if (
|
|
39845
|
-
|
|
39936
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(leftSibling, 'table')) {
|
|
39937
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
39938
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
39846
39939
|
}
|
|
39847
39940
|
return;
|
|
39848
39941
|
}
|
|
39849
|
-
if (!
|
|
39850
|
-
|
|
39851
|
-
|
|
39852
|
-
|
|
39942
|
+
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)) {
|
|
39943
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
39944
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(rightSibling, leftSibling);
|
|
39945
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
39853
39946
|
}
|
|
39854
|
-
if (
|
|
39947
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(rightSibling.firstElementChild)) {
|
|
39855
39948
|
const item = rightSibling.firstElementChild;
|
|
39856
39949
|
// What's left of the right list's first item joins the left block,
|
|
39857
39950
|
// up to a list nested in the item
|
|
39858
|
-
if (!
|
|
39859
|
-
|
|
39860
|
-
while(item.firstChild && !
|
|
39861
|
-
|
|
39951
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
|
|
39952
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
39953
|
+
while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(item.firstChild)){
|
|
39954
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, item.firstChild);
|
|
39862
39955
|
}
|
|
39863
39956
|
}
|
|
39864
39957
|
// Remove empty right LI
|
|
39865
|
-
if (
|
|
39866
|
-
|
|
39958
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item)) {
|
|
39959
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(item);
|
|
39867
39960
|
}
|
|
39868
|
-
if (
|
|
39869
|
-
|
|
39961
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
39962
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
39870
39963
|
}
|
|
39871
39964
|
}
|
|
39872
39965
|
}
|
|
39966
|
+
/**
|
|
39967
|
+
* A plain space the deletion leaves at an edge of the block, before a line
|
|
39968
|
+
* break or next to another space isn't shown, and the browser drops it when
|
|
39969
|
+
* the next char is typed. It becomes non-breaking, as in the browsers' own
|
|
39970
|
+
* delete and in Backspace without a selection (#1522)
|
|
39971
|
+
*/ __keepSpacesVisible(fake) {
|
|
39972
|
+
var _a;
|
|
39973
|
+
const { jodit } = this;
|
|
39974
|
+
const 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;
|
|
39975
|
+
if (KEEPS_SPACES.has(jodit.ew.getComputedStyle(block).whiteSpace)) {
|
|
39976
|
+
return;
|
|
39977
|
+
}
|
|
39978
|
+
const before = this.__findNeighbor(fake, true, block);
|
|
39979
|
+
const after = this.__findNeighbor(fake, false, block);
|
|
39980
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
|
|
39981
|
+
before.nodeValue = before.nodeValue.replace(/ +$/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
|
|
39982
|
+
}
|
|
39983
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
|
|
39984
|
+
after.nodeValue = after.nodeValue.replace(/^ +/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
|
|
39985
|
+
}
|
|
39986
|
+
}
|
|
39987
|
+
/**
|
|
39988
|
+
* The text, line break or other element next to the caret in its block,
|
|
39989
|
+
* looking inside inline elements
|
|
39990
|
+
*/ __findNeighbor(fake, left, block) {
|
|
39991
|
+
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, (node)=>{
|
|
39992
|
+
var _a;
|
|
39993
|
+
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);
|
|
39994
|
+
}, block);
|
|
39995
|
+
}
|
|
39873
39996
|
/**
|
|
39874
39997
|
* If left sibling is list - return last leaf
|
|
39875
39998
|
*/ __defineRightLeftBox(leftSibling) {
|
|
39876
|
-
if (!
|
|
39999
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(leftSibling)) {
|
|
39877
40000
|
return leftSibling;
|
|
39878
40001
|
}
|
|
39879
40002
|
let lastLeaf = leftSibling.lastElementChild;
|
|
39880
|
-
if (!
|
|
40003
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(lastLeaf)) {
|
|
39881
40004
|
lastLeaf = this.j.createInside.element('li');
|
|
39882
|
-
|
|
40005
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, lastLeaf);
|
|
39883
40006
|
}
|
|
39884
40007
|
return lastLeaf;
|
|
39885
40008
|
}
|
|
@@ -39887,22 +40010,22 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39887
40010
|
* Add BR in the empty block left at the caret
|
|
39888
40011
|
*/ __addBrInEmptyBlock(fake, range) {
|
|
39889
40012
|
const jodit = this.j;
|
|
39890
|
-
if (fake.isConnected &&
|
|
40013
|
+
if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
|
|
39891
40014
|
const br = jodit.createInside.element('br');
|
|
39892
|
-
|
|
40015
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fake, br);
|
|
39893
40016
|
range.setStartBefore(br);
|
|
39894
40017
|
range.collapse(true);
|
|
39895
40018
|
}
|
|
39896
40019
|
}
|
|
39897
40020
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
39898
40021
|
var _a;
|
|
39899
|
-
if (!leftSibling || !
|
|
39900
|
-
const root = (_a =
|
|
39901
|
-
const leftText =
|
|
40022
|
+
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(leftSibling)) {
|
|
40023
|
+
const 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;
|
|
40024
|
+
const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText, root);
|
|
39902
40025
|
if (leftText) {
|
|
39903
40026
|
range.setStartAfter(leftText);
|
|
39904
40027
|
range.collapse(true);
|
|
39905
|
-
|
|
40028
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
39906
40029
|
}
|
|
39907
40030
|
}
|
|
39908
40031
|
}
|
|
@@ -39910,7 +40033,7 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
39910
40033
|
deleteCommand.requires = [
|
|
39911
40034
|
'backspace'
|
|
39912
40035
|
];
|
|
39913
|
-
|
|
40036
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
|
|
39914
40037
|
|
|
39915
40038
|
|
|
39916
40039
|
/***/ }),
|
|
@@ -51119,7 +51242,7 @@ const key = 'table_processor_observer-resize';
|
|
|
51119
51242
|
/**
|
|
51120
51243
|
* Click on resize handle
|
|
51121
51244
|
*/ onHandleMouseDown(event) {
|
|
51122
|
-
if (this.j.isLocked) {
|
|
51245
|
+
if (this.j.isLocked || this.j.o.readonly) {
|
|
51123
51246
|
return;
|
|
51124
51247
|
}
|
|
51125
51248
|
this.drag = true;
|
|
@@ -51154,10 +51277,15 @@ const key = 'table_processor_observer-resize';
|
|
|
51154
51277
|
let box;
|
|
51155
51278
|
this.minX = 0;
|
|
51156
51279
|
this.maxX = 1000000;
|
|
51280
|
+
this.startTableWidth = this.workTable.offsetWidth;
|
|
51157
51281
|
if (this.wholeTable != null) {
|
|
51158
|
-
const
|
|
51282
|
+
const parent = this.workTable.parentNode;
|
|
51283
|
+
const tableBox = parent.getBoundingClientRect();
|
|
51159
51284
|
this.minX = tableBox.left;
|
|
51160
51285
|
this.maxX = this.minX + tableBox.width;
|
|
51286
|
+
const side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
51287
|
+
this.startParentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(parent, this.j.ew);
|
|
51288
|
+
this.startMargin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
51161
51289
|
} else {
|
|
51162
51290
|
// find maximum columns
|
|
51163
51291
|
const coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
|
|
@@ -51171,6 +51299,17 @@ const key = 'table_processor_observer-resize';
|
|
|
51171
51299
|
this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, this.maxX);
|
|
51172
51300
|
}
|
|
51173
51301
|
});
|
|
51302
|
+
const matrix = this.module.formalMatrix(this.workTable);
|
|
51303
|
+
this.startWidths = this.resizedColumns().map((column)=>{
|
|
51304
|
+
const cells = matrix.map((row)=>row[column]);
|
|
51305
|
+
const index = cells.findIndex((td)=>td.colSpan === 1 || cells.length === 1);
|
|
51306
|
+
const cell = cells[index];
|
|
51307
|
+
return [
|
|
51308
|
+
cell,
|
|
51309
|
+
cell ? cell.offsetWidth : 0,
|
|
51310
|
+
cells.slice(Math.max(index, 0) + 1)
|
|
51311
|
+
];
|
|
51312
|
+
});
|
|
51174
51313
|
}
|
|
51175
51314
|
return false;
|
|
51176
51315
|
}
|
|
@@ -51199,8 +51338,11 @@ const key = 'table_processor_observer-resize';
|
|
|
51199
51338
|
x = this.maxX;
|
|
51200
51339
|
}
|
|
51201
51340
|
this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
51202
|
-
this.
|
|
51203
|
-
|
|
51341
|
+
if (this.wholeTable == null) {
|
|
51342
|
+
this.setColumnWidths();
|
|
51343
|
+
} else {
|
|
51344
|
+
this.resizeTable();
|
|
51345
|
+
}
|
|
51204
51346
|
const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
|
|
51205
51347
|
Object.assign(this.resizeHandler.style, {
|
|
51206
51348
|
left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
|
|
@@ -51313,21 +51455,49 @@ const key = 'table_processor_observer-resize';
|
|
|
51313
51455
|
};
|
|
51314
51456
|
this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
|
|
51315
51457
|
}
|
|
51458
|
+
/**
|
|
51459
|
+
* The two columns a column drag resizes: the work cell's last, and the
|
|
51460
|
+
* next cell's first
|
|
51461
|
+
*/ resizedColumns() {
|
|
51462
|
+
const 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);
|
|
51463
|
+
return [
|
|
51464
|
+
this.module.formalCoordinate(this.workTable, this.workCell, true)[1],
|
|
51465
|
+
this.module.formalCoordinate(this.workTable, nextTD)[1]
|
|
51466
|
+
];
|
|
51467
|
+
}
|
|
51316
51468
|
/**
|
|
51317
51469
|
* Resize only one column
|
|
51318
51470
|
*/ resizeColumns() {
|
|
51319
51471
|
const delta = this.resizeDelta;
|
|
51320
51472
|
const marked = [];
|
|
51321
51473
|
const tableModule = this.module;
|
|
51322
|
-
|
|
51323
|
-
|
|
51324
|
-
tableModule.setColumnWidthByDelta(this.workTable,
|
|
51474
|
+
const [column, nextColumn] = this.resizedColumns();
|
|
51475
|
+
tableModule.setColumnWidthByDelta(this.workTable, column, delta, true, marked);
|
|
51476
|
+
tableModule.setColumnWidthByDelta(this.workTable, nextColumn, -delta, false, marked);
|
|
51477
|
+
}
|
|
51478
|
+
/**
|
|
51479
|
+
* Sets the widths `resizeColumns` would while the handle is dragged, from
|
|
51480
|
+
* the widths the drag started with, so that a move doesn't put back every
|
|
51481
|
+
* cell's style and lay the table out again to measure them
|
|
51482
|
+
*/ setColumnWidths() {
|
|
51483
|
+
this.startWidths.forEach(([cell, width, below], index)=>{
|
|
51484
|
+
const delta = index ? -this.resizeDelta : this.resizeDelta;
|
|
51485
|
+
if (cell) {
|
|
51486
|
+
(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) + '%');
|
|
51487
|
+
}
|
|
51488
|
+
below.forEach((td)=>{
|
|
51489
|
+
td.style.removeProperty('width');
|
|
51490
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style')) {
|
|
51491
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style', null);
|
|
51492
|
+
}
|
|
51493
|
+
});
|
|
51494
|
+
});
|
|
51325
51495
|
}
|
|
51326
51496
|
/**
|
|
51327
51497
|
* Resize whole table
|
|
51328
51498
|
*/ resizeTable() {
|
|
51329
51499
|
const delta = this.resizeDelta * (this.isRTL ? -1 : 1);
|
|
51330
|
-
const width = this.
|
|
51500
|
+
const width = this.startTableWidth, parentWidth = this.startParentWidth;
|
|
51331
51501
|
// for RTL use mirror logic
|
|
51332
51502
|
const rightSide = !this.wholeTable;
|
|
51333
51503
|
const needChangeWidth = this.isRTL ? !rightSide : rightSide;
|
|
@@ -51336,10 +51506,9 @@ const key = 'table_processor_observer-resize';
|
|
|
51336
51506
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
|
|
51337
51507
|
} else {
|
|
51338
51508
|
const side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
51339
|
-
const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
51340
51509
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, {
|
|
51341
51510
|
width: (width - delta) / parentWidth * 100 + '%',
|
|
51342
|
-
[side]: (
|
|
51511
|
+
[side]: (this.startMargin + delta) / parentWidth * 100 + '%'
|
|
51343
51512
|
});
|
|
51344
51513
|
}
|
|
51345
51514
|
}
|
|
@@ -51415,9 +51584,10 @@ const key = 'table_processor_observer-resize';
|
|
|
51415
51584
|
if (!editor.o.tableAllowCellResize) {
|
|
51416
51585
|
return;
|
|
51417
51586
|
}
|
|
51418
|
-
|
|
51587
|
+
const observeTables = ()=>{
|
|
51419
51588
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
|
|
51420
|
-
}
|
|
51589
|
+
};
|
|
51590
|
+
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', ()=>{
|
|
51421
51591
|
if (!this.drag || this.workRow) {
|
|
51422
51592
|
return;
|
|
51423
51593
|
}
|
|
@@ -51433,6 +51603,8 @@ const key = 'table_processor_observer-resize';
|
|
|
51433
51603
|
tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
|
|
51434
51604
|
});
|
|
51435
51605
|
});
|
|
51606
|
+
// None of those events comes with the editor's starting value
|
|
51607
|
+
observeTables();
|
|
51436
51608
|
}
|
|
51437
51609
|
/**
|
|
51438
51610
|
* Add to every Table listeners
|
|
@@ -51446,7 +51618,9 @@ const key = 'table_processor_observer-resize';
|
|
|
51446
51618
|
this.hideResizeHandle();
|
|
51447
51619
|
}
|
|
51448
51620
|
}).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
|
|
51449
|
-
|
|
51621
|
+
// A drag from a cell isn't a resize, and the handle on
|
|
51622
|
+
// a border it passes would take its moves (#1778)
|
|
51623
|
+
if (this.j.isLocked || this.j.o.readonly || event.buttons) {
|
|
51450
51624
|
return;
|
|
51451
51625
|
}
|
|
51452
51626
|
const cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(event.target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, table);
|
|
@@ -51488,10 +51662,21 @@ const key = 'table_processor_observer-resize';
|
|
|
51488
51662
|
this.startX = 0;
|
|
51489
51663
|
/**
|
|
51490
51664
|
* The table's and its cells' styles as a column drag started, put back
|
|
51491
|
-
* before
|
|
51665
|
+
* as it ends, before the final widths
|
|
51492
51666
|
*/ this.startStyles = [];
|
|
51493
51667
|
this.startLeft = 0;
|
|
51494
51668
|
this.startEdge = 0;
|
|
51669
|
+
/**
|
|
51670
|
+
* For each of the two columns a drag resizes, the cell whose width
|
|
51671
|
+
* `setColumnWidthByDelta` sets, with its width as the drag started, and
|
|
51672
|
+
* the cells below it, whose widths it clears
|
|
51673
|
+
*/ this.startWidths = [];
|
|
51674
|
+
/**
|
|
51675
|
+
* The table's width as the drag started, and for a drag of its edge, the
|
|
51676
|
+
* width inside what holds it and its margin on that side
|
|
51677
|
+
*/ this.startTableWidth = 0;
|
|
51678
|
+
this.startParentWidth = 0;
|
|
51679
|
+
this.startMargin = 0;
|
|
51495
51680
|
/**
|
|
51496
51681
|
* The row whose height the handle sets, or null while it sets a width
|
|
51497
51682
|
*/ this.workRow = null;
|
|
@@ -53333,7 +53518,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
|
|
|
53333
53518
|
|
|
53334
53519
|
|
|
53335
53520
|
const key = 'table_processor_observer';
|
|
53336
|
-
const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
|
|
53337
53521
|
class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
53338
53522
|
/**
|
|
53339
53523
|
* Shortcut for Jodit.modules.Table
|
|
@@ -53348,6 +53532,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53348
53532
|
// move the caret, as table-keyboard-navigation's do
|
|
53349
53533
|
.on('keydown', this.__onKeyDown, {
|
|
53350
53534
|
top: true
|
|
53535
|
+
}).on('clickEditor', this.__onClickAfterDrag, {
|
|
53536
|
+
top: true
|
|
53351
53537
|
}).on('keydown.select-cells', (event)=>{
|
|
53352
53538
|
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
53353
53539
|
this.unselectCells();
|
|
@@ -53467,18 +53653,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53467
53653
|
}
|
|
53468
53654
|
this.__isSelectionMode = true;
|
|
53469
53655
|
this.__selectedCell = cell;
|
|
53656
|
+
this.__movedTo = cell;
|
|
53470
53657
|
this.__tableModule.addSelection(cell);
|
|
53471
|
-
this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells',
|
|
53472
|
-
|
|
53473
|
-
|
|
53474
|
-
|
|
53475
|
-
|
|
53658
|
+
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));
|
|
53659
|
+
new Set([
|
|
53660
|
+
this.j.ew,
|
|
53661
|
+
this.j.ow
|
|
53662
|
+
]).forEach((win)=>this.j.e.on(win, 'mouseup.select-cells touchend.select-cells', this.__onRelease.bind(this, table)));
|
|
53476
53663
|
return false;
|
|
53477
53664
|
}
|
|
53478
53665
|
onOutsideClick() {
|
|
53479
53666
|
this.__selectedCell = null;
|
|
53480
53667
|
this.__onRemoveSelection();
|
|
53481
53668
|
}
|
|
53669
|
+
onMouseDown() {
|
|
53670
|
+
this.__keepMarks = false;
|
|
53671
|
+
}
|
|
53672
|
+
/**
|
|
53673
|
+
* The click that ends a drag let go outside the table, and inside the
|
|
53674
|
+
* editor, lands on the editor. Taken on, it would unmark the cells and
|
|
53675
|
+
* close their popup. As for the click on a row after a drag over the
|
|
53676
|
+
* cells, the browser's own selection from the drag goes
|
|
53677
|
+
*/ __onClickAfterDrag() {
|
|
53678
|
+
var _a;
|
|
53679
|
+
if (this.__keepMarks) {
|
|
53680
|
+
this.__keepMarks = false;
|
|
53681
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
53682
|
+
this.j.e.stopPropagation('clickEditor');
|
|
53683
|
+
return false;
|
|
53684
|
+
}
|
|
53685
|
+
}
|
|
53482
53686
|
onChange() {
|
|
53483
53687
|
if (!this.j.isLocked && !this.__isSelectionMode) {
|
|
53484
53688
|
this.__onRemoveSelection();
|
|
@@ -53497,16 +53701,20 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53497
53701
|
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
53498
53702
|
// host, so the lookup must start from the shadow root
|
|
53499
53703
|
const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
53500
|
-
|
|
53501
|
-
return;
|
|
53502
|
-
}
|
|
53503
|
-
const cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
53704
|
+
const cell = node && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
53504
53705
|
'td',
|
|
53505
53706
|
'th'
|
|
53506
53707
|
], table);
|
|
53507
53708
|
if (!cell || !this.__selectedCell) {
|
|
53508
53709
|
return;
|
|
53509
53710
|
}
|
|
53711
|
+
// The marks change only when the mouse goes into another cell, and then
|
|
53712
|
+
// at once rather than throttled, as the browser's own selection from
|
|
53713
|
+
// the drag shows in the cells between until they do (#1778)
|
|
53714
|
+
if (cell === this.__movedTo) {
|
|
53715
|
+
return;
|
|
53716
|
+
}
|
|
53717
|
+
this.__movedTo = cell;
|
|
53510
53718
|
if (cell !== this.__selectedCell) {
|
|
53511
53719
|
this.j.lock(key);
|
|
53512
53720
|
}
|
|
@@ -53543,7 +53751,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53543
53751
|
/**
|
|
53544
53752
|
* Stop a selection process
|
|
53545
53753
|
*/ __onStopSelection(table, e) {
|
|
53546
|
-
var _a
|
|
53754
|
+
var _a;
|
|
53547
53755
|
if (!this.__selectedCell) {
|
|
53548
53756
|
return;
|
|
53549
53757
|
}
|
|
@@ -53566,11 +53774,34 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53566
53774
|
if (ownTable && ownTable !== table) {
|
|
53567
53775
|
return; // Nested tables
|
|
53568
53776
|
}
|
|
53569
|
-
|
|
53777
|
+
this.__showCellsPopup(table, [
|
|
53570
53778
|
cell,
|
|
53571
53779
|
this.__selectedCell
|
|
53572
|
-
])
|
|
53573
|
-
|
|
53780
|
+
]);
|
|
53781
|
+
this.__stopListening();
|
|
53782
|
+
}
|
|
53783
|
+
/**
|
|
53784
|
+
* A drag let go outside the table doesn't reach the table's `mouseup`, so
|
|
53785
|
+
* the window's ends it, leaving the cells marked as they were (#1774)
|
|
53786
|
+
*/ __onRelease(table, e) {
|
|
53787
|
+
if (this.__isSelectionMode) {
|
|
53788
|
+
this.__isSelectionMode = false;
|
|
53789
|
+
if (!this.j.isLockedNotBy(key)) {
|
|
53790
|
+
this.j.unlock();
|
|
53791
|
+
}
|
|
53792
|
+
const cells = this.__tableModule.getAllSelectedCells();
|
|
53793
|
+
// One let go outside the editor clicks outside it, which unmarks them
|
|
53794
|
+
if (cells.length > 1 && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.j.editor, e.target)) {
|
|
53795
|
+
this.__keepMarks = true;
|
|
53796
|
+
this.__showCellsPopup(table, cells);
|
|
53797
|
+
}
|
|
53798
|
+
}
|
|
53799
|
+
this.__stopListening();
|
|
53800
|
+
}
|
|
53801
|
+
__showCellsPopup(table, cells) {
|
|
53802
|
+
var _a, _b;
|
|
53803
|
+
const bound = this.__tableModule.getSelectedBound(table, cells), box = this.__tableModule.formalMatrix(table);
|
|
53804
|
+
const 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]];
|
|
53574
53805
|
// `getSelectedBound` keeps its `Infinity` sentinel when none of the
|
|
53575
53806
|
// selected cells belong to this table's matrix — e.g. after a
|
|
53576
53807
|
// drag-and-drop that moved/removed the cells, leaving a stale anchor and
|
|
@@ -53589,10 +53820,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53589
53820
|
height: maxOffset.top - minOffset.top + maxOffset.height
|
|
53590
53821
|
};
|
|
53591
53822
|
}, 'cells');
|
|
53592
|
-
|
|
53823
|
+
}
|
|
53824
|
+
__stopListening() {
|
|
53825
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach((table)=>{
|
|
53593
53826
|
this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
|
|
53594
53827
|
});
|
|
53595
|
-
|
|
53828
|
+
new Set([
|
|
53829
|
+
this.j.ew,
|
|
53830
|
+
this.j.ow
|
|
53831
|
+
]).forEach((win)=>this.j.e.off(win, 'mouseup.select-cells touchend.select-cells'));
|
|
53832
|
+
this.__movedTo = null;
|
|
53596
53833
|
}
|
|
53597
53834
|
/**
|
|
53598
53835
|
* Remove selection for all cells
|
|
@@ -53763,7 +54000,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53763
54000
|
}
|
|
53764
54001
|
/** @override */ beforeDestruct(jodit) {
|
|
53765
54002
|
this.__onRemoveSelection();
|
|
53766
|
-
|
|
54003
|
+
this.__stopListening();
|
|
54004
|
+
jodit.e.off('.select-cells').off('keydown', this.__onKeyDown).off('clickEditor', this.__onClickAfterDrag);
|
|
53767
54005
|
}
|
|
53768
54006
|
constructor(){
|
|
53769
54007
|
super(...arguments);
|
|
@@ -53780,6 +54018,13 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
53780
54018
|
/**
|
|
53781
54019
|
* User is selecting cells now
|
|
53782
54020
|
*/ this.__isSelectionMode = false;
|
|
54021
|
+
/**
|
|
54022
|
+
* The cell the marks were last drawn to
|
|
54023
|
+
*/ this.__movedTo = null;
|
|
54024
|
+
/**
|
|
54025
|
+
* A drag let go outside the table ends in a click on the editor, which
|
|
54026
|
+
* would unmark its cells
|
|
54027
|
+
*/ this.__keepMarks = false;
|
|
53783
54028
|
}
|
|
53784
54029
|
}
|
|
53785
54030
|
selectCells.requires = [
|
|
@@ -53797,6 +54042,15 @@ __decorate([
|
|
|
53797
54042
|
__decorate([
|
|
53798
54043
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
|
|
53799
54044
|
], selectCells.prototype, "onOutsideClick", null);
|
|
54045
|
+
__decorate([
|
|
54046
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
54047
|
+
':mousedown',
|
|
54048
|
+
':touchstart'
|
|
54049
|
+
])
|
|
54050
|
+
], selectCells.prototype, "onMouseDown", null);
|
|
54051
|
+
__decorate([
|
|
54052
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
54053
|
+
], selectCells.prototype, "__onClickAfterDrag", null);
|
|
53800
54054
|
__decorate([
|
|
53801
54055
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
|
|
53802
54056
|
], selectCells.prototype, "onChange", null);
|
|
@@ -53844,10 +54098,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
53844
54098
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
53845
54099
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
53846
54100
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
53847
|
-
/* harmony import */ var
|
|
53848
|
-
/* harmony import */ var
|
|
53849
|
-
/* harmony import */ var
|
|
53850
|
-
/* harmony import */ var
|
|
54101
|
+
/* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4510);
|
|
54102
|
+
/* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87058);
|
|
54103
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
|
|
54104
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67510);
|
|
54105
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67215);
|
|
53851
54106
|
/*!
|
|
53852
54107
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
53853
54108
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -53866,6 +54121,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
53866
54121
|
|
|
53867
54122
|
|
|
53868
54123
|
|
|
54124
|
+
|
|
53869
54125
|
/**
|
|
53870
54126
|
* A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
|
|
53871
54127
|
*
|
|
@@ -53876,22 +54132,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
53876
54132
|
* console.log(img.src);
|
|
53877
54133
|
* })
|
|
53878
54134
|
* ```
|
|
53879
|
-
*/ class select extends
|
|
54135
|
+
*/ class select extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
53880
54136
|
afterInit(jodit) {
|
|
53881
54137
|
this.proxyEventsList.forEach((eventName)=>{
|
|
53882
54138
|
jodit.e.on(eventName + '.select', this.onStartSelection);
|
|
53883
54139
|
});
|
|
54140
|
+
jodit.e.on('dblclick', this.__onDblClickBesideRow, {
|
|
54141
|
+
top: true
|
|
54142
|
+
});
|
|
53884
54143
|
}
|
|
53885
54144
|
beforeDestruct(jodit) {
|
|
53886
54145
|
this.proxyEventsList.forEach((eventName)=>{
|
|
53887
|
-
jodit.e.
|
|
54146
|
+
jodit.e.off(eventName + '.select', this.onStartSelection);
|
|
53888
54147
|
});
|
|
54148
|
+
this.__endPressBesideRow();
|
|
54149
|
+
jodit.e.off('dblclick', this.__onDblClickBesideRow);
|
|
53889
54150
|
}
|
|
53890
54151
|
onStartSelection(e) {
|
|
53891
54152
|
const { j } = this;
|
|
53892
54153
|
let result, target = e.target;
|
|
53893
54154
|
while(result === undefined && target && target !== j.editor){
|
|
53894
|
-
result = j.e.fire((0,
|
|
54155
|
+
result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
|
|
53895
54156
|
target = target.parentElement;
|
|
53896
54157
|
}
|
|
53897
54158
|
if (e.type === 'click' && result === undefined && target === j.editor) {
|
|
@@ -53911,10 +54172,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
53911
54172
|
}
|
|
53912
54173
|
// Selecting the text of a popup input with the mouse and releasing
|
|
53913
54174
|
// the button past the popup's edge is not a click outside of it.
|
|
53914
|
-
if (pressed &&
|
|
54175
|
+
if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
|
|
53915
54176
|
return;
|
|
53916
54177
|
}
|
|
53917
|
-
const box =
|
|
54178
|
+
const box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup);
|
|
53918
54179
|
if (!box) {
|
|
53919
54180
|
this.j.e.fire('outsideClick', e);
|
|
53920
54181
|
}
|
|
@@ -53960,6 +54221,127 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
53960
54221
|
s.setCursorAfter(text);
|
|
53961
54222
|
}
|
|
53962
54223
|
}
|
|
54224
|
+
/**
|
|
54225
|
+
* The table row the mouse is to the right of
|
|
54226
|
+
*/ __rowBeside(e) {
|
|
54227
|
+
var _a;
|
|
54228
|
+
const { j } = this;
|
|
54229
|
+
const target = e.target;
|
|
54230
|
+
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)) {
|
|
54231
|
+
return null;
|
|
54232
|
+
}
|
|
54233
|
+
const table = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(target.children).find((elm)=>{
|
|
54234
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table')) {
|
|
54235
|
+
return false;
|
|
54236
|
+
}
|
|
54237
|
+
const box = elm.getBoundingClientRect();
|
|
54238
|
+
return e.clientX >= box.right && e.clientY >= box.top && e.clientY < box.bottom;
|
|
54239
|
+
});
|
|
54240
|
+
const rows = table ? (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).filter((row)=>row.cells.length) : [];
|
|
54241
|
+
if (!table || !rows.length) {
|
|
54242
|
+
return null;
|
|
54243
|
+
}
|
|
54244
|
+
const row = (_a = rows.find((row)=>e.clientY < row.getBoundingClientRect().bottom)) !== null && _a !== void 0 ? _a : rows[rows.length - 1];
|
|
54245
|
+
return {
|
|
54246
|
+
table,
|
|
54247
|
+
row
|
|
54248
|
+
};
|
|
54249
|
+
}
|
|
54250
|
+
/**
|
|
54251
|
+
* A press to the right of a table row puts the caret where Word's typing
|
|
54252
|
+
* goes from there: the start of the next row's first cell, or of the block
|
|
54253
|
+
* after the table for the last row (#1770). The browsers put it after the
|
|
54254
|
+
* table, whichever row it's beside, so typing starts a new line below it.
|
|
54255
|
+
* Their own press is stopped, as its drag would start after the table and
|
|
54256
|
+
* take in the rows below first
|
|
54257
|
+
*/ onMouseDownBesideTableRow(e) {
|
|
54258
|
+
const { j } = this;
|
|
54259
|
+
const beside = this.__rowBeside(e);
|
|
54260
|
+
if (!beside) {
|
|
54261
|
+
return;
|
|
54262
|
+
}
|
|
54263
|
+
// A press before the last one was let go must not stack its listeners
|
|
54264
|
+
this.__endPressBesideRow();
|
|
54265
|
+
e.preventDefault();
|
|
54266
|
+
this.__putCaretBesideRow(beside.table, beside.row);
|
|
54267
|
+
this.__pressBesideRow = {
|
|
54268
|
+
row: beside.row,
|
|
54269
|
+
caret: j.s.range.cloneRange()
|
|
54270
|
+
};
|
|
54271
|
+
j.e.on(j.ew, 'mousemove', this.__onDragFromRow);
|
|
54272
|
+
new Set([
|
|
54273
|
+
j.ew,
|
|
54274
|
+
j.ow
|
|
54275
|
+
]).forEach((win)=>j.e.on(win, 'mouseup', this.__onReleaseFromRow));
|
|
54276
|
+
}
|
|
54277
|
+
/**
|
|
54278
|
+
* A drag from beside a row selects from the end of the row to the mouse,
|
|
54279
|
+
* and back beside the row it's the caret again
|
|
54280
|
+
*/ __onDragFromRow(e) {
|
|
54281
|
+
var _a, _b;
|
|
54282
|
+
const { s } = this.j;
|
|
54283
|
+
const press = this.__pressBesideRow;
|
|
54284
|
+
if (!press || !(e.buttons & 1)) {
|
|
54285
|
+
this.__endPressBesideRow();
|
|
54286
|
+
return;
|
|
54287
|
+
}
|
|
54288
|
+
if (((_a = this.__rowBeside(e)) === null || _a === void 0 ? void 0 : _a.row) === press.row) {
|
|
54289
|
+
if (!s.isCollapsed()) {
|
|
54290
|
+
s.selectRange(press.caret.cloneRange());
|
|
54291
|
+
}
|
|
54292
|
+
return;
|
|
54293
|
+
}
|
|
54294
|
+
const { cells } = press.row;
|
|
54295
|
+
const last = cells[cells.length - 1];
|
|
54296
|
+
if (s.insertCursorAtPoint(e.clientX, e.clientY)) {
|
|
54297
|
+
const { startContainer, startOffset } = s.range;
|
|
54298
|
+
(_b = s.sel) === null || _b === void 0 ? void 0 : _b.setBaseAndExtent(last, last.childNodes.length, startContainer, startOffset);
|
|
54299
|
+
}
|
|
54300
|
+
}
|
|
54301
|
+
/**
|
|
54302
|
+
* In iframe mode, a press in an editor without the focus puts the caret at
|
|
54303
|
+
* its end, so a release that selected nothing puts it back
|
|
54304
|
+
*/ __onReleaseFromRow() {
|
|
54305
|
+
const press = this.__pressBesideRow;
|
|
54306
|
+
this.__endPressBesideRow();
|
|
54307
|
+
if (press && this.j.s.isCollapsed()) {
|
|
54308
|
+
this.j.s.selectRange(press.caret);
|
|
54309
|
+
}
|
|
54310
|
+
}
|
|
54311
|
+
__endPressBesideRow() {
|
|
54312
|
+
const { j } = this;
|
|
54313
|
+
this.__pressBesideRow = null;
|
|
54314
|
+
j.e.off(j.ew, 'mousemove', this.__onDragFromRow);
|
|
54315
|
+
new Set([
|
|
54316
|
+
j.ew,
|
|
54317
|
+
j.ow
|
|
54318
|
+
]).forEach((win)=>j.e.off(win, 'mouseup', this.__onReleaseFromRow));
|
|
54319
|
+
}
|
|
54320
|
+
/**
|
|
54321
|
+
* A double click beside a row is two clicks there, so add-new-line,
|
|
54322
|
+
* which adds a line on a double click with a caret, doesn't see it
|
|
54323
|
+
*/ __onDblClickBesideRow(e) {
|
|
54324
|
+
if (this.__rowBeside(e)) {
|
|
54325
|
+
this.j.e.stopPropagation('dblclick');
|
|
54326
|
+
return false;
|
|
54327
|
+
}
|
|
54328
|
+
}
|
|
54329
|
+
__putCaretBesideRow(table, row) {
|
|
54330
|
+
const { j } = this;
|
|
54331
|
+
const rows = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
54332
|
+
const next = rows.slice(rows.indexOf(row) + 1).find((row)=>row.cells.length);
|
|
54333
|
+
let after = table.nextSibling;
|
|
54334
|
+
while(after && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(after)){
|
|
54335
|
+
after = after.nextSibling;
|
|
54336
|
+
}
|
|
54337
|
+
if (next) {
|
|
54338
|
+
j.s.setCursorIn(next.cells[0], true);
|
|
54339
|
+
} 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)) {
|
|
54340
|
+
j.s.setCursorIn(after, true);
|
|
54341
|
+
} else {
|
|
54342
|
+
j.s.setCursorAfter(table);
|
|
54343
|
+
}
|
|
54344
|
+
}
|
|
53963
54345
|
/**
|
|
53964
54346
|
* Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
|
|
53965
54347
|
* a collapsed cursor leaves empty marker elements with the caret inside; a
|
|
@@ -54025,6 +54407,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
54025
54407
|
* element and ends in another as a `click` on their common ancestor, so a
|
|
54026
54408
|
* press inside a popup is remembered to tell such a drag from a real click.
|
|
54027
54409
|
*/ this.__pressTarget = null;
|
|
54410
|
+
/**
|
|
54411
|
+
* The row a press to its right was beside, and the caret it put there,
|
|
54412
|
+
* while the button is down
|
|
54413
|
+
*/ this.__pressBesideRow = null;
|
|
54028
54414
|
}
|
|
54029
54415
|
}
|
|
54030
54416
|
__decorate([
|
|
@@ -54054,6 +54440,18 @@ __decorate([
|
|
|
54054
54440
|
':click'
|
|
54055
54441
|
])
|
|
54056
54442
|
], select.prototype, "onClickRightOfNestedListItem", null);
|
|
54443
|
+
__decorate([
|
|
54444
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':mousedown')
|
|
54445
|
+
], select.prototype, "onMouseDownBesideTableRow", null);
|
|
54446
|
+
__decorate([
|
|
54447
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
54448
|
+
], select.prototype, "__onDragFromRow", null);
|
|
54449
|
+
__decorate([
|
|
54450
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
54451
|
+
], select.prototype, "__onReleaseFromRow", null);
|
|
54452
|
+
__decorate([
|
|
54453
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
54454
|
+
], select.prototype, "__onDblClickBesideRow", null);
|
|
54057
54455
|
__decorate([
|
|
54058
54456
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
54059
54457
|
':click'
|