jodit-pro 4.18.8 → 4.18.11
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 +2 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +30 -30
- package/es2015/jodit.js +1242 -229
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +13 -13
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
- 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 +14 -7
- package/es2015/plugins/backup/backup.min.js +2 -2
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +26 -19
- package/es2015/plugins/button-generator/button-generator.min.js +3 -3
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +19 -19
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +21 -21
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +2 -2
- package/es2018/plugins/button-generator/button-generator.min.js +3 -3
- 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 +2 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +24 -24
- package/es2021/jodit.js +1217 -229
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +16 -16
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
- 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 +14 -7
- package/es2021/plugins/backup/backup.min.js +2 -2
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +26 -19
- package/es2021/plugins/button-generator/button-generator.min.js +3 -3
- 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 +2 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +24 -24
- package/es2021.en/jodit.js +1217 -229
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +30 -30
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +26 -26
- 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 +14 -7
- package/es2021.en/plugins/backup/backup.min.js +2 -2
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +26 -19
- package/es2021.en/plugins/button-generator/button-generator.min.js +3 -3
- 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 +3 -3
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1383 -235
- package/es5/jodit.min.css +3 -3
- 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 +19 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
- 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 +14 -7
- package/es5/plugins/backup/backup.min.js +2 -2
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +26 -19
- package/es5/plugins/button-generator/button-generator.min.js +2 -2
- 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/esm/plugins/ai-assistant-pro/ai-assistant-pro.js +2 -2
- package/esm/plugins/ai-assistant-pro/core/panel-resize.d.ts +4 -0
- package/esm/plugins/ai-assistant-pro/core/panel-resize.js +1 -1
- package/esm/plugins/backup/ui/item.js +1 -1
- package/esm/plugins/button-generator/ui/form/form.js +2 -2
- package/package.json +1 -1
- package/types/plugins/ai-assistant-pro/core/panel-resize.d.ts +4 -0
package/es2021/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.18.
|
|
4
|
+
* Version: v4.18.11
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1766,7 +1766,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1766
1766
|
* ```
|
|
1767
1767
|
* @packageDocumentation
|
|
1768
1768
|
* @module constants
|
|
1769
|
-
*/ const APP_VERSION = "4.18.
|
|
1769
|
+
*/ const APP_VERSION = "4.18.11";
|
|
1770
1770
|
// prettier-ignore
|
|
1771
1771
|
const ES = "es2021";
|
|
1772
1772
|
const IS_ES_MODERN = true;
|
|
@@ -2484,6 +2484,8 @@ function cacheHTML(target, _, descriptor) {
|
|
|
2484
2484
|
*/
|
|
2485
2485
|
|
|
2486
2486
|
const componentRegistry = new Map();
|
|
2487
|
+
const decoratedClasses = new WeakSet();
|
|
2488
|
+
const warnedClasses = new WeakSet();
|
|
2487
2489
|
/**
|
|
2488
2490
|
* Decorate components and set status isReady after constructor
|
|
2489
2491
|
* @param constructorFunction - Component constructor class
|
|
@@ -2500,9 +2502,16 @@ const componentRegistry = new Map();
|
|
|
2500
2502
|
Object.setPrototypeOf(this, newConstructorFunction.prototype);
|
|
2501
2503
|
}
|
|
2502
2504
|
this.setStatus('ready');
|
|
2505
|
+
} else if (!_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_PROD && !decoratedClasses.has(this.constructor) && !warnedClasses.has(this.constructor)) {
|
|
2506
|
+
// Only the outermost class's decorator sets `ready`, so a subclass
|
|
2507
|
+
// without its own decorator stays in `beforeInit`. See #1685
|
|
2508
|
+
warnedClasses.add(this.constructor);
|
|
2509
|
+
console.warn(`Component "${this.constructor.name || (0,_helpers_utils_get_class_name_js__WEBPACK_IMPORTED_MODULE_1__.getClassName)(this)}" extends a @component class without being decorated itself, so it never becomes ready and its @watch, @debounce, @throttle and @hook handlers never run`);
|
|
2503
2510
|
}
|
|
2504
2511
|
}
|
|
2505
2512
|
}
|
|
2513
|
+
decoratedClasses.add(constructorFunction);
|
|
2514
|
+
decoratedClasses.add(newConstructorFunction);
|
|
2506
2515
|
const name = (0,_helpers_utils_get_class_name_js__WEBPACK_IMPORTED_MODULE_1__.getClassName)(constructorFunction.prototype);
|
|
2507
2516
|
if (componentRegistry.has(name) && !_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
|
|
2508
2517
|
throw new Error(`Component with name "${name}" is already registered`);
|
|
@@ -5686,10 +5695,11 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5686
5695
|
/* harmony export */ });
|
|
5687
5696
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5688
5697
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5689
|
-
/* harmony import */ var
|
|
5690
|
-
/* harmony import */ var
|
|
5691
|
-
/* harmony import */ var
|
|
5692
|
-
/* harmony import */ var
|
|
5698
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90723);
|
|
5699
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
|
|
5700
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29960);
|
|
5701
|
+
/* harmony import */ var _utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
5702
|
+
/* harmony import */ var _utils_selector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76078);
|
|
5693
5703
|
/*!
|
|
5694
5704
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5695
5705
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5702,6 +5712,7 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5702
5712
|
|
|
5703
5713
|
|
|
5704
5714
|
|
|
5715
|
+
|
|
5705
5716
|
function normalizeCSS(s) {
|
|
5706
5717
|
return s.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi, '').replace(/mso-[a-z-]+:[\s]*[^";']+$/gi, '').replace(/border[a-z-]*:[\s]*[^;]+;/gi, '').replace(/([0-9.]+)(pt|cm)/gi, (match, units, metrics)=>{
|
|
5707
5718
|
switch(metrics.toLowerCase()){
|
|
@@ -5735,7 +5746,7 @@ function normalizeCSS(s) {
|
|
|
5735
5746
|
html = html.substring(0, closeIndex + '</html>'.length);
|
|
5736
5747
|
}
|
|
5737
5748
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
5738
|
-
(0,
|
|
5749
|
+
(0,_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(iframe, 'display', 'none');
|
|
5739
5750
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(_constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body, iframe);
|
|
5740
5751
|
let convertedString = '', collection;
|
|
5741
5752
|
try {
|
|
@@ -5744,13 +5755,14 @@ function normalizeCSS(s) {
|
|
|
5744
5755
|
iframeDoc.open();
|
|
5745
5756
|
iframeDoc.write(html);
|
|
5746
5757
|
iframeDoc.close();
|
|
5758
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_2__.readWordListItems)(iframeDoc.body);
|
|
5747
5759
|
// Word marks its auto-generated list markers (the literal
|
|
5748
5760
|
// bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
|
|
5749
5761
|
// They are display-only and must not be imported, otherwise
|
|
5750
5762
|
// the marker text leaks into the content. Drop them before any
|
|
5751
5763
|
// style normalization strips the `mso-list` hint. See #948
|
|
5752
5764
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5753
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,
|
|
5765
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style') || '')) {
|
|
5754
5766
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
5755
5767
|
}
|
|
5756
5768
|
});
|
|
@@ -5761,7 +5773,7 @@ function normalizeCSS(s) {
|
|
|
5761
5773
|
if (rules[idx].selectorText === '') {
|
|
5762
5774
|
continue;
|
|
5763
5775
|
}
|
|
5764
|
-
collection = (0,
|
|
5776
|
+
collection = (0,_utils_selector_js__WEBPACK_IMPORTED_MODULE_6__.$$)(rules[idx].selectorText, iframeDoc.body);
|
|
5765
5777
|
// `style.cssText` on purpose: the CSSOM parses the text,
|
|
5766
5778
|
// drops invalid declarations and re-serializes it. The raw
|
|
5767
5779
|
// `style` attribute would keep Word-only junk verbatim
|
|
@@ -5775,18 +5787,19 @@ function normalizeCSS(s) {
|
|
|
5775
5787
|
throw e;
|
|
5776
5788
|
}
|
|
5777
5789
|
}
|
|
5790
|
+
;(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_2__.wrapWordListItems)(listItems);
|
|
5778
5791
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5779
5792
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node)) {
|
|
5780
|
-
const cssText = (0,
|
|
5793
|
+
const cssText = (0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style');
|
|
5781
5794
|
if (cssText) {
|
|
5782
5795
|
node.style.cssText = normalizeCSS(cssText);
|
|
5783
5796
|
}
|
|
5784
|
-
if (!(0,
|
|
5785
|
-
(0,
|
|
5797
|
+
if (!(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style')) {
|
|
5798
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style', null);
|
|
5786
5799
|
}
|
|
5787
5800
|
}
|
|
5788
5801
|
});
|
|
5789
|
-
convertedString = iframeDoc.firstChild ? (0,
|
|
5802
|
+
convertedString = iframeDoc.firstChild ? (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(iframeDoc.body.innerHTML) : '';
|
|
5790
5803
|
}
|
|
5791
5804
|
} catch (_a) {} finally{
|
|
5792
5805
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
|
|
@@ -5794,7 +5807,7 @@ function normalizeCSS(s) {
|
|
|
5794
5807
|
if (convertedString) {
|
|
5795
5808
|
html = convertedString;
|
|
5796
5809
|
}
|
|
5797
|
-
return (0,
|
|
5810
|
+
return (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(html.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '').replace(/<!--[^>]*>/g, ''));
|
|
5798
5811
|
}
|
|
5799
5812
|
|
|
5800
5813
|
|
|
@@ -5809,8 +5822,9 @@ function normalizeCSS(s) {
|
|
|
5809
5822
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5810
5823
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5811
5824
|
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
|
|
5812
|
-
/* harmony import */ var
|
|
5813
|
-
/* harmony import */ var
|
|
5825
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90723);
|
|
5826
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
5827
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
5814
5828
|
/*!
|
|
5815
5829
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5816
5830
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5822,6 +5836,7 @@ function normalizeCSS(s) {
|
|
|
5822
5836
|
|
|
5823
5837
|
|
|
5824
5838
|
|
|
5839
|
+
|
|
5825
5840
|
/**
|
|
5826
5841
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
5827
5842
|
* content that matches the look and feel of the site.
|
|
@@ -5835,6 +5850,7 @@ function normalizeCSS(s) {
|
|
|
5835
5850
|
const div = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5836
5851
|
div.innerHTML = html;
|
|
5837
5852
|
const marks = [];
|
|
5853
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.readWordListItems)(div);
|
|
5838
5854
|
if (div.firstChild) {
|
|
5839
5855
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(div, (node)=>{
|
|
5840
5856
|
if (!node) {
|
|
@@ -5859,7 +5875,7 @@ function normalizeCSS(s) {
|
|
|
5859
5875
|
// with `mso-list:Ignore`. They are display-only
|
|
5860
5876
|
// and must not be imported, otherwise the marker
|
|
5861
5877
|
// text leaks into the content. See #948
|
|
5862
|
-
if (/mso-list:\s*ignore/i.test((0,
|
|
5878
|
+
if (/mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style') || '')) {
|
|
5863
5879
|
marks.push(node);
|
|
5864
5880
|
break;
|
|
5865
5881
|
}
|
|
@@ -5873,7 +5889,7 @@ function normalizeCSS(s) {
|
|
|
5873
5889
|
// `attrRaw`: SVG keeps camelCase names
|
|
5874
5890
|
// (`viewBox`), `attr()` would kebab-case
|
|
5875
5891
|
// them and silently skip the removal
|
|
5876
|
-
(0,
|
|
5892
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attrRaw)(node, attribute.name, null);
|
|
5877
5893
|
}
|
|
5878
5894
|
});
|
|
5879
5895
|
}
|
|
@@ -5886,12 +5902,13 @@ function normalizeCSS(s) {
|
|
|
5886
5902
|
});
|
|
5887
5903
|
}
|
|
5888
5904
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove.apply(null, marks);
|
|
5905
|
+
(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.wrapWordListItems)(listItems);
|
|
5889
5906
|
convertedString = div.innerHTML;
|
|
5890
5907
|
} catch (e) {}
|
|
5891
5908
|
if (convertedString) {
|
|
5892
5909
|
html = convertedString;
|
|
5893
5910
|
}
|
|
5894
|
-
html = html.split(/(\n)/).filter(
|
|
5911
|
+
html = html.split(/(\n)/).filter(_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim).join('\n');
|
|
5895
5912
|
return html.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '').replace(/<!--[^>]*>/g, '');
|
|
5896
5913
|
}
|
|
5897
5914
|
|
|
@@ -6226,7 +6243,14 @@ const NEW_LINE_TAGS = new Set([
|
|
|
6226
6243
|
'h4',
|
|
6227
6244
|
'h5',
|
|
6228
6245
|
'h6',
|
|
6229
|
-
'hr'
|
|
6246
|
+
'hr',
|
|
6247
|
+
'ul',
|
|
6248
|
+
'ol',
|
|
6249
|
+
'li'
|
|
6250
|
+
]);
|
|
6251
|
+
const LIST_TAGS = new Set([
|
|
6252
|
+
'ul',
|
|
6253
|
+
'ol'
|
|
6230
6254
|
]);
|
|
6231
6255
|
const INVISIBLE_TAGS = new Set([
|
|
6232
6256
|
'script',
|
|
@@ -6252,6 +6276,16 @@ const ALONE_TAGS = new Set([
|
|
|
6252
6276
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(tmp, (node)=>{
|
|
6253
6277
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node) && all.push(node);
|
|
6254
6278
|
});
|
|
6279
|
+
// By default blocks are joined with a single space (single-line
|
|
6280
|
+
// plain text). When `blockBr` is set, separate them with a line
|
|
6281
|
+
// break instead, so paragraph structure survives — e.g. the
|
|
6282
|
+
// "Insert only Text" paste option. See #1232
|
|
6283
|
+
const separators = new Set();
|
|
6284
|
+
const separator = ()=>{
|
|
6285
|
+
const text = doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' ');
|
|
6286
|
+
separators.add(text);
|
|
6287
|
+
return text;
|
|
6288
|
+
};
|
|
6255
6289
|
all.forEach((p)=>{
|
|
6256
6290
|
const pr = p.parentNode;
|
|
6257
6291
|
if (!pr) {
|
|
@@ -6271,16 +6305,17 @@ const ALONE_TAGS = new Set([
|
|
|
6271
6305
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, NEW_LINE_TAGS)) {
|
|
6272
6306
|
return;
|
|
6273
6307
|
}
|
|
6308
|
+
const pv = p.previousSibling;
|
|
6309
|
+
// A nested list starts on a new line after its item's own text
|
|
6310
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, LIST_TAGS) && pv && !separators.has(pv) && !(_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(pv) && /\s$/.test(pv.nodeValue || ''))) {
|
|
6311
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(p, separator());
|
|
6312
|
+
}
|
|
6274
6313
|
const nx = p.nextSibling;
|
|
6275
6314
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(nx) && /^\s/.test(nx.nodeValue || '')) {
|
|
6276
6315
|
return;
|
|
6277
6316
|
}
|
|
6278
6317
|
if (nx) {
|
|
6279
|
-
|
|
6280
|
-
// plain text). When `blockBr` is set, separate them with a line
|
|
6281
|
-
// break instead, so paragraph structure survives — e.g. the
|
|
6282
|
-
// "Insert only Text" paste option. See #1232
|
|
6283
|
-
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(nx, doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' '));
|
|
6318
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(nx, separator());
|
|
6284
6319
|
}
|
|
6285
6320
|
});
|
|
6286
6321
|
return restoreTags((0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)(tmp.innerText));
|
|
@@ -6290,6 +6325,180 @@ function restoreTags(content) {
|
|
|
6290
6325
|
}
|
|
6291
6326
|
|
|
6292
6327
|
|
|
6328
|
+
/***/ }),
|
|
6329
|
+
|
|
6330
|
+
/***/ 90723:
|
|
6331
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6332
|
+
|
|
6333
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6334
|
+
/* harmony export */ readWordListItems: function() { return /* binding */ readWordListItems; },
|
|
6335
|
+
/* harmony export */ wrapWordListItems: function() { return /* binding */ wrapWordListItems; }
|
|
6336
|
+
/* harmony export */ });
|
|
6337
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
6338
|
+
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
|
|
6339
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
6340
|
+
/*!
|
|
6341
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6342
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
6343
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6344
|
+
*/ /**
|
|
6345
|
+
* @module helpers/html
|
|
6346
|
+
*/
|
|
6347
|
+
|
|
6348
|
+
|
|
6349
|
+
const ROMAN = {
|
|
6350
|
+
i: 1,
|
|
6351
|
+
v: 5,
|
|
6352
|
+
x: 10,
|
|
6353
|
+
l: 50,
|
|
6354
|
+
c: 100,
|
|
6355
|
+
d: 500,
|
|
6356
|
+
m: 1000
|
|
6357
|
+
};
|
|
6358
|
+
function romanValue(roman) {
|
|
6359
|
+
let value = 0;
|
|
6360
|
+
for(let i = 0; i < roman.length; i += 1){
|
|
6361
|
+
const current = ROMAN[roman[i]], next = ROMAN[roman[i + 1]] || 0;
|
|
6362
|
+
value += current < next ? -current : current;
|
|
6363
|
+
}
|
|
6364
|
+
return value;
|
|
6365
|
+
}
|
|
6366
|
+
/**
|
|
6367
|
+
* Word's marker text (`1.`, `b)`, `iv.`, `·`, `o`, `§`) decides the list type
|
|
6368
|
+
*/ function parseMarker(marker) {
|
|
6369
|
+
const text = marker.replace(/\s+/g, '');
|
|
6370
|
+
const decimal = /^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(text);
|
|
6371
|
+
if (decimal) {
|
|
6372
|
+
return {
|
|
6373
|
+
tag: 'ol',
|
|
6374
|
+
listStyleType: null,
|
|
6375
|
+
start: Number(decimal[1])
|
|
6376
|
+
};
|
|
6377
|
+
}
|
|
6378
|
+
const letters = /^\(?([a-z]+|[A-Z]+)[.)]$/.exec(text);
|
|
6379
|
+
if (letters) {
|
|
6380
|
+
const value = letters[1], lower = value.toLowerCase(), upper = value !== lower;
|
|
6381
|
+
if (/^[ivxlcdm]+$/.test(lower) && (lower.length > 1 || lower === 'i')) {
|
|
6382
|
+
return {
|
|
6383
|
+
tag: 'ol',
|
|
6384
|
+
listStyleType: upper ? 'upper-roman' : 'lower-roman',
|
|
6385
|
+
start: romanValue(lower)
|
|
6386
|
+
};
|
|
6387
|
+
}
|
|
6388
|
+
// Word continues a lettered list with aa, bb, ...
|
|
6389
|
+
if (/^([a-z])\1*$/.test(lower)) {
|
|
6390
|
+
return {
|
|
6391
|
+
tag: 'ol',
|
|
6392
|
+
listStyleType: upper ? 'upper-alpha' : 'lower-alpha',
|
|
6393
|
+
start: (lower.length - 1) * 26 + lower.charCodeAt(0) - 96
|
|
6394
|
+
};
|
|
6395
|
+
}
|
|
6396
|
+
}
|
|
6397
|
+
return {
|
|
6398
|
+
tag: 'ul',
|
|
6399
|
+
listStyleType: null,
|
|
6400
|
+
start: 1
|
|
6401
|
+
};
|
|
6402
|
+
}
|
|
6403
|
+
/**
|
|
6404
|
+
* Removes the marker and the wrappers it leaves empty
|
|
6405
|
+
*/ function removeMarker(marker, paragraph) {
|
|
6406
|
+
let parent = marker.parentNode;
|
|
6407
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(marker);
|
|
6408
|
+
while(parent && parent !== paragraph && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(parent) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)){
|
|
6409
|
+
const next = parent.parentNode;
|
|
6410
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
|
|
6411
|
+
parent = next;
|
|
6412
|
+
}
|
|
6413
|
+
}
|
|
6414
|
+
/**
|
|
6415
|
+
* Finds Word's list paragraphs (`<p style="mso-list:l0 level1 lfo1">`), reads
|
|
6416
|
+
* their list, level and type from the `mso-list:Ignore` marker, and removes the
|
|
6417
|
+
* marker. Call it before anything strips the `mso-list` styles, then pass the
|
|
6418
|
+
* result to {@link wrapWordListItems}
|
|
6419
|
+
*/ function readWordListItems(root) {
|
|
6420
|
+
const items = [];
|
|
6421
|
+
(0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(root.querySelectorAll('p')).forEach((paragraph)=>{
|
|
6422
|
+
const match = /mso-list:\s*l(\d+)\s+level(\d+)(?:\s+lfo(\d+))?/i.exec((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(paragraph, 'style') || '');
|
|
6423
|
+
if (!match) {
|
|
6424
|
+
return;
|
|
6425
|
+
}
|
|
6426
|
+
const marker = (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(paragraph.querySelectorAll('[style]')).find((elm)=>/mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || ''));
|
|
6427
|
+
items.push({
|
|
6428
|
+
paragraph,
|
|
6429
|
+
list: `${match[1]}:${match[3] || ''}`,
|
|
6430
|
+
level: Number(match[2]),
|
|
6431
|
+
...parseMarker((marker === null || marker === void 0 ? void 0 : marker.textContent) || '')
|
|
6432
|
+
});
|
|
6433
|
+
if (marker) {
|
|
6434
|
+
removeMarker(marker, paragraph);
|
|
6435
|
+
}
|
|
6436
|
+
});
|
|
6437
|
+
return items;
|
|
6438
|
+
}
|
|
6439
|
+
function isAdjacent(prev, item) {
|
|
6440
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(item.paragraph, true, (n)=>!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmptyTextNode(n) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isComment(n)) === prev.paragraph;
|
|
6441
|
+
}
|
|
6442
|
+
/**
|
|
6443
|
+
* Turns the paragraphs found by {@link readWordListItems} into `<ul>`/`<ol>`
|
|
6444
|
+
* lists, nesting them by level. Each paragraph becomes an `<li>` without Word's
|
|
6445
|
+
* hanging indent
|
|
6446
|
+
*/ function wrapWordListItems(items) {
|
|
6447
|
+
let stack = [];
|
|
6448
|
+
const continues = items.map((item, index)=>index > 0 && isAdjacent(items[index - 1], item));
|
|
6449
|
+
items.forEach((item, index)=>{
|
|
6450
|
+
const { paragraph } = item;
|
|
6451
|
+
if (!continues[index]) {
|
|
6452
|
+
stack = [];
|
|
6453
|
+
}
|
|
6454
|
+
while(stack.length && stack[stack.length - 1].level > item.level){
|
|
6455
|
+
stack.pop();
|
|
6456
|
+
}
|
|
6457
|
+
let top = stack[stack.length - 1];
|
|
6458
|
+
if (top && top.level === item.level && top.list !== item.list) {
|
|
6459
|
+
stack.pop();
|
|
6460
|
+
top = stack[stack.length - 1];
|
|
6461
|
+
}
|
|
6462
|
+
const doc = paragraph.ownerDocument;
|
|
6463
|
+
if (!top || top.level < item.level) {
|
|
6464
|
+
const element = doc.createElement(item.tag);
|
|
6465
|
+
if (item.listStyleType) {
|
|
6466
|
+
element.style.listStyleType = item.listStyleType;
|
|
6467
|
+
}
|
|
6468
|
+
if (item.tag === 'ol' && item.start !== 1) {
|
|
6469
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(element, 'start', item.start);
|
|
6470
|
+
}
|
|
6471
|
+
if (top && top.li) {
|
|
6472
|
+
top.li.appendChild(element);
|
|
6473
|
+
} else {
|
|
6474
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(paragraph, element);
|
|
6475
|
+
}
|
|
6476
|
+
top = {
|
|
6477
|
+
level: item.level,
|
|
6478
|
+
list: item.list,
|
|
6479
|
+
element
|
|
6480
|
+
};
|
|
6481
|
+
stack.push(top);
|
|
6482
|
+
}
|
|
6483
|
+
const li = doc.createElement('li');
|
|
6484
|
+
(0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(paragraph.attributes).forEach((attribute)=>{
|
|
6485
|
+
if (attribute.name !== 'class') {
|
|
6486
|
+
li.setAttribute(attribute.name, attribute.value);
|
|
6487
|
+
}
|
|
6488
|
+
});
|
|
6489
|
+
li.style.removeProperty('margin-left');
|
|
6490
|
+
li.style.removeProperty('text-indent');
|
|
6491
|
+
if (!(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(li, 'style')) {
|
|
6492
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(li, 'style', null);
|
|
6493
|
+
}
|
|
6494
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(paragraph, li);
|
|
6495
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(paragraph);
|
|
6496
|
+
top.element.appendChild(li);
|
|
6497
|
+
top.li = li;
|
|
6498
|
+
});
|
|
6499
|
+
}
|
|
6500
|
+
|
|
6501
|
+
|
|
6293
6502
|
/***/ }),
|
|
6294
6503
|
|
|
6295
6504
|
/***/ 21537:
|
|
@@ -10557,13 +10766,15 @@ function usable(ranges, shadowRoot) {
|
|
|
10557
10766
|
/* harmony export */ composedRanges: function() { return /* reexport safe */ _composed_ranges_js__WEBPACK_IMPORTED_MODULE_2__.composedRanges; },
|
|
10558
10767
|
/* harmony export */ cursorInTheEdgeOfString: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
10559
10768
|
/* harmony export */ findCorrectCurrentNode: function() { return /* binding */ findCorrectCurrentNode; },
|
|
10560
|
-
/* harmony export */
|
|
10769
|
+
/* harmony export */ isMoved: function() { return /* reexport safe */ _is_moved_js__WEBPACK_IMPORTED_MODULE_3__.isMoved; },
|
|
10770
|
+
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */ _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_4__.moveNodeInsideStart; }
|
|
10561
10771
|
/* harmony export */ });
|
|
10562
10772
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
10563
10773
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
10564
10774
|
/* harmony import */ var _composed_ranges_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79505);
|
|
10565
|
-
/* harmony import */ var
|
|
10566
|
-
/* harmony import */ var
|
|
10775
|
+
/* harmony import */ var _is_moved_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12604);
|
|
10776
|
+
/* harmony import */ var _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26716);
|
|
10777
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43463);
|
|
10567
10778
|
/*!
|
|
10568
10779
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10569
10780
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10575,6 +10786,7 @@ function usable(ranges, shadowRoot) {
|
|
|
10575
10786
|
|
|
10576
10787
|
|
|
10577
10788
|
|
|
10789
|
+
|
|
10578
10790
|
/**
|
|
10579
10791
|
* Despite the name, returns `true` when the cursor is NOT at the checked edge
|
|
10580
10792
|
* of the text node: there is significant (non invisible-space) text between
|
|
@@ -10630,6 +10842,33 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10630
10842
|
}
|
|
10631
10843
|
|
|
10632
10844
|
|
|
10845
|
+
/***/ }),
|
|
10846
|
+
|
|
10847
|
+
/***/ 12604:
|
|
10848
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10849
|
+
|
|
10850
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10851
|
+
/* harmony export */ isMoved: function() { return /* binding */ isMoved; }
|
|
10852
|
+
/* harmony export */ });
|
|
10853
|
+
/*!
|
|
10854
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10855
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
10856
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
10857
|
+
*/ /**
|
|
10858
|
+
* Whether the selection, `before` as it was when a key went down, has since
|
|
10859
|
+
* moved to somewhere else in the editor
|
|
10860
|
+
* @private
|
|
10861
|
+
*/ function isMoved(jodit, before) {
|
|
10862
|
+
const { s } = jodit;
|
|
10863
|
+
// Selecting table cells, for one, removes the selection altogether
|
|
10864
|
+
if (!before || !s.isInsideArea) {
|
|
10865
|
+
return false;
|
|
10866
|
+
}
|
|
10867
|
+
const { range } = s;
|
|
10868
|
+
return range.startContainer !== before.startContainer || range.startOffset !== before.startOffset || range.endContainer !== before.endContainer || range.endOffset !== before.endOffset;
|
|
10869
|
+
}
|
|
10870
|
+
|
|
10871
|
+
|
|
10633
10872
|
/***/ }),
|
|
10634
10873
|
|
|
10635
10874
|
/***/ 26716:
|
|
@@ -12673,11 +12912,13 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12673
12912
|
/* harmony export */ toggleOrderedList: function() { return /* binding */ toggleOrderedList; }
|
|
12674
12913
|
/* harmony export */ });
|
|
12675
12914
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
12676
|
-
/* harmony import */ var
|
|
12677
|
-
/* harmony import */ var
|
|
12678
|
-
/* harmony import */ var
|
|
12679
|
-
/* harmony import */ var
|
|
12680
|
-
/* harmony import */ var
|
|
12915
|
+
/* harmony import */ var _helpers_size_object_size_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21496);
|
|
12916
|
+
/* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38837);
|
|
12917
|
+
/* harmony import */ var _extract_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32526);
|
|
12918
|
+
/* harmony import */ var _is_same_attributes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94466);
|
|
12919
|
+
/* harmony import */ var _toggle_attributes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44253);
|
|
12920
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77361);
|
|
12921
|
+
/* harmony import */ var _wrap_list_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82515);
|
|
12681
12922
|
/*!
|
|
12682
12923
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
12683
12924
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -12688,6 +12929,8 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12688
12929
|
|
|
12689
12930
|
|
|
12690
12931
|
|
|
12932
|
+
|
|
12933
|
+
|
|
12691
12934
|
/**
|
|
12692
12935
|
* Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
|
|
12693
12936
|
* @private
|
|
@@ -12699,39 +12942,69 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12699
12942
|
if (!list) {
|
|
12700
12943
|
return mode;
|
|
12701
12944
|
}
|
|
12702
|
-
const result = jodit.e.fire(`${
|
|
12945
|
+
const result = jodit.e.fire(`${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}BeforeToggleList`, mode, commitStyle, list);
|
|
12703
12946
|
if (result !== undefined) {
|
|
12704
12947
|
return result;
|
|
12705
12948
|
}
|
|
12706
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
12949
|
+
const hook = jodit.e.fire.bind(jodit.e, `${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}AfterToggleList`);
|
|
12707
12950
|
if (mode !== (/* inlined export .UNWRAP */"unwrap")) {
|
|
12708
|
-
const isChangeMode = (0,
|
|
12951
|
+
const isChangeMode = (0,_toggle_attributes_js__WEBPACK_IMPORTED_MODULE_5__.toggleAttributes)(commitStyle, li.parentElement, jodit, _constants_js__WEBPACK_IMPORTED_MODULE_6__.INITIAL, true) === (/* inlined export .CHANGE */"change");
|
|
12952
|
+
const isSameList = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, commitStyle.element);
|
|
12953
|
+
// ol => ol[style="list-style-type: lower-roman"]: a list's style
|
|
12954
|
+
// belongs to the whole list, so it is changed without splitting it
|
|
12955
|
+
if (isSameList && isChangeMode && mode !== _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE && changesStyleOnly(commitStyle)) {
|
|
12956
|
+
(0,_toggle_attributes_js__WEBPACK_IMPORTED_MODULE_5__.toggleAttributes)(commitStyle, list, jodit, (/* inlined export .CHANGE */"change"));
|
|
12957
|
+
hook((/* inlined export .CHANGE */"change"), joinPrevious(commitStyle, list, mode), commitStyle);
|
|
12958
|
+
return (/* inlined export .CHANGE */"change");
|
|
12959
|
+
}
|
|
12960
|
+
// Restyled already, for an earlier part of the selection
|
|
12961
|
+
if (isSameList && mode === (/* inlined export .CHANGE */"change")) {
|
|
12962
|
+
return (/* inlined export .CHANGE */"change");
|
|
12963
|
+
}
|
|
12709
12964
|
// ul => ol, ol => ul or ul => ul.class1
|
|
12710
|
-
if (mode ===
|
|
12711
|
-
const wrapper = unwrapList(
|
|
12712
|
-
const newList = (0,
|
|
12713
|
-
hook(
|
|
12714
|
-
return
|
|
12965
|
+
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
|
|
12966
|
+
const wrapper = unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, list, li, jodit, commitStyle);
|
|
12967
|
+
const newList = (0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, wrapper, jodit);
|
|
12968
|
+
hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
|
|
12969
|
+
return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
|
|
12715
12970
|
}
|
|
12716
12971
|
}
|
|
12717
12972
|
const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"), list, li, jodit, commitStyle);
|
|
12718
12973
|
hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
|
|
12719
12974
|
return (/* inlined export .UNWRAP */"unwrap");
|
|
12720
12975
|
}
|
|
12976
|
+
/**
|
|
12977
|
+
* Other attributes, such as a class, still move the items into a new list,
|
|
12978
|
+
* where the `beforeWrapList` hook can add markup to each of them
|
|
12979
|
+
*/ function changesStyleOnly({ options: { attributes } }) {
|
|
12980
|
+
return Boolean(attributes === null || attributes === void 0 ? void 0 : attributes.style) && (0,_helpers_size_object_size_js__WEBPACK_IMPORTED_MODULE_1__.size)(attributes) === 1;
|
|
12981
|
+
}
|
|
12982
|
+
/**
|
|
12983
|
+
* Joins a restyled list to the list before it, when the selection runs on
|
|
12984
|
+
* from that list and the two now match
|
|
12985
|
+
*/ function joinPrevious(commitStyle, list, mode) {
|
|
12986
|
+
const prev = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(list, true);
|
|
12987
|
+
if (mode !== (/* inlined export .CHANGE */"change") || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(prev, commitStyle.element) || !(0,_is_same_attributes_js__WEBPACK_IMPORTED_MODULE_4__.elementsEqualAttributes)(prev, list)) {
|
|
12988
|
+
return list;
|
|
12989
|
+
}
|
|
12990
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(prev, Array.from(list.childNodes));
|
|
12991
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(list);
|
|
12992
|
+
return prev;
|
|
12993
|
+
}
|
|
12721
12994
|
function unwrapList(mode, list, li, jodit, cs) {
|
|
12722
|
-
const result = jodit.e.fire(`${
|
|
12995
|
+
const result = jodit.e.fire(`${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}BeforeUnwrapList`, mode, list, cs);
|
|
12723
12996
|
if (result) {
|
|
12724
|
-
(0,
|
|
12997
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_2__.assert)(_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(result), `${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}BeforeUnwrapList hook must return HTMLElement`);
|
|
12725
12998
|
return result;
|
|
12726
12999
|
}
|
|
12727
|
-
;(0,
|
|
12728
|
-
(0,
|
|
13000
|
+
;(0,_extract_js__WEBPACK_IMPORTED_MODULE_3__.extractSelectedPart)(list, li, jodit);
|
|
13001
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_2__.assert)(_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(li.parentElement), 'Element should be inside the list');
|
|
12729
13002
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(li.parentElement);
|
|
12730
13003
|
// In the REPLACE mode the content will be immediately wrapped in a `li`
|
|
12731
13004
|
// of the new list inside `wrapList`, so it should stay in the document.
|
|
12732
13005
|
// Replacing it with a fragment here would dissolve the content
|
|
12733
13006
|
// (with `enter: 'br'`) and the new list would never be inserted.
|
|
12734
|
-
if (mode ===
|
|
13007
|
+
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE) {
|
|
12735
13008
|
return li;
|
|
12736
13009
|
}
|
|
12737
13010
|
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(li, jodit.o.enter.toLowerCase() !== 'br' ? jodit.o.enter : jodit.createInside.fragment(), jodit.createInside);
|
|
@@ -13429,7 +13702,7 @@ const transactions = {
|
|
|
13429
13702
|
[states.LIST]: {
|
|
13430
13703
|
exec (value) {
|
|
13431
13704
|
const { element, jodit, mode } = value;
|
|
13432
|
-
if (mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.INITIAL && mode !== (/* inlined export .UNWRAP */"unwrap") && mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.REPLACE) {
|
|
13705
|
+
if (mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.INITIAL && mode !== (/* inlined export .UNWRAP */"unwrap") && mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.REPLACE && mode !== (/* inlined export .CHANGE */"change")) {
|
|
13433
13706
|
return {
|
|
13434
13707
|
...value,
|
|
13435
13708
|
next: states.END
|
|
@@ -16680,6 +16953,7 @@ Icon.__cache = new Map();
|
|
|
16680
16953
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16681
16954
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16682
16955
|
};
|
|
16956
|
+
var Popup_1;
|
|
16683
16957
|
|
|
16684
16958
|
|
|
16685
16959
|
|
|
@@ -16696,7 +16970,7 @@ const EVENTS_FOR_AUTOCLOSE = [
|
|
|
16696
16970
|
'backSpaceAfterDelete',
|
|
16697
16971
|
'beforeCommandDelete'
|
|
16698
16972
|
];
|
|
16699
|
-
class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
16973
|
+
let Popup = Popup_1 = class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
16700
16974
|
className() {
|
|
16701
16975
|
return 'Popup';
|
|
16702
16976
|
}
|
|
@@ -16706,7 +16980,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16706
16980
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(content, childContainer);
|
|
16707
16981
|
}
|
|
16708
16982
|
updateParentElement(target) {
|
|
16709
|
-
if (target !== this && _component_component_js__WEBPACK_IMPORTED_MODULE_0__.Component.isInstanceOf(target,
|
|
16983
|
+
if (target !== this && _component_component_js__WEBPACK_IMPORTED_MODULE_0__.Component.isInstanceOf(target, Popup_1)) {
|
|
16710
16984
|
this.__childrenPopups.forEach((popup)=>{
|
|
16711
16985
|
if (!target.closest(popup) && popup.isOpened) {
|
|
16712
16986
|
popup.close();
|
|
@@ -16748,7 +17022,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16748
17022
|
if (parentContainer) {
|
|
16749
17023
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(parentContainer, this.container);
|
|
16750
17024
|
} else {
|
|
16751
|
-
const popupContainer = (0,_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.jodit,
|
|
17025
|
+
const popupContainer = (0,_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.jodit, Popup_1);
|
|
16752
17026
|
if (parentContainer !== this.container.parentElement) {
|
|
16753
17027
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(popupContainer, this.container);
|
|
16754
17028
|
}
|
|
@@ -16861,11 +17135,11 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16861
17135
|
};
|
|
16862
17136
|
const getMatchStrategy = (inBox)=>{
|
|
16863
17137
|
let strategy;
|
|
16864
|
-
if (
|
|
17138
|
+
if (Popup_1.boxInView(getPointByStrategy(defaultStrategy), inBox)) {
|
|
16865
17139
|
strategy = defaultStrategy;
|
|
16866
17140
|
} else {
|
|
16867
17141
|
strategy = list.find((key)=>{
|
|
16868
|
-
if (
|
|
17142
|
+
if (Popup_1.boxInView(getPointByStrategy(key), inBox)) {
|
|
16869
17143
|
return key;
|
|
16870
17144
|
}
|
|
16871
17145
|
return;
|
|
@@ -16876,7 +17150,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16876
17150
|
// Try to find match position inside Jodit.container
|
|
16877
17151
|
let strategy = getMatchStrategy((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.position)(this.j.container, this.j));
|
|
16878
17152
|
// If not found or is not inside window view
|
|
16879
|
-
if (!strategy || !
|
|
17153
|
+
if (!strategy || !Popup_1.boxInView(getPointByStrategy(strategy), view)) {
|
|
16880
17154
|
// Find match strategy inside window view
|
|
16881
17155
|
strategy = getMatchStrategy(view) || strategy || defaultStrategy;
|
|
16882
17156
|
}
|
|
@@ -16926,7 +17200,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16926
17200
|
if (!e.target) {
|
|
16927
17201
|
return false;
|
|
16928
17202
|
}
|
|
16929
|
-
const box = _element_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target,
|
|
17203
|
+
const box = _element_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target, Popup_1);
|
|
16930
17204
|
return Boolean(box && (this === box || box.closest(this)));
|
|
16931
17205
|
}
|
|
16932
17206
|
__addGlobalListeners() {
|
|
@@ -16981,7 +17255,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
16981
17255
|
this.__childrenPopups = new Set();
|
|
16982
17256
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'role', 'popup');
|
|
16983
17257
|
}
|
|
16984
|
-
}
|
|
17258
|
+
};
|
|
16985
17259
|
__decorate([
|
|
16986
17260
|
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
16987
17261
|
], Popup.prototype, "updatePosition", null);
|
|
@@ -16995,6 +17269,10 @@ __decorate([
|
|
|
16995
17269
|
__decorate([
|
|
16996
17270
|
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
16997
17271
|
], Popup.prototype, "__closeOnOutsideClick", null);
|
|
17272
|
+
Popup = Popup_1 = __decorate([
|
|
17273
|
+
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.component
|
|
17274
|
+
], Popup);
|
|
17275
|
+
|
|
16998
17276
|
|
|
16999
17277
|
|
|
17000
17278
|
/***/ }),
|
|
@@ -18192,7 +18470,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18192
18470
|
commands.push(command);
|
|
18193
18471
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(command)) {
|
|
18194
18472
|
const hotkeys = this.o.commandToHotkeys[commandName] || this.o.commandToHotkeys[commandNameOriginal] || command.hotkeys;
|
|
18195
|
-
if (hotkeys) {
|
|
18473
|
+
if (hotkeys && hotkeys.length) {
|
|
18196
18474
|
this.registerHotkeyToCommand(hotkeys, commandName, options === null || options === void 0 ? void 0 : options.stopPropagation);
|
|
18197
18475
|
}
|
|
18198
18476
|
}
|
|
@@ -18201,6 +18479,10 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18201
18479
|
/**
|
|
18202
18480
|
* Register hotkey for command
|
|
18203
18481
|
*/ registerHotkeyToCommand(hotkeys, commandName, shouldStop = true) {
|
|
18482
|
+
// An empty list (e.g. `commandToHotkeys: { cmd: [] }`) turns the key off
|
|
18483
|
+
if (!hotkeys || !hotkeys.length) {
|
|
18484
|
+
return;
|
|
18485
|
+
}
|
|
18204
18486
|
const shortcuts = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.asArray)(hotkeys).map(_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.normalizeKeyAliases).map((hotkey)=>hotkey + '.hotkey').join(' ');
|
|
18205
18487
|
this.e.off(shortcuts).on(shortcuts, (type, stop)=>{
|
|
18206
18488
|
if (stop) {
|
|
@@ -19212,7 +19494,10 @@ function addClassNames(className, elm) {
|
|
|
19212
19494
|
Autoplay: 'تشغيل تلقائي',
|
|
19213
19495
|
Loop: 'تكرار',
|
|
19214
19496
|
Muted: 'مكتوم الصوت',
|
|
19215
|
-
Controls: 'عناصر التحكم'
|
|
19497
|
+
Controls: 'عناصر التحكم',
|
|
19498
|
+
'Start at...': 'البدء من...',
|
|
19499
|
+
'Start numbering at': 'بدء الترقيم من',
|
|
19500
|
+
'Number for the first item': 'رقم العنصر الأول'
|
|
19216
19501
|
});
|
|
19217
19502
|
|
|
19218
19503
|
|
|
@@ -19453,7 +19738,10 @@ function addClassNames(className, elm) {
|
|
|
19453
19738
|
Autoplay: 'Avtomatik oynatma',
|
|
19454
19739
|
Loop: 'Təkrarla',
|
|
19455
19740
|
Muted: 'Səssiz',
|
|
19456
|
-
Controls: 'İdarəetmə elementləri'
|
|
19741
|
+
Controls: 'İdarəetmə elementləri',
|
|
19742
|
+
'Start at...': 'Başlanğıc nömrəsi...',
|
|
19743
|
+
'Start numbering at': 'Nömrələmənin başlanğıcı',
|
|
19744
|
+
'Number for the first item': 'Birinci bəndin nömrəsi'
|
|
19457
19745
|
});
|
|
19458
19746
|
|
|
19459
19747
|
|
|
@@ -19686,7 +19974,10 @@ function addClassNames(className, elm) {
|
|
|
19686
19974
|
Autoplay: 'Automatické přehrávání',
|
|
19687
19975
|
Loop: 'Opakovat',
|
|
19688
19976
|
Muted: 'Ztlumeno',
|
|
19689
|
-
Controls: 'Ovládací prvky'
|
|
19977
|
+
Controls: 'Ovládací prvky',
|
|
19978
|
+
'Start at...': 'Začít od...',
|
|
19979
|
+
'Start numbering at': 'Začít číslování od',
|
|
19980
|
+
'Number for the first item': 'Číslo první položky'
|
|
19690
19981
|
});
|
|
19691
19982
|
|
|
19692
19983
|
|
|
@@ -19923,7 +20214,10 @@ function addClassNames(className, elm) {
|
|
|
19923
20214
|
Autoplay: 'Automatische Wiedergabe',
|
|
19924
20215
|
Loop: 'Wiederholen',
|
|
19925
20216
|
Muted: 'Stumm',
|
|
19926
|
-
Controls: 'Steuerelemente'
|
|
20217
|
+
Controls: 'Steuerelemente',
|
|
20218
|
+
'Start at...': 'Beginnen bei...',
|
|
20219
|
+
'Start numbering at': 'Nummerierung beginnen bei',
|
|
20220
|
+
'Number for the first item': 'Nummer des ersten Eintrags'
|
|
19927
20221
|
});
|
|
19928
20222
|
|
|
19929
20223
|
|
|
@@ -20177,7 +20471,10 @@ function addClassNames(className, elm) {
|
|
|
20177
20471
|
Autoplay: 'Reproducción automática',
|
|
20178
20472
|
Loop: 'Repetir',
|
|
20179
20473
|
Muted: 'Silenciado',
|
|
20180
|
-
Controls: 'Controles'
|
|
20474
|
+
Controls: 'Controles',
|
|
20475
|
+
'Start at...': 'Empezar en...',
|
|
20476
|
+
'Start numbering at': 'Empezar la numeración en',
|
|
20477
|
+
'Number for the first item': 'Número del primer elemento'
|
|
20181
20478
|
});
|
|
20182
20479
|
|
|
20183
20480
|
|
|
@@ -20409,7 +20706,10 @@ function addClassNames(className, elm) {
|
|
|
20409
20706
|
Autoplay: 'پخش خودکار',
|
|
20410
20707
|
Loop: 'تکرار',
|
|
20411
20708
|
Muted: 'بیصدا',
|
|
20412
|
-
Controls: 'کنترلها'
|
|
20709
|
+
Controls: 'کنترلها',
|
|
20710
|
+
'Start at...': 'شروع از...',
|
|
20711
|
+
'Start numbering at': 'شروع شمارهگذاری از',
|
|
20712
|
+
'Number for the first item': 'شمارهی نخستین مورد'
|
|
20413
20713
|
});
|
|
20414
20714
|
|
|
20415
20715
|
|
|
@@ -20647,7 +20947,10 @@ function addClassNames(className, elm) {
|
|
|
20647
20947
|
Autoplay: 'Automaattinen toisto',
|
|
20648
20948
|
Loop: 'Toista uudelleen',
|
|
20649
20949
|
Muted: 'Mykistetty',
|
|
20650
|
-
Controls: 'Säätimet'
|
|
20950
|
+
Controls: 'Säätimet',
|
|
20951
|
+
'Start at...': 'Aloita numerosta...',
|
|
20952
|
+
'Start numbering at': 'Aloita numerointi numerosta',
|
|
20953
|
+
'Number for the first item': 'Ensimmäisen kohdan numero'
|
|
20651
20954
|
});
|
|
20652
20955
|
|
|
20653
20956
|
|
|
@@ -20879,7 +21182,10 @@ function addClassNames(className, elm) {
|
|
|
20879
21182
|
Autoplay: 'Lecture automatique',
|
|
20880
21183
|
Loop: 'Lecture en boucle',
|
|
20881
21184
|
Muted: 'Muet',
|
|
20882
|
-
Controls: 'Commandes'
|
|
21185
|
+
Controls: 'Commandes',
|
|
21186
|
+
'Start at...': 'Commencer à...',
|
|
21187
|
+
'Start numbering at': 'Commencer la numérotation à',
|
|
21188
|
+
'Number for the first item': 'Numéro du premier élément'
|
|
20883
21189
|
});
|
|
20884
21190
|
|
|
20885
21191
|
|
|
@@ -21111,7 +21417,10 @@ function addClassNames(className, elm) {
|
|
|
21111
21417
|
Autoplay: 'ניגון אוטומטי',
|
|
21112
21418
|
Loop: 'הפעלה חוזרת',
|
|
21113
21419
|
Muted: 'מושתק',
|
|
21114
|
-
Controls: 'פקדים'
|
|
21420
|
+
Controls: 'פקדים',
|
|
21421
|
+
'Start at...': 'התחל מ...',
|
|
21422
|
+
'Start numbering at': 'התחל מספור מ',
|
|
21423
|
+
'Number for the first item': 'מספר הפריט הראשון'
|
|
21115
21424
|
});
|
|
21116
21425
|
|
|
21117
21426
|
|
|
@@ -21345,7 +21654,10 @@ function addClassNames(className, elm) {
|
|
|
21345
21654
|
Autoplay: 'Automatikus lejátszás',
|
|
21346
21655
|
Loop: 'Ismétlés',
|
|
21347
21656
|
Muted: 'Némítva',
|
|
21348
|
-
Controls: 'Vezérlők'
|
|
21657
|
+
Controls: 'Vezérlők',
|
|
21658
|
+
'Start at...': 'Kezdőszám...',
|
|
21659
|
+
'Start numbering at': 'Számozás kezdőértéke',
|
|
21660
|
+
'Number for the first item': 'Az első elem száma'
|
|
21349
21661
|
});
|
|
21350
21662
|
|
|
21351
21663
|
|
|
@@ -21578,7 +21890,10 @@ function addClassNames(className, elm) {
|
|
|
21578
21890
|
Autoplay: 'Putar otomatis',
|
|
21579
21891
|
Loop: 'Ulangi',
|
|
21580
21892
|
Muted: 'Dibisukan',
|
|
21581
|
-
Controls: 'Kontrol'
|
|
21893
|
+
Controls: 'Kontrol',
|
|
21894
|
+
'Start at...': 'Mulai dari...',
|
|
21895
|
+
'Start numbering at': 'Mulai penomoran dari',
|
|
21896
|
+
'Number for the first item': 'Nomor untuk item pertama'
|
|
21582
21897
|
});
|
|
21583
21898
|
|
|
21584
21899
|
|
|
@@ -21815,7 +22130,10 @@ function addClassNames(className, elm) {
|
|
|
21815
22130
|
Autoplay: 'Riproduzione automatica',
|
|
21816
22131
|
Loop: 'Ripeti',
|
|
21817
22132
|
Muted: 'Muto',
|
|
21818
|
-
Controls: 'Controlli'
|
|
22133
|
+
Controls: 'Controlli',
|
|
22134
|
+
'Start at...': 'Inizia da...',
|
|
22135
|
+
'Start numbering at': 'Inizia la numerazione da',
|
|
22136
|
+
'Number for the first item': 'Numero del primo elemento'
|
|
21819
22137
|
});
|
|
21820
22138
|
|
|
21821
22139
|
|
|
@@ -22052,7 +22370,10 @@ function addClassNames(className, elm) {
|
|
|
22052
22370
|
Autoplay: '自動再生',
|
|
22053
22371
|
Loop: 'ループ再生',
|
|
22054
22372
|
Muted: 'ミュート',
|
|
22055
|
-
Controls: 'コントロール'
|
|
22373
|
+
Controls: 'コントロール',
|
|
22374
|
+
'Start at...': '開始番号...',
|
|
22375
|
+
'Start numbering at': '番号の開始値',
|
|
22376
|
+
'Number for the first item': '最初の項目の番号'
|
|
22056
22377
|
});
|
|
22057
22378
|
|
|
22058
22379
|
|
|
@@ -22295,7 +22616,10 @@ function addClassNames(className, elm) {
|
|
|
22295
22616
|
Autoplay: '자동 재생',
|
|
22296
22617
|
Loop: '반복 재생',
|
|
22297
22618
|
Muted: '음소거',
|
|
22298
|
-
Controls: '컨트롤'
|
|
22619
|
+
Controls: '컨트롤',
|
|
22620
|
+
'Start at...': '시작 번호...',
|
|
22621
|
+
'Start numbering at': '번호 매기기 시작 값',
|
|
22622
|
+
'Number for the first item': '첫 번째 항목의 번호'
|
|
22299
22623
|
});
|
|
22300
22624
|
|
|
22301
22625
|
|
|
@@ -22527,7 +22851,10 @@ function addClassNames(className, elm) {
|
|
|
22527
22851
|
Autoplay: 'Автоматаар тоглуулах',
|
|
22528
22852
|
Loop: 'Давтах',
|
|
22529
22853
|
Muted: 'Дуугүй',
|
|
22530
|
-
Controls: 'Удирдлага'
|
|
22854
|
+
Controls: 'Удирдлага',
|
|
22855
|
+
'Start at...': 'Эхлэх дугаар...',
|
|
22856
|
+
'Start numbering at': 'Дугаарлалт эхлэх',
|
|
22857
|
+
'Number for the first item': 'Эхний зүйлийн дугаар'
|
|
22531
22858
|
});
|
|
22532
22859
|
|
|
22533
22860
|
|
|
@@ -22760,7 +23087,10 @@ function addClassNames(className, elm) {
|
|
|
22760
23087
|
Autoplay: 'Automatisch afspelen',
|
|
22761
23088
|
Loop: 'Herhalen',
|
|
22762
23089
|
Muted: 'Gedempt',
|
|
22763
|
-
Controls: 'Bedieningselementen'
|
|
23090
|
+
Controls: 'Bedieningselementen',
|
|
23091
|
+
'Start at...': 'Beginnen bij...',
|
|
23092
|
+
'Start numbering at': 'Nummering beginnen bij',
|
|
23093
|
+
'Number for the first item': 'Nummer van het eerste item'
|
|
22764
23094
|
});
|
|
22765
23095
|
|
|
22766
23096
|
|
|
@@ -23001,7 +23331,10 @@ function addClassNames(className, elm) {
|
|
|
23001
23331
|
Autoplay: 'Automatisk avspilling',
|
|
23002
23332
|
Loop: 'Gjenta',
|
|
23003
23333
|
Muted: 'Dempet',
|
|
23004
|
-
Controls: 'Kontroller'
|
|
23334
|
+
Controls: 'Kontroller',
|
|
23335
|
+
'Start at...': 'Start på...',
|
|
23336
|
+
'Start numbering at': 'Start nummereringen på',
|
|
23337
|
+
'Number for the first item': 'Nummer for første punkt'
|
|
23005
23338
|
});
|
|
23006
23339
|
|
|
23007
23340
|
|
|
@@ -23233,7 +23566,10 @@ function addClassNames(className, elm) {
|
|
|
23233
23566
|
Autoplay: 'Autoodtwarzanie',
|
|
23234
23567
|
Loop: 'Zapętlenie',
|
|
23235
23568
|
Muted: 'Wyciszony',
|
|
23236
|
-
Controls: 'Elementy sterujące'
|
|
23569
|
+
Controls: 'Elementy sterujące',
|
|
23570
|
+
'Start at...': 'Zacznij od...',
|
|
23571
|
+
'Start numbering at': 'Rozpocznij numerowanie od',
|
|
23572
|
+
'Number for the first item': 'Numer pierwszego elementu'
|
|
23237
23573
|
});
|
|
23238
23574
|
|
|
23239
23575
|
|
|
@@ -23470,7 +23806,10 @@ function addClassNames(className, elm) {
|
|
|
23470
23806
|
Autoplay: 'Reprodução automática',
|
|
23471
23807
|
Loop: 'Repetir',
|
|
23472
23808
|
Muted: 'Sem som',
|
|
23473
|
-
Controls: 'Controles'
|
|
23809
|
+
Controls: 'Controles',
|
|
23810
|
+
'Start at...': 'Começar em...',
|
|
23811
|
+
'Start numbering at': 'Começar a numeração em',
|
|
23812
|
+
'Number for the first item': 'Número do primeiro item'
|
|
23474
23813
|
});
|
|
23475
23814
|
|
|
23476
23815
|
|
|
@@ -23701,7 +24040,10 @@ function addClassNames(className, elm) {
|
|
|
23701
24040
|
Autoplay: 'Автовоспроизведение',
|
|
23702
24041
|
Loop: 'Повтор',
|
|
23703
24042
|
Muted: 'Без звука',
|
|
23704
|
-
Controls: 'Элементы управления'
|
|
24043
|
+
Controls: 'Элементы управления',
|
|
24044
|
+
'Start at...': 'Начать с...',
|
|
24045
|
+
'Start numbering at': 'Начать нумерацию с',
|
|
24046
|
+
'Number for the first item': 'Номер первого пункта'
|
|
23705
24047
|
});
|
|
23706
24048
|
|
|
23707
24049
|
|
|
@@ -23940,7 +24282,10 @@ function addClassNames(className, elm) {
|
|
|
23940
24282
|
Autoplay: 'Automatické prehrávanie',
|
|
23941
24283
|
Loop: 'Opakovať',
|
|
23942
24284
|
Muted: 'Stlmené',
|
|
23943
|
-
Controls: 'Ovládacie prvky'
|
|
24285
|
+
Controls: 'Ovládacie prvky',
|
|
24286
|
+
'Start at...': 'Začať od...',
|
|
24287
|
+
'Start numbering at': 'Začať číslovanie od',
|
|
24288
|
+
'Number for the first item': 'Číslo prvej položky'
|
|
23944
24289
|
});
|
|
23945
24290
|
|
|
23946
24291
|
|
|
@@ -24180,7 +24525,10 @@ function addClassNames(className, elm) {
|
|
|
24180
24525
|
Autoplay: 'Automatisk uppspelning',
|
|
24181
24526
|
Loop: 'Upprepa',
|
|
24182
24527
|
Muted: 'Ljudlös',
|
|
24183
|
-
Controls: 'Kontroller'
|
|
24528
|
+
Controls: 'Kontroller',
|
|
24529
|
+
'Start at...': 'Börja på...',
|
|
24530
|
+
'Start numbering at': 'Börja numreringen på',
|
|
24531
|
+
'Number for the first item': 'Nummer för första punkten'
|
|
24184
24532
|
});
|
|
24185
24533
|
|
|
24186
24534
|
|
|
@@ -24412,7 +24760,10 @@ function addClassNames(className, elm) {
|
|
|
24412
24760
|
Autoplay: 'Otomatik oynat',
|
|
24413
24761
|
Loop: 'Döngü',
|
|
24414
24762
|
Muted: 'Sessiz',
|
|
24415
|
-
Controls: 'Kontroller'
|
|
24763
|
+
Controls: 'Kontroller',
|
|
24764
|
+
'Start at...': 'Başlangıç numarası...',
|
|
24765
|
+
'Start numbering at': 'Numaralandırma başlangıcı',
|
|
24766
|
+
'Number for the first item': 'İlk öğenin numarası'
|
|
24416
24767
|
});
|
|
24417
24768
|
|
|
24418
24769
|
|
|
@@ -24643,7 +24994,10 @@ function addClassNames(className, elm) {
|
|
|
24643
24994
|
Autoplay: 'Автовідтворення',
|
|
24644
24995
|
Loop: 'Повтор',
|
|
24645
24996
|
Muted: 'Без звуку',
|
|
24646
|
-
Controls: 'Елементи керування'
|
|
24997
|
+
Controls: 'Елементи керування',
|
|
24998
|
+
'Start at...': 'Почати з...',
|
|
24999
|
+
'Start numbering at': 'Почати нумерацію з',
|
|
25000
|
+
'Number for the first item': 'Номер першого пункту'
|
|
24647
25001
|
});
|
|
24648
25002
|
|
|
24649
25003
|
|
|
@@ -24876,7 +25230,10 @@ function addClassNames(className, elm) {
|
|
|
24876
25230
|
Autoplay: '自动播放',
|
|
24877
25231
|
Loop: '循环播放',
|
|
24878
25232
|
Muted: '静音',
|
|
24879
|
-
Controls: '播放控件'
|
|
25233
|
+
Controls: '播放控件',
|
|
25234
|
+
'Start at...': '起始于...',
|
|
25235
|
+
'Start numbering at': '编号起始值',
|
|
25236
|
+
'Number for the first item': '第一项的编号'
|
|
24880
25237
|
});
|
|
24881
25238
|
|
|
24882
25239
|
|
|
@@ -25108,7 +25465,10 @@ function addClassNames(className, elm) {
|
|
|
25108
25465
|
Autoplay: '自動播放',
|
|
25109
25466
|
Loop: '循環播放',
|
|
25110
25467
|
Muted: '靜音',
|
|
25111
|
-
Controls: '播放控制項'
|
|
25468
|
+
Controls: '播放控制項',
|
|
25469
|
+
'Start at...': '起始於...',
|
|
25470
|
+
'Start numbering at': '編號起始值',
|
|
25471
|
+
'Number for the first item': '第一項的編號'
|
|
25112
25472
|
});
|
|
25113
25473
|
|
|
25114
25474
|
|
|
@@ -25619,7 +25979,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
25619
25979
|
}
|
|
25620
25980
|
}
|
|
25621
25981
|
__onResizerMouseDown(e) {
|
|
25622
|
-
var _a, _b
|
|
25982
|
+
var _a, _b;
|
|
25983
|
+
// As for the header: otherwise Safari selects the dialog's text as
|
|
25984
|
+
// the pointer moves
|
|
25985
|
+
if (e.cancelable) {
|
|
25986
|
+
e.preventDefault();
|
|
25987
|
+
}
|
|
25623
25988
|
this.resizable = true;
|
|
25624
25989
|
this.startX = e.clientX;
|
|
25625
25990
|
this.startY = e.clientY;
|
|
@@ -25631,8 +25996,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
25631
25996
|
// the content area does not shrink below its CSS `min-height`,
|
|
25632
25997
|
// so it is part of the smallest height the panel can take
|
|
25633
25998
|
const contentMinHeight = content ? parseFloat(this.ow.getComputedStyle(content).minHeight) || 0 : 0;
|
|
25634
|
-
this.minSize.w = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minWidth) ? this.o.minWidth : Math.max(100,
|
|
25635
|
-
this.minSize.h = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minHeight) ? this.o.minHeight : ((
|
|
25999
|
+
this.minSize.w = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minWidth) ? this.o.minWidth : Math.max(100, header ? this.__contentWidth(header) : 0, footer ? this.__contentWidth(footer) : 0);
|
|
26000
|
+
this.minSize.h = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minHeight) ? this.o.minHeight : ((_a = header === null || header === void 0 ? void 0 : header.offsetHeight) !== null && _a !== void 0 ? _a : 0) + ((_b = footer === null || footer === void 0 ? void 0 : footer.offsetHeight) !== null && _b !== void 0 ? _b : 0) + contentMinHeight + this.resizer.offsetHeight;
|
|
25636
26001
|
this.lockSelect();
|
|
25637
26002
|
this.__addGlobalResizeListeners();
|
|
25638
26003
|
if (this.e) {
|
|
@@ -25641,13 +26006,25 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
25641
26006
|
*/ this.e.fire(this, 'startResize');
|
|
25642
26007
|
}
|
|
25643
26008
|
}
|
|
26009
|
+
/**
|
|
26010
|
+
* The width `box` takes with its content on one line. The header and
|
|
26011
|
+
* footer are flex rows as wide as the dialog, so the footer's
|
|
26012
|
+
* `scrollWidth` was the dialog's width and kept it from getting any
|
|
26013
|
+
* narrower
|
|
26014
|
+
*/ __contentWidth(box) {
|
|
26015
|
+
const { width } = box.style;
|
|
26016
|
+
box.style.width = 'max-content';
|
|
26017
|
+
const contentWidth = box.offsetWidth;
|
|
26018
|
+
box.style.width = width;
|
|
26019
|
+
return contentWidth;
|
|
26020
|
+
}
|
|
25644
26021
|
__addGlobalResizeListeners() {
|
|
25645
26022
|
const self1 = this;
|
|
25646
26023
|
self1.e.on(self1.ow, 'pointermove touchmove', self1.__onMouseMove).on(self1.ow, 'pointerup touchend', self1.__onMouseUp);
|
|
25647
26024
|
}
|
|
25648
26025
|
__removeGlobalResizeListeners() {
|
|
25649
26026
|
const self1 = this;
|
|
25650
|
-
self1.e.off(self1.ow, '
|
|
26027
|
+
self1.e.off(self1.ow, 'pointermove touchmove', self1.__onMouseMove).off(self1.ow, 'pointerup touchend', self1.__onMouseUp);
|
|
25651
26028
|
}
|
|
25652
26029
|
/**
|
|
25653
26030
|
* Specifies the size of the window
|
|
@@ -28218,17 +28595,29 @@ const DEFAULT_SOURCE_NAME = 'default';
|
|
|
28218
28595
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28219
28596
|
/* harmony export */ FileBrowserFiles: function() { return /* binding */ FileBrowserFiles; }
|
|
28220
28597
|
/* harmony export */ });
|
|
28221
|
-
/* harmony import */ var
|
|
28598
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
|
|
28599
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67510);
|
|
28222
28600
|
/*!
|
|
28223
28601
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28224
28602
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
28225
28603
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
28226
|
-
*/
|
|
28227
|
-
|
|
28604
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
28605
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28606
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
28607
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28608
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
28609
|
+
};
|
|
28610
|
+
|
|
28611
|
+
|
|
28612
|
+
let FileBrowserFiles = class FileBrowserFiles extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__.UIGroup {
|
|
28228
28613
|
className() {
|
|
28229
28614
|
return 'FileBrowserFiles';
|
|
28230
28615
|
}
|
|
28231
|
-
}
|
|
28616
|
+
};
|
|
28617
|
+
FileBrowserFiles = __decorate([
|
|
28618
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
28619
|
+
], FileBrowserFiles);
|
|
28620
|
+
|
|
28232
28621
|
|
|
28233
28622
|
|
|
28234
28623
|
/***/ }),
|
|
@@ -28260,17 +28649,29 @@ class FileBrowserFiles extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_0__.UI
|
|
|
28260
28649
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28261
28650
|
/* harmony export */ FileBrowserTree: function() { return /* binding */ FileBrowserTree; }
|
|
28262
28651
|
/* harmony export */ });
|
|
28263
|
-
/* harmony import */ var
|
|
28652
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
|
|
28653
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67510);
|
|
28264
28654
|
/*!
|
|
28265
28655
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28266
28656
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
28267
28657
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
28268
|
-
*/
|
|
28269
|
-
|
|
28658
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
28659
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28660
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
28661
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28662
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
28663
|
+
};
|
|
28664
|
+
|
|
28665
|
+
|
|
28666
|
+
let FileBrowserTree = class FileBrowserTree extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__.UIGroup {
|
|
28270
28667
|
className() {
|
|
28271
28668
|
return 'FileBrowserTree';
|
|
28272
28669
|
}
|
|
28273
|
-
}
|
|
28670
|
+
};
|
|
28671
|
+
FileBrowserTree = __decorate([
|
|
28672
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
28673
|
+
], FileBrowserTree);
|
|
28674
|
+
|
|
28274
28675
|
|
|
28275
28676
|
|
|
28276
28677
|
/***/ }),
|
|
@@ -29948,23 +30349,15 @@ StatusBar = __decorate([
|
|
|
29948
30349
|
/* harmony export */ });
|
|
29949
30350
|
/* harmony import */ var _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91907);
|
|
29950
30351
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82758);
|
|
29951
|
-
/* harmony import */ var
|
|
29952
|
-
/* harmony import */ var
|
|
29953
|
-
/* harmony import */ var
|
|
29954
|
-
/* harmony import */ var
|
|
29955
|
-
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
30352
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
30353
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
30354
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
30355
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
29956
30356
|
/*!
|
|
29957
30357
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29958
30358
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29959
30359
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
29960
|
-
*/
|
|
29961
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29962
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
29963
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29964
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29965
|
-
};
|
|
29966
|
-
|
|
29967
|
-
|
|
30360
|
+
*/
|
|
29968
30361
|
|
|
29969
30362
|
|
|
29970
30363
|
|
|
@@ -29975,19 +30368,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
29975
30368
|
/** @override */ className() {
|
|
29976
30369
|
return 'Table';
|
|
29977
30370
|
}
|
|
29978
|
-
__recalculateStyles() {
|
|
29979
|
-
const style = (0,_core_global_js__WEBPACK_IMPORTED_MODULE_4__.getContainer)(this.j, Table, 'style', true);
|
|
29980
|
-
const selectors = [];
|
|
29981
|
-
this.selected.forEach((td)=>{
|
|
29982
|
-
const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
|
|
29983
|
-
selector && selectors.push(selector);
|
|
29984
|
-
});
|
|
29985
|
-
style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
|
|
29986
|
-
}
|
|
29987
30371
|
addSelection(td) {
|
|
29988
30372
|
this.selected.add(td);
|
|
29989
30373
|
this.__recalculateStyles();
|
|
29990
|
-
const table =
|
|
30374
|
+
const table = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', this.j.editor);
|
|
29991
30375
|
if (table) {
|
|
29992
30376
|
const cells = Table.__selectedByTable.get(table) || new Set();
|
|
29993
30377
|
cells.add(td);
|
|
@@ -29997,7 +30381,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
29997
30381
|
removeSelection(td) {
|
|
29998
30382
|
this.selected.delete(td);
|
|
29999
30383
|
this.__recalculateStyles();
|
|
30000
|
-
const table =
|
|
30384
|
+
const table = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', this.j.editor);
|
|
30001
30385
|
if (table) {
|
|
30002
30386
|
const cells = Table.__selectedByTable.get(table);
|
|
30003
30387
|
if (cells) {
|
|
@@ -30011,11 +30395,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30011
30395
|
/**
|
|
30012
30396
|
* Returns array of selected cells
|
|
30013
30397
|
*/ getAllSelectedCells() {
|
|
30014
|
-
return (0,
|
|
30398
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(this.selected);
|
|
30015
30399
|
}
|
|
30016
30400
|
static __getSelectedCellsByTable(table) {
|
|
30017
30401
|
const cells = Table.__selectedByTable.get(table);
|
|
30018
|
-
return cells ? (0,
|
|
30402
|
+
return cells ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(cells) : [];
|
|
30019
30403
|
}
|
|
30020
30404
|
/** @override **/ destruct() {
|
|
30021
30405
|
this.selected.clear();
|
|
@@ -30042,7 +30426,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30042
30426
|
const matrix = [
|
|
30043
30427
|
[]
|
|
30044
30428
|
];
|
|
30045
|
-
const rows = (0,
|
|
30429
|
+
const rows = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
30046
30430
|
const setCell = (cell, i)=>{
|
|
30047
30431
|
if (matrix[i] === undefined) {
|
|
30048
30432
|
matrix[i] = [];
|
|
@@ -30065,7 +30449,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30065
30449
|
}
|
|
30066
30450
|
};
|
|
30067
30451
|
for(let i = 0; i < rows.length; i += 1){
|
|
30068
|
-
const cells = (0,
|
|
30452
|
+
const cells = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(rows[i].cells);
|
|
30069
30453
|
for(let j = 0; j < cells.length; j += 1){
|
|
30070
30454
|
if (setCell(cells[j], i) === false) {
|
|
30071
30455
|
return matrix;
|
|
@@ -30115,34 +30499,34 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30115
30499
|
row = create.element('tr');
|
|
30116
30500
|
for(let j = 0; j < columnsCount; j += 1){
|
|
30117
30501
|
const cell = create.element('td');
|
|
30118
|
-
|
|
30119
|
-
|
|
30502
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, create.element('br'));
|
|
30503
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(row, cell);
|
|
30120
30504
|
}
|
|
30121
30505
|
} else {
|
|
30122
30506
|
row = line.cloneNode(true);
|
|
30123
|
-
|
|
30124
|
-
if (!
|
|
30507
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(line, (cell)=>{
|
|
30508
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(cell)) {
|
|
30125
30509
|
return;
|
|
30126
30510
|
}
|
|
30127
|
-
const rowspan = (0,
|
|
30511
|
+
const rowspan = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan');
|
|
30128
30512
|
if (rowspan && parseInt(rowspan, 10) > 1) {
|
|
30129
30513
|
const newRowSpan = parseInt(rowspan, 10) - 1;
|
|
30130
|
-
(0,
|
|
30514
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', newRowSpan > 1 ? newRowSpan : null);
|
|
30131
30515
|
}
|
|
30132
30516
|
});
|
|
30133
|
-
|
|
30134
|
-
if (
|
|
30135
|
-
|
|
30136
|
-
|
|
30517
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(row, (cell)=>{
|
|
30518
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(cell)) {
|
|
30519
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(cell);
|
|
30520
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, create.element('br'));
|
|
30137
30521
|
}
|
|
30138
30522
|
});
|
|
30139
30523
|
}
|
|
30140
30524
|
if (after && line && line.nextSibling) {
|
|
30141
|
-
|
|
30525
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
|
|
30142
30526
|
} else if (!after && line) {
|
|
30143
|
-
|
|
30527
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
|
|
30144
30528
|
} else {
|
|
30145
|
-
|
|
30529
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.first(table, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'tbody')) || table, row);
|
|
30146
30530
|
}
|
|
30147
30531
|
}
|
|
30148
30532
|
/**
|
|
@@ -30170,7 +30554,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30170
30554
|
while(box[rowIndex + 1][nextCell] === cell){
|
|
30171
30555
|
nextCell += 1;
|
|
30172
30556
|
}
|
|
30173
|
-
const nextRow =
|
|
30557
|
+
const nextRow = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next(cell.parentNode, (elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'tr'), table);
|
|
30174
30558
|
if (nextRow) {
|
|
30175
30559
|
// `box[rowIndex + 1][nextCell]` is the cell that
|
|
30176
30560
|
// logically follows the moved cell in the next row, but
|
|
@@ -30187,21 +30571,21 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30187
30571
|
}
|
|
30188
30572
|
}
|
|
30189
30573
|
if (referenceCell) {
|
|
30190
|
-
|
|
30574
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(referenceCell, cell);
|
|
30191
30575
|
} else {
|
|
30192
|
-
|
|
30576
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(nextRow, cell);
|
|
30193
30577
|
}
|
|
30194
30578
|
}
|
|
30195
30579
|
}
|
|
30196
30580
|
} else {
|
|
30197
|
-
|
|
30581
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(cell);
|
|
30198
30582
|
}
|
|
30199
30583
|
if (dec && (cell.parentNode === row || cell !== box[rowIndex][j - 1])) {
|
|
30200
30584
|
const rowSpan = cell.rowSpan;
|
|
30201
|
-
(0,
|
|
30585
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
|
|
30202
30586
|
}
|
|
30203
30587
|
});
|
|
30204
|
-
|
|
30588
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
|
|
30205
30589
|
}
|
|
30206
30590
|
/**
|
|
30207
30591
|
* Remove row
|
|
@@ -30212,7 +30596,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30212
30596
|
* Insert column before / after all the columns containing the selected cells
|
|
30213
30597
|
*/ appendColumn(table, selectedCell, insertAfter = true) {
|
|
30214
30598
|
const box = Table.__formalMatrix(table);
|
|
30215
|
-
if (!insertAfter &&
|
|
30599
|
+
if (!insertAfter && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(selectedCell.previousElementSibling)) {
|
|
30216
30600
|
return this.appendColumn(table, selectedCell.previousElementSibling, true);
|
|
30217
30601
|
}
|
|
30218
30602
|
const [, formalCol] = Table.__formalCoordinate(table, selectedCell, insertAfter);
|
|
@@ -30222,11 +30606,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30222
30606
|
const cells = box[i];
|
|
30223
30607
|
if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
|
|
30224
30608
|
const cell = this.j.createInside.element('td');
|
|
30225
|
-
|
|
30609
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, this.j.createInside.element('br'));
|
|
30226
30610
|
if (insertAfter) {
|
|
30227
|
-
|
|
30611
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(cells[columnIndex], cell);
|
|
30228
30612
|
} else {
|
|
30229
|
-
|
|
30613
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(cells[columnIndex], cell);
|
|
30230
30614
|
}
|
|
30231
30615
|
if (cells[columnIndex].rowSpan > 1) {
|
|
30232
30616
|
cell.rowSpan = cells[columnIndex].rowSpan;
|
|
@@ -30248,11 +30632,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30248
30632
|
} else if (j + 1 < cells.length && box[i][j + 1] === td) {
|
|
30249
30633
|
dec = true;
|
|
30250
30634
|
} else {
|
|
30251
|
-
|
|
30635
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(td);
|
|
30252
30636
|
}
|
|
30253
30637
|
if (dec && (i - 1 < 0 || td !== box[i - 1][j])) {
|
|
30254
30638
|
const colSpan = td.colSpan;
|
|
30255
|
-
(0,
|
|
30639
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'colspan', colSpan - 1 > 1 ? (colSpan - 1).toString() : null);
|
|
30256
30640
|
}
|
|
30257
30641
|
});
|
|
30258
30642
|
}
|
|
@@ -30329,13 +30713,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30329
30713
|
continue; // broken table
|
|
30330
30714
|
}
|
|
30331
30715
|
if (box[i][j].hasAttribute('rowspan') && box[i][j].rowSpan === 1) {
|
|
30332
|
-
(0,
|
|
30716
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'rowspan', null);
|
|
30333
30717
|
}
|
|
30334
30718
|
if (box[i][j].hasAttribute('colspan') && box[i][j].colSpan === 1) {
|
|
30335
|
-
(0,
|
|
30719
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'colspan', null);
|
|
30336
30720
|
}
|
|
30337
|
-
if (box[i][j].hasAttribute('class') && !(0,
|
|
30338
|
-
(0,
|
|
30721
|
+
if (box[i][j].hasAttribute('class') && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'class')) {
|
|
30722
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'class', null);
|
|
30339
30723
|
}
|
|
30340
30724
|
}
|
|
30341
30725
|
}
|
|
@@ -30409,10 +30793,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30409
30793
|
return;
|
|
30410
30794
|
}
|
|
30411
30795
|
alreadyMerged.add(td);
|
|
30412
|
-
if (i === bound[0][0] && (0,
|
|
30796
|
+
if (i === bound[0][0] && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(td, 'width')) {
|
|
30413
30797
|
w += td.offsetWidth;
|
|
30414
30798
|
}
|
|
30415
|
-
if ((0,
|
|
30799
|
+
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.trim)(cell.innerHTML.replace(/<br(\/)?>/g, '')) !== '') {
|
|
30416
30800
|
html.push(cell.innerHTML);
|
|
30417
30801
|
}
|
|
30418
30802
|
if (cs > 1) {
|
|
@@ -30451,9 +30835,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30451
30835
|
alreadyMerged.delete(first);
|
|
30452
30836
|
Table.__unmark(__marked);
|
|
30453
30837
|
Table.__normalizeTable(table);
|
|
30454
|
-
(0,
|
|
30838
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).forEach((tr)=>{
|
|
30455
30839
|
if (!tr.cells.length) {
|
|
30456
|
-
|
|
30840
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tr);
|
|
30457
30841
|
}
|
|
30458
30842
|
});
|
|
30459
30843
|
}
|
|
@@ -30469,7 +30853,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30469
30853
|
const __marked = [];
|
|
30470
30854
|
Table.__getSelectedCellsByTable(table).forEach((cell)=>{
|
|
30471
30855
|
td = jodit.createInside.element('td');
|
|
30472
|
-
|
|
30856
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, jodit.createInside.element('br'));
|
|
30473
30857
|
tr = jodit.createInside.element('tr');
|
|
30474
30858
|
coord = Table.__formalCoordinate(table, cell);
|
|
30475
30859
|
if (cell.rowSpan < 2) {
|
|
@@ -30478,8 +30862,8 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30478
30862
|
Table.__mark(tdElm, 'rowspan', tdElm.rowSpan + 1, __marked);
|
|
30479
30863
|
}
|
|
30480
30864
|
});
|
|
30481
|
-
|
|
30482
|
-
|
|
30865
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(cell, 'tr', table), tr);
|
|
30866
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(tr, td);
|
|
30483
30867
|
} else {
|
|
30484
30868
|
Table.__mark(cell, 'rowspan', cell.rowSpan - 1, __marked);
|
|
30485
30869
|
Table.__formalMatrix(table, (tdElm, i, j)=>{
|
|
@@ -30491,9 +30875,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30491
30875
|
}
|
|
30492
30876
|
});
|
|
30493
30877
|
if (after) {
|
|
30494
|
-
|
|
30878
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(after, td);
|
|
30495
30879
|
} else {
|
|
30496
|
-
|
|
30880
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prepend(parent, td);
|
|
30497
30881
|
}
|
|
30498
30882
|
}
|
|
30499
30883
|
if (cell.colSpan > 1) {
|
|
@@ -30524,12 +30908,12 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30524
30908
|
Table.__mark(cell, 'colspan', cell.colSpan - 1, __marked);
|
|
30525
30909
|
}
|
|
30526
30910
|
td = jodit.createInside.element('td');
|
|
30527
|
-
|
|
30911
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, jodit.createInside.element('br'));
|
|
30528
30912
|
if (cell.rowSpan > 1) {
|
|
30529
30913
|
Table.__mark(td, 'rowspan', cell.rowSpan, __marked);
|
|
30530
30914
|
}
|
|
30531
30915
|
const oldWidth = cell.offsetWidth; // get old width
|
|
30532
|
-
|
|
30916
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(cell, td);
|
|
30533
30917
|
percentage = oldWidth / table.offsetWidth / 2;
|
|
30534
30918
|
Table.__mark(cell, 'width', (percentage * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.ACCURACY) + '%', __marked);
|
|
30535
30919
|
Table.__mark(td, 'width', (percentage * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.ACCURACY) + '%', __marked);
|
|
@@ -30585,22 +30969,22 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30585
30969
|
const value = dict[key];
|
|
30586
30970
|
switch(key){
|
|
30587
30971
|
case 'remove':
|
|
30588
|
-
|
|
30972
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(cell);
|
|
30589
30973
|
break;
|
|
30590
30974
|
case 'rowspan':
|
|
30591
|
-
(0,
|
|
30975
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumber)(value) && value > 1 ? value : null);
|
|
30592
30976
|
break;
|
|
30593
30977
|
case 'colspan':
|
|
30594
|
-
(0,
|
|
30978
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'colspan', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumber)(value) && value > 1 ? value : null);
|
|
30595
30979
|
break;
|
|
30596
30980
|
case 'width':
|
|
30597
30981
|
if (value == null) {
|
|
30598
30982
|
cell.style.removeProperty('width');
|
|
30599
|
-
if (!(0,
|
|
30600
|
-
(0,
|
|
30983
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'style')) {
|
|
30984
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'style', null);
|
|
30601
30985
|
}
|
|
30602
30986
|
} else {
|
|
30603
|
-
(0,
|
|
30987
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(cell, 'width', value.toString());
|
|
30604
30988
|
}
|
|
30605
30989
|
break;
|
|
30606
30990
|
}
|
|
@@ -30613,12 +30997,23 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30613
30997
|
constructor(){
|
|
30614
30998
|
super(...arguments);
|
|
30615
30999
|
this.selected = new Set();
|
|
31000
|
+
/**
|
|
31001
|
+
* Rewrite the `<style>` that marks the selected cells once for all the
|
|
31002
|
+
* cells (un)selected in one go: a drag over a block of cells unmarks and
|
|
31003
|
+
* marks every one of them on each move. `@debounce()` was never applied,
|
|
31004
|
+
* as a Table never reaches `ready`
|
|
31005
|
+
*/ this.__recalculateStyles = this.async.microDebounce(()=>{
|
|
31006
|
+
const style = (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.j, Table, 'style', true);
|
|
31007
|
+
const selectors = [];
|
|
31008
|
+
this.selected.forEach((td)=>{
|
|
31009
|
+
const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
|
|
31010
|
+
selector && selectors.push(selector);
|
|
31011
|
+
});
|
|
31012
|
+
style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
|
|
31013
|
+
});
|
|
30616
31014
|
}
|
|
30617
31015
|
}
|
|
30618
31016
|
Table.__selectedByTable = new WeakMap();
|
|
30619
|
-
__decorate([
|
|
30620
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.debounce)()
|
|
30621
|
-
], Table.prototype, "__recalculateStyles", null);
|
|
30622
31017
|
const instance = (j)=>j.getInstance('Table', j.o);
|
|
30623
31018
|
|
|
30624
31019
|
|
|
@@ -34012,6 +34407,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34012
34407
|
mainClosestBox = nextBox;
|
|
34013
34408
|
}
|
|
34014
34409
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(mainClosestBox) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(mainClosestBox, jodit.editor)) {
|
|
34410
|
+
// A table cell is never joined with its neighbour
|
|
34411
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, mainClosestBox, true)) {
|
|
34412
|
+
return false;
|
|
34413
|
+
}
|
|
34015
34414
|
const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(mainClosestBox, backspace);
|
|
34016
34415
|
// A line break before the cursor is a single unit: remove it instead of
|
|
34017
34416
|
// merging the current element into the (void) `<br>`, which used to move
|
|
@@ -34021,13 +34420,48 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34021
34420
|
jodit.s.setCursorBefore(fakeNode);
|
|
34022
34421
|
return true;
|
|
34023
34422
|
}
|
|
34024
|
-
|
|
34423
|
+
// Backspace leaves a block after a table alone, as Word does, rather
|
|
34424
|
+
// than moving its text into the last cell
|
|
34425
|
+
if (backspace && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, 'table')) {
|
|
34426
|
+
jodit.s.setCursorBefore(fakeNode);
|
|
34427
|
+
return true;
|
|
34428
|
+
}
|
|
34429
|
+
const box = findCaretBox(fakeNode, mainClosestBox);
|
|
34430
|
+
if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
|
|
34025
34431
|
jodit.s.setCursorBefore(fakeNode);
|
|
34026
34432
|
return true;
|
|
34027
34433
|
}
|
|
34028
34434
|
}
|
|
34029
34435
|
return false;
|
|
34030
34436
|
}
|
|
34437
|
+
/**
|
|
34438
|
+
* The block holding the caret inside the box that has the sibling, so
|
|
34439
|
+
* `<p>one</p><div><p>|two</p></div>` joins the two paragraphs instead of
|
|
34440
|
+
* moving the whole `<div>` into the first one. For a list item that is its
|
|
34441
|
+
* list, which the list cases handle.
|
|
34442
|
+
*/ function findCaretBox(fakeNode, mainClosestBox) {
|
|
34443
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, mainClosestBox);
|
|
34444
|
+
if (!block) {
|
|
34445
|
+
return mainClosestBox;
|
|
34446
|
+
}
|
|
34447
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(block) && block.parentElement ? block.parentElement : block;
|
|
34448
|
+
}
|
|
34449
|
+
/**
|
|
34450
|
+
* The innermost block on the sibling's edge facing the caret, so the
|
|
34451
|
+
* content is joined to text: `<div><p>one</p></div><p>|two</p>` gives
|
|
34452
|
+
* `<div><p>one|two</p></div>`
|
|
34453
|
+
*/ function findEdgeBlock(sibling, backspace, root) {
|
|
34454
|
+
let block = sibling;
|
|
34455
|
+
while(block){
|
|
34456
|
+
const edge = backspace ? block.lastChild : block.firstChild;
|
|
34457
|
+
const child = edge && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(edge) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(edge, backspace) : edge;
|
|
34458
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(child) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, 'table') || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(child, root)) {
|
|
34459
|
+
return block;
|
|
34460
|
+
}
|
|
34461
|
+
block = child;
|
|
34462
|
+
}
|
|
34463
|
+
return block;
|
|
34464
|
+
}
|
|
34031
34465
|
/**
|
|
34032
34466
|
* Content cannot be merged into the `<table>` element itself — it would land
|
|
34033
34467
|
* between the table sections (after `</tbody>`), which is invalid HTML and
|
|
@@ -34044,6 +34478,40 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34044
34478
|
});
|
|
34045
34479
|
return cells.length ? cells[backspace ? cells.length - 1 : 0] : null;
|
|
34046
34480
|
}
|
|
34481
|
+
/**
|
|
34482
|
+
* Delete at the edge of a list pulls the next line up to the caret, as the
|
|
34483
|
+
* browsers do, instead of moving the caret's line into the next block:
|
|
34484
|
+
* `<ul><li>one|</li></ul><p>two</p>` gives `<ul><li>one|two</li></ul>`, and
|
|
34485
|
+
* `<p>one|</p><ul><li>two</li></ul>` gives `<p>one|two</p>`
|
|
34486
|
+
* @private
|
|
34487
|
+
*/ function checkPullNextLine(jodit, fakeNode, box, sibling, backspace) {
|
|
34488
|
+
if (backspace || !(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(box) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(sibling))) {
|
|
34489
|
+
return false;
|
|
34490
|
+
}
|
|
34491
|
+
const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, box, true);
|
|
34492
|
+
const source = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(sibling) ? sibling.firstElementChild : sibling;
|
|
34493
|
+
if (!target || !source || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(source, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(source, 'table')) {
|
|
34494
|
+
return false;
|
|
34495
|
+
}
|
|
34496
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(source)) {
|
|
34497
|
+
const line = [];
|
|
34498
|
+
for(let node = source.firstChild; node && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node); node = node.nextSibling){
|
|
34499
|
+
line.push(node);
|
|
34500
|
+
}
|
|
34501
|
+
if (!line.length) {
|
|
34502
|
+
return false;
|
|
34503
|
+
}
|
|
34504
|
+
const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
34505
|
+
line.forEach((node)=>filter(node) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(target, node) : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node));
|
|
34506
|
+
}
|
|
34507
|
+
let remove = source;
|
|
34508
|
+
while(remove && remove !== jodit.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(remove)){
|
|
34509
|
+
const parent = remove.parentElement;
|
|
34510
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(remove);
|
|
34511
|
+
remove = parent;
|
|
34512
|
+
}
|
|
34513
|
+
return true;
|
|
34514
|
+
}
|
|
34047
34515
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
34048
34516
|
// Process UL/LI/OL cases
|
|
34049
34517
|
const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -34185,9 +34653,10 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
34185
34653
|
* ```html
|
|
34186
34654
|
* t|st
|
|
34187
34655
|
* ```
|
|
34656
|
+
* With `stopBeforeSpace`, nothing is removed when the next char is a space.
|
|
34188
34657
|
* @private
|
|
34189
34658
|
*/ // eslint-disable-next-line complexity
|
|
34190
|
-
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
34659
|
+
function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = false) {
|
|
34191
34660
|
var _a, _b;
|
|
34192
34661
|
const step = backspace ? -1 : 1;
|
|
34193
34662
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(fakeNode, !backspace);
|
|
@@ -34206,6 +34675,9 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
34206
34675
|
break;
|
|
34207
34676
|
}
|
|
34208
34677
|
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
34678
|
+
if (stopBeforeSpace && isSpace(nextChar(sibling.nodeValue, backspace))) {
|
|
34679
|
+
break;
|
|
34680
|
+
}
|
|
34209
34681
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
34210
34682
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(sibling.parentNode)) {
|
|
34211
34683
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
@@ -34313,9 +34785,25 @@ function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
|
34313
34785
|
}
|
|
34314
34786
|
function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
|
|
34315
34787
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before, sibling, fakeNode);
|
|
34316
|
-
|
|
34317
|
-
|
|
34788
|
+
const wordChar = mode === 'word' && !isSpace(removed);
|
|
34789
|
+
// Backspace by word removes the spaces before the caret, then the word, and keeps the space in front of it
|
|
34790
|
+
if (mode === 'sentence' || wordChar || mode === 'word' && backspace) {
|
|
34791
|
+
checkRemoveChar(jodit, fakeNode, backspace, mode, wordChar && backspace);
|
|
34792
|
+
}
|
|
34793
|
+
}
|
|
34794
|
+
/**
|
|
34795
|
+
* The char tryRemoveChar would remove next
|
|
34796
|
+
*/ function nextChar(value, backspace) {
|
|
34797
|
+
const chars = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(value);
|
|
34798
|
+
const step = backspace ? -1 : 1;
|
|
34799
|
+
let index = backspace ? chars.length - 1 : 0;
|
|
34800
|
+
while(chars[index] === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE){
|
|
34801
|
+
index += step;
|
|
34318
34802
|
}
|
|
34803
|
+
return chars[index];
|
|
34804
|
+
}
|
|
34805
|
+
function isSpace(char) {
|
|
34806
|
+
return char === ' ' || char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
34319
34807
|
}
|
|
34320
34808
|
|
|
34321
34809
|
|
|
@@ -34678,7 +35166,8 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
34678
35166
|
/***/ 32496:
|
|
34679
35167
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
34680
35168
|
|
|
34681
|
-
/* harmony import */ var
|
|
35169
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
35170
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6441);
|
|
34682
35171
|
/*!
|
|
34683
35172
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
34684
35173
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -34686,13 +35175,18 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
34686
35175
|
*/ /**
|
|
34687
35176
|
* @module plugins/backspace
|
|
34688
35177
|
*/
|
|
34689
|
-
|
|
35178
|
+
|
|
35179
|
+
_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
|
|
34690
35180
|
hotkeys: {
|
|
34691
|
-
delete: [
|
|
35181
|
+
delete: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
|
|
35182
|
+
'delete'
|
|
35183
|
+
] : [
|
|
34692
35184
|
'delete',
|
|
34693
35185
|
'cmd+backspace'
|
|
34694
35186
|
],
|
|
34695
|
-
deleteWord: [
|
|
35187
|
+
deleteWord: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
|
|
35188
|
+
'ctrl+delete'
|
|
35189
|
+
] : [
|
|
34696
35190
|
'ctrl+delete',
|
|
34697
35191
|
'cmd+alt+backspace',
|
|
34698
35192
|
'ctrl+alt+backspace'
|
|
@@ -34704,7 +35198,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.delete = {
|
|
|
34704
35198
|
backspace: [
|
|
34705
35199
|
'backspace'
|
|
34706
35200
|
],
|
|
34707
|
-
backspaceWord: [
|
|
35201
|
+
backspaceWord: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [] : [
|
|
34708
35202
|
'ctrl+backspace'
|
|
34709
35203
|
],
|
|
34710
35204
|
backspaceSentence: [
|
|
@@ -35149,6 +35643,19 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
|
|
|
35149
35643
|
this.walker.setWork(editor.editor);
|
|
35150
35644
|
this.currentSelectionNode = editor.s.current();
|
|
35151
35645
|
}
|
|
35646
|
+
/**
|
|
35647
|
+
* Typing into an empty block (`<p><br></p>`) replaces its `<br>`, but the
|
|
35648
|
+
* browser keeps the `<br>` when the caret is in an invisible-space text
|
|
35649
|
+
* node in front of it, as Jodit leaves the caret in many of the empty
|
|
35650
|
+
* blocks it makes (a cleared editor, a heading in an empty table cell).
|
|
35651
|
+
* See #1632
|
|
35652
|
+
*/ onInputRemovePlaceholderBr(event) {
|
|
35653
|
+
var _a;
|
|
35654
|
+
if (!this.isEditMode || event.type === 'input' && (event.isComposing || !((_a = event.inputType) === null || _a === void 0 ? void 0 : _a.startsWith('insert')))) {
|
|
35655
|
+
return;
|
|
35656
|
+
}
|
|
35657
|
+
;(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removePlaceholderBr)(this.j);
|
|
35658
|
+
}
|
|
35152
35659
|
startWalker() {
|
|
35153
35660
|
const { jodit } = this;
|
|
35154
35661
|
const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.allowTags);
|
|
@@ -35321,6 +35828,12 @@ __decorate([
|
|
|
35321
35828
|
':keydown'
|
|
35322
35829
|
])
|
|
35323
35830
|
], cleanHtml.prototype, "onChangeCleanHTML", null);
|
|
35831
|
+
__decorate([
|
|
35832
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)([
|
|
35833
|
+
':input',
|
|
35834
|
+
'jodit.editor:compositionend'
|
|
35835
|
+
])
|
|
35836
|
+
], cleanHtml.prototype, "onInputRemovePlaceholderBr", null);
|
|
35324
35837
|
__decorate([
|
|
35325
35838
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.hook)('ready')
|
|
35326
35839
|
], cleanHtml.prototype, "startWalker", null);
|
|
@@ -35452,12 +35965,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
35452
35965
|
/* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
|
|
35453
35966
|
/* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
|
|
35454
35967
|
/* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
|
|
35455
|
-
/* harmony export */
|
|
35968
|
+
/* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
|
|
35969
|
+
/* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__.visitNodeWalker; }
|
|
35456
35970
|
/* harmony export */ });
|
|
35457
35971
|
/* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
|
|
35458
35972
|
/* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
|
|
35459
35973
|
/* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
|
|
35460
|
-
/* harmony import */ var
|
|
35974
|
+
/* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
|
|
35975
|
+
/* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39516);
|
|
35461
35976
|
/*!
|
|
35462
35977
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35463
35978
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35471,6 +35986,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
35471
35986
|
|
|
35472
35987
|
|
|
35473
35988
|
|
|
35989
|
+
|
|
35474
35990
|
/***/ }),
|
|
35475
35991
|
|
|
35476
35992
|
/***/ 15908:
|
|
@@ -35623,6 +36139,62 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
|
35623
36139
|
}
|
|
35624
36140
|
|
|
35625
36141
|
|
|
36142
|
+
/***/ }),
|
|
36143
|
+
|
|
36144
|
+
/***/ 56385:
|
|
36145
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36146
|
+
|
|
36147
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
36148
|
+
/* harmony export */ removePlaceholderBr: function() { return /* binding */ removePlaceholderBr; }
|
|
36149
|
+
/* harmony export */ });
|
|
36150
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
36151
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
36152
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
36153
|
+
/*!
|
|
36154
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
36155
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
36156
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
36157
|
+
*/
|
|
36158
|
+
|
|
36159
|
+
|
|
36160
|
+
function lastNode(node) {
|
|
36161
|
+
let last = node.lastChild;
|
|
36162
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(last) && !last.nodeValue){
|
|
36163
|
+
last = last.previousSibling;
|
|
36164
|
+
}
|
|
36165
|
+
return last;
|
|
36166
|
+
}
|
|
36167
|
+
/**
|
|
36168
|
+
* Remove the `<br>` that kept the block with the caret open while it was
|
|
36169
|
+
* empty, once text has gone into the block: when the block is one line of
|
|
36170
|
+
* text that ends in that `<br>`, the `<br>` adds nothing to it
|
|
36171
|
+
* @private
|
|
36172
|
+
*/ function removePlaceholderBr(jodit) {
|
|
36173
|
+
var _a;
|
|
36174
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(jodit.s.current(), _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
|
|
36175
|
+
if (!block || !(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)((_a = block.textContent) !== null && _a !== void 0 ? _a : '')) {
|
|
36176
|
+
return;
|
|
36177
|
+
}
|
|
36178
|
+
let br = lastNode(block);
|
|
36179
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(br) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(br, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(br)){
|
|
36180
|
+
br = lastNode(br);
|
|
36181
|
+
}
|
|
36182
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(br, 'br')) {
|
|
36183
|
+
return;
|
|
36184
|
+
}
|
|
36185
|
+
// Another line break, a block, an image or an embed means the `<br>` may
|
|
36186
|
+
// end an empty line, or give the caret a place after the embed
|
|
36187
|
+
const isOneLineOfText = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
|
|
36188
|
+
if (node !== br && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(node) && !node.isContentEditable)) {
|
|
36189
|
+
return false;
|
|
36190
|
+
}
|
|
36191
|
+
});
|
|
36192
|
+
if (isOneLineOfText) {
|
|
36193
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(br);
|
|
36194
|
+
}
|
|
36195
|
+
}
|
|
36196
|
+
|
|
36197
|
+
|
|
35626
36198
|
/***/ }),
|
|
35627
36199
|
|
|
35628
36200
|
/***/ 82558:
|
|
@@ -37264,6 +37836,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
37264
37836
|
}
|
|
37265
37837
|
jodit.s.expandSelection();
|
|
37266
37838
|
const range = jodit.s.range;
|
|
37839
|
+
const caret = this.__clearSelectedCells(range);
|
|
37840
|
+
if (caret && range.collapsed) {
|
|
37841
|
+
jodit.s.selectRange(caret);
|
|
37842
|
+
return false;
|
|
37843
|
+
}
|
|
37267
37844
|
range.deleteContents();
|
|
37268
37845
|
const fake = jodit.createInside.fake();
|
|
37269
37846
|
range.insertNode(fake);
|
|
@@ -37273,21 +37850,98 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
37273
37850
|
range.setStartBefore(fake);
|
|
37274
37851
|
range.collapse(true);
|
|
37275
37852
|
this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
|
|
37276
|
-
this.__addBrInEmptyBlock(fake,
|
|
37853
|
+
this.__addBrInEmptyBlock(fake, range);
|
|
37277
37854
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
|
|
37278
|
-
jodit.s.selectRange(range);
|
|
37855
|
+
jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
|
|
37279
37856
|
return false;
|
|
37280
37857
|
}
|
|
37858
|
+
/**
|
|
37859
|
+
* A selection that starts or ends in a table cell clears the selected part
|
|
37860
|
+
* of each cell it covers and keeps the cells, as the browsers do.
|
|
37861
|
+
* `deleteContents` would remove the cells it fully covers, and the cells
|
|
37862
|
+
* it cuts would then be merged as blocks. The range is moved out of those
|
|
37863
|
+
* tables, so only the content between them is left to delete.
|
|
37864
|
+
*
|
|
37865
|
+
* Returns where the caret goes, or null when no table is involved
|
|
37866
|
+
*/ __clearSelectedCells(range) {
|
|
37867
|
+
const { editor, createInside } = this.j;
|
|
37868
|
+
const startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell, editor);
|
|
37869
|
+
const endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell, editor);
|
|
37870
|
+
if (startCell === endCell) {
|
|
37871
|
+
return null;
|
|
37872
|
+
}
|
|
37873
|
+
const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(startCell, 'table', editor);
|
|
37874
|
+
const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(endCell, 'table', editor);
|
|
37875
|
+
const caret = range.cloneRange();
|
|
37876
|
+
caret.collapse(true);
|
|
37877
|
+
const parts = [];
|
|
37878
|
+
const addParts = (table)=>{
|
|
37879
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(table.rows).flatMap((row)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(row.cells)).filter((cell)=>range.intersectsNode(cell)).forEach((cell)=>{
|
|
37880
|
+
const part = range.cloneRange();
|
|
37881
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.startContainer)) {
|
|
37882
|
+
part.setStart(cell, 0);
|
|
37883
|
+
}
|
|
37884
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.endContainer)) {
|
|
37885
|
+
part.setEnd(cell, cell.childNodes.length);
|
|
37886
|
+
}
|
|
37887
|
+
parts.push([
|
|
37888
|
+
cell,
|
|
37889
|
+
part
|
|
37890
|
+
]);
|
|
37891
|
+
});
|
|
37892
|
+
};
|
|
37893
|
+
if (startTable) {
|
|
37894
|
+
addParts(startTable);
|
|
37895
|
+
if (startTable === endTable) {
|
|
37896
|
+
range.collapse(true);
|
|
37897
|
+
} else {
|
|
37898
|
+
range.setStartAfter(startTable);
|
|
37899
|
+
}
|
|
37900
|
+
}
|
|
37901
|
+
if (endTable && endTable !== startTable) {
|
|
37902
|
+
addParts(endTable);
|
|
37903
|
+
range.setEndBefore(endTable);
|
|
37904
|
+
}
|
|
37905
|
+
parts.forEach(([cell, part])=>{
|
|
37906
|
+
part.deleteContents();
|
|
37907
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(cell)) {
|
|
37908
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(cell);
|
|
37909
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(cell, createInside.element('br'));
|
|
37910
|
+
}
|
|
37911
|
+
});
|
|
37912
|
+
return startTable ? caret : null;
|
|
37913
|
+
}
|
|
37281
37914
|
__moveContentInLeftSibling(fake, leftSibling, rightSibling) {
|
|
37282
37915
|
leftSibling = this.__defineRightLeftBox(leftSibling);
|
|
37916
|
+
// Nothing is moved into a table, and a block left empty after it goes
|
|
37917
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(leftSibling, 'table')) {
|
|
37918
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
|
|
37919
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
37920
|
+
}
|
|
37921
|
+
return;
|
|
37922
|
+
}
|
|
37283
37923
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(rightSibling, 'table') && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
|
|
37284
37924
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
|
|
37285
37925
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(rightSibling, leftSibling);
|
|
37286
37926
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
37287
37927
|
}
|
|
37288
|
-
|
|
37289
|
-
|
|
37290
|
-
|
|
37928
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(rightSibling.firstElementChild)) {
|
|
37929
|
+
const item = rightSibling.firstElementChild;
|
|
37930
|
+
// What's left of the right list's first item joins the left block,
|
|
37931
|
+
// up to a list nested in the item
|
|
37932
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
|
|
37933
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
|
|
37934
|
+
while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(item.firstChild)){
|
|
37935
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, item.firstChild);
|
|
37936
|
+
}
|
|
37937
|
+
}
|
|
37938
|
+
// Remove empty right LI
|
|
37939
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item)) {
|
|
37940
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(item);
|
|
37941
|
+
}
|
|
37942
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
|
|
37943
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
37944
|
+
}
|
|
37291
37945
|
}
|
|
37292
37946
|
}
|
|
37293
37947
|
/**
|
|
@@ -37304,8 +37958,8 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
37304
37958
|
return lastLeaf;
|
|
37305
37959
|
}
|
|
37306
37960
|
/**
|
|
37307
|
-
* Add BR in empty
|
|
37308
|
-
*/ __addBrInEmptyBlock(fake,
|
|
37961
|
+
* Add BR in the empty block left at the caret
|
|
37962
|
+
*/ __addBrInEmptyBlock(fake, range) {
|
|
37309
37963
|
const jodit = this.j;
|
|
37310
37964
|
if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
|
|
37311
37965
|
const br = jodit.createInside.element('br');
|
|
@@ -37313,13 +37967,6 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
37313
37967
|
range.setStartBefore(br);
|
|
37314
37968
|
range.collapse(true);
|
|
37315
37969
|
}
|
|
37316
|
-
// Add BR in the right empty table cell
|
|
37317
|
-
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(rightSibling, 'table')) {
|
|
37318
|
-
const firstCell = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.$$)('td,th', rightSibling).shift();
|
|
37319
|
-
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(firstCell) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(firstCell)) {
|
|
37320
|
-
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(firstCell, jodit.createInside.element('br'));
|
|
37321
|
-
}
|
|
37322
|
-
}
|
|
37323
37970
|
}
|
|
37324
37971
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
37325
37972
|
var _a;
|
|
@@ -38767,7 +39414,18 @@ function focus(editor) {
|
|
|
38767
39414
|
editor.e.on('afterInit', ()=>{
|
|
38768
39415
|
if (editor.o.autofocus) {
|
|
38769
39416
|
if (editor.defaultTimeout) {
|
|
38770
|
-
editor
|
|
39417
|
+
// A click or key in the editor during the delay has put the
|
|
39418
|
+
// caret where the user wants it, so autofocus leaves it there
|
|
39419
|
+
const userInput = 'mousedown touchstart keydown';
|
|
39420
|
+
const cancel = ()=>{
|
|
39421
|
+
editor.async.clearTimeout(timeout);
|
|
39422
|
+
editor.e.off(userInput, cancel);
|
|
39423
|
+
};
|
|
39424
|
+
const timeout = editor.async.setTimeout(()=>{
|
|
39425
|
+
editor.e.off(userInput, cancel);
|
|
39426
|
+
focus();
|
|
39427
|
+
}, 300);
|
|
39428
|
+
editor.e.on(userInput, cancel);
|
|
38771
39429
|
} else {
|
|
38772
39430
|
focus();
|
|
38773
39431
|
}
|
|
@@ -40014,7 +40672,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
|
|
|
40014
40672
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
|
|
40015
40673
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
|
|
40016
40674
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
|
|
40017
|
-
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '
|
|
40675
|
+
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
|
|
40018
40676
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
|
|
40019
40677
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
40020
40678
|
|
|
@@ -40060,6 +40718,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
40060
40718
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'rel', 'stylesheet');
|
|
40061
40719
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href', href);
|
|
40062
40720
|
doc.head && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(doc.head, link);
|
|
40721
|
+
// What plugins measured in the editing document changes once it's styled
|
|
40722
|
+
jodit.e.on(link, 'load', ()=>jodit.e.fire('resize'));
|
|
40063
40723
|
});
|
|
40064
40724
|
}
|
|
40065
40725
|
if (opt.iframeStyle) {
|
|
@@ -40097,6 +40757,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
40097
40757
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(doc.body, 'contenteditable', editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && !editor.getReadOnly() || null);
|
|
40098
40758
|
};
|
|
40099
40759
|
const clearMarkers = (html)=>{
|
|
40760
|
+
// The plugins' own styles, from `getContainer`, aren't part of the value
|
|
40761
|
+
html = html.replace(/<style[^>]+jodit-box[^>]*>[\s\S]*?<\/style>/gi, '');
|
|
40100
40762
|
const bodyReg = /<body.*<\/body>/im, bodyMarker = '{%%BODY%%}', body = bodyReg.exec(html);
|
|
40101
40763
|
if (body) {
|
|
40102
40764
|
// remove markers
|
|
@@ -40121,7 +40783,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
40121
40783
|
*/ const replaceDocument = (html)=>{
|
|
40122
40784
|
const inert = new DOMParser().parseFromString(html, 'text/html');
|
|
40123
40785
|
editor.e.fire('safeHTML', inert.documentElement);
|
|
40786
|
+
// The plugins' own styles stay, as the value leaves them out
|
|
40787
|
+
const styles = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.$$)('style.jodit-box', doc.head);
|
|
40124
40788
|
doc.replaceChild(doc.adoptNode(inert.documentElement), doc.documentElement);
|
|
40789
|
+
styles.forEach((style)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(doc.head, style));
|
|
40125
40790
|
};
|
|
40126
40791
|
if (docMode) {
|
|
40127
40792
|
const tag = editor.element.tagName;
|
|
@@ -40263,6 +40928,9 @@ const SELECTED_TAGS = new Set([
|
|
|
40263
40928
|
*/ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
40264
40929
|
afterInit(jodit) {
|
|
40265
40930
|
jodit.e.on(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
40931
|
+
// Over the highlight in `styles/reset.less`; the image keeps its own. It goes
|
|
40932
|
+
// in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
40933
|
+
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'image-processor', 'style', true).textContent = `.jodit-wysiwyg.${IMAGE_SELECTED}::selection,` + `.jodit-wysiwyg.${IMAGE_SELECTED} *:not(img)::selection{background:transparent}`;
|
|
40266
40934
|
}
|
|
40267
40935
|
beforeDestruct(jodit) {
|
|
40268
40936
|
jodit.e.off(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
@@ -40515,8 +41183,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
|
|
|
40515
41183
|
dialog.close();
|
|
40516
41184
|
});
|
|
40517
41185
|
buttons.remove.onAction(()=>{
|
|
41186
|
+
const caret = j.s.createRange();
|
|
41187
|
+
caret.setStartBefore(this.state.sourceImage);
|
|
41188
|
+
caret.collapse(true);
|
|
40518
41189
|
j.s.removeNode(this.state.sourceImage);
|
|
40519
41190
|
dialog.close();
|
|
41191
|
+
j.s.selectRange(caret);
|
|
40520
41192
|
});
|
|
40521
41193
|
buttons.cancel.onAction(()=>{
|
|
40522
41194
|
dialog.close();
|
|
@@ -40530,10 +41202,20 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
|
|
|
40530
41202
|
],
|
|
40531
41203
|
buttons.check
|
|
40532
41204
|
]);
|
|
40533
|
-
|
|
40534
|
-
|
|
40535
|
-
|
|
41205
|
+
// The dialog fires `afterClose` on its own emitter, not the editor's
|
|
41206
|
+
dialog.e.on(dialog, 'afterClose', ()=>{
|
|
41207
|
+
const { sourceImage } = this.state;
|
|
41208
|
+
if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
|
|
41209
|
+
return;
|
|
41210
|
+
}
|
|
41211
|
+
if (j.o.image.selectImageAfterClose) {
|
|
41212
|
+
j.s.select(sourceImage);
|
|
41213
|
+
return;
|
|
40536
41214
|
}
|
|
41215
|
+
const caret = j.s.createRange();
|
|
41216
|
+
caret.setStartAfter(sourceImage);
|
|
41217
|
+
caret.collapse(true);
|
|
41218
|
+
j.s.selectRange(caret);
|
|
40537
41219
|
});
|
|
40538
41220
|
dialog.setSize(j.o.image.dialogWidth);
|
|
40539
41221
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.markOwner)(j, dialog.container);
|
|
@@ -40564,6 +41246,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
|
|
|
40564
41246
|
this.activeTabState.activeTab = 'Image';
|
|
40565
41247
|
this.__lock();
|
|
40566
41248
|
this.dialog.open().setModal(true).setPosition();
|
|
41249
|
+
this.__focusFirstField();
|
|
40567
41250
|
this.async.promise((resolve, reject)=>(0,_readers_index_js__WEBPACK_IMPORTED_MODULE_10__.readValuesFromImage)(this.j, this.state).then(resolve, reject)).catch((e)=>{
|
|
40568
41251
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
|
|
40569
41252
|
this.dialog.message.error(e.message);
|
|
@@ -40571,6 +41254,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
|
|
|
40571
41254
|
}).finally(()=>this.__unlock());
|
|
40572
41255
|
return false;
|
|
40573
41256
|
}
|
|
41257
|
+
/**
|
|
41258
|
+
* Keys typed while the dialog is open must not reach the editor behind it,
|
|
41259
|
+
* so focus the active tab's first field, or else the first field shown
|
|
41260
|
+
*/ __focusFirstField() {
|
|
41261
|
+
var _a;
|
|
41262
|
+
const fields = (box)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(box.querySelectorAll('input, select, textarea'));
|
|
41263
|
+
(_a = fields(this.form.getElm('tabsBox')).concat(fields(this.form.container)).find((field)=>field.offsetParent != null)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
41264
|
+
}
|
|
40574
41265
|
__lock() {
|
|
40575
41266
|
this.dialog.lock();
|
|
40576
41267
|
this.form.setMod('lock', true);
|
|
@@ -42759,10 +43450,11 @@ const align = {
|
|
|
42759
43450
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
42760
43451
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
42761
43452
|
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
|
|
42762
|
-
/* harmony import */ var
|
|
42763
|
-
/* harmony import */ var
|
|
42764
|
-
/* harmony import */ var
|
|
42765
|
-
/* harmony import */ var
|
|
43453
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45124);
|
|
43454
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67510);
|
|
43455
|
+
/* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61259);
|
|
43456
|
+
/* harmony import */ var _modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21491);
|
|
43457
|
+
/* harmony import */ var _config_config_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(24526);
|
|
42766
43458
|
/*!
|
|
42767
43459
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42768
43460
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42782,14 +43474,15 @@ const align = {
|
|
|
42782
43474
|
|
|
42783
43475
|
|
|
42784
43476
|
|
|
43477
|
+
|
|
42785
43478
|
/**
|
|
42786
43479
|
* Plugin for show inline popup dialog
|
|
42787
43480
|
*/ class inlinePopup extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
|
|
42788
43481
|
get popup() {
|
|
42789
|
-
return new
|
|
43482
|
+
return new _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup(this.jodit, false);
|
|
42790
43483
|
}
|
|
42791
43484
|
get toolbar() {
|
|
42792
|
-
return (0,
|
|
43485
|
+
return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__.makeCollection)(this.jodit, this.popup);
|
|
42793
43486
|
}
|
|
42794
43487
|
onClick(node) {
|
|
42795
43488
|
const elements = this.elmsList, mediaWrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
|
|
@@ -42863,6 +43556,33 @@ const align = {
|
|
|
42863
43556
|
onOutsideClick() {
|
|
42864
43557
|
this.popup.close();
|
|
42865
43558
|
}
|
|
43559
|
+
/**
|
|
43560
|
+
* A key that moves the caret off an element closes its popup, and one
|
|
43561
|
+
* that moves the caret into an element with a popup (a link) opens it,
|
|
43562
|
+
* as clicks do
|
|
43563
|
+
*/ onKeyUp() {
|
|
43564
|
+
this.__followCaret();
|
|
43565
|
+
}
|
|
43566
|
+
__followCaret() {
|
|
43567
|
+
if (!(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isMoved)(this.j, this.snapRange)) {
|
|
43568
|
+
return;
|
|
43569
|
+
}
|
|
43570
|
+
const { range } = this.j.s;
|
|
43571
|
+
const target = this.previousTarget;
|
|
43572
|
+
if (this.popup.isOpened && this.type !== 'selection' && target && !range.intersectsNode(target)) {
|
|
43573
|
+
this.popup.close();
|
|
43574
|
+
}
|
|
43575
|
+
const node = range.startContainer;
|
|
43576
|
+
const element = this.__elementAt(node);
|
|
43577
|
+
if (range.collapsed && element && element !== this.__keyDownElement) {
|
|
43578
|
+
this.onClick(node);
|
|
43579
|
+
}
|
|
43580
|
+
}
|
|
43581
|
+
/**
|
|
43582
|
+
* The element with a popup that holds `node`
|
|
43583
|
+
*/ __elementAt(node) {
|
|
43584
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, this.elmsList, this.j.editor);
|
|
43585
|
+
}
|
|
42866
43586
|
/**
|
|
42867
43587
|
* Can show popup for this type
|
|
42868
43588
|
*/ canShowPopupForType(type) {
|
|
@@ -42902,12 +43622,28 @@ const align = {
|
|
|
42902
43622
|
], 'mousedown touchstart', this.__onDocumentMouseDown).on('closeAllPopups', this.__onCloseAllPopups);
|
|
42903
43623
|
this.addListenersForElements();
|
|
42904
43624
|
}
|
|
43625
|
+
onRecalcPositionPopup() {
|
|
43626
|
+
if (this.popup.isOpened && this.type !== 'selection' && this.previousTarget) {
|
|
43627
|
+
this.__reopenFor = this.previousTarget;
|
|
43628
|
+
}
|
|
43629
|
+
}
|
|
42905
43630
|
__onDocumentMouseDown(e) {
|
|
42906
|
-
|
|
43631
|
+
this.__reopenFor = null;
|
|
43632
|
+
if (this.popup.isOpened && this.type === 'selection' && e.target && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(e.target, _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
|
|
42907
43633
|
this.__reopenSelectionPopup = true;
|
|
42908
43634
|
}
|
|
42909
43635
|
}
|
|
42910
43636
|
__onCloseAllPopups() {
|
|
43637
|
+
const target = this.__reopenFor;
|
|
43638
|
+
if (target) {
|
|
43639
|
+
this.__reopenFor = null;
|
|
43640
|
+
// After the popup's own `closeAllPopups` handler, as below
|
|
43641
|
+
this.j.async.setTimeout(()=>{
|
|
43642
|
+
if (this.j.editor.contains(target)) {
|
|
43643
|
+
this.onClick(target);
|
|
43644
|
+
}
|
|
43645
|
+
}, 1);
|
|
43646
|
+
}
|
|
42911
43647
|
if (!this.__reopenSelectionPopup) {
|
|
42912
43648
|
return;
|
|
42913
43649
|
}
|
|
@@ -42944,11 +43680,16 @@ const align = {
|
|
|
42944
43680
|
height: rect.height
|
|
42945
43681
|
};
|
|
42946
43682
|
}
|
|
42947
|
-
onSelectionStart() {
|
|
43683
|
+
onSelectionStart(event) {
|
|
43684
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
43685
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
43686
|
+
this.__followCaret();
|
|
43687
|
+
}
|
|
42948
43688
|
this.snapRange = this.j.s.range.cloneRange();
|
|
43689
|
+
this.__keyDownElement = this.__elementAt(this.snapRange.startContainer);
|
|
42949
43690
|
}
|
|
42950
43691
|
onSelectionEnd(e) {
|
|
42951
|
-
if (e && e.target &&
|
|
43692
|
+
if (e && e.target && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(e.target, _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
|
|
42952
43693
|
return;
|
|
42953
43694
|
}
|
|
42954
43695
|
const { snapRange } = this, { range } = this.j.s;
|
|
@@ -43032,7 +43773,13 @@ const align = {
|
|
|
43032
43773
|
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
43033
43774
|
* while the selection is still there. See #1238
|
|
43034
43775
|
*/ this.__reopenSelectionPopup = false;
|
|
43776
|
+
/**
|
|
43777
|
+
* The alignment controls fire `recalcPositionPopup` once they have moved
|
|
43778
|
+
* the element, and their button then fires `closeAllPopups`. The popup
|
|
43779
|
+
* opens again beside the element, as the selection toolbar does
|
|
43780
|
+
*/ this.__reopenFor = null;
|
|
43035
43781
|
this.snapRange = null;
|
|
43782
|
+
this.__keyDownElement = null;
|
|
43036
43783
|
this.elmsList = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s));
|
|
43037
43784
|
}
|
|
43038
43785
|
}
|
|
@@ -43062,6 +43809,12 @@ __decorate([
|
|
|
43062
43809
|
__decorate([
|
|
43063
43810
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':outsideClick')
|
|
43064
43811
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
43812
|
+
__decorate([
|
|
43813
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':keyup')
|
|
43814
|
+
], inlinePopup.prototype, "onKeyUp", null);
|
|
43815
|
+
__decorate([
|
|
43816
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':recalcPositionPopup')
|
|
43817
|
+
], inlinePopup.prototype, "onRecalcPositionPopup", null);
|
|
43065
43818
|
__decorate([
|
|
43066
43819
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
43067
43820
|
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
@@ -44923,9 +45676,11 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
44923
45676
|
return cleaned;
|
|
44924
45677
|
}
|
|
44925
45678
|
/**
|
|
44926
|
-
* The width that decides which breakpoint set the toolbar uses
|
|
44927
|
-
*
|
|
44928
|
-
*
|
|
45679
|
+
* The width that decides which breakpoint set the toolbar uses: the editor's
|
|
45680
|
+
* own width, or its parent's while the editor has none yet (for example
|
|
45681
|
+
* while hidden at init). A toolbar rendered into an external container
|
|
45682
|
+
* (`toolbar` set to an element or a selector) lays out in that container, so
|
|
45683
|
+
* its width is what matters there.
|
|
44929
45684
|
*/ function adaptiveWidth(editor) {
|
|
44930
45685
|
var _a;
|
|
44931
45686
|
const { toolbar } = editor.o;
|
|
@@ -44935,7 +45690,7 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
44935
45690
|
return width;
|
|
44936
45691
|
}
|
|
44937
45692
|
}
|
|
44938
|
-
return ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
45693
|
+
return editor.container.offsetWidth || ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
44939
45694
|
}
|
|
44940
45695
|
/**
|
|
44941
45696
|
* Rebuild toolbar in depends on editor's width
|
|
@@ -45009,6 +45764,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
|
45009
45764
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
|
|
45010
45765
|
/* harmony import */ var _icons_ol_svg_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13465);
|
|
45011
45766
|
/* harmony import */ var _icons_ul_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50267);
|
|
45767
|
+
/* harmony import */ var _start_dialog_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83086);
|
|
45012
45768
|
/*!
|
|
45013
45769
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45014
45770
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -45018,11 +45774,19 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
|
45018
45774
|
|
|
45019
45775
|
|
|
45020
45776
|
|
|
45777
|
+
|
|
45778
|
+
/**
|
|
45779
|
+
* The `ol` dropdown item that asks for the list's start number
|
|
45780
|
+
*/ const START = 'start';
|
|
45021
45781
|
const memoExec = (jodit, _, { control })=>{
|
|
45022
45782
|
var _a;
|
|
45023
45783
|
const key = `button${control.command}`;
|
|
45024
45784
|
const value = (_a = control.args && control.args[0]) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__.dataBind)(jodit, key);
|
|
45025
|
-
(
|
|
45785
|
+
if (value === START) {
|
|
45786
|
+
(0,_start_dialog_js__WEBPACK_IMPORTED_MODULE_5__.openStartDialog)(jodit);
|
|
45787
|
+
return;
|
|
45788
|
+
}
|
|
45789
|
+
;(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__.dataBind)(jodit, key, value);
|
|
45026
45790
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
45027
45791
|
};
|
|
45028
45792
|
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('ol', _icons_ol_svg_js__WEBPACK_IMPORTED_MODULE_3__["default"]).set('ul', _icons_ul_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
|
@@ -45052,9 +45816,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.ol = {
|
|
|
45052
45816
|
'lower-greek': 'Lower Greek',
|
|
45053
45817
|
'lower-roman': 'Lower Roman',
|
|
45054
45818
|
'upper-alpha': 'Upper Alpha',
|
|
45055
|
-
'upper-roman': 'Upper Roman'
|
|
45819
|
+
'upper-roman': 'Upper Roman',
|
|
45820
|
+
[START]: 'Start at...'
|
|
45056
45821
|
},
|
|
45057
|
-
exec: memoExec
|
|
45822
|
+
exec: memoExec,
|
|
45823
|
+
isChildDisabled: (jodit, button)=>{
|
|
45824
|
+
var _a;
|
|
45825
|
+
return ((_a = button.control.args) === null || _a === void 0 ? void 0 : _a[0]) === START && !(0,_start_dialog_js__WEBPACK_IMPORTED_MODULE_5__.closestOrderedList)(jodit);
|
|
45826
|
+
}
|
|
45058
45827
|
};
|
|
45059
45828
|
|
|
45060
45829
|
|
|
@@ -45137,6 +45906,83 @@ __decorate([
|
|
|
45137
45906
|
_core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('orderedList', orderedList);
|
|
45138
45907
|
|
|
45139
45908
|
|
|
45909
|
+
/***/ }),
|
|
45910
|
+
|
|
45911
|
+
/***/ 83086:
|
|
45912
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45913
|
+
|
|
45914
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45915
|
+
/* harmony export */ closestOrderedList: function() { return /* binding */ closestOrderedList; },
|
|
45916
|
+
/* harmony export */ openStartDialog: function() { return /* binding */ openStartDialog; }
|
|
45917
|
+
/* harmony export */ });
|
|
45918
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
45919
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
45920
|
+
/* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62843);
|
|
45921
|
+
/* harmony import */ var _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2525);
|
|
45922
|
+
/*!
|
|
45923
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45924
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45925
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45926
|
+
*/
|
|
45927
|
+
|
|
45928
|
+
|
|
45929
|
+
|
|
45930
|
+
/**
|
|
45931
|
+
* The numbered list the selection is in
|
|
45932
|
+
*/ function closestOrderedList(jodit) {
|
|
45933
|
+
const current = jodit.s.current();
|
|
45934
|
+
return current ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'ol', jodit.editor) : null;
|
|
45935
|
+
}
|
|
45936
|
+
/**
|
|
45937
|
+
* Asks for the number of the first item of the list the selection is in,
|
|
45938
|
+
* and sets the list's `start`. The selection is put back when the dialog
|
|
45939
|
+
* closes, however it closes.
|
|
45940
|
+
*/ function openStartDialog(jodit) {
|
|
45941
|
+
const list = closestOrderedList(jodit);
|
|
45942
|
+
if (!list) {
|
|
45943
|
+
return;
|
|
45944
|
+
}
|
|
45945
|
+
const dialog = jodit.dlg({
|
|
45946
|
+
resizable: false,
|
|
45947
|
+
closeOnClickOverlay: true
|
|
45948
|
+
});
|
|
45949
|
+
const input = new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIInput(jodit, {
|
|
45950
|
+
name: 'start',
|
|
45951
|
+
type: 'number',
|
|
45952
|
+
label: 'Number for the first item',
|
|
45953
|
+
value: list.start
|
|
45954
|
+
});
|
|
45955
|
+
const form = new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIForm(jodit, [
|
|
45956
|
+
new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIBlock(jodit, [
|
|
45957
|
+
input
|
|
45958
|
+
])
|
|
45959
|
+
]);
|
|
45960
|
+
form.container.classList.add('jodit-dialog_alert');
|
|
45961
|
+
form.onSubmit(({ start })=>{
|
|
45962
|
+
const value = start === '' ? 1 : parseInt(start, 10);
|
|
45963
|
+
if (isNaN(value)) {
|
|
45964
|
+
input.focus();
|
|
45965
|
+
return false;
|
|
45966
|
+
}
|
|
45967
|
+
dialog.close();
|
|
45968
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(list, 'start', value === 1 ? null : value);
|
|
45969
|
+
jodit.synchronizeValues();
|
|
45970
|
+
});
|
|
45971
|
+
jodit.s.save();
|
|
45972
|
+
dialog.e.on(dialog, 'afterClose', ()=>{
|
|
45973
|
+
jodit.s.focus();
|
|
45974
|
+
jodit.s.restore();
|
|
45975
|
+
});
|
|
45976
|
+
dialog.setFooter([
|
|
45977
|
+
(0,_core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__.Button)(jodit, 'cancel', 'Cancel').onAction(()=>dialog.close()),
|
|
45978
|
+
(0,_core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__.Button)(jodit, 'ok', 'Apply', 'primary').onAction(()=>form.submit())
|
|
45979
|
+
]);
|
|
45980
|
+
dialog.open(form, jodit.i18n('Start numbering at'), true, true);
|
|
45981
|
+
input.focus();
|
|
45982
|
+
input.nativeInput.select();
|
|
45983
|
+
}
|
|
45984
|
+
|
|
45985
|
+
|
|
45140
45986
|
/***/ }),
|
|
45141
45987
|
|
|
45142
45988
|
/***/ 71842:
|
|
@@ -45929,6 +46775,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
45929
46775
|
return true;
|
|
45930
46776
|
}
|
|
45931
46777
|
const first = root.firstChild;
|
|
46778
|
+
// Firefox pads an empty editable body with a bare <br>
|
|
46779
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(first, 'br') && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next(first, Boolean, root)) {
|
|
46780
|
+
return true;
|
|
46781
|
+
}
|
|
45932
46782
|
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has((_a = first.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || /^(TABLE)$/i.test(first.nodeName)) {
|
|
45933
46783
|
return false;
|
|
45934
46784
|
}
|
|
@@ -45977,11 +46827,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
45977
46827
|
marginTop = parseInt(style2.getPropertyValue('margin-top'), 10);
|
|
45978
46828
|
marginLeft = parseInt(style2.getPropertyValue('margin-left'), 10);
|
|
45979
46829
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(this.placeholderElm, {
|
|
46830
|
+
fontFamily: style2.getPropertyValue('font-family'),
|
|
45980
46831
|
fontSize: parseInt(style2.getPropertyValue('font-size'), 10),
|
|
45981
46832
|
lineHeight: style2.getPropertyValue('line-height')
|
|
45982
46833
|
});
|
|
45983
46834
|
} else {
|
|
45984
46835
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(this.placeholderElm, {
|
|
46836
|
+
fontFamily: style.getPropertyValue('font-family'),
|
|
45985
46837
|
fontSize: parseInt(style.getPropertyValue('font-size'), 10),
|
|
45986
46838
|
lineHeight: style.getPropertyValue('line-height')
|
|
45987
46839
|
});
|
|
@@ -46029,7 +46881,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
46029
46881
|
this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
|
|
46030
46882
|
}
|
|
46031
46883
|
editor.e.fire('placeholder', this.placeholderElm.innerHTML);
|
|
46032
|
-
editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder afterCommand.placeholder', this.toggle).on(window, 'load', this.toggle);
|
|
46884
|
+
editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder afterCommand.placeholder resize.placeholder', this.toggle).on(window, 'load', this.toggle);
|
|
46033
46885
|
this.addNativeListeners();
|
|
46034
46886
|
this.toggle();
|
|
46035
46887
|
};
|
|
@@ -46883,7 +47735,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
46883
47735
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
46884
47736
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
46885
47737
|
/* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
|
|
46886
|
-
/* harmony import */ var
|
|
47738
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
|
|
47739
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67510);
|
|
47740
|
+
/* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(61259);
|
|
47741
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71675);
|
|
46887
47742
|
/*!
|
|
46888
47743
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46889
47744
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -46903,6 +47758,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
46903
47758
|
|
|
46904
47759
|
|
|
46905
47760
|
|
|
47761
|
+
|
|
47762
|
+
|
|
47763
|
+
|
|
46906
47764
|
const keyBInd = '__jodit-resizer_binded';
|
|
46907
47765
|
/**
|
|
46908
47766
|
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
@@ -46922,11 +47780,19 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
46922
47780
|
*/ function heightFollowsWidth(element) {
|
|
46923
47781
|
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'video') && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, 'height') && !(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(element, 'height');
|
|
46924
47782
|
}
|
|
47783
|
+
const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
47784
|
+
/**
|
|
47785
|
+
* A click on an embed lands on its wrapper, so it selects the embed, until the
|
|
47786
|
+
* wrapper is active. While the editor is locked, as during resizing, the
|
|
47787
|
+
* wrapper takes the mouse again.
|
|
47788
|
+
*/ const EMBED_WRAPPER_STYLE = `${IFRAME_WRAPPER}{position:relative;display:block;user-select:none}` + `${IFRAME_WRAPPER} iframe{position:relative}` + `${IFRAME_WRAPPER}::after{position:absolute;z-index:1;display:block;background:transparent;content:'';cursor:pointer;inset:0}` + `${IFRAME_WRAPPER}[data-jodit-wrapper_active=true] iframe{z-index:2}` + `.jodit_lock ${IFRAME_WRAPPER}[data-jodit-wrapper_active=true] iframe{z-index:1}`;
|
|
46925
47789
|
/**
|
|
46926
47790
|
* The module creates a supporting frame for resizing of the elements img and table
|
|
46927
47791
|
*/ class resizer extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
46928
47792
|
/** @override */ afterInit(editor) {
|
|
46929
|
-
|
|
47793
|
+
// It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
47794
|
+
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(editor, 'resizer', 'style', true).textContent = EMBED_WRAPPER_STYLE;
|
|
47795
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('div', this.rect).forEach((resizeHandle)=>{
|
|
46930
47796
|
editor.e.on(resizeHandle, 'mousedown.resizer touchstart.resizer', this.onStartResizing.bind(this, resizeHandle));
|
|
46931
47797
|
});
|
|
46932
47798
|
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.eventEmitter.on('hideHelpers', this.hide);
|
|
@@ -46934,7 +47800,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
46934
47800
|
if (isReadOnly) {
|
|
46935
47801
|
this.hide();
|
|
46936
47802
|
}
|
|
46937
|
-
}).on('afterInit changePlace', this.addEventListeners.bind(this))
|
|
47803
|
+
}).on('afterInit changePlace', this.addEventListeners.bind(this))// Handlers without a namespace run first, ahead of those that
|
|
47804
|
+
// move the caret, as table-keyboard-navigation's do
|
|
47805
|
+
.on('keydown', this.onEditorKeyDown, {
|
|
47806
|
+
top: true
|
|
47807
|
+
}).on('afterGetValueFromEditor.resizer', (data)=>{
|
|
46938
47808
|
const rgx = /<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;
|
|
46939
47809
|
if (rgx.test(data.value)) {
|
|
46940
47810
|
data.value = data.value.replace(rgx, '$1');
|
|
@@ -47079,6 +47949,38 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
47079
47949
|
e.stopImmediatePropagation();
|
|
47080
47950
|
}
|
|
47081
47951
|
}
|
|
47952
|
+
onEditorKeyDown(event) {
|
|
47953
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
47954
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
47955
|
+
this.__followCaret();
|
|
47956
|
+
}
|
|
47957
|
+
this.__keyDownRange = this.j.s.range.cloneRange();
|
|
47958
|
+
this.__keyDownTable = this.__caretTable();
|
|
47959
|
+
}
|
|
47960
|
+
__caretTable() {
|
|
47961
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(this.j.s.range.startContainer, 'table', this.j.editor);
|
|
47962
|
+
}
|
|
47963
|
+
/**
|
|
47964
|
+
* Hide the frame once a key has moved the caret off its element, and
|
|
47965
|
+
* frame a table the caret has moved into, as clicks do
|
|
47966
|
+
*/ onEditorKeyUp() {
|
|
47967
|
+
this.__followCaret();
|
|
47968
|
+
}
|
|
47969
|
+
__followCaret() {
|
|
47970
|
+
const before = this.__keyDownRange;
|
|
47971
|
+
this.__keyDownRange = null;
|
|
47972
|
+
if (!(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, before)) {
|
|
47973
|
+
return;
|
|
47974
|
+
}
|
|
47975
|
+
if (this.isShown && this.element && !this.j.s.range.intersectsNode(this.element)) {
|
|
47976
|
+
this.hide();
|
|
47977
|
+
}
|
|
47978
|
+
const table = this.__caretTable();
|
|
47979
|
+
if (table && table !== this.__keyDownTable && this.j.o.allowResizeTags.has('table')) {
|
|
47980
|
+
this.__bind(table);
|
|
47981
|
+
this.onClickElement(table);
|
|
47982
|
+
}
|
|
47983
|
+
}
|
|
47082
47984
|
onKeyDown(e) {
|
|
47083
47985
|
this.isAltMode = e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ALT;
|
|
47084
47986
|
if (!this.isAltMode && this.isResizeMode) {
|
|
@@ -47100,6 +48002,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
47100
48002
|
return;
|
|
47101
48003
|
}
|
|
47102
48004
|
if (!this.isResizeMode) {
|
|
48005
|
+
// A click in the element's popup, or in a list it opens, works on
|
|
48006
|
+
// the element, so it keeps its frame
|
|
48007
|
+
if ((e === null || e === void 0 ? void 0 : e.target) && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_8__.UIElement.closestElement(e.target, _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_9__.Popup)) {
|
|
48008
|
+
return;
|
|
48009
|
+
}
|
|
47103
48010
|
return this.hide();
|
|
47104
48011
|
}
|
|
47105
48012
|
e.stopImmediatePropagation();
|
|
@@ -47266,7 +48173,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
47266
48173
|
this.hide();
|
|
47267
48174
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.layer);
|
|
47268
48175
|
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.eventEmitter.off('hideHelpers', this.hide);
|
|
47269
|
-
jodit.e.off(this.j.ow, '.resizer').off('.resizer');
|
|
48176
|
+
jodit.e.off(this.j.ow, '.resizer').off('.resizer').off('keydown', this.onEditorKeyDown);
|
|
47270
48177
|
}
|
|
47271
48178
|
constructor(){
|
|
47272
48179
|
super(...arguments);
|
|
@@ -47291,6 +48198,8 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
47291
48198
|
this.sizeViewer = this.rect.getElementsByTagName('span')[0];
|
|
47292
48199
|
this.pointerX = 0;
|
|
47293
48200
|
this.pointerY = 0;
|
|
48201
|
+
this.__keyDownRange = null;
|
|
48202
|
+
this.__keyDownTable = null;
|
|
47294
48203
|
this.isAltMode = false;
|
|
47295
48204
|
this.onClickElement = (element)=>{
|
|
47296
48205
|
if (this.isResizeMode) {
|
|
@@ -47352,6 +48261,12 @@ __decorate([
|
|
|
47352
48261
|
__decorate([
|
|
47353
48262
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47354
48263
|
], resizer.prototype, "onResize", null);
|
|
48264
|
+
__decorate([
|
|
48265
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48266
|
+
], resizer.prototype, "onEditorKeyDown", null);
|
|
48267
|
+
__decorate([
|
|
48268
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
|
|
48269
|
+
], resizer.prototype, "onEditorKeyUp", null);
|
|
47355
48270
|
__decorate([
|
|
47356
48271
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47357
48272
|
], resizer.prototype, "onKeyDown", null);
|
|
@@ -48302,8 +49217,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
|
|
|
48302
49217
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
48303
49218
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
48304
49219
|
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
48305
|
-
/* harmony import */ var
|
|
48306
|
-
/* harmony import */ var
|
|
49220
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45124);
|
|
49221
|
+
/* harmony import */ var _modules_table_table_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76014);
|
|
49222
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55311);
|
|
48307
49223
|
/*!
|
|
48308
49224
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48309
49225
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -48322,19 +49238,24 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
|
|
|
48322
49238
|
|
|
48323
49239
|
|
|
48324
49240
|
|
|
49241
|
+
|
|
48325
49242
|
const key = 'table_processor_observer';
|
|
48326
49243
|
const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
|
|
48327
49244
|
class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
48328
49245
|
/**
|
|
48329
49246
|
* Shortcut for Jodit.modules.Table
|
|
48330
49247
|
*/ get __tableModule() {
|
|
48331
|
-
return this.j.getInstance(
|
|
49248
|
+
return this.j.getInstance(_modules_table_table_js__WEBPACK_IMPORTED_MODULE_7__.Table, this.j.o);
|
|
48332
49249
|
}
|
|
48333
49250
|
afterInit(jodit) {
|
|
48334
49251
|
if (!jodit.o.tableAllowCellSelection) {
|
|
48335
49252
|
return;
|
|
48336
49253
|
}
|
|
48337
|
-
jodit.e
|
|
49254
|
+
jodit.e// Handlers without a namespace run first, ahead of those that
|
|
49255
|
+
// move the caret, as table-keyboard-navigation's do
|
|
49256
|
+
.on('keydown', this.__onKeyDown, {
|
|
49257
|
+
top: true
|
|
49258
|
+
}).on('keydown.select-cells', (event)=>{
|
|
48338
49259
|
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
48339
49260
|
this.unselectCells();
|
|
48340
49261
|
}
|
|
@@ -48358,6 +49279,59 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
48358
49279
|
}
|
|
48359
49280
|
});
|
|
48360
49281
|
}
|
|
49282
|
+
__onKeyDown(event) {
|
|
49283
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
49284
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
49285
|
+
this.__followCaret();
|
|
49286
|
+
}
|
|
49287
|
+
this.__keyDownCell = this.__caretCell();
|
|
49288
|
+
this.__keyDownRange = this.j.s.range.cloneRange();
|
|
49289
|
+
this.__keyDownInLink = this.__isInLink();
|
|
49290
|
+
}
|
|
49291
|
+
__isInLink() {
|
|
49292
|
+
return Boolean(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(this.j.s.range.startContainer, 'a', this.j.editor));
|
|
49293
|
+
}
|
|
49294
|
+
/**
|
|
49295
|
+
* Where the selection starts rather than `s.current()`, which finds the
|
|
49296
|
+
* first cell when the caret is just before the table
|
|
49297
|
+
*/ __caretCell() {
|
|
49298
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(this.j.s.range.startContainer, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, this.j.editor);
|
|
49299
|
+
}
|
|
49300
|
+
/**
|
|
49301
|
+
* A key that moves the caret into a cell, from another cell or from
|
|
49302
|
+
* outside the table, marks that cell and opens its popup, as a click on
|
|
49303
|
+
* it does. One that moves the caret out of the table unmarks the cells
|
|
49304
|
+
*/ onKeyUp() {
|
|
49305
|
+
this.__followCaret();
|
|
49306
|
+
}
|
|
49307
|
+
__followCaret() {
|
|
49308
|
+
const before = this.__keyDownRange;
|
|
49309
|
+
this.__keyDownRange = null;
|
|
49310
|
+
if (this.j.o.readonly || !(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.isMoved)(this.j, before)) {
|
|
49311
|
+
return;
|
|
49312
|
+
}
|
|
49313
|
+
const cell = this.__caretCell();
|
|
49314
|
+
const hasLeftLink = this.__keyDownInLink && !this.__isInLink();
|
|
49315
|
+
if (cell === this.__keyDownCell && !(cell && hasLeftLink)) {
|
|
49316
|
+
return;
|
|
49317
|
+
}
|
|
49318
|
+
const hadMarked = this.__tableModule.getAllSelectedCells().length > 0;
|
|
49319
|
+
this.unselectCells();
|
|
49320
|
+
if (!cell) {
|
|
49321
|
+
if (hadMarked) {
|
|
49322
|
+
this.j.e.fire('hidePopup', 'cells');
|
|
49323
|
+
}
|
|
49324
|
+
return;
|
|
49325
|
+
}
|
|
49326
|
+
const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(cell, 'table', this.j.editor);
|
|
49327
|
+
if (!table) {
|
|
49328
|
+
return;
|
|
49329
|
+
}
|
|
49330
|
+
// As after a click, the first change to the cell keeps the mark
|
|
49331
|
+
this.__selectedCell = cell;
|
|
49332
|
+
this.__tableModule.addSelection(cell);
|
|
49333
|
+
this.j.e.fire('showPopup', table, ()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.position)(cell, this.j), 'cells');
|
|
49334
|
+
}
|
|
48361
49335
|
/**
|
|
48362
49336
|
* Mouse click inside the table
|
|
48363
49337
|
*/ onStartSelection(cell, event) {
|
|
@@ -48679,10 +49653,17 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
48679
49653
|
}
|
|
48680
49654
|
/** @override */ beforeDestruct(jodit) {
|
|
48681
49655
|
this.__onRemoveSelection();
|
|
48682
|
-
jodit.e.off('.select-cells');
|
|
49656
|
+
jodit.e.off('.select-cells').off('keydown', this.__onKeyDown);
|
|
48683
49657
|
}
|
|
48684
49658
|
constructor(){
|
|
48685
49659
|
super(...arguments);
|
|
49660
|
+
/**
|
|
49661
|
+
* The cell with the caret, and the selection, when a key went down
|
|
49662
|
+
*/ this.__keyDownCell = null;
|
|
49663
|
+
this.__keyDownRange = null;
|
|
49664
|
+
/**
|
|
49665
|
+
* A link's popup replaces the cell's while the caret is in the link
|
|
49666
|
+
*/ this.__keyDownInLink = false;
|
|
48686
49667
|
/**
|
|
48687
49668
|
* First selected cell
|
|
48688
49669
|
*/ this.__selectedCell = null;
|
|
@@ -48694,6 +49675,12 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
48694
49675
|
selectCells.requires = [
|
|
48695
49676
|
'select'
|
|
48696
49677
|
];
|
|
49678
|
+
__decorate([
|
|
49679
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
49680
|
+
], selectCells.prototype, "__onKeyDown", null);
|
|
49681
|
+
__decorate([
|
|
49682
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
|
|
49683
|
+
], selectCells.prototype, "onKeyUp", null);
|
|
48697
49684
|
__decorate([
|
|
48698
49685
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48699
49686
|
], selectCells.prototype, "onStartSelection", null);
|
|
@@ -53132,7 +54119,9 @@ const WORK_KEYS = new Set([
|
|
|
53132
54119
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT:
|
|
53133
54120
|
{
|
|
53134
54121
|
next = getNextCell();
|
|
53135
|
-
|
|
54122
|
+
// Left in the first cell leaves the table, as Up in the
|
|
54123
|
+
// top row does
|
|
54124
|
+
if (!next && key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
53136
54125
|
tableModule.appendRow(table, !isPrev ? false : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(table, (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'tr')), !isPrev);
|
|
53137
54126
|
next = getNextCell();
|
|
53138
54127
|
}
|
|
@@ -53158,7 +54147,6 @@ const WORK_KEYS = new Set([
|
|
|
53158
54147
|
if (!next) {
|
|
53159
54148
|
return;
|
|
53160
54149
|
}
|
|
53161
|
-
editor.e.fire('hidePopup hideResizer');
|
|
53162
54150
|
if (!next.firstChild) {
|
|
53163
54151
|
const first = editor.createInside.element('br');
|
|
53164
54152
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
|