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/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.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
|
*/
|
|
@@ -1814,7 +1814,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1814
1814
|
* ```
|
|
1815
1815
|
* @packageDocumentation
|
|
1816
1816
|
* @module constants
|
|
1817
|
-
*/ const APP_VERSION = "4.18.
|
|
1817
|
+
*/ const APP_VERSION = "4.18.11";
|
|
1818
1818
|
// prettier-ignore
|
|
1819
1819
|
const ES = "es2015";
|
|
1820
1820
|
const IS_ES_MODERN = true;
|
|
@@ -2532,6 +2532,8 @@ function cacheHTML(target, _, descriptor) {
|
|
|
2532
2532
|
*/
|
|
2533
2533
|
|
|
2534
2534
|
const componentRegistry = new Map();
|
|
2535
|
+
const decoratedClasses = new WeakSet();
|
|
2536
|
+
const warnedClasses = new WeakSet();
|
|
2535
2537
|
/**
|
|
2536
2538
|
* Decorate components and set status isReady after constructor
|
|
2537
2539
|
* @param constructorFunction - Component constructor class
|
|
@@ -2548,9 +2550,16 @@ const componentRegistry = new Map();
|
|
|
2548
2550
|
Object.setPrototypeOf(this, newConstructorFunction.prototype);
|
|
2549
2551
|
}
|
|
2550
2552
|
this.setStatus('ready');
|
|
2553
|
+
} else if (!_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_PROD && !decoratedClasses.has(this.constructor) && !warnedClasses.has(this.constructor)) {
|
|
2554
|
+
// Only the outermost class's decorator sets `ready`, so a subclass
|
|
2555
|
+
// without its own decorator stays in `beforeInit`. See #1685
|
|
2556
|
+
warnedClasses.add(this.constructor);
|
|
2557
|
+
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`);
|
|
2551
2558
|
}
|
|
2552
2559
|
}
|
|
2553
2560
|
}
|
|
2561
|
+
decoratedClasses.add(constructorFunction);
|
|
2562
|
+
decoratedClasses.add(newConstructorFunction);
|
|
2554
2563
|
const name = (0,_helpers_utils_get_class_name_js__WEBPACK_IMPORTED_MODULE_1__.getClassName)(constructorFunction.prototype);
|
|
2555
2564
|
if (componentRegistry.has(name) && !_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
|
|
2556
2565
|
throw new Error(`Component with name "${name}" is already registered`);
|
|
@@ -5734,10 +5743,11 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5734
5743
|
/* harmony export */ });
|
|
5735
5744
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5736
5745
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5737
|
-
/* harmony import */ var
|
|
5738
|
-
/* harmony import */ var
|
|
5739
|
-
/* harmony import */ var
|
|
5740
|
-
/* harmony import */ var
|
|
5746
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90723);
|
|
5747
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
|
|
5748
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29960);
|
|
5749
|
+
/* harmony import */ var _utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
5750
|
+
/* harmony import */ var _utils_selector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76078);
|
|
5741
5751
|
/*!
|
|
5742
5752
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5743
5753
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5750,6 +5760,7 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5750
5760
|
|
|
5751
5761
|
|
|
5752
5762
|
|
|
5763
|
+
|
|
5753
5764
|
function normalizeCSS(s) {
|
|
5754
5765
|
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)=>{
|
|
5755
5766
|
switch(metrics.toLowerCase()){
|
|
@@ -5783,7 +5794,7 @@ function normalizeCSS(s) {
|
|
|
5783
5794
|
html = html.substring(0, closeIndex + '</html>'.length);
|
|
5784
5795
|
}
|
|
5785
5796
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
5786
|
-
(0,
|
|
5797
|
+
(0,_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(iframe, 'display', 'none');
|
|
5787
5798
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(_constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body, iframe);
|
|
5788
5799
|
let convertedString = '', collection;
|
|
5789
5800
|
try {
|
|
@@ -5792,13 +5803,14 @@ function normalizeCSS(s) {
|
|
|
5792
5803
|
iframeDoc.open();
|
|
5793
5804
|
iframeDoc.write(html);
|
|
5794
5805
|
iframeDoc.close();
|
|
5806
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_2__.readWordListItems)(iframeDoc.body);
|
|
5795
5807
|
// Word marks its auto-generated list markers (the literal
|
|
5796
5808
|
// bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
|
|
5797
5809
|
// They are display-only and must not be imported, otherwise
|
|
5798
5810
|
// the marker text leaks into the content. Drop them before any
|
|
5799
5811
|
// style normalization strips the `mso-list` hint. See #948
|
|
5800
5812
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5801
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,
|
|
5813
|
+
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') || '')) {
|
|
5802
5814
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
5803
5815
|
}
|
|
5804
5816
|
});
|
|
@@ -5809,7 +5821,7 @@ function normalizeCSS(s) {
|
|
|
5809
5821
|
if (rules[idx].selectorText === '') {
|
|
5810
5822
|
continue;
|
|
5811
5823
|
}
|
|
5812
|
-
collection = (0,
|
|
5824
|
+
collection = (0,_utils_selector_js__WEBPACK_IMPORTED_MODULE_6__.$$)(rules[idx].selectorText, iframeDoc.body);
|
|
5813
5825
|
// `style.cssText` on purpose: the CSSOM parses the text,
|
|
5814
5826
|
// drops invalid declarations and re-serializes it. The raw
|
|
5815
5827
|
// `style` attribute would keep Word-only junk verbatim
|
|
@@ -5823,18 +5835,19 @@ function normalizeCSS(s) {
|
|
|
5823
5835
|
throw e;
|
|
5824
5836
|
}
|
|
5825
5837
|
}
|
|
5838
|
+
;(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_2__.wrapWordListItems)(listItems);
|
|
5826
5839
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5827
5840
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node)) {
|
|
5828
|
-
const cssText = (0,
|
|
5841
|
+
const cssText = (0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style');
|
|
5829
5842
|
if (cssText) {
|
|
5830
5843
|
node.style.cssText = normalizeCSS(cssText);
|
|
5831
5844
|
}
|
|
5832
|
-
if (!(0,
|
|
5833
|
-
(0,
|
|
5845
|
+
if (!(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style')) {
|
|
5846
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(node, 'style', null);
|
|
5834
5847
|
}
|
|
5835
5848
|
}
|
|
5836
5849
|
});
|
|
5837
|
-
convertedString = iframeDoc.firstChild ? (0,
|
|
5850
|
+
convertedString = iframeDoc.firstChild ? (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(iframeDoc.body.innerHTML) : '';
|
|
5838
5851
|
}
|
|
5839
5852
|
} catch (_a) {} finally{
|
|
5840
5853
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
|
|
@@ -5842,7 +5855,7 @@ function normalizeCSS(s) {
|
|
|
5842
5855
|
if (convertedString) {
|
|
5843
5856
|
html = convertedString;
|
|
5844
5857
|
}
|
|
5845
|
-
return (0,
|
|
5858
|
+
return (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(html.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '').replace(/<!--[^>]*>/g, ''));
|
|
5846
5859
|
}
|
|
5847
5860
|
|
|
5848
5861
|
|
|
@@ -5857,8 +5870,9 @@ function normalizeCSS(s) {
|
|
|
5857
5870
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5858
5871
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5859
5872
|
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
|
|
5860
|
-
/* harmony import */ var
|
|
5861
|
-
/* harmony import */ var
|
|
5873
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90723);
|
|
5874
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
5875
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
5862
5876
|
/*!
|
|
5863
5877
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5864
5878
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5870,6 +5884,7 @@ function normalizeCSS(s) {
|
|
|
5870
5884
|
|
|
5871
5885
|
|
|
5872
5886
|
|
|
5887
|
+
|
|
5873
5888
|
/**
|
|
5874
5889
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
5875
5890
|
* content that matches the look and feel of the site.
|
|
@@ -5883,6 +5898,7 @@ function normalizeCSS(s) {
|
|
|
5883
5898
|
const div = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5884
5899
|
div.innerHTML = html;
|
|
5885
5900
|
const marks = [];
|
|
5901
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.readWordListItems)(div);
|
|
5886
5902
|
if (div.firstChild) {
|
|
5887
5903
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(div, (node)=>{
|
|
5888
5904
|
if (!node) {
|
|
@@ -5907,7 +5923,7 @@ function normalizeCSS(s) {
|
|
|
5907
5923
|
// with `mso-list:Ignore`. They are display-only
|
|
5908
5924
|
// and must not be imported, otherwise the marker
|
|
5909
5925
|
// text leaks into the content. See #948
|
|
5910
|
-
if (/mso-list:\s*ignore/i.test((0,
|
|
5926
|
+
if (/mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style') || '')) {
|
|
5911
5927
|
marks.push(node);
|
|
5912
5928
|
break;
|
|
5913
5929
|
}
|
|
@@ -5921,7 +5937,7 @@ function normalizeCSS(s) {
|
|
|
5921
5937
|
// `attrRaw`: SVG keeps camelCase names
|
|
5922
5938
|
// (`viewBox`), `attr()` would kebab-case
|
|
5923
5939
|
// them and silently skip the removal
|
|
5924
|
-
(0,
|
|
5940
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attrRaw)(node, attribute.name, null);
|
|
5925
5941
|
}
|
|
5926
5942
|
});
|
|
5927
5943
|
}
|
|
@@ -5934,12 +5950,13 @@ function normalizeCSS(s) {
|
|
|
5934
5950
|
});
|
|
5935
5951
|
}
|
|
5936
5952
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove.apply(null, marks);
|
|
5953
|
+
(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.wrapWordListItems)(listItems);
|
|
5937
5954
|
convertedString = div.innerHTML;
|
|
5938
5955
|
} catch (e) {}
|
|
5939
5956
|
if (convertedString) {
|
|
5940
5957
|
html = convertedString;
|
|
5941
5958
|
}
|
|
5942
|
-
html = html.split(/(\n)/).filter(
|
|
5959
|
+
html = html.split(/(\n)/).filter(_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim).join('\n');
|
|
5943
5960
|
return html.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '').replace(/<!--[^>]*>/g, '');
|
|
5944
5961
|
}
|
|
5945
5962
|
|
|
@@ -6274,7 +6291,14 @@ const NEW_LINE_TAGS = new Set([
|
|
|
6274
6291
|
'h4',
|
|
6275
6292
|
'h5',
|
|
6276
6293
|
'h6',
|
|
6277
|
-
'hr'
|
|
6294
|
+
'hr',
|
|
6295
|
+
'ul',
|
|
6296
|
+
'ol',
|
|
6297
|
+
'li'
|
|
6298
|
+
]);
|
|
6299
|
+
const LIST_TAGS = new Set([
|
|
6300
|
+
'ul',
|
|
6301
|
+
'ol'
|
|
6278
6302
|
]);
|
|
6279
6303
|
const INVISIBLE_TAGS = new Set([
|
|
6280
6304
|
'script',
|
|
@@ -6300,6 +6324,16 @@ const ALONE_TAGS = new Set([
|
|
|
6300
6324
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(tmp, (node)=>{
|
|
6301
6325
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node) && all.push(node);
|
|
6302
6326
|
});
|
|
6327
|
+
// By default blocks are joined with a single space (single-line
|
|
6328
|
+
// plain text). When `blockBr` is set, separate them with a line
|
|
6329
|
+
// break instead, so paragraph structure survives — e.g. the
|
|
6330
|
+
// "Insert only Text" paste option. See #1232
|
|
6331
|
+
const separators = new Set();
|
|
6332
|
+
const separator = ()=>{
|
|
6333
|
+
const text = doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' ');
|
|
6334
|
+
separators.add(text);
|
|
6335
|
+
return text;
|
|
6336
|
+
};
|
|
6303
6337
|
all.forEach((p)=>{
|
|
6304
6338
|
const pr = p.parentNode;
|
|
6305
6339
|
if (!pr) {
|
|
@@ -6319,16 +6353,17 @@ const ALONE_TAGS = new Set([
|
|
|
6319
6353
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, NEW_LINE_TAGS)) {
|
|
6320
6354
|
return;
|
|
6321
6355
|
}
|
|
6356
|
+
const pv = p.previousSibling;
|
|
6357
|
+
// A nested list starts on a new line after its item's own text
|
|
6358
|
+
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 || ''))) {
|
|
6359
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(p, separator());
|
|
6360
|
+
}
|
|
6322
6361
|
const nx = p.nextSibling;
|
|
6323
6362
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(nx) && /^\s/.test(nx.nodeValue || '')) {
|
|
6324
6363
|
return;
|
|
6325
6364
|
}
|
|
6326
6365
|
if (nx) {
|
|
6327
|
-
|
|
6328
|
-
// plain text). When `blockBr` is set, separate them with a line
|
|
6329
|
-
// break instead, so paragraph structure survives — e.g. the
|
|
6330
|
-
// "Insert only Text" paste option. See #1232
|
|
6331
|
-
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(nx, doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' '));
|
|
6366
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(nx, separator());
|
|
6332
6367
|
}
|
|
6333
6368
|
});
|
|
6334
6369
|
return restoreTags((0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)(tmp.innerText));
|
|
@@ -6338,6 +6373,205 @@ function restoreTags(content) {
|
|
|
6338
6373
|
}
|
|
6339
6374
|
|
|
6340
6375
|
|
|
6376
|
+
/***/ }),
|
|
6377
|
+
|
|
6378
|
+
/***/ 90723:
|
|
6379
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6380
|
+
|
|
6381
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6382
|
+
/* harmony export */ readWordListItems: function() { return /* binding */ readWordListItems; },
|
|
6383
|
+
/* harmony export */ wrapWordListItems: function() { return /* binding */ wrapWordListItems; }
|
|
6384
|
+
/* harmony export */ });
|
|
6385
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
6386
|
+
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
|
|
6387
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
6388
|
+
function _define_property(obj, key, value) {
|
|
6389
|
+
if (key in obj) {
|
|
6390
|
+
Object.defineProperty(obj, key, {
|
|
6391
|
+
value: value,
|
|
6392
|
+
enumerable: true,
|
|
6393
|
+
configurable: true,
|
|
6394
|
+
writable: true
|
|
6395
|
+
});
|
|
6396
|
+
} else obj[key] = value;
|
|
6397
|
+
return obj;
|
|
6398
|
+
}
|
|
6399
|
+
function _object_spread(target) {
|
|
6400
|
+
for(var i = 1; i < arguments.length; i++){
|
|
6401
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
6402
|
+
var ownKeys = Object.keys(source);
|
|
6403
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
6404
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
6405
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
6406
|
+
}));
|
|
6407
|
+
}
|
|
6408
|
+
ownKeys.forEach(function(key) {
|
|
6409
|
+
_define_property(target, key, source[key]);
|
|
6410
|
+
});
|
|
6411
|
+
}
|
|
6412
|
+
return target;
|
|
6413
|
+
}
|
|
6414
|
+
/*!
|
|
6415
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6416
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
6417
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6418
|
+
*/ /**
|
|
6419
|
+
* @module helpers/html
|
|
6420
|
+
*/ ;
|
|
6421
|
+
|
|
6422
|
+
|
|
6423
|
+
const ROMAN = {
|
|
6424
|
+
i: 1,
|
|
6425
|
+
v: 5,
|
|
6426
|
+
x: 10,
|
|
6427
|
+
l: 50,
|
|
6428
|
+
c: 100,
|
|
6429
|
+
d: 500,
|
|
6430
|
+
m: 1000
|
|
6431
|
+
};
|
|
6432
|
+
function romanValue(roman) {
|
|
6433
|
+
let value = 0;
|
|
6434
|
+
for(let i = 0; i < roman.length; i += 1){
|
|
6435
|
+
const current = ROMAN[roman[i]], next = ROMAN[roman[i + 1]] || 0;
|
|
6436
|
+
value += current < next ? -current : current;
|
|
6437
|
+
}
|
|
6438
|
+
return value;
|
|
6439
|
+
}
|
|
6440
|
+
/**
|
|
6441
|
+
* Word's marker text (`1.`, `b)`, `iv.`, `·`, `o`, `§`) decides the list type
|
|
6442
|
+
*/ function parseMarker(marker) {
|
|
6443
|
+
const text = marker.replace(/\s+/g, '');
|
|
6444
|
+
const decimal = /^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(text);
|
|
6445
|
+
if (decimal) {
|
|
6446
|
+
return {
|
|
6447
|
+
tag: 'ol',
|
|
6448
|
+
listStyleType: null,
|
|
6449
|
+
start: Number(decimal[1])
|
|
6450
|
+
};
|
|
6451
|
+
}
|
|
6452
|
+
const letters = /^\(?([a-z]+|[A-Z]+)[.)]$/.exec(text);
|
|
6453
|
+
if (letters) {
|
|
6454
|
+
const value = letters[1], lower = value.toLowerCase(), upper = value !== lower;
|
|
6455
|
+
if (/^[ivxlcdm]+$/.test(lower) && (lower.length > 1 || lower === 'i')) {
|
|
6456
|
+
return {
|
|
6457
|
+
tag: 'ol',
|
|
6458
|
+
listStyleType: upper ? 'upper-roman' : 'lower-roman',
|
|
6459
|
+
start: romanValue(lower)
|
|
6460
|
+
};
|
|
6461
|
+
}
|
|
6462
|
+
// Word continues a lettered list with aa, bb, ...
|
|
6463
|
+
if (/^([a-z])\1*$/.test(lower)) {
|
|
6464
|
+
return {
|
|
6465
|
+
tag: 'ol',
|
|
6466
|
+
listStyleType: upper ? 'upper-alpha' : 'lower-alpha',
|
|
6467
|
+
start: (lower.length - 1) * 26 + lower.charCodeAt(0) - 96
|
|
6468
|
+
};
|
|
6469
|
+
}
|
|
6470
|
+
}
|
|
6471
|
+
return {
|
|
6472
|
+
tag: 'ul',
|
|
6473
|
+
listStyleType: null,
|
|
6474
|
+
start: 1
|
|
6475
|
+
};
|
|
6476
|
+
}
|
|
6477
|
+
/**
|
|
6478
|
+
* Removes the marker and the wrappers it leaves empty
|
|
6479
|
+
*/ function removeMarker(marker, paragraph) {
|
|
6480
|
+
let parent = marker.parentNode;
|
|
6481
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(marker);
|
|
6482
|
+
while(parent && parent !== paragraph && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(parent) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)){
|
|
6483
|
+
const next = parent.parentNode;
|
|
6484
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
|
|
6485
|
+
parent = next;
|
|
6486
|
+
}
|
|
6487
|
+
}
|
|
6488
|
+
/**
|
|
6489
|
+
* Finds Word's list paragraphs (`<p style="mso-list:l0 level1 lfo1">`), reads
|
|
6490
|
+
* their list, level and type from the `mso-list:Ignore` marker, and removes the
|
|
6491
|
+
* marker. Call it before anything strips the `mso-list` styles, then pass the
|
|
6492
|
+
* result to {@link wrapWordListItems}
|
|
6493
|
+
*/ function readWordListItems(root) {
|
|
6494
|
+
const items = [];
|
|
6495
|
+
(0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(root.querySelectorAll('p')).forEach((paragraph)=>{
|
|
6496
|
+
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') || '');
|
|
6497
|
+
if (!match) {
|
|
6498
|
+
return;
|
|
6499
|
+
}
|
|
6500
|
+
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') || ''));
|
|
6501
|
+
items.push(_object_spread({
|
|
6502
|
+
paragraph,
|
|
6503
|
+
list: `${match[1]}:${match[3] || ''}`,
|
|
6504
|
+
level: Number(match[2])
|
|
6505
|
+
}, parseMarker((marker === null || marker === void 0 ? void 0 : marker.textContent) || '')));
|
|
6506
|
+
if (marker) {
|
|
6507
|
+
removeMarker(marker, paragraph);
|
|
6508
|
+
}
|
|
6509
|
+
});
|
|
6510
|
+
return items;
|
|
6511
|
+
}
|
|
6512
|
+
function isAdjacent(prev, item) {
|
|
6513
|
+
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;
|
|
6514
|
+
}
|
|
6515
|
+
/**
|
|
6516
|
+
* Turns the paragraphs found by {@link readWordListItems} into `<ul>`/`<ol>`
|
|
6517
|
+
* lists, nesting them by level. Each paragraph becomes an `<li>` without Word's
|
|
6518
|
+
* hanging indent
|
|
6519
|
+
*/ function wrapWordListItems(items) {
|
|
6520
|
+
let stack = [];
|
|
6521
|
+
const continues = items.map((item, index)=>index > 0 && isAdjacent(items[index - 1], item));
|
|
6522
|
+
items.forEach((item, index)=>{
|
|
6523
|
+
const { paragraph } = item;
|
|
6524
|
+
if (!continues[index]) {
|
|
6525
|
+
stack = [];
|
|
6526
|
+
}
|
|
6527
|
+
while(stack.length && stack[stack.length - 1].level > item.level){
|
|
6528
|
+
stack.pop();
|
|
6529
|
+
}
|
|
6530
|
+
let top = stack[stack.length - 1];
|
|
6531
|
+
if (top && top.level === item.level && top.list !== item.list) {
|
|
6532
|
+
stack.pop();
|
|
6533
|
+
top = stack[stack.length - 1];
|
|
6534
|
+
}
|
|
6535
|
+
const doc = paragraph.ownerDocument;
|
|
6536
|
+
if (!top || top.level < item.level) {
|
|
6537
|
+
const element = doc.createElement(item.tag);
|
|
6538
|
+
if (item.listStyleType) {
|
|
6539
|
+
element.style.listStyleType = item.listStyleType;
|
|
6540
|
+
}
|
|
6541
|
+
if (item.tag === 'ol' && item.start !== 1) {
|
|
6542
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(element, 'start', item.start);
|
|
6543
|
+
}
|
|
6544
|
+
if (top && top.li) {
|
|
6545
|
+
top.li.appendChild(element);
|
|
6546
|
+
} else {
|
|
6547
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(paragraph, element);
|
|
6548
|
+
}
|
|
6549
|
+
top = {
|
|
6550
|
+
level: item.level,
|
|
6551
|
+
list: item.list,
|
|
6552
|
+
element
|
|
6553
|
+
};
|
|
6554
|
+
stack.push(top);
|
|
6555
|
+
}
|
|
6556
|
+
const li = doc.createElement('li');
|
|
6557
|
+
(0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(paragraph.attributes).forEach((attribute)=>{
|
|
6558
|
+
if (attribute.name !== 'class') {
|
|
6559
|
+
li.setAttribute(attribute.name, attribute.value);
|
|
6560
|
+
}
|
|
6561
|
+
});
|
|
6562
|
+
li.style.removeProperty('margin-left');
|
|
6563
|
+
li.style.removeProperty('text-indent');
|
|
6564
|
+
if (!(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(li, 'style')) {
|
|
6565
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(li, 'style', null);
|
|
6566
|
+
}
|
|
6567
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(paragraph, li);
|
|
6568
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(paragraph);
|
|
6569
|
+
top.element.appendChild(li);
|
|
6570
|
+
top.li = li;
|
|
6571
|
+
});
|
|
6572
|
+
}
|
|
6573
|
+
|
|
6574
|
+
|
|
6341
6575
|
/***/ }),
|
|
6342
6576
|
|
|
6343
6577
|
/***/ 21537:
|
|
@@ -10800,13 +11034,15 @@ function usable(ranges, shadowRoot) {
|
|
|
10800
11034
|
/* harmony export */ composedRanges: function() { return /* reexport safe */ _composed_ranges_js__WEBPACK_IMPORTED_MODULE_2__.composedRanges; },
|
|
10801
11035
|
/* harmony export */ cursorInTheEdgeOfString: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
10802
11036
|
/* harmony export */ findCorrectCurrentNode: function() { return /* binding */ findCorrectCurrentNode; },
|
|
10803
|
-
/* harmony export */
|
|
11037
|
+
/* harmony export */ isMoved: function() { return /* reexport safe */ _is_moved_js__WEBPACK_IMPORTED_MODULE_3__.isMoved; },
|
|
11038
|
+
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */ _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_4__.moveNodeInsideStart; }
|
|
10804
11039
|
/* harmony export */ });
|
|
10805
11040
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
10806
11041
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
10807
11042
|
/* harmony import */ var _composed_ranges_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79505);
|
|
10808
|
-
/* harmony import */ var
|
|
10809
|
-
/* harmony import */ var
|
|
11043
|
+
/* harmony import */ var _is_moved_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12604);
|
|
11044
|
+
/* harmony import */ var _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26716);
|
|
11045
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43463);
|
|
10810
11046
|
/*!
|
|
10811
11047
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10812
11048
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10818,6 +11054,7 @@ function usable(ranges, shadowRoot) {
|
|
|
10818
11054
|
|
|
10819
11055
|
|
|
10820
11056
|
|
|
11057
|
+
|
|
10821
11058
|
/**
|
|
10822
11059
|
* Despite the name, returns `true` when the cursor is NOT at the checked edge
|
|
10823
11060
|
* of the text node: there is significant (non invisible-space) text between
|
|
@@ -10873,6 +11110,33 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10873
11110
|
}
|
|
10874
11111
|
|
|
10875
11112
|
|
|
11113
|
+
/***/ }),
|
|
11114
|
+
|
|
11115
|
+
/***/ 12604:
|
|
11116
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11117
|
+
|
|
11118
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11119
|
+
/* harmony export */ isMoved: function() { return /* binding */ isMoved; }
|
|
11120
|
+
/* harmony export */ });
|
|
11121
|
+
/*!
|
|
11122
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
11123
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
11124
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
11125
|
+
*/ /**
|
|
11126
|
+
* Whether the selection, `before` as it was when a key went down, has since
|
|
11127
|
+
* moved to somewhere else in the editor
|
|
11128
|
+
* @private
|
|
11129
|
+
*/ function isMoved(jodit, before) {
|
|
11130
|
+
const { s } = jodit;
|
|
11131
|
+
// Selecting table cells, for one, removes the selection altogether
|
|
11132
|
+
if (!before || !s.isInsideArea) {
|
|
11133
|
+
return false;
|
|
11134
|
+
}
|
|
11135
|
+
const { range } = s;
|
|
11136
|
+
return range.startContainer !== before.startContainer || range.startOffset !== before.startOffset || range.endContainer !== before.endContainer || range.endOffset !== before.endOffset;
|
|
11137
|
+
}
|
|
11138
|
+
|
|
11139
|
+
|
|
10876
11140
|
/***/ }),
|
|
10877
11141
|
|
|
10878
11142
|
/***/ 26716:
|
|
@@ -12916,11 +13180,13 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12916
13180
|
/* harmony export */ toggleOrderedList: function() { return /* binding */ toggleOrderedList; }
|
|
12917
13181
|
/* harmony export */ });
|
|
12918
13182
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
12919
|
-
/* harmony import */ var
|
|
12920
|
-
/* harmony import */ var
|
|
12921
|
-
/* harmony import */ var
|
|
12922
|
-
/* harmony import */ var
|
|
12923
|
-
/* harmony import */ var
|
|
13183
|
+
/* harmony import */ var _helpers_size_object_size_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21496);
|
|
13184
|
+
/* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38837);
|
|
13185
|
+
/* harmony import */ var _extract_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32526);
|
|
13186
|
+
/* harmony import */ var _is_same_attributes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94466);
|
|
13187
|
+
/* harmony import */ var _toggle_attributes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44253);
|
|
13188
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77361);
|
|
13189
|
+
/* harmony import */ var _wrap_list_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82515);
|
|
12924
13190
|
/*!
|
|
12925
13191
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
12926
13192
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -12931,6 +13197,8 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12931
13197
|
|
|
12932
13198
|
|
|
12933
13199
|
|
|
13200
|
+
|
|
13201
|
+
|
|
12934
13202
|
/**
|
|
12935
13203
|
* Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
|
|
12936
13204
|
* @private
|
|
@@ -12942,39 +13210,69 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12942
13210
|
if (!list) {
|
|
12943
13211
|
return mode;
|
|
12944
13212
|
}
|
|
12945
|
-
const result = jodit.e.fire(`${
|
|
13213
|
+
const result = jodit.e.fire(`${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}BeforeToggleList`, mode, commitStyle, list);
|
|
12946
13214
|
if (result !== undefined) {
|
|
12947
13215
|
return result;
|
|
12948
13216
|
}
|
|
12949
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
13217
|
+
const hook = jodit.e.fire.bind(jodit.e, `${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}AfterToggleList`);
|
|
12950
13218
|
if (mode !== (/* inlined export .UNWRAP */"unwrap")) {
|
|
12951
|
-
const isChangeMode = (0,
|
|
13219
|
+
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");
|
|
13220
|
+
const isSameList = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, commitStyle.element);
|
|
13221
|
+
// ol => ol[style="list-style-type: lower-roman"]: a list's style
|
|
13222
|
+
// belongs to the whole list, so it is changed without splitting it
|
|
13223
|
+
if (isSameList && isChangeMode && mode !== _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE && changesStyleOnly(commitStyle)) {
|
|
13224
|
+
(0,_toggle_attributes_js__WEBPACK_IMPORTED_MODULE_5__.toggleAttributes)(commitStyle, list, jodit, (/* inlined export .CHANGE */"change"));
|
|
13225
|
+
hook((/* inlined export .CHANGE */"change"), joinPrevious(commitStyle, list, mode), commitStyle);
|
|
13226
|
+
return (/* inlined export .CHANGE */"change");
|
|
13227
|
+
}
|
|
13228
|
+
// Restyled already, for an earlier part of the selection
|
|
13229
|
+
if (isSameList && mode === (/* inlined export .CHANGE */"change")) {
|
|
13230
|
+
return (/* inlined export .CHANGE */"change");
|
|
13231
|
+
}
|
|
12952
13232
|
// ul => ol, ol => ul or ul => ul.class1
|
|
12953
|
-
if (mode ===
|
|
12954
|
-
const wrapper = unwrapList(
|
|
12955
|
-
const newList = (0,
|
|
12956
|
-
hook(
|
|
12957
|
-
return
|
|
13233
|
+
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
|
|
13234
|
+
const wrapper = unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, list, li, jodit, commitStyle);
|
|
13235
|
+
const newList = (0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, wrapper, jodit);
|
|
13236
|
+
hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
|
|
13237
|
+
return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
|
|
12958
13238
|
}
|
|
12959
13239
|
}
|
|
12960
13240
|
const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"), list, li, jodit, commitStyle);
|
|
12961
13241
|
hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
|
|
12962
13242
|
return (/* inlined export .UNWRAP */"unwrap");
|
|
12963
13243
|
}
|
|
13244
|
+
/**
|
|
13245
|
+
* Other attributes, such as a class, still move the items into a new list,
|
|
13246
|
+
* where the `beforeWrapList` hook can add markup to each of them
|
|
13247
|
+
*/ function changesStyleOnly({ options: { attributes } }) {
|
|
13248
|
+
return Boolean(attributes === null || attributes === void 0 ? void 0 : attributes.style) && (0,_helpers_size_object_size_js__WEBPACK_IMPORTED_MODULE_1__.size)(attributes) === 1;
|
|
13249
|
+
}
|
|
13250
|
+
/**
|
|
13251
|
+
* Joins a restyled list to the list before it, when the selection runs on
|
|
13252
|
+
* from that list and the two now match
|
|
13253
|
+
*/ function joinPrevious(commitStyle, list, mode) {
|
|
13254
|
+
const prev = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(list, true);
|
|
13255
|
+
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)) {
|
|
13256
|
+
return list;
|
|
13257
|
+
}
|
|
13258
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(prev, Array.from(list.childNodes));
|
|
13259
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(list);
|
|
13260
|
+
return prev;
|
|
13261
|
+
}
|
|
12964
13262
|
function unwrapList(mode, list, li, jodit, cs) {
|
|
12965
|
-
const result = jodit.e.fire(`${
|
|
13263
|
+
const result = jodit.e.fire(`${_constants_js__WEBPACK_IMPORTED_MODULE_6__._PREFIX}BeforeUnwrapList`, mode, list, cs);
|
|
12966
13264
|
if (result) {
|
|
12967
|
-
(0,
|
|
13265
|
+
(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`);
|
|
12968
13266
|
return result;
|
|
12969
13267
|
}
|
|
12970
|
-
;(0,
|
|
12971
|
-
(0,
|
|
13268
|
+
;(0,_extract_js__WEBPACK_IMPORTED_MODULE_3__.extractSelectedPart)(list, li, jodit);
|
|
13269
|
+
(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');
|
|
12972
13270
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(li.parentElement);
|
|
12973
13271
|
// In the REPLACE mode the content will be immediately wrapped in a `li`
|
|
12974
13272
|
// of the new list inside `wrapList`, so it should stay in the document.
|
|
12975
13273
|
// Replacing it with a fragment here would dissolve the content
|
|
12976
13274
|
// (with `enter: 'br'`) and the new list would never be inserted.
|
|
12977
|
-
if (mode ===
|
|
13275
|
+
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE) {
|
|
12978
13276
|
return li;
|
|
12979
13277
|
}
|
|
12980
13278
|
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(li, jodit.o.enter.toLowerCase() !== 'br' ? jodit.o.enter : jodit.createInside.fragment(), jodit.createInside);
|
|
@@ -13716,7 +14014,7 @@ const transactions = {
|
|
|
13716
14014
|
[states.LIST]: {
|
|
13717
14015
|
exec (value) {
|
|
13718
14016
|
const { element, jodit, mode } = value;
|
|
13719
|
-
if (mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.INITIAL && mode !== (/* inlined export .UNWRAP */"unwrap") && mode !== _constants_js__WEBPACK_IMPORTED_MODULE_4__.REPLACE) {
|
|
14017
|
+
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")) {
|
|
13720
14018
|
return _object_spread_props(_object_spread({}, value), {
|
|
13721
14019
|
next: states.END
|
|
13722
14020
|
});
|
|
@@ -17339,6 +17637,7 @@ function _object_spread_props(target, source) {
|
|
|
17339
17637
|
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;
|
|
17340
17638
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17341
17639
|
};
|
|
17640
|
+
var Popup_1;
|
|
17342
17641
|
|
|
17343
17642
|
|
|
17344
17643
|
|
|
@@ -17355,7 +17654,7 @@ const EVENTS_FOR_AUTOCLOSE = [
|
|
|
17355
17654
|
'backSpaceAfterDelete',
|
|
17356
17655
|
'beforeCommandDelete'
|
|
17357
17656
|
];
|
|
17358
|
-
class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
17657
|
+
let Popup = Popup_1 = class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
17359
17658
|
className() {
|
|
17360
17659
|
return 'Popup';
|
|
17361
17660
|
}
|
|
@@ -17365,7 +17664,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17365
17664
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(content, childContainer);
|
|
17366
17665
|
}
|
|
17367
17666
|
updateParentElement(target) {
|
|
17368
|
-
if (target !== this && _component_component_js__WEBPACK_IMPORTED_MODULE_0__.Component.isInstanceOf(target,
|
|
17667
|
+
if (target !== this && _component_component_js__WEBPACK_IMPORTED_MODULE_0__.Component.isInstanceOf(target, Popup_1)) {
|
|
17369
17668
|
this.__childrenPopups.forEach((popup)=>{
|
|
17370
17669
|
if (!target.closest(popup) && popup.isOpened) {
|
|
17371
17670
|
popup.close();
|
|
@@ -17407,7 +17706,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17407
17706
|
if (parentContainer) {
|
|
17408
17707
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(parentContainer, this.container);
|
|
17409
17708
|
} else {
|
|
17410
|
-
const popupContainer = (0,_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.jodit,
|
|
17709
|
+
const popupContainer = (0,_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.jodit, Popup_1);
|
|
17411
17710
|
if (parentContainer !== this.container.parentElement) {
|
|
17412
17711
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(popupContainer, this.container);
|
|
17413
17712
|
}
|
|
@@ -17519,11 +17818,11 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17519
17818
|
};
|
|
17520
17819
|
const getMatchStrategy = (inBox)=>{
|
|
17521
17820
|
let strategy;
|
|
17522
|
-
if (
|
|
17821
|
+
if (Popup_1.boxInView(getPointByStrategy(defaultStrategy), inBox)) {
|
|
17523
17822
|
strategy = defaultStrategy;
|
|
17524
17823
|
} else {
|
|
17525
17824
|
strategy = list.find((key)=>{
|
|
17526
|
-
if (
|
|
17825
|
+
if (Popup_1.boxInView(getPointByStrategy(key), inBox)) {
|
|
17527
17826
|
return key;
|
|
17528
17827
|
}
|
|
17529
17828
|
return;
|
|
@@ -17534,7 +17833,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17534
17833
|
// Try to find match position inside Jodit.container
|
|
17535
17834
|
let strategy = getMatchStrategy((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.position)(this.j.container, this.j));
|
|
17536
17835
|
// If not found or is not inside window view
|
|
17537
|
-
if (!strategy || !
|
|
17836
|
+
if (!strategy || !Popup_1.boxInView(getPointByStrategy(strategy), view)) {
|
|
17538
17837
|
// Find match strategy inside window view
|
|
17539
17838
|
strategy = getMatchStrategy(view) || strategy || defaultStrategy;
|
|
17540
17839
|
}
|
|
@@ -17584,7 +17883,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17584
17883
|
if (!e.target) {
|
|
17585
17884
|
return false;
|
|
17586
17885
|
}
|
|
17587
|
-
const box = _element_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target,
|
|
17886
|
+
const box = _element_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(e.target, Popup_1);
|
|
17588
17887
|
return Boolean(box && (this === box || box.closest(this)));
|
|
17589
17888
|
}
|
|
17590
17889
|
__addGlobalListeners() {
|
|
@@ -17639,7 +17938,7 @@ class Popup extends _group_group_js__WEBPACK_IMPORTED_MODULE_8__.UIGroup {
|
|
|
17639
17938
|
this.__childrenPopups = new Set();
|
|
17640
17939
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'role', 'popup');
|
|
17641
17940
|
}
|
|
17642
|
-
}
|
|
17941
|
+
};
|
|
17643
17942
|
__decorate([
|
|
17644
17943
|
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
17645
17944
|
], Popup.prototype, "updatePosition", null);
|
|
@@ -17653,6 +17952,10 @@ __decorate([
|
|
|
17653
17952
|
__decorate([
|
|
17654
17953
|
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
17655
17954
|
], Popup.prototype, "__closeOnOutsideClick", null);
|
|
17955
|
+
Popup = Popup_1 = __decorate([
|
|
17956
|
+
_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.component
|
|
17957
|
+
], Popup);
|
|
17958
|
+
|
|
17656
17959
|
|
|
17657
17960
|
|
|
17658
17961
|
/***/ }),
|
|
@@ -18876,7 +19179,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18876
19179
|
commands.push(command);
|
|
18877
19180
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(command)) {
|
|
18878
19181
|
const hotkeys = this.o.commandToHotkeys[commandName] || this.o.commandToHotkeys[commandNameOriginal] || command.hotkeys;
|
|
18879
|
-
if (hotkeys) {
|
|
19182
|
+
if (hotkeys && hotkeys.length) {
|
|
18880
19183
|
this.registerHotkeyToCommand(hotkeys, commandName, options === null || options === void 0 ? void 0 : options.stopPropagation);
|
|
18881
19184
|
}
|
|
18882
19185
|
}
|
|
@@ -18885,6 +19188,10 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18885
19188
|
/**
|
|
18886
19189
|
* Register hotkey for command
|
|
18887
19190
|
*/ registerHotkeyToCommand(hotkeys, commandName, shouldStop = true) {
|
|
19191
|
+
// An empty list (e.g. `commandToHotkeys: { cmd: [] }`) turns the key off
|
|
19192
|
+
if (!hotkeys || !hotkeys.length) {
|
|
19193
|
+
return;
|
|
19194
|
+
}
|
|
18888
19195
|
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(' ');
|
|
18889
19196
|
this.e.off(shortcuts).on(shortcuts, (type, stop)=>{
|
|
18890
19197
|
if (stop) {
|
|
@@ -19895,7 +20202,10 @@ function addClassNames(className, elm) {
|
|
|
19895
20202
|
Autoplay: 'تشغيل تلقائي',
|
|
19896
20203
|
Loop: 'تكرار',
|
|
19897
20204
|
Muted: 'مكتوم الصوت',
|
|
19898
|
-
Controls: 'عناصر التحكم'
|
|
20205
|
+
Controls: 'عناصر التحكم',
|
|
20206
|
+
'Start at...': 'البدء من...',
|
|
20207
|
+
'Start numbering at': 'بدء الترقيم من',
|
|
20208
|
+
'Number for the first item': 'رقم العنصر الأول'
|
|
19899
20209
|
});
|
|
19900
20210
|
|
|
19901
20211
|
|
|
@@ -20136,7 +20446,10 @@ function addClassNames(className, elm) {
|
|
|
20136
20446
|
Autoplay: 'Avtomatik oynatma',
|
|
20137
20447
|
Loop: 'Təkrarla',
|
|
20138
20448
|
Muted: 'Səssiz',
|
|
20139
|
-
Controls: 'İdarəetmə elementləri'
|
|
20449
|
+
Controls: 'İdarəetmə elementləri',
|
|
20450
|
+
'Start at...': 'Başlanğıc nömrəsi...',
|
|
20451
|
+
'Start numbering at': 'Nömrələmənin başlanğıcı',
|
|
20452
|
+
'Number for the first item': 'Birinci bəndin nömrəsi'
|
|
20140
20453
|
});
|
|
20141
20454
|
|
|
20142
20455
|
|
|
@@ -20369,7 +20682,10 @@ function addClassNames(className, elm) {
|
|
|
20369
20682
|
Autoplay: 'Automatické přehrávání',
|
|
20370
20683
|
Loop: 'Opakovat',
|
|
20371
20684
|
Muted: 'Ztlumeno',
|
|
20372
|
-
Controls: 'Ovládací prvky'
|
|
20685
|
+
Controls: 'Ovládací prvky',
|
|
20686
|
+
'Start at...': 'Začít od...',
|
|
20687
|
+
'Start numbering at': 'Začít číslování od',
|
|
20688
|
+
'Number for the first item': 'Číslo první položky'
|
|
20373
20689
|
});
|
|
20374
20690
|
|
|
20375
20691
|
|
|
@@ -20606,7 +20922,10 @@ function addClassNames(className, elm) {
|
|
|
20606
20922
|
Autoplay: 'Automatische Wiedergabe',
|
|
20607
20923
|
Loop: 'Wiederholen',
|
|
20608
20924
|
Muted: 'Stumm',
|
|
20609
|
-
Controls: 'Steuerelemente'
|
|
20925
|
+
Controls: 'Steuerelemente',
|
|
20926
|
+
'Start at...': 'Beginnen bei...',
|
|
20927
|
+
'Start numbering at': 'Nummerierung beginnen bei',
|
|
20928
|
+
'Number for the first item': 'Nummer des ersten Eintrags'
|
|
20610
20929
|
});
|
|
20611
20930
|
|
|
20612
20931
|
|
|
@@ -20860,7 +21179,10 @@ function addClassNames(className, elm) {
|
|
|
20860
21179
|
Autoplay: 'Reproducción automática',
|
|
20861
21180
|
Loop: 'Repetir',
|
|
20862
21181
|
Muted: 'Silenciado',
|
|
20863
|
-
Controls: 'Controles'
|
|
21182
|
+
Controls: 'Controles',
|
|
21183
|
+
'Start at...': 'Empezar en...',
|
|
21184
|
+
'Start numbering at': 'Empezar la numeración en',
|
|
21185
|
+
'Number for the first item': 'Número del primer elemento'
|
|
20864
21186
|
});
|
|
20865
21187
|
|
|
20866
21188
|
|
|
@@ -21092,7 +21414,10 @@ function addClassNames(className, elm) {
|
|
|
21092
21414
|
Autoplay: 'پخش خودکار',
|
|
21093
21415
|
Loop: 'تکرار',
|
|
21094
21416
|
Muted: 'بیصدا',
|
|
21095
|
-
Controls: 'کنترلها'
|
|
21417
|
+
Controls: 'کنترلها',
|
|
21418
|
+
'Start at...': 'شروع از...',
|
|
21419
|
+
'Start numbering at': 'شروع شمارهگذاری از',
|
|
21420
|
+
'Number for the first item': 'شمارهی نخستین مورد'
|
|
21096
21421
|
});
|
|
21097
21422
|
|
|
21098
21423
|
|
|
@@ -21330,7 +21655,10 @@ function addClassNames(className, elm) {
|
|
|
21330
21655
|
Autoplay: 'Automaattinen toisto',
|
|
21331
21656
|
Loop: 'Toista uudelleen',
|
|
21332
21657
|
Muted: 'Mykistetty',
|
|
21333
|
-
Controls: 'Säätimet'
|
|
21658
|
+
Controls: 'Säätimet',
|
|
21659
|
+
'Start at...': 'Aloita numerosta...',
|
|
21660
|
+
'Start numbering at': 'Aloita numerointi numerosta',
|
|
21661
|
+
'Number for the first item': 'Ensimmäisen kohdan numero'
|
|
21334
21662
|
});
|
|
21335
21663
|
|
|
21336
21664
|
|
|
@@ -21562,7 +21890,10 @@ function addClassNames(className, elm) {
|
|
|
21562
21890
|
Autoplay: 'Lecture automatique',
|
|
21563
21891
|
Loop: 'Lecture en boucle',
|
|
21564
21892
|
Muted: 'Muet',
|
|
21565
|
-
Controls: 'Commandes'
|
|
21893
|
+
Controls: 'Commandes',
|
|
21894
|
+
'Start at...': 'Commencer à...',
|
|
21895
|
+
'Start numbering at': 'Commencer la numérotation à',
|
|
21896
|
+
'Number for the first item': 'Numéro du premier élément'
|
|
21566
21897
|
});
|
|
21567
21898
|
|
|
21568
21899
|
|
|
@@ -21794,7 +22125,10 @@ function addClassNames(className, elm) {
|
|
|
21794
22125
|
Autoplay: 'ניגון אוטומטי',
|
|
21795
22126
|
Loop: 'הפעלה חוזרת',
|
|
21796
22127
|
Muted: 'מושתק',
|
|
21797
|
-
Controls: 'פקדים'
|
|
22128
|
+
Controls: 'פקדים',
|
|
22129
|
+
'Start at...': 'התחל מ...',
|
|
22130
|
+
'Start numbering at': 'התחל מספור מ',
|
|
22131
|
+
'Number for the first item': 'מספר הפריט הראשון'
|
|
21798
22132
|
});
|
|
21799
22133
|
|
|
21800
22134
|
|
|
@@ -22028,7 +22362,10 @@ function addClassNames(className, elm) {
|
|
|
22028
22362
|
Autoplay: 'Automatikus lejátszás',
|
|
22029
22363
|
Loop: 'Ismétlés',
|
|
22030
22364
|
Muted: 'Némítva',
|
|
22031
|
-
Controls: 'Vezérlők'
|
|
22365
|
+
Controls: 'Vezérlők',
|
|
22366
|
+
'Start at...': 'Kezdőszám...',
|
|
22367
|
+
'Start numbering at': 'Számozás kezdőértéke',
|
|
22368
|
+
'Number for the first item': 'Az első elem száma'
|
|
22032
22369
|
});
|
|
22033
22370
|
|
|
22034
22371
|
|
|
@@ -22261,7 +22598,10 @@ function addClassNames(className, elm) {
|
|
|
22261
22598
|
Autoplay: 'Putar otomatis',
|
|
22262
22599
|
Loop: 'Ulangi',
|
|
22263
22600
|
Muted: 'Dibisukan',
|
|
22264
|
-
Controls: 'Kontrol'
|
|
22601
|
+
Controls: 'Kontrol',
|
|
22602
|
+
'Start at...': 'Mulai dari...',
|
|
22603
|
+
'Start numbering at': 'Mulai penomoran dari',
|
|
22604
|
+
'Number for the first item': 'Nomor untuk item pertama'
|
|
22265
22605
|
});
|
|
22266
22606
|
|
|
22267
22607
|
|
|
@@ -22498,7 +22838,10 @@ function addClassNames(className, elm) {
|
|
|
22498
22838
|
Autoplay: 'Riproduzione automatica',
|
|
22499
22839
|
Loop: 'Ripeti',
|
|
22500
22840
|
Muted: 'Muto',
|
|
22501
|
-
Controls: 'Controlli'
|
|
22841
|
+
Controls: 'Controlli',
|
|
22842
|
+
'Start at...': 'Inizia da...',
|
|
22843
|
+
'Start numbering at': 'Inizia la numerazione da',
|
|
22844
|
+
'Number for the first item': 'Numero del primo elemento'
|
|
22502
22845
|
});
|
|
22503
22846
|
|
|
22504
22847
|
|
|
@@ -22735,7 +23078,10 @@ function addClassNames(className, elm) {
|
|
|
22735
23078
|
Autoplay: '自動再生',
|
|
22736
23079
|
Loop: 'ループ再生',
|
|
22737
23080
|
Muted: 'ミュート',
|
|
22738
|
-
Controls: 'コントロール'
|
|
23081
|
+
Controls: 'コントロール',
|
|
23082
|
+
'Start at...': '開始番号...',
|
|
23083
|
+
'Start numbering at': '番号の開始値',
|
|
23084
|
+
'Number for the first item': '最初の項目の番号'
|
|
22739
23085
|
});
|
|
22740
23086
|
|
|
22741
23087
|
|
|
@@ -22978,7 +23324,10 @@ function addClassNames(className, elm) {
|
|
|
22978
23324
|
Autoplay: '자동 재생',
|
|
22979
23325
|
Loop: '반복 재생',
|
|
22980
23326
|
Muted: '음소거',
|
|
22981
|
-
Controls: '컨트롤'
|
|
23327
|
+
Controls: '컨트롤',
|
|
23328
|
+
'Start at...': '시작 번호...',
|
|
23329
|
+
'Start numbering at': '번호 매기기 시작 값',
|
|
23330
|
+
'Number for the first item': '첫 번째 항목의 번호'
|
|
22982
23331
|
});
|
|
22983
23332
|
|
|
22984
23333
|
|
|
@@ -23210,7 +23559,10 @@ function addClassNames(className, elm) {
|
|
|
23210
23559
|
Autoplay: 'Автоматаар тоглуулах',
|
|
23211
23560
|
Loop: 'Давтах',
|
|
23212
23561
|
Muted: 'Дуугүй',
|
|
23213
|
-
Controls: 'Удирдлага'
|
|
23562
|
+
Controls: 'Удирдлага',
|
|
23563
|
+
'Start at...': 'Эхлэх дугаар...',
|
|
23564
|
+
'Start numbering at': 'Дугаарлалт эхлэх',
|
|
23565
|
+
'Number for the first item': 'Эхний зүйлийн дугаар'
|
|
23214
23566
|
});
|
|
23215
23567
|
|
|
23216
23568
|
|
|
@@ -23443,7 +23795,10 @@ function addClassNames(className, elm) {
|
|
|
23443
23795
|
Autoplay: 'Automatisch afspelen',
|
|
23444
23796
|
Loop: 'Herhalen',
|
|
23445
23797
|
Muted: 'Gedempt',
|
|
23446
|
-
Controls: 'Bedieningselementen'
|
|
23798
|
+
Controls: 'Bedieningselementen',
|
|
23799
|
+
'Start at...': 'Beginnen bij...',
|
|
23800
|
+
'Start numbering at': 'Nummering beginnen bij',
|
|
23801
|
+
'Number for the first item': 'Nummer van het eerste item'
|
|
23447
23802
|
});
|
|
23448
23803
|
|
|
23449
23804
|
|
|
@@ -23684,7 +24039,10 @@ function addClassNames(className, elm) {
|
|
|
23684
24039
|
Autoplay: 'Automatisk avspilling',
|
|
23685
24040
|
Loop: 'Gjenta',
|
|
23686
24041
|
Muted: 'Dempet',
|
|
23687
|
-
Controls: 'Kontroller'
|
|
24042
|
+
Controls: 'Kontroller',
|
|
24043
|
+
'Start at...': 'Start på...',
|
|
24044
|
+
'Start numbering at': 'Start nummereringen på',
|
|
24045
|
+
'Number for the first item': 'Nummer for første punkt'
|
|
23688
24046
|
});
|
|
23689
24047
|
|
|
23690
24048
|
|
|
@@ -23916,7 +24274,10 @@ function addClassNames(className, elm) {
|
|
|
23916
24274
|
Autoplay: 'Autoodtwarzanie',
|
|
23917
24275
|
Loop: 'Zapętlenie',
|
|
23918
24276
|
Muted: 'Wyciszony',
|
|
23919
|
-
Controls: 'Elementy sterujące'
|
|
24277
|
+
Controls: 'Elementy sterujące',
|
|
24278
|
+
'Start at...': 'Zacznij od...',
|
|
24279
|
+
'Start numbering at': 'Rozpocznij numerowanie od',
|
|
24280
|
+
'Number for the first item': 'Numer pierwszego elementu'
|
|
23920
24281
|
});
|
|
23921
24282
|
|
|
23922
24283
|
|
|
@@ -24153,7 +24514,10 @@ function addClassNames(className, elm) {
|
|
|
24153
24514
|
Autoplay: 'Reprodução automática',
|
|
24154
24515
|
Loop: 'Repetir',
|
|
24155
24516
|
Muted: 'Sem som',
|
|
24156
|
-
Controls: 'Controles'
|
|
24517
|
+
Controls: 'Controles',
|
|
24518
|
+
'Start at...': 'Começar em...',
|
|
24519
|
+
'Start numbering at': 'Começar a numeração em',
|
|
24520
|
+
'Number for the first item': 'Número do primeiro item'
|
|
24157
24521
|
});
|
|
24158
24522
|
|
|
24159
24523
|
|
|
@@ -24384,7 +24748,10 @@ function addClassNames(className, elm) {
|
|
|
24384
24748
|
Autoplay: 'Автовоспроизведение',
|
|
24385
24749
|
Loop: 'Повтор',
|
|
24386
24750
|
Muted: 'Без звука',
|
|
24387
|
-
Controls: 'Элементы управления'
|
|
24751
|
+
Controls: 'Элементы управления',
|
|
24752
|
+
'Start at...': 'Начать с...',
|
|
24753
|
+
'Start numbering at': 'Начать нумерацию с',
|
|
24754
|
+
'Number for the first item': 'Номер первого пункта'
|
|
24388
24755
|
});
|
|
24389
24756
|
|
|
24390
24757
|
|
|
@@ -24623,7 +24990,10 @@ function addClassNames(className, elm) {
|
|
|
24623
24990
|
Autoplay: 'Automatické prehrávanie',
|
|
24624
24991
|
Loop: 'Opakovať',
|
|
24625
24992
|
Muted: 'Stlmené',
|
|
24626
|
-
Controls: 'Ovládacie prvky'
|
|
24993
|
+
Controls: 'Ovládacie prvky',
|
|
24994
|
+
'Start at...': 'Začať od...',
|
|
24995
|
+
'Start numbering at': 'Začať číslovanie od',
|
|
24996
|
+
'Number for the first item': 'Číslo prvej položky'
|
|
24627
24997
|
});
|
|
24628
24998
|
|
|
24629
24999
|
|
|
@@ -24863,7 +25233,10 @@ function addClassNames(className, elm) {
|
|
|
24863
25233
|
Autoplay: 'Automatisk uppspelning',
|
|
24864
25234
|
Loop: 'Upprepa',
|
|
24865
25235
|
Muted: 'Ljudlös',
|
|
24866
|
-
Controls: 'Kontroller'
|
|
25236
|
+
Controls: 'Kontroller',
|
|
25237
|
+
'Start at...': 'Börja på...',
|
|
25238
|
+
'Start numbering at': 'Börja numreringen på',
|
|
25239
|
+
'Number for the first item': 'Nummer för första punkten'
|
|
24867
25240
|
});
|
|
24868
25241
|
|
|
24869
25242
|
|
|
@@ -25095,7 +25468,10 @@ function addClassNames(className, elm) {
|
|
|
25095
25468
|
Autoplay: 'Otomatik oynat',
|
|
25096
25469
|
Loop: 'Döngü',
|
|
25097
25470
|
Muted: 'Sessiz',
|
|
25098
|
-
Controls: 'Kontroller'
|
|
25471
|
+
Controls: 'Kontroller',
|
|
25472
|
+
'Start at...': 'Başlangıç numarası...',
|
|
25473
|
+
'Start numbering at': 'Numaralandırma başlangıcı',
|
|
25474
|
+
'Number for the first item': 'İlk öğenin numarası'
|
|
25099
25475
|
});
|
|
25100
25476
|
|
|
25101
25477
|
|
|
@@ -25326,7 +25702,10 @@ function addClassNames(className, elm) {
|
|
|
25326
25702
|
Autoplay: 'Автовідтворення',
|
|
25327
25703
|
Loop: 'Повтор',
|
|
25328
25704
|
Muted: 'Без звуку',
|
|
25329
|
-
Controls: 'Елементи керування'
|
|
25705
|
+
Controls: 'Елементи керування',
|
|
25706
|
+
'Start at...': 'Почати з...',
|
|
25707
|
+
'Start numbering at': 'Почати нумерацію з',
|
|
25708
|
+
'Number for the first item': 'Номер першого пункту'
|
|
25330
25709
|
});
|
|
25331
25710
|
|
|
25332
25711
|
|
|
@@ -25559,7 +25938,10 @@ function addClassNames(className, elm) {
|
|
|
25559
25938
|
Autoplay: '自动播放',
|
|
25560
25939
|
Loop: '循环播放',
|
|
25561
25940
|
Muted: '静音',
|
|
25562
|
-
Controls: '播放控件'
|
|
25941
|
+
Controls: '播放控件',
|
|
25942
|
+
'Start at...': '起始于...',
|
|
25943
|
+
'Start numbering at': '编号起始值',
|
|
25944
|
+
'Number for the first item': '第一项的编号'
|
|
25563
25945
|
});
|
|
25564
25946
|
|
|
25565
25947
|
|
|
@@ -25791,7 +26173,10 @@ function addClassNames(className, elm) {
|
|
|
25791
26173
|
Autoplay: '自動播放',
|
|
25792
26174
|
Loop: '循環播放',
|
|
25793
26175
|
Muted: '靜音',
|
|
25794
|
-
Controls: '播放控制項'
|
|
26176
|
+
Controls: '播放控制項',
|
|
26177
|
+
'Start at...': '起始於...',
|
|
26178
|
+
'Start numbering at': '編號起始值',
|
|
26179
|
+
'Number for the first item': '第一項的編號'
|
|
25795
26180
|
});
|
|
25796
26181
|
|
|
25797
26182
|
|
|
@@ -26351,7 +26736,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
26351
26736
|
}
|
|
26352
26737
|
}
|
|
26353
26738
|
__onResizerMouseDown(e) {
|
|
26354
|
-
var _a, _b
|
|
26739
|
+
var _a, _b;
|
|
26740
|
+
// As for the header: otherwise Safari selects the dialog's text as
|
|
26741
|
+
// the pointer moves
|
|
26742
|
+
if (e.cancelable) {
|
|
26743
|
+
e.preventDefault();
|
|
26744
|
+
}
|
|
26355
26745
|
this.resizable = true;
|
|
26356
26746
|
this.startX = e.clientX;
|
|
26357
26747
|
this.startY = e.clientY;
|
|
@@ -26363,8 +26753,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
26363
26753
|
// the content area does not shrink below its CSS `min-height`,
|
|
26364
26754
|
// so it is part of the smallest height the panel can take
|
|
26365
26755
|
const contentMinHeight = content ? parseFloat(this.ow.getComputedStyle(content).minHeight) || 0 : 0;
|
|
26366
|
-
this.minSize.w = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minWidth) ? this.o.minWidth : Math.max(100,
|
|
26367
|
-
this.minSize.h = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isNumber)(this.o.minHeight) ? this.o.minHeight : ((
|
|
26756
|
+
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);
|
|
26757
|
+
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;
|
|
26368
26758
|
this.lockSelect();
|
|
26369
26759
|
this.__addGlobalResizeListeners();
|
|
26370
26760
|
if (this.e) {
|
|
@@ -26373,13 +26763,25 @@ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
|
|
|
26373
26763
|
*/ this.e.fire(this, 'startResize');
|
|
26374
26764
|
}
|
|
26375
26765
|
}
|
|
26766
|
+
/**
|
|
26767
|
+
* The width `box` takes with its content on one line. The header and
|
|
26768
|
+
* footer are flex rows as wide as the dialog, so the footer's
|
|
26769
|
+
* `scrollWidth` was the dialog's width and kept it from getting any
|
|
26770
|
+
* narrower
|
|
26771
|
+
*/ __contentWidth(box) {
|
|
26772
|
+
const { width } = box.style;
|
|
26773
|
+
box.style.width = 'max-content';
|
|
26774
|
+
const contentWidth = box.offsetWidth;
|
|
26775
|
+
box.style.width = width;
|
|
26776
|
+
return contentWidth;
|
|
26777
|
+
}
|
|
26376
26778
|
__addGlobalResizeListeners() {
|
|
26377
26779
|
const self1 = this;
|
|
26378
26780
|
self1.e.on(self1.ow, 'pointermove touchmove', self1.__onMouseMove).on(self1.ow, 'pointerup touchend', self1.__onMouseUp);
|
|
26379
26781
|
}
|
|
26380
26782
|
__removeGlobalResizeListeners() {
|
|
26381
26783
|
const self1 = this;
|
|
26382
|
-
self1.e.off(self1.ow, '
|
|
26784
|
+
self1.e.off(self1.ow, 'pointermove touchmove', self1.__onMouseMove).off(self1.ow, 'pointerup touchend', self1.__onMouseUp);
|
|
26383
26785
|
}
|
|
26384
26786
|
/**
|
|
26385
26787
|
* Specifies the size of the window
|
|
@@ -29129,17 +29531,29 @@ const DEFAULT_SOURCE_NAME = 'default';
|
|
|
29129
29531
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29130
29532
|
/* harmony export */ FileBrowserFiles: function() { return /* binding */ FileBrowserFiles; }
|
|
29131
29533
|
/* harmony export */ });
|
|
29132
|
-
/* harmony import */ var
|
|
29534
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
|
|
29535
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67510);
|
|
29133
29536
|
/*!
|
|
29134
29537
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29135
29538
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29136
29539
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
29137
|
-
*/
|
|
29138
|
-
|
|
29540
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
29541
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29542
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
29543
|
+
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;
|
|
29544
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29545
|
+
};
|
|
29546
|
+
|
|
29547
|
+
|
|
29548
|
+
let FileBrowserFiles = class FileBrowserFiles extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__.UIGroup {
|
|
29139
29549
|
className() {
|
|
29140
29550
|
return 'FileBrowserFiles';
|
|
29141
29551
|
}
|
|
29142
|
-
}
|
|
29552
|
+
};
|
|
29553
|
+
FileBrowserFiles = __decorate([
|
|
29554
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
29555
|
+
], FileBrowserFiles);
|
|
29556
|
+
|
|
29143
29557
|
|
|
29144
29558
|
|
|
29145
29559
|
/***/ }),
|
|
@@ -29171,17 +29585,29 @@ class FileBrowserFiles extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_0__.UI
|
|
|
29171
29585
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29172
29586
|
/* harmony export */ FileBrowserTree: function() { return /* binding */ FileBrowserTree; }
|
|
29173
29587
|
/* harmony export */ });
|
|
29174
|
-
/* harmony import */ var
|
|
29588
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
|
|
29589
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67510);
|
|
29175
29590
|
/*!
|
|
29176
29591
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29177
29592
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29178
29593
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
29179
|
-
*/
|
|
29180
|
-
|
|
29594
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
29595
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29596
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
29597
|
+
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;
|
|
29598
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29599
|
+
};
|
|
29600
|
+
|
|
29601
|
+
|
|
29602
|
+
let FileBrowserTree = class FileBrowserTree extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_1__.UIGroup {
|
|
29181
29603
|
className() {
|
|
29182
29604
|
return 'FileBrowserTree';
|
|
29183
29605
|
}
|
|
29184
|
-
}
|
|
29606
|
+
};
|
|
29607
|
+
FileBrowserTree = __decorate([
|
|
29608
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
29609
|
+
], FileBrowserTree);
|
|
29610
|
+
|
|
29185
29611
|
|
|
29186
29612
|
|
|
29187
29613
|
/***/ }),
|
|
@@ -30859,23 +31285,15 @@ StatusBar = __decorate([
|
|
|
30859
31285
|
/* harmony export */ });
|
|
30860
31286
|
/* harmony import */ var _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91907);
|
|
30861
31287
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82758);
|
|
30862
|
-
/* harmony import */ var
|
|
30863
|
-
/* harmony import */ var
|
|
30864
|
-
/* harmony import */ var
|
|
30865
|
-
/* harmony import */ var
|
|
30866
|
-
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
31288
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
31289
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
31290
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
31291
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
30867
31292
|
/*!
|
|
30868
31293
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
30869
31294
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
30870
31295
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
30871
|
-
*/
|
|
30872
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
30873
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30874
|
-
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;
|
|
30875
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30876
|
-
};
|
|
30877
|
-
|
|
30878
|
-
|
|
31296
|
+
*/
|
|
30879
31297
|
|
|
30880
31298
|
|
|
30881
31299
|
|
|
@@ -30886,19 +31304,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30886
31304
|
/** @override */ className() {
|
|
30887
31305
|
return 'Table';
|
|
30888
31306
|
}
|
|
30889
|
-
__recalculateStyles() {
|
|
30890
|
-
const style = (0,_core_global_js__WEBPACK_IMPORTED_MODULE_4__.getContainer)(this.j, Table, 'style', true);
|
|
30891
|
-
const selectors = [];
|
|
30892
|
-
this.selected.forEach((td)=>{
|
|
30893
|
-
const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
|
|
30894
|
-
selector && selectors.push(selector);
|
|
30895
|
-
});
|
|
30896
|
-
style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
|
|
30897
|
-
}
|
|
30898
31307
|
addSelection(td) {
|
|
30899
31308
|
this.selected.add(td);
|
|
30900
31309
|
this.__recalculateStyles();
|
|
30901
|
-
const table =
|
|
31310
|
+
const table = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', this.j.editor);
|
|
30902
31311
|
if (table) {
|
|
30903
31312
|
const cells = Table.__selectedByTable.get(table) || new Set();
|
|
30904
31313
|
cells.add(td);
|
|
@@ -30908,7 +31317,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30908
31317
|
removeSelection(td) {
|
|
30909
31318
|
this.selected.delete(td);
|
|
30910
31319
|
this.__recalculateStyles();
|
|
30911
|
-
const table =
|
|
31320
|
+
const table = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', this.j.editor);
|
|
30912
31321
|
if (table) {
|
|
30913
31322
|
const cells = Table.__selectedByTable.get(table);
|
|
30914
31323
|
if (cells) {
|
|
@@ -30922,11 +31331,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30922
31331
|
/**
|
|
30923
31332
|
* Returns array of selected cells
|
|
30924
31333
|
*/ getAllSelectedCells() {
|
|
30925
|
-
return (0,
|
|
31334
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(this.selected);
|
|
30926
31335
|
}
|
|
30927
31336
|
static __getSelectedCellsByTable(table) {
|
|
30928
31337
|
const cells = Table.__selectedByTable.get(table);
|
|
30929
|
-
return cells ? (0,
|
|
31338
|
+
return cells ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(cells) : [];
|
|
30930
31339
|
}
|
|
30931
31340
|
/** @override **/ destruct() {
|
|
30932
31341
|
this.selected.clear();
|
|
@@ -30953,7 +31362,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30953
31362
|
const matrix = [
|
|
30954
31363
|
[]
|
|
30955
31364
|
];
|
|
30956
|
-
const rows = (0,
|
|
31365
|
+
const rows = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
30957
31366
|
const setCell = (cell, i)=>{
|
|
30958
31367
|
if (matrix[i] === undefined) {
|
|
30959
31368
|
matrix[i] = [];
|
|
@@ -30976,7 +31385,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
30976
31385
|
}
|
|
30977
31386
|
};
|
|
30978
31387
|
for(let i = 0; i < rows.length; i += 1){
|
|
30979
|
-
const cells = (0,
|
|
31388
|
+
const cells = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(rows[i].cells);
|
|
30980
31389
|
for(let j = 0; j < cells.length; j += 1){
|
|
30981
31390
|
if (setCell(cells[j], i) === false) {
|
|
30982
31391
|
return matrix;
|
|
@@ -31026,34 +31435,34 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31026
31435
|
row = create.element('tr');
|
|
31027
31436
|
for(let j = 0; j < columnsCount; j += 1){
|
|
31028
31437
|
const cell = create.element('td');
|
|
31029
|
-
|
|
31030
|
-
|
|
31438
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, create.element('br'));
|
|
31439
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(row, cell);
|
|
31031
31440
|
}
|
|
31032
31441
|
} else {
|
|
31033
31442
|
row = line.cloneNode(true);
|
|
31034
|
-
|
|
31035
|
-
if (!
|
|
31443
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(line, (cell)=>{
|
|
31444
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(cell)) {
|
|
31036
31445
|
return;
|
|
31037
31446
|
}
|
|
31038
|
-
const rowspan = (0,
|
|
31447
|
+
const rowspan = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan');
|
|
31039
31448
|
if (rowspan && parseInt(rowspan, 10) > 1) {
|
|
31040
31449
|
const newRowSpan = parseInt(rowspan, 10) - 1;
|
|
31041
|
-
(0,
|
|
31450
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', newRowSpan > 1 ? newRowSpan : null);
|
|
31042
31451
|
}
|
|
31043
31452
|
});
|
|
31044
|
-
|
|
31045
|
-
if (
|
|
31046
|
-
|
|
31047
|
-
|
|
31453
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(row, (cell)=>{
|
|
31454
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(cell)) {
|
|
31455
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(cell);
|
|
31456
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, create.element('br'));
|
|
31048
31457
|
}
|
|
31049
31458
|
});
|
|
31050
31459
|
}
|
|
31051
31460
|
if (after && line && line.nextSibling) {
|
|
31052
|
-
|
|
31461
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
|
|
31053
31462
|
} else if (!after && line) {
|
|
31054
|
-
|
|
31463
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
|
|
31055
31464
|
} else {
|
|
31056
|
-
|
|
31465
|
+
_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);
|
|
31057
31466
|
}
|
|
31058
31467
|
}
|
|
31059
31468
|
/**
|
|
@@ -31081,7 +31490,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31081
31490
|
while(box[rowIndex + 1][nextCell] === cell){
|
|
31082
31491
|
nextCell += 1;
|
|
31083
31492
|
}
|
|
31084
|
-
const nextRow =
|
|
31493
|
+
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);
|
|
31085
31494
|
if (nextRow) {
|
|
31086
31495
|
// `box[rowIndex + 1][nextCell]` is the cell that
|
|
31087
31496
|
// logically follows the moved cell in the next row, but
|
|
@@ -31098,21 +31507,21 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31098
31507
|
}
|
|
31099
31508
|
}
|
|
31100
31509
|
if (referenceCell) {
|
|
31101
|
-
|
|
31510
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(referenceCell, cell);
|
|
31102
31511
|
} else {
|
|
31103
|
-
|
|
31512
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(nextRow, cell);
|
|
31104
31513
|
}
|
|
31105
31514
|
}
|
|
31106
31515
|
}
|
|
31107
31516
|
} else {
|
|
31108
|
-
|
|
31517
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(cell);
|
|
31109
31518
|
}
|
|
31110
31519
|
if (dec && (cell.parentNode === row || cell !== box[rowIndex][j - 1])) {
|
|
31111
31520
|
const rowSpan = cell.rowSpan;
|
|
31112
|
-
(0,
|
|
31521
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
|
|
31113
31522
|
}
|
|
31114
31523
|
});
|
|
31115
|
-
|
|
31524
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
|
|
31116
31525
|
}
|
|
31117
31526
|
/**
|
|
31118
31527
|
* Remove row
|
|
@@ -31123,7 +31532,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31123
31532
|
* Insert column before / after all the columns containing the selected cells
|
|
31124
31533
|
*/ appendColumn(table, selectedCell, insertAfter = true) {
|
|
31125
31534
|
const box = Table.__formalMatrix(table);
|
|
31126
|
-
if (!insertAfter &&
|
|
31535
|
+
if (!insertAfter && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell(selectedCell.previousElementSibling)) {
|
|
31127
31536
|
return this.appendColumn(table, selectedCell.previousElementSibling, true);
|
|
31128
31537
|
}
|
|
31129
31538
|
const [, formalCol] = Table.__formalCoordinate(table, selectedCell, insertAfter);
|
|
@@ -31133,11 +31542,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31133
31542
|
const cells = box[i];
|
|
31134
31543
|
if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
|
|
31135
31544
|
const cell = this.j.createInside.element('td');
|
|
31136
|
-
|
|
31545
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, this.j.createInside.element('br'));
|
|
31137
31546
|
if (insertAfter) {
|
|
31138
|
-
|
|
31547
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(cells[columnIndex], cell);
|
|
31139
31548
|
} else {
|
|
31140
|
-
|
|
31549
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(cells[columnIndex], cell);
|
|
31141
31550
|
}
|
|
31142
31551
|
if (cells[columnIndex].rowSpan > 1) {
|
|
31143
31552
|
cell.rowSpan = cells[columnIndex].rowSpan;
|
|
@@ -31159,11 +31568,11 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31159
31568
|
} else if (j + 1 < cells.length && box[i][j + 1] === td) {
|
|
31160
31569
|
dec = true;
|
|
31161
31570
|
} else {
|
|
31162
|
-
|
|
31571
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(td);
|
|
31163
31572
|
}
|
|
31164
31573
|
if (dec && (i - 1 < 0 || td !== box[i - 1][j])) {
|
|
31165
31574
|
const colSpan = td.colSpan;
|
|
31166
|
-
(0,
|
|
31575
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'colspan', colSpan - 1 > 1 ? (colSpan - 1).toString() : null);
|
|
31167
31576
|
}
|
|
31168
31577
|
});
|
|
31169
31578
|
}
|
|
@@ -31240,13 +31649,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31240
31649
|
continue; // broken table
|
|
31241
31650
|
}
|
|
31242
31651
|
if (box[i][j].hasAttribute('rowspan') && box[i][j].rowSpan === 1) {
|
|
31243
|
-
(0,
|
|
31652
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'rowspan', null);
|
|
31244
31653
|
}
|
|
31245
31654
|
if (box[i][j].hasAttribute('colspan') && box[i][j].colSpan === 1) {
|
|
31246
|
-
(0,
|
|
31655
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'colspan', null);
|
|
31247
31656
|
}
|
|
31248
|
-
if (box[i][j].hasAttribute('class') && !(0,
|
|
31249
|
-
(0,
|
|
31657
|
+
if (box[i][j].hasAttribute('class') && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'class')) {
|
|
31658
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(box[i][j], 'class', null);
|
|
31250
31659
|
}
|
|
31251
31660
|
}
|
|
31252
31661
|
}
|
|
@@ -31320,10 +31729,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31320
31729
|
return;
|
|
31321
31730
|
}
|
|
31322
31731
|
alreadyMerged.add(td);
|
|
31323
|
-
if (i === bound[0][0] && (0,
|
|
31732
|
+
if (i === bound[0][0] && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(td, 'width')) {
|
|
31324
31733
|
w += td.offsetWidth;
|
|
31325
31734
|
}
|
|
31326
|
-
if ((0,
|
|
31735
|
+
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.trim)(cell.innerHTML.replace(/<br(\/)?>/g, '')) !== '') {
|
|
31327
31736
|
html.push(cell.innerHTML);
|
|
31328
31737
|
}
|
|
31329
31738
|
if (cs > 1) {
|
|
@@ -31362,9 +31771,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31362
31771
|
alreadyMerged.delete(first);
|
|
31363
31772
|
Table.__unmark(__marked);
|
|
31364
31773
|
Table.__normalizeTable(table);
|
|
31365
|
-
(0,
|
|
31774
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).forEach((tr)=>{
|
|
31366
31775
|
if (!tr.cells.length) {
|
|
31367
|
-
|
|
31776
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tr);
|
|
31368
31777
|
}
|
|
31369
31778
|
});
|
|
31370
31779
|
}
|
|
@@ -31380,7 +31789,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31380
31789
|
const __marked = [];
|
|
31381
31790
|
Table.__getSelectedCellsByTable(table).forEach((cell)=>{
|
|
31382
31791
|
td = jodit.createInside.element('td');
|
|
31383
|
-
|
|
31792
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, jodit.createInside.element('br'));
|
|
31384
31793
|
tr = jodit.createInside.element('tr');
|
|
31385
31794
|
coord = Table.__formalCoordinate(table, cell);
|
|
31386
31795
|
if (cell.rowSpan < 2) {
|
|
@@ -31389,8 +31798,8 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31389
31798
|
Table.__mark(tdElm, 'rowspan', tdElm.rowSpan + 1, __marked);
|
|
31390
31799
|
}
|
|
31391
31800
|
});
|
|
31392
|
-
|
|
31393
|
-
|
|
31801
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(cell, 'tr', table), tr);
|
|
31802
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(tr, td);
|
|
31394
31803
|
} else {
|
|
31395
31804
|
Table.__mark(cell, 'rowspan', cell.rowSpan - 1, __marked);
|
|
31396
31805
|
Table.__formalMatrix(table, (tdElm, i, j)=>{
|
|
@@ -31402,9 +31811,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31402
31811
|
}
|
|
31403
31812
|
});
|
|
31404
31813
|
if (after) {
|
|
31405
|
-
|
|
31814
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(after, td);
|
|
31406
31815
|
} else {
|
|
31407
|
-
|
|
31816
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prepend(parent, td);
|
|
31408
31817
|
}
|
|
31409
31818
|
}
|
|
31410
31819
|
if (cell.colSpan > 1) {
|
|
@@ -31435,12 +31844,12 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31435
31844
|
Table.__mark(cell, 'colspan', cell.colSpan - 1, __marked);
|
|
31436
31845
|
}
|
|
31437
31846
|
td = jodit.createInside.element('td');
|
|
31438
|
-
|
|
31847
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, jodit.createInside.element('br'));
|
|
31439
31848
|
if (cell.rowSpan > 1) {
|
|
31440
31849
|
Table.__mark(td, 'rowspan', cell.rowSpan, __marked);
|
|
31441
31850
|
}
|
|
31442
31851
|
const oldWidth = cell.offsetWidth; // get old width
|
|
31443
|
-
|
|
31852
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(cell, td);
|
|
31444
31853
|
percentage = oldWidth / table.offsetWidth / 2;
|
|
31445
31854
|
Table.__mark(cell, 'width', (percentage * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.ACCURACY) + '%', __marked);
|
|
31446
31855
|
Table.__mark(td, 'width', (percentage * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.ACCURACY) + '%', __marked);
|
|
@@ -31496,22 +31905,22 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31496
31905
|
const value = dict[key];
|
|
31497
31906
|
switch(key){
|
|
31498
31907
|
case 'remove':
|
|
31499
|
-
|
|
31908
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(cell);
|
|
31500
31909
|
break;
|
|
31501
31910
|
case 'rowspan':
|
|
31502
|
-
(0,
|
|
31911
|
+
(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);
|
|
31503
31912
|
break;
|
|
31504
31913
|
case 'colspan':
|
|
31505
|
-
(0,
|
|
31914
|
+
(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);
|
|
31506
31915
|
break;
|
|
31507
31916
|
case 'width':
|
|
31508
31917
|
if (value == null) {
|
|
31509
31918
|
cell.style.removeProperty('width');
|
|
31510
|
-
if (!(0,
|
|
31511
|
-
(0,
|
|
31919
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'style')) {
|
|
31920
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'style', null);
|
|
31512
31921
|
}
|
|
31513
31922
|
} else {
|
|
31514
|
-
(0,
|
|
31923
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(cell, 'width', value.toString());
|
|
31515
31924
|
}
|
|
31516
31925
|
break;
|
|
31517
31926
|
}
|
|
@@ -31524,12 +31933,23 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31524
31933
|
constructor(){
|
|
31525
31934
|
super(...arguments);
|
|
31526
31935
|
this.selected = new Set();
|
|
31936
|
+
/**
|
|
31937
|
+
* Rewrite the `<style>` that marks the selected cells once for all the
|
|
31938
|
+
* cells (un)selected in one go: a drag over a block of cells unmarks and
|
|
31939
|
+
* marks every one of them on each move. `@debounce()` was never applied,
|
|
31940
|
+
* as a Table never reaches `ready`
|
|
31941
|
+
*/ this.__recalculateStyles = this.async.microDebounce(()=>{
|
|
31942
|
+
const style = (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(this.j, Table, 'style', true);
|
|
31943
|
+
const selectors = [];
|
|
31944
|
+
this.selected.forEach((td)=>{
|
|
31945
|
+
const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
|
|
31946
|
+
selector && selectors.push(selector);
|
|
31947
|
+
});
|
|
31948
|
+
style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
|
|
31949
|
+
});
|
|
31527
31950
|
}
|
|
31528
31951
|
}
|
|
31529
31952
|
Table.__selectedByTable = new WeakMap();
|
|
31530
|
-
__decorate([
|
|
31531
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.debounce)()
|
|
31532
|
-
], Table.prototype, "__recalculateStyles", null);
|
|
31533
31953
|
const instance = (j)=>j.getInstance('Table', j.o);
|
|
31534
31954
|
|
|
31535
31955
|
|
|
@@ -34993,6 +35413,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34993
35413
|
mainClosestBox = nextBox;
|
|
34994
35414
|
}
|
|
34995
35415
|
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)) {
|
|
35416
|
+
// A table cell is never joined with its neighbour
|
|
35417
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, mainClosestBox, true)) {
|
|
35418
|
+
return false;
|
|
35419
|
+
}
|
|
34996
35420
|
const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(mainClosestBox, backspace);
|
|
34997
35421
|
// A line break before the cursor is a single unit: remove it instead of
|
|
34998
35422
|
// merging the current element into the (void) `<br>`, which used to move
|
|
@@ -35002,13 +35426,48 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
35002
35426
|
jodit.s.setCursorBefore(fakeNode);
|
|
35003
35427
|
return true;
|
|
35004
35428
|
}
|
|
35005
|
-
|
|
35429
|
+
// Backspace leaves a block after a table alone, as Word does, rather
|
|
35430
|
+
// than moving its text into the last cell
|
|
35431
|
+
if (backspace && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, 'table')) {
|
|
35432
|
+
jodit.s.setCursorBefore(fakeNode);
|
|
35433
|
+
return true;
|
|
35434
|
+
}
|
|
35435
|
+
const box = findCaretBox(fakeNode, mainClosestBox);
|
|
35436
|
+
if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
|
|
35006
35437
|
jodit.s.setCursorBefore(fakeNode);
|
|
35007
35438
|
return true;
|
|
35008
35439
|
}
|
|
35009
35440
|
}
|
|
35010
35441
|
return false;
|
|
35011
35442
|
}
|
|
35443
|
+
/**
|
|
35444
|
+
* The block holding the caret inside the box that has the sibling, so
|
|
35445
|
+
* `<p>one</p><div><p>|two</p></div>` joins the two paragraphs instead of
|
|
35446
|
+
* moving the whole `<div>` into the first one. For a list item that is its
|
|
35447
|
+
* list, which the list cases handle.
|
|
35448
|
+
*/ function findCaretBox(fakeNode, mainClosestBox) {
|
|
35449
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, mainClosestBox);
|
|
35450
|
+
if (!block) {
|
|
35451
|
+
return mainClosestBox;
|
|
35452
|
+
}
|
|
35453
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(block) && block.parentElement ? block.parentElement : block;
|
|
35454
|
+
}
|
|
35455
|
+
/**
|
|
35456
|
+
* The innermost block on the sibling's edge facing the caret, so the
|
|
35457
|
+
* content is joined to text: `<div><p>one</p></div><p>|two</p>` gives
|
|
35458
|
+
* `<div><p>one|two</p></div>`
|
|
35459
|
+
*/ function findEdgeBlock(sibling, backspace, root) {
|
|
35460
|
+
let block = sibling;
|
|
35461
|
+
while(block){
|
|
35462
|
+
const edge = backspace ? block.lastChild : block.firstChild;
|
|
35463
|
+
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;
|
|
35464
|
+
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)) {
|
|
35465
|
+
return block;
|
|
35466
|
+
}
|
|
35467
|
+
block = child;
|
|
35468
|
+
}
|
|
35469
|
+
return block;
|
|
35470
|
+
}
|
|
35012
35471
|
/**
|
|
35013
35472
|
* Content cannot be merged into the `<table>` element itself — it would land
|
|
35014
35473
|
* between the table sections (after `</tbody>`), which is invalid HTML and
|
|
@@ -35025,6 +35484,40 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
35025
35484
|
});
|
|
35026
35485
|
return cells.length ? cells[backspace ? cells.length - 1 : 0] : null;
|
|
35027
35486
|
}
|
|
35487
|
+
/**
|
|
35488
|
+
* Delete at the edge of a list pulls the next line up to the caret, as the
|
|
35489
|
+
* browsers do, instead of moving the caret's line into the next block:
|
|
35490
|
+
* `<ul><li>one|</li></ul><p>two</p>` gives `<ul><li>one|two</li></ul>`, and
|
|
35491
|
+
* `<p>one|</p><ul><li>two</li></ul>` gives `<p>one|two</p>`
|
|
35492
|
+
* @private
|
|
35493
|
+
*/ function checkPullNextLine(jodit, fakeNode, box, sibling, backspace) {
|
|
35494
|
+
if (backspace || !(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(box) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(sibling))) {
|
|
35495
|
+
return false;
|
|
35496
|
+
}
|
|
35497
|
+
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);
|
|
35498
|
+
const source = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(sibling) ? sibling.firstElementChild : sibling;
|
|
35499
|
+
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')) {
|
|
35500
|
+
return false;
|
|
35501
|
+
}
|
|
35502
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(source)) {
|
|
35503
|
+
const line = [];
|
|
35504
|
+
for(let node = source.firstChild; node && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node); node = node.nextSibling){
|
|
35505
|
+
line.push(node);
|
|
35506
|
+
}
|
|
35507
|
+
if (!line.length) {
|
|
35508
|
+
return false;
|
|
35509
|
+
}
|
|
35510
|
+
const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
35511
|
+
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));
|
|
35512
|
+
}
|
|
35513
|
+
let remove = source;
|
|
35514
|
+
while(remove && remove !== jodit.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(remove)){
|
|
35515
|
+
const parent = remove.parentElement;
|
|
35516
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(remove);
|
|
35517
|
+
remove = parent;
|
|
35518
|
+
}
|
|
35519
|
+
return true;
|
|
35520
|
+
}
|
|
35028
35521
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
35029
35522
|
// Process UL/LI/OL cases
|
|
35030
35523
|
const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -35166,9 +35659,10 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
35166
35659
|
* ```html
|
|
35167
35660
|
* t|st
|
|
35168
35661
|
* ```
|
|
35662
|
+
* With `stopBeforeSpace`, nothing is removed when the next char is a space.
|
|
35169
35663
|
* @private
|
|
35170
35664
|
*/ // eslint-disable-next-line complexity
|
|
35171
|
-
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
35665
|
+
function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = false) {
|
|
35172
35666
|
var _a, _b;
|
|
35173
35667
|
const step = backspace ? -1 : 1;
|
|
35174
35668
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.sibling(fakeNode, !backspace);
|
|
@@ -35187,6 +35681,9 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
35187
35681
|
break;
|
|
35188
35682
|
}
|
|
35189
35683
|
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
35684
|
+
if (stopBeforeSpace && isSpace(nextChar(sibling.nodeValue, backspace))) {
|
|
35685
|
+
break;
|
|
35686
|
+
}
|
|
35190
35687
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
35191
35688
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(sibling.parentNode)) {
|
|
35192
35689
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
@@ -35294,10 +35791,26 @@ function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
|
35294
35791
|
}
|
|
35295
35792
|
function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
|
|
35296
35793
|
;(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);
|
|
35297
|
-
|
|
35298
|
-
|
|
35794
|
+
const wordChar = mode === 'word' && !isSpace(removed);
|
|
35795
|
+
// Backspace by word removes the spaces before the caret, then the word, and keeps the space in front of it
|
|
35796
|
+
if (mode === 'sentence' || wordChar || mode === 'word' && backspace) {
|
|
35797
|
+
checkRemoveChar(jodit, fakeNode, backspace, mode, wordChar && backspace);
|
|
35299
35798
|
}
|
|
35300
35799
|
}
|
|
35800
|
+
/**
|
|
35801
|
+
* The char tryRemoveChar would remove next
|
|
35802
|
+
*/ function nextChar(value, backspace) {
|
|
35803
|
+
const chars = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(value);
|
|
35804
|
+
const step = backspace ? -1 : 1;
|
|
35805
|
+
let index = backspace ? chars.length - 1 : 0;
|
|
35806
|
+
while(chars[index] === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE){
|
|
35807
|
+
index += step;
|
|
35808
|
+
}
|
|
35809
|
+
return chars[index];
|
|
35810
|
+
}
|
|
35811
|
+
function isSpace(char) {
|
|
35812
|
+
return char === ' ' || char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
35813
|
+
}
|
|
35301
35814
|
|
|
35302
35815
|
|
|
35303
35816
|
/***/ }),
|
|
@@ -35659,7 +36172,8 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
35659
36172
|
/***/ 32496:
|
|
35660
36173
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
35661
36174
|
|
|
35662
|
-
/* harmony import */ var
|
|
36175
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
36176
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6441);
|
|
35663
36177
|
/*!
|
|
35664
36178
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35665
36179
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35667,13 +36181,18 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
35667
36181
|
*/ /**
|
|
35668
36182
|
* @module plugins/backspace
|
|
35669
36183
|
*/
|
|
35670
|
-
|
|
36184
|
+
|
|
36185
|
+
_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
|
|
35671
36186
|
hotkeys: {
|
|
35672
|
-
delete: [
|
|
36187
|
+
delete: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
|
|
36188
|
+
'delete'
|
|
36189
|
+
] : [
|
|
35673
36190
|
'delete',
|
|
35674
36191
|
'cmd+backspace'
|
|
35675
36192
|
],
|
|
35676
|
-
deleteWord: [
|
|
36193
|
+
deleteWord: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [
|
|
36194
|
+
'ctrl+delete'
|
|
36195
|
+
] : [
|
|
35677
36196
|
'ctrl+delete',
|
|
35678
36197
|
'cmd+alt+backspace',
|
|
35679
36198
|
'ctrl+alt+backspace'
|
|
@@ -35685,7 +36204,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.delete = {
|
|
|
35685
36204
|
backspace: [
|
|
35686
36205
|
'backspace'
|
|
35687
36206
|
],
|
|
35688
|
-
backspaceWord: [
|
|
36207
|
+
backspaceWord: _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_MAC ? [] : [
|
|
35689
36208
|
'ctrl+backspace'
|
|
35690
36209
|
],
|
|
35691
36210
|
backspaceSentence: [
|
|
@@ -36154,6 +36673,19 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
|
|
|
36154
36673
|
this.walker.setWork(editor.editor);
|
|
36155
36674
|
this.currentSelectionNode = editor.s.current();
|
|
36156
36675
|
}
|
|
36676
|
+
/**
|
|
36677
|
+
* Typing into an empty block (`<p><br></p>`) replaces its `<br>`, but the
|
|
36678
|
+
* browser keeps the `<br>` when the caret is in an invisible-space text
|
|
36679
|
+
* node in front of it, as Jodit leaves the caret in many of the empty
|
|
36680
|
+
* blocks it makes (a cleared editor, a heading in an empty table cell).
|
|
36681
|
+
* See #1632
|
|
36682
|
+
*/ onInputRemovePlaceholderBr(event) {
|
|
36683
|
+
var _a;
|
|
36684
|
+
if (!this.isEditMode || event.type === 'input' && (event.isComposing || !((_a = event.inputType) === null || _a === void 0 ? void 0 : _a.startsWith('insert')))) {
|
|
36685
|
+
return;
|
|
36686
|
+
}
|
|
36687
|
+
;(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removePlaceholderBr)(this.j);
|
|
36688
|
+
}
|
|
36157
36689
|
startWalker() {
|
|
36158
36690
|
const { jodit } = this;
|
|
36159
36691
|
const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.allowTags);
|
|
@@ -36326,6 +36858,12 @@ __decorate([
|
|
|
36326
36858
|
':keydown'
|
|
36327
36859
|
])
|
|
36328
36860
|
], cleanHtml.prototype, "onChangeCleanHTML", null);
|
|
36861
|
+
__decorate([
|
|
36862
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)([
|
|
36863
|
+
':input',
|
|
36864
|
+
'jodit.editor:compositionend'
|
|
36865
|
+
])
|
|
36866
|
+
], cleanHtml.prototype, "onInputRemovePlaceholderBr", null);
|
|
36329
36867
|
__decorate([
|
|
36330
36868
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.hook)('ready')
|
|
36331
36869
|
], cleanHtml.prototype, "startWalker", null);
|
|
@@ -36457,12 +36995,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
36457
36995
|
/* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
|
|
36458
36996
|
/* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
|
|
36459
36997
|
/* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
|
|
36460
|
-
/* harmony export */
|
|
36998
|
+
/* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
|
|
36999
|
+
/* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__.visitNodeWalker; }
|
|
36461
37000
|
/* harmony export */ });
|
|
36462
37001
|
/* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
|
|
36463
37002
|
/* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
|
|
36464
37003
|
/* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
|
|
36465
|
-
/* harmony import */ var
|
|
37004
|
+
/* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
|
|
37005
|
+
/* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39516);
|
|
36466
37006
|
/*!
|
|
36467
37007
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
36468
37008
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -36476,6 +37016,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
36476
37016
|
|
|
36477
37017
|
|
|
36478
37018
|
|
|
37019
|
+
|
|
36479
37020
|
/***/ }),
|
|
36480
37021
|
|
|
36481
37022
|
/***/ 15908:
|
|
@@ -36628,6 +37169,62 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
|
36628
37169
|
}
|
|
36629
37170
|
|
|
36630
37171
|
|
|
37172
|
+
/***/ }),
|
|
37173
|
+
|
|
37174
|
+
/***/ 56385:
|
|
37175
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37176
|
+
|
|
37177
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37178
|
+
/* harmony export */ removePlaceholderBr: function() { return /* binding */ removePlaceholderBr; }
|
|
37179
|
+
/* harmony export */ });
|
|
37180
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
37181
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
37182
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
37183
|
+
/*!
|
|
37184
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37185
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
37186
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
37187
|
+
*/
|
|
37188
|
+
|
|
37189
|
+
|
|
37190
|
+
function lastNode(node) {
|
|
37191
|
+
let last = node.lastChild;
|
|
37192
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(last) && !last.nodeValue){
|
|
37193
|
+
last = last.previousSibling;
|
|
37194
|
+
}
|
|
37195
|
+
return last;
|
|
37196
|
+
}
|
|
37197
|
+
/**
|
|
37198
|
+
* Remove the `<br>` that kept the block with the caret open while it was
|
|
37199
|
+
* empty, once text has gone into the block: when the block is one line of
|
|
37200
|
+
* text that ends in that `<br>`, the `<br>` adds nothing to it
|
|
37201
|
+
* @private
|
|
37202
|
+
*/ function removePlaceholderBr(jodit) {
|
|
37203
|
+
var _a;
|
|
37204
|
+
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);
|
|
37205
|
+
if (!block || !(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)((_a = block.textContent) !== null && _a !== void 0 ? _a : '')) {
|
|
37206
|
+
return;
|
|
37207
|
+
}
|
|
37208
|
+
let br = lastNode(block);
|
|
37209
|
+
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)){
|
|
37210
|
+
br = lastNode(br);
|
|
37211
|
+
}
|
|
37212
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(br, 'br')) {
|
|
37213
|
+
return;
|
|
37214
|
+
}
|
|
37215
|
+
// Another line break, a block, an image or an embed means the `<br>` may
|
|
37216
|
+
// end an empty line, or give the caret a place after the embed
|
|
37217
|
+
const isOneLineOfText = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
|
|
37218
|
+
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)) {
|
|
37219
|
+
return false;
|
|
37220
|
+
}
|
|
37221
|
+
});
|
|
37222
|
+
if (isOneLineOfText) {
|
|
37223
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(br);
|
|
37224
|
+
}
|
|
37225
|
+
}
|
|
37226
|
+
|
|
37227
|
+
|
|
36631
37228
|
/***/ }),
|
|
36632
37229
|
|
|
36633
37230
|
/***/ 82558:
|
|
@@ -38269,6 +38866,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
38269
38866
|
}
|
|
38270
38867
|
jodit.s.expandSelection();
|
|
38271
38868
|
const range = jodit.s.range;
|
|
38869
|
+
const caret = this.__clearSelectedCells(range);
|
|
38870
|
+
if (caret && range.collapsed) {
|
|
38871
|
+
jodit.s.selectRange(caret);
|
|
38872
|
+
return false;
|
|
38873
|
+
}
|
|
38272
38874
|
range.deleteContents();
|
|
38273
38875
|
const fake = jodit.createInside.fake();
|
|
38274
38876
|
range.insertNode(fake);
|
|
@@ -38278,21 +38880,98 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
38278
38880
|
range.setStartBefore(fake);
|
|
38279
38881
|
range.collapse(true);
|
|
38280
38882
|
this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
|
|
38281
|
-
this.__addBrInEmptyBlock(fake,
|
|
38883
|
+
this.__addBrInEmptyBlock(fake, range);
|
|
38282
38884
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
|
|
38283
|
-
jodit.s.selectRange(range);
|
|
38885
|
+
jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
|
|
38284
38886
|
return false;
|
|
38285
38887
|
}
|
|
38888
|
+
/**
|
|
38889
|
+
* A selection that starts or ends in a table cell clears the selected part
|
|
38890
|
+
* of each cell it covers and keeps the cells, as the browsers do.
|
|
38891
|
+
* `deleteContents` would remove the cells it fully covers, and the cells
|
|
38892
|
+
* it cuts would then be merged as blocks. The range is moved out of those
|
|
38893
|
+
* tables, so only the content between them is left to delete.
|
|
38894
|
+
*
|
|
38895
|
+
* Returns where the caret goes, or null when no table is involved
|
|
38896
|
+
*/ __clearSelectedCells(range) {
|
|
38897
|
+
const { editor, createInside } = this.j;
|
|
38898
|
+
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);
|
|
38899
|
+
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);
|
|
38900
|
+
if (startCell === endCell) {
|
|
38901
|
+
return null;
|
|
38902
|
+
}
|
|
38903
|
+
const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(startCell, 'table', editor);
|
|
38904
|
+
const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(endCell, 'table', editor);
|
|
38905
|
+
const caret = range.cloneRange();
|
|
38906
|
+
caret.collapse(true);
|
|
38907
|
+
const parts = [];
|
|
38908
|
+
const addParts = (table)=>{
|
|
38909
|
+
(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)=>{
|
|
38910
|
+
const part = range.cloneRange();
|
|
38911
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.startContainer)) {
|
|
38912
|
+
part.setStart(cell, 0);
|
|
38913
|
+
}
|
|
38914
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.endContainer)) {
|
|
38915
|
+
part.setEnd(cell, cell.childNodes.length);
|
|
38916
|
+
}
|
|
38917
|
+
parts.push([
|
|
38918
|
+
cell,
|
|
38919
|
+
part
|
|
38920
|
+
]);
|
|
38921
|
+
});
|
|
38922
|
+
};
|
|
38923
|
+
if (startTable) {
|
|
38924
|
+
addParts(startTable);
|
|
38925
|
+
if (startTable === endTable) {
|
|
38926
|
+
range.collapse(true);
|
|
38927
|
+
} else {
|
|
38928
|
+
range.setStartAfter(startTable);
|
|
38929
|
+
}
|
|
38930
|
+
}
|
|
38931
|
+
if (endTable && endTable !== startTable) {
|
|
38932
|
+
addParts(endTable);
|
|
38933
|
+
range.setEndBefore(endTable);
|
|
38934
|
+
}
|
|
38935
|
+
parts.forEach(([cell, part])=>{
|
|
38936
|
+
part.deleteContents();
|
|
38937
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(cell)) {
|
|
38938
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(cell);
|
|
38939
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(cell, createInside.element('br'));
|
|
38940
|
+
}
|
|
38941
|
+
});
|
|
38942
|
+
return startTable ? caret : null;
|
|
38943
|
+
}
|
|
38286
38944
|
__moveContentInLeftSibling(fake, leftSibling, rightSibling) {
|
|
38287
38945
|
leftSibling = this.__defineRightLeftBox(leftSibling);
|
|
38946
|
+
// Nothing is moved into a table, and a block left empty after it goes
|
|
38947
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(leftSibling, 'table')) {
|
|
38948
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
|
|
38949
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
38950
|
+
}
|
|
38951
|
+
return;
|
|
38952
|
+
}
|
|
38288
38953
|
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)) {
|
|
38289
38954
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
|
|
38290
38955
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(rightSibling, leftSibling);
|
|
38291
38956
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
38292
38957
|
}
|
|
38293
|
-
|
|
38294
|
-
|
|
38295
|
-
|
|
38958
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(rightSibling.firstElementChild)) {
|
|
38959
|
+
const item = rightSibling.firstElementChild;
|
|
38960
|
+
// What's left of the right list's first item joins the left block,
|
|
38961
|
+
// up to a list nested in the item
|
|
38962
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
|
|
38963
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
|
|
38964
|
+
while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(item.firstChild)){
|
|
38965
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, item.firstChild);
|
|
38966
|
+
}
|
|
38967
|
+
}
|
|
38968
|
+
// Remove empty right LI
|
|
38969
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item)) {
|
|
38970
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(item);
|
|
38971
|
+
}
|
|
38972
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
|
|
38973
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
|
|
38974
|
+
}
|
|
38296
38975
|
}
|
|
38297
38976
|
}
|
|
38298
38977
|
/**
|
|
@@ -38309,8 +38988,8 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
38309
38988
|
return lastLeaf;
|
|
38310
38989
|
}
|
|
38311
38990
|
/**
|
|
38312
|
-
* Add BR in empty
|
|
38313
|
-
*/ __addBrInEmptyBlock(fake,
|
|
38991
|
+
* Add BR in the empty block left at the caret
|
|
38992
|
+
*/ __addBrInEmptyBlock(fake, range) {
|
|
38314
38993
|
const jodit = this.j;
|
|
38315
38994
|
if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
|
|
38316
38995
|
const br = jodit.createInside.element('br');
|
|
@@ -38318,13 +38997,6 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
|
|
|
38318
38997
|
range.setStartBefore(br);
|
|
38319
38998
|
range.collapse(true);
|
|
38320
38999
|
}
|
|
38321
|
-
// Add BR in the right empty table cell
|
|
38322
|
-
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(rightSibling, 'table')) {
|
|
38323
|
-
const firstCell = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.$$)('td,th', rightSibling).shift();
|
|
38324
|
-
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(firstCell) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(firstCell)) {
|
|
38325
|
-
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(firstCell, jodit.createInside.element('br'));
|
|
38326
|
-
}
|
|
38327
|
-
}
|
|
38328
39000
|
}
|
|
38329
39001
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
38330
39002
|
var _a;
|
|
@@ -39772,7 +40444,18 @@ function focus(editor) {
|
|
|
39772
40444
|
editor.e.on('afterInit', ()=>{
|
|
39773
40445
|
if (editor.o.autofocus) {
|
|
39774
40446
|
if (editor.defaultTimeout) {
|
|
39775
|
-
editor
|
|
40447
|
+
// A click or key in the editor during the delay has put the
|
|
40448
|
+
// caret where the user wants it, so autofocus leaves it there
|
|
40449
|
+
const userInput = 'mousedown touchstart keydown';
|
|
40450
|
+
const cancel = ()=>{
|
|
40451
|
+
editor.async.clearTimeout(timeout);
|
|
40452
|
+
editor.e.off(userInput, cancel);
|
|
40453
|
+
};
|
|
40454
|
+
const timeout = editor.async.setTimeout(()=>{
|
|
40455
|
+
editor.e.off(userInput, cancel);
|
|
40456
|
+
focus();
|
|
40457
|
+
}, 300);
|
|
40458
|
+
editor.e.on(userInput, cancel);
|
|
39776
40459
|
} else {
|
|
39777
40460
|
focus();
|
|
39778
40461
|
}
|
|
@@ -41067,7 +41750,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
|
|
|
41067
41750
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
|
|
41068
41751
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
|
|
41069
41752
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
|
|
41070
|
-
_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;' + '}' + '
|
|
41753
|
+
_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' + '}';
|
|
41071
41754
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
|
|
41072
41755
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
41073
41756
|
|
|
@@ -41113,6 +41796,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41113
41796
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'rel', 'stylesheet');
|
|
41114
41797
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href', href);
|
|
41115
41798
|
doc.head && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(doc.head, link);
|
|
41799
|
+
// What plugins measured in the editing document changes once it's styled
|
|
41800
|
+
jodit.e.on(link, 'load', ()=>jodit.e.fire('resize'));
|
|
41116
41801
|
});
|
|
41117
41802
|
}
|
|
41118
41803
|
if (opt.iframeStyle) {
|
|
@@ -41150,6 +41835,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41150
41835
|
(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);
|
|
41151
41836
|
};
|
|
41152
41837
|
const clearMarkers = (html)=>{
|
|
41838
|
+
// The plugins' own styles, from `getContainer`, aren't part of the value
|
|
41839
|
+
html = html.replace(/<style[^>]+jodit-box[^>]*>[\s\S]*?<\/style>/gi, '');
|
|
41153
41840
|
const bodyReg = /<body.*<\/body>/im, bodyMarker = '{%%BODY%%}', body = bodyReg.exec(html);
|
|
41154
41841
|
if (body) {
|
|
41155
41842
|
// remove markers
|
|
@@ -41174,7 +41861,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41174
41861
|
*/ const replaceDocument = (html)=>{
|
|
41175
41862
|
const inert = new DOMParser().parseFromString(html, 'text/html');
|
|
41176
41863
|
editor.e.fire('safeHTML', inert.documentElement);
|
|
41864
|
+
// The plugins' own styles stay, as the value leaves them out
|
|
41865
|
+
const styles = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.$$)('style.jodit-box', doc.head);
|
|
41177
41866
|
doc.replaceChild(doc.adoptNode(inert.documentElement), doc.documentElement);
|
|
41867
|
+
styles.forEach((style)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(doc.head, style));
|
|
41178
41868
|
};
|
|
41179
41869
|
if (docMode) {
|
|
41180
41870
|
const tag = editor.element.tagName;
|
|
@@ -41342,6 +42032,9 @@ const SELECTED_TAGS = new Set([
|
|
|
41342
42032
|
*/ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
41343
42033
|
afterInit(jodit) {
|
|
41344
42034
|
jodit.e.on(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
42035
|
+
// Over the highlight in `styles/reset.less`; the image keeps its own. It goes
|
|
42036
|
+
// in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
42037
|
+
(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}`;
|
|
41345
42038
|
}
|
|
41346
42039
|
beforeDestruct(jodit) {
|
|
41347
42040
|
jodit.e.off(jodit.ed, 'selectionchange', this.onSelectionChange);
|
|
@@ -41622,8 +42315,12 @@ function _async_to_generator(fn) {
|
|
|
41622
42315
|
dialog.close();
|
|
41623
42316
|
});
|
|
41624
42317
|
buttons.remove.onAction(()=>{
|
|
42318
|
+
const caret = j.s.createRange();
|
|
42319
|
+
caret.setStartBefore(this.state.sourceImage);
|
|
42320
|
+
caret.collapse(true);
|
|
41625
42321
|
j.s.removeNode(this.state.sourceImage);
|
|
41626
42322
|
dialog.close();
|
|
42323
|
+
j.s.selectRange(caret);
|
|
41627
42324
|
});
|
|
41628
42325
|
buttons.cancel.onAction(()=>{
|
|
41629
42326
|
dialog.close();
|
|
@@ -41637,10 +42334,20 @@ function _async_to_generator(fn) {
|
|
|
41637
42334
|
],
|
|
41638
42335
|
buttons.check
|
|
41639
42336
|
]);
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
|
|
42337
|
+
// The dialog fires `afterClose` on its own emitter, not the editor's
|
|
42338
|
+
dialog.e.on(dialog, 'afterClose', ()=>{
|
|
42339
|
+
const { sourceImage } = this.state;
|
|
42340
|
+
if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
|
|
42341
|
+
return;
|
|
42342
|
+
}
|
|
42343
|
+
if (j.o.image.selectImageAfterClose) {
|
|
42344
|
+
j.s.select(sourceImage);
|
|
42345
|
+
return;
|
|
41643
42346
|
}
|
|
42347
|
+
const caret = j.s.createRange();
|
|
42348
|
+
caret.setStartAfter(sourceImage);
|
|
42349
|
+
caret.collapse(true);
|
|
42350
|
+
j.s.selectRange(caret);
|
|
41644
42351
|
});
|
|
41645
42352
|
dialog.setSize(j.o.image.dialogWidth);
|
|
41646
42353
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.markOwner)(j, dialog.container);
|
|
@@ -41671,6 +42378,7 @@ function _async_to_generator(fn) {
|
|
|
41671
42378
|
this.activeTabState.activeTab = 'Image';
|
|
41672
42379
|
this.__lock();
|
|
41673
42380
|
this.dialog.open().setModal(true).setPosition();
|
|
42381
|
+
this.__focusFirstField();
|
|
41674
42382
|
this.async.promise((resolve, reject)=>(0,_readers_index_js__WEBPACK_IMPORTED_MODULE_10__.readValuesFromImage)(this.j, this.state).then(resolve, reject)).catch((e)=>{
|
|
41675
42383
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
|
|
41676
42384
|
this.dialog.message.error(e.message);
|
|
@@ -41678,6 +42386,14 @@ function _async_to_generator(fn) {
|
|
|
41678
42386
|
}).finally(()=>this.__unlock());
|
|
41679
42387
|
return false;
|
|
41680
42388
|
}
|
|
42389
|
+
/**
|
|
42390
|
+
* Keys typed while the dialog is open must not reach the editor behind it,
|
|
42391
|
+
* so focus the active tab's first field, or else the first field shown
|
|
42392
|
+
*/ __focusFirstField() {
|
|
42393
|
+
var _a;
|
|
42394
|
+
const fields = (box)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(box.querySelectorAll('input, select, textarea'));
|
|
42395
|
+
(_a = fields(this.form.getElm('tabsBox')).concat(fields(this.form.container)).find((field)=>field.offsetParent != null)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42396
|
+
}
|
|
41681
42397
|
__lock() {
|
|
41682
42398
|
this.dialog.lock();
|
|
41683
42399
|
this.form.setMod('lock', true);
|
|
@@ -44004,10 +44720,11 @@ const align = {
|
|
|
44004
44720
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
44005
44721
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
44006
44722
|
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
|
|
44007
|
-
/* harmony import */ var
|
|
44008
|
-
/* harmony import */ var
|
|
44009
|
-
/* harmony import */ var
|
|
44010
|
-
/* harmony import */ var
|
|
44723
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45124);
|
|
44724
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67510);
|
|
44725
|
+
/* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61259);
|
|
44726
|
+
/* harmony import */ var _modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21491);
|
|
44727
|
+
/* harmony import */ var _config_config_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(24526);
|
|
44011
44728
|
function _define_property(obj, key, value) {
|
|
44012
44729
|
if (key in obj) {
|
|
44013
44730
|
Object.defineProperty(obj, key, {
|
|
@@ -44076,14 +44793,15 @@ function _object_spread_props(target, source) {
|
|
|
44076
44793
|
|
|
44077
44794
|
|
|
44078
44795
|
|
|
44796
|
+
|
|
44079
44797
|
/**
|
|
44080
44798
|
* Plugin for show inline popup dialog
|
|
44081
44799
|
*/ class inlinePopup extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
|
|
44082
44800
|
get popup() {
|
|
44083
|
-
return new
|
|
44801
|
+
return new _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup(this.jodit, false);
|
|
44084
44802
|
}
|
|
44085
44803
|
get toolbar() {
|
|
44086
|
-
return (0,
|
|
44804
|
+
return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__.makeCollection)(this.jodit, this.popup);
|
|
44087
44805
|
}
|
|
44088
44806
|
onClick(node) {
|
|
44089
44807
|
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);
|
|
@@ -44156,6 +44874,33 @@ function _object_spread_props(target, source) {
|
|
|
44156
44874
|
onOutsideClick() {
|
|
44157
44875
|
this.popup.close();
|
|
44158
44876
|
}
|
|
44877
|
+
/**
|
|
44878
|
+
* A key that moves the caret off an element closes its popup, and one
|
|
44879
|
+
* that moves the caret into an element with a popup (a link) opens it,
|
|
44880
|
+
* as clicks do
|
|
44881
|
+
*/ onKeyUp() {
|
|
44882
|
+
this.__followCaret();
|
|
44883
|
+
}
|
|
44884
|
+
__followCaret() {
|
|
44885
|
+
if (!(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isMoved)(this.j, this.snapRange)) {
|
|
44886
|
+
return;
|
|
44887
|
+
}
|
|
44888
|
+
const { range } = this.j.s;
|
|
44889
|
+
const target = this.previousTarget;
|
|
44890
|
+
if (this.popup.isOpened && this.type !== 'selection' && target && !range.intersectsNode(target)) {
|
|
44891
|
+
this.popup.close();
|
|
44892
|
+
}
|
|
44893
|
+
const node = range.startContainer;
|
|
44894
|
+
const element = this.__elementAt(node);
|
|
44895
|
+
if (range.collapsed && element && element !== this.__keyDownElement) {
|
|
44896
|
+
this.onClick(node);
|
|
44897
|
+
}
|
|
44898
|
+
}
|
|
44899
|
+
/**
|
|
44900
|
+
* The element with a popup that holds `node`
|
|
44901
|
+
*/ __elementAt(node) {
|
|
44902
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, this.elmsList, this.j.editor);
|
|
44903
|
+
}
|
|
44159
44904
|
/**
|
|
44160
44905
|
* Can show popup for this type
|
|
44161
44906
|
*/ canShowPopupForType(type) {
|
|
@@ -44195,12 +44940,28 @@ function _object_spread_props(target, source) {
|
|
|
44195
44940
|
], 'mousedown touchstart', this.__onDocumentMouseDown).on('closeAllPopups', this.__onCloseAllPopups);
|
|
44196
44941
|
this.addListenersForElements();
|
|
44197
44942
|
}
|
|
44943
|
+
onRecalcPositionPopup() {
|
|
44944
|
+
if (this.popup.isOpened && this.type !== 'selection' && this.previousTarget) {
|
|
44945
|
+
this.__reopenFor = this.previousTarget;
|
|
44946
|
+
}
|
|
44947
|
+
}
|
|
44198
44948
|
__onDocumentMouseDown(e) {
|
|
44199
|
-
|
|
44949
|
+
this.__reopenFor = null;
|
|
44950
|
+
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)) {
|
|
44200
44951
|
this.__reopenSelectionPopup = true;
|
|
44201
44952
|
}
|
|
44202
44953
|
}
|
|
44203
44954
|
__onCloseAllPopups() {
|
|
44955
|
+
const target = this.__reopenFor;
|
|
44956
|
+
if (target) {
|
|
44957
|
+
this.__reopenFor = null;
|
|
44958
|
+
// After the popup's own `closeAllPopups` handler, as below
|
|
44959
|
+
this.j.async.setTimeout(()=>{
|
|
44960
|
+
if (this.j.editor.contains(target)) {
|
|
44961
|
+
this.onClick(target);
|
|
44962
|
+
}
|
|
44963
|
+
}, 1);
|
|
44964
|
+
}
|
|
44204
44965
|
if (!this.__reopenSelectionPopup) {
|
|
44205
44966
|
return;
|
|
44206
44967
|
}
|
|
@@ -44237,11 +44998,16 @@ function _object_spread_props(target, source) {
|
|
|
44237
44998
|
height: rect.height
|
|
44238
44999
|
};
|
|
44239
45000
|
}
|
|
44240
|
-
onSelectionStart() {
|
|
45001
|
+
onSelectionStart(event) {
|
|
45002
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
45003
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
45004
|
+
this.__followCaret();
|
|
45005
|
+
}
|
|
44241
45006
|
this.snapRange = this.j.s.range.cloneRange();
|
|
45007
|
+
this.__keyDownElement = this.__elementAt(this.snapRange.startContainer);
|
|
44242
45008
|
}
|
|
44243
45009
|
onSelectionEnd(e) {
|
|
44244
|
-
if (e && e.target &&
|
|
45010
|
+
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)) {
|
|
44245
45011
|
return;
|
|
44246
45012
|
}
|
|
44247
45013
|
const { snapRange } = this, { range } = this.j.s;
|
|
@@ -44325,7 +45091,13 @@ function _object_spread_props(target, source) {
|
|
|
44325
45091
|
* command fires `closeAllPopups`, the toolbar should be shown again
|
|
44326
45092
|
* while the selection is still there. See #1238
|
|
44327
45093
|
*/ this.__reopenSelectionPopup = false;
|
|
45094
|
+
/**
|
|
45095
|
+
* The alignment controls fire `recalcPositionPopup` once they have moved
|
|
45096
|
+
* the element, and their button then fires `closeAllPopups`. The popup
|
|
45097
|
+
* opens again beside the element, as the selection toolbar does
|
|
45098
|
+
*/ this.__reopenFor = null;
|
|
44328
45099
|
this.snapRange = null;
|
|
45100
|
+
this.__keyDownElement = null;
|
|
44329
45101
|
this.elmsList = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.keys)(this.j.o.popup, false).filter((s)=>!this.isExcludedTarget(s));
|
|
44330
45102
|
}
|
|
44331
45103
|
}
|
|
@@ -44355,6 +45127,12 @@ __decorate([
|
|
|
44355
45127
|
__decorate([
|
|
44356
45128
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':outsideClick')
|
|
44357
45129
|
], inlinePopup.prototype, "onOutsideClick", null);
|
|
45130
|
+
__decorate([
|
|
45131
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':keyup')
|
|
45132
|
+
], inlinePopup.prototype, "onKeyUp", null);
|
|
45133
|
+
__decorate([
|
|
45134
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':recalcPositionPopup')
|
|
45135
|
+
], inlinePopup.prototype, "onRecalcPositionPopup", null);
|
|
44358
45136
|
__decorate([
|
|
44359
45137
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
44360
45138
|
], inlinePopup.prototype, "__onDocumentMouseDown", null);
|
|
@@ -46216,9 +46994,11 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
46216
46994
|
return cleaned;
|
|
46217
46995
|
}
|
|
46218
46996
|
/**
|
|
46219
|
-
* The width that decides which breakpoint set the toolbar uses
|
|
46220
|
-
*
|
|
46221
|
-
*
|
|
46997
|
+
* The width that decides which breakpoint set the toolbar uses: the editor's
|
|
46998
|
+
* own width, or its parent's while the editor has none yet (for example
|
|
46999
|
+
* while hidden at init). A toolbar rendered into an external container
|
|
47000
|
+
* (`toolbar` set to an element or a selector) lays out in that container, so
|
|
47001
|
+
* its width is what matters there.
|
|
46222
47002
|
*/ function adaptiveWidth(editor) {
|
|
46223
47003
|
var _a;
|
|
46224
47004
|
const { toolbar } = editor.o;
|
|
@@ -46228,7 +47008,7 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
46228
47008
|
return width;
|
|
46229
47009
|
}
|
|
46230
47010
|
}
|
|
46231
|
-
return ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
47011
|
+
return editor.container.offsetWidth || ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
46232
47012
|
}
|
|
46233
47013
|
/**
|
|
46234
47014
|
* Rebuild toolbar in depends on editor's width
|
|
@@ -46302,6 +47082,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
|
46302
47082
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
|
|
46303
47083
|
/* harmony import */ var _icons_ol_svg_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13465);
|
|
46304
47084
|
/* harmony import */ var _icons_ul_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50267);
|
|
47085
|
+
/* harmony import */ var _start_dialog_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(83086);
|
|
46305
47086
|
/*!
|
|
46306
47087
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46307
47088
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -46311,11 +47092,19 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
|
46311
47092
|
|
|
46312
47093
|
|
|
46313
47094
|
|
|
47095
|
+
|
|
47096
|
+
/**
|
|
47097
|
+
* The `ol` dropdown item that asks for the list's start number
|
|
47098
|
+
*/ const START = 'start';
|
|
46314
47099
|
const memoExec = (jodit, _, { control })=>{
|
|
46315
47100
|
var _a;
|
|
46316
47101
|
const key = `button${control.command}`;
|
|
46317
47102
|
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);
|
|
46318
|
-
(
|
|
47103
|
+
if (value === START) {
|
|
47104
|
+
(0,_start_dialog_js__WEBPACK_IMPORTED_MODULE_5__.openStartDialog)(jodit);
|
|
47105
|
+
return;
|
|
47106
|
+
}
|
|
47107
|
+
;(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__.dataBind)(jodit, key, value);
|
|
46319
47108
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
46320
47109
|
};
|
|
46321
47110
|
_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"]);
|
|
@@ -46345,9 +47134,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.ol = {
|
|
|
46345
47134
|
'lower-greek': 'Lower Greek',
|
|
46346
47135
|
'lower-roman': 'Lower Roman',
|
|
46347
47136
|
'upper-alpha': 'Upper Alpha',
|
|
46348
|
-
'upper-roman': 'Upper Roman'
|
|
47137
|
+
'upper-roman': 'Upper Roman',
|
|
47138
|
+
[START]: 'Start at...'
|
|
46349
47139
|
},
|
|
46350
|
-
exec: memoExec
|
|
47140
|
+
exec: memoExec,
|
|
47141
|
+
isChildDisabled: (jodit, button)=>{
|
|
47142
|
+
var _a;
|
|
47143
|
+
return ((_a = button.control.args) === null || _a === void 0 ? void 0 : _a[0]) === START && !(0,_start_dialog_js__WEBPACK_IMPORTED_MODULE_5__.closestOrderedList)(jodit);
|
|
47144
|
+
}
|
|
46351
47145
|
};
|
|
46352
47146
|
|
|
46353
47147
|
|
|
@@ -46430,6 +47224,83 @@ __decorate([
|
|
|
46430
47224
|
_core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('orderedList', orderedList);
|
|
46431
47225
|
|
|
46432
47226
|
|
|
47227
|
+
/***/ }),
|
|
47228
|
+
|
|
47229
|
+
/***/ 83086:
|
|
47230
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
47231
|
+
|
|
47232
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47233
|
+
/* harmony export */ closestOrderedList: function() { return /* binding */ closestOrderedList; },
|
|
47234
|
+
/* harmony export */ openStartDialog: function() { return /* binding */ openStartDialog; }
|
|
47235
|
+
/* harmony export */ });
|
|
47236
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
47237
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
47238
|
+
/* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62843);
|
|
47239
|
+
/* harmony import */ var _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2525);
|
|
47240
|
+
/*!
|
|
47241
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
47242
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
47243
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
47244
|
+
*/
|
|
47245
|
+
|
|
47246
|
+
|
|
47247
|
+
|
|
47248
|
+
/**
|
|
47249
|
+
* The numbered list the selection is in
|
|
47250
|
+
*/ function closestOrderedList(jodit) {
|
|
47251
|
+
const current = jodit.s.current();
|
|
47252
|
+
return current ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'ol', jodit.editor) : null;
|
|
47253
|
+
}
|
|
47254
|
+
/**
|
|
47255
|
+
* Asks for the number of the first item of the list the selection is in,
|
|
47256
|
+
* and sets the list's `start`. The selection is put back when the dialog
|
|
47257
|
+
* closes, however it closes.
|
|
47258
|
+
*/ function openStartDialog(jodit) {
|
|
47259
|
+
const list = closestOrderedList(jodit);
|
|
47260
|
+
if (!list) {
|
|
47261
|
+
return;
|
|
47262
|
+
}
|
|
47263
|
+
const dialog = jodit.dlg({
|
|
47264
|
+
resizable: false,
|
|
47265
|
+
closeOnClickOverlay: true
|
|
47266
|
+
});
|
|
47267
|
+
const input = new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIInput(jodit, {
|
|
47268
|
+
name: 'start',
|
|
47269
|
+
type: 'number',
|
|
47270
|
+
label: 'Number for the first item',
|
|
47271
|
+
value: list.start
|
|
47272
|
+
});
|
|
47273
|
+
const form = new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIForm(jodit, [
|
|
47274
|
+
new _core_ui_form_index_js__WEBPACK_IMPORTED_MODULE_3__.UIBlock(jodit, [
|
|
47275
|
+
input
|
|
47276
|
+
])
|
|
47277
|
+
]);
|
|
47278
|
+
form.container.classList.add('jodit-dialog_alert');
|
|
47279
|
+
form.onSubmit(({ start })=>{
|
|
47280
|
+
const value = start === '' ? 1 : parseInt(start, 10);
|
|
47281
|
+
if (isNaN(value)) {
|
|
47282
|
+
input.focus();
|
|
47283
|
+
return false;
|
|
47284
|
+
}
|
|
47285
|
+
dialog.close();
|
|
47286
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(list, 'start', value === 1 ? null : value);
|
|
47287
|
+
jodit.synchronizeValues();
|
|
47288
|
+
});
|
|
47289
|
+
jodit.s.save();
|
|
47290
|
+
dialog.e.on(dialog, 'afterClose', ()=>{
|
|
47291
|
+
jodit.s.focus();
|
|
47292
|
+
jodit.s.restore();
|
|
47293
|
+
});
|
|
47294
|
+
dialog.setFooter([
|
|
47295
|
+
(0,_core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__.Button)(jodit, 'cancel', 'Cancel').onAction(()=>dialog.close()),
|
|
47296
|
+
(0,_core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_2__.Button)(jodit, 'ok', 'Apply', 'primary').onAction(()=>form.submit())
|
|
47297
|
+
]);
|
|
47298
|
+
dialog.open(form, jodit.i18n('Start numbering at'), true, true);
|
|
47299
|
+
input.focus();
|
|
47300
|
+
input.nativeInput.select();
|
|
47301
|
+
}
|
|
47302
|
+
|
|
47303
|
+
|
|
46433
47304
|
/***/ }),
|
|
46434
47305
|
|
|
46435
47306
|
/***/ 71842:
|
|
@@ -47250,6 +48121,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
47250
48121
|
return true;
|
|
47251
48122
|
}
|
|
47252
48123
|
const first = root.firstChild;
|
|
48124
|
+
// Firefox pads an empty editable body with a bare <br>
|
|
48125
|
+
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)) {
|
|
48126
|
+
return true;
|
|
48127
|
+
}
|
|
47253
48128
|
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)) {
|
|
47254
48129
|
return false;
|
|
47255
48130
|
}
|
|
@@ -47298,11 +48173,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
47298
48173
|
marginTop = parseInt(style2.getPropertyValue('margin-top'), 10);
|
|
47299
48174
|
marginLeft = parseInt(style2.getPropertyValue('margin-left'), 10);
|
|
47300
48175
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(this.placeholderElm, {
|
|
48176
|
+
fontFamily: style2.getPropertyValue('font-family'),
|
|
47301
48177
|
fontSize: parseInt(style2.getPropertyValue('font-size'), 10),
|
|
47302
48178
|
lineHeight: style2.getPropertyValue('line-height')
|
|
47303
48179
|
});
|
|
47304
48180
|
} else {
|
|
47305
48181
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(this.placeholderElm, {
|
|
48182
|
+
fontFamily: style.getPropertyValue('font-family'),
|
|
47306
48183
|
fontSize: parseInt(style.getPropertyValue('font-size'), 10),
|
|
47307
48184
|
lineHeight: style.getPropertyValue('line-height')
|
|
47308
48185
|
});
|
|
@@ -47350,7 +48227,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
47350
48227
|
this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
|
|
47351
48228
|
}
|
|
47352
48229
|
editor.e.fire('placeholder', this.placeholderElm.innerHTML);
|
|
47353
|
-
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);
|
|
48230
|
+
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);
|
|
47354
48231
|
this.addNativeListeners();
|
|
47355
48232
|
this.toggle();
|
|
47356
48233
|
};
|
|
@@ -48204,7 +49081,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
48204
49081
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
48205
49082
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
48206
49083
|
/* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
|
|
48207
|
-
/* harmony import */ var
|
|
49084
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
|
|
49085
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67510);
|
|
49086
|
+
/* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(61259);
|
|
49087
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71675);
|
|
48208
49088
|
/*!
|
|
48209
49089
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48210
49090
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -48224,6 +49104,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
48224
49104
|
|
|
48225
49105
|
|
|
48226
49106
|
|
|
49107
|
+
|
|
49108
|
+
|
|
49109
|
+
|
|
48227
49110
|
const keyBInd = '__jodit-resizer_binded';
|
|
48228
49111
|
/**
|
|
48229
49112
|
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
@@ -48243,11 +49126,19 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48243
49126
|
*/ function heightFollowsWidth(element) {
|
|
48244
49127
|
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');
|
|
48245
49128
|
}
|
|
49129
|
+
const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
49130
|
+
/**
|
|
49131
|
+
* A click on an embed lands on its wrapper, so it selects the embed, until the
|
|
49132
|
+
* wrapper is active. While the editor is locked, as during resizing, the
|
|
49133
|
+
* wrapper takes the mouse again.
|
|
49134
|
+
*/ 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}`;
|
|
48246
49135
|
/**
|
|
48247
49136
|
* The module creates a supporting frame for resizing of the elements img and table
|
|
48248
49137
|
*/ class resizer extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
48249
49138
|
/** @override */ afterInit(editor) {
|
|
48250
|
-
|
|
49139
|
+
// It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
49140
|
+
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(editor, 'resizer', 'style', true).textContent = EMBED_WRAPPER_STYLE;
|
|
49141
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('div', this.rect).forEach((resizeHandle)=>{
|
|
48251
49142
|
editor.e.on(resizeHandle, 'mousedown.resizer touchstart.resizer', this.onStartResizing.bind(this, resizeHandle));
|
|
48252
49143
|
});
|
|
48253
49144
|
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.eventEmitter.on('hideHelpers', this.hide);
|
|
@@ -48255,7 +49146,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48255
49146
|
if (isReadOnly) {
|
|
48256
49147
|
this.hide();
|
|
48257
49148
|
}
|
|
48258
|
-
}).on('afterInit changePlace', this.addEventListeners.bind(this))
|
|
49149
|
+
}).on('afterInit changePlace', this.addEventListeners.bind(this))// Handlers without a namespace run first, ahead of those that
|
|
49150
|
+
// move the caret, as table-keyboard-navigation's do
|
|
49151
|
+
.on('keydown', this.onEditorKeyDown, {
|
|
49152
|
+
top: true
|
|
49153
|
+
}).on('afterGetValueFromEditor.resizer', (data)=>{
|
|
48259
49154
|
const rgx = /<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;
|
|
48260
49155
|
if (rgx.test(data.value)) {
|
|
48261
49156
|
data.value = data.value.replace(rgx, '$1');
|
|
@@ -48400,6 +49295,38 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48400
49295
|
e.stopImmediatePropagation();
|
|
48401
49296
|
}
|
|
48402
49297
|
}
|
|
49298
|
+
onEditorKeyDown(event) {
|
|
49299
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
49300
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
49301
|
+
this.__followCaret();
|
|
49302
|
+
}
|
|
49303
|
+
this.__keyDownRange = this.j.s.range.cloneRange();
|
|
49304
|
+
this.__keyDownTable = this.__caretTable();
|
|
49305
|
+
}
|
|
49306
|
+
__caretTable() {
|
|
49307
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(this.j.s.range.startContainer, 'table', this.j.editor);
|
|
49308
|
+
}
|
|
49309
|
+
/**
|
|
49310
|
+
* Hide the frame once a key has moved the caret off its element, and
|
|
49311
|
+
* frame a table the caret has moved into, as clicks do
|
|
49312
|
+
*/ onEditorKeyUp() {
|
|
49313
|
+
this.__followCaret();
|
|
49314
|
+
}
|
|
49315
|
+
__followCaret() {
|
|
49316
|
+
const before = this.__keyDownRange;
|
|
49317
|
+
this.__keyDownRange = null;
|
|
49318
|
+
if (!(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, before)) {
|
|
49319
|
+
return;
|
|
49320
|
+
}
|
|
49321
|
+
if (this.isShown && this.element && !this.j.s.range.intersectsNode(this.element)) {
|
|
49322
|
+
this.hide();
|
|
49323
|
+
}
|
|
49324
|
+
const table = this.__caretTable();
|
|
49325
|
+
if (table && table !== this.__keyDownTable && this.j.o.allowResizeTags.has('table')) {
|
|
49326
|
+
this.__bind(table);
|
|
49327
|
+
this.onClickElement(table);
|
|
49328
|
+
}
|
|
49329
|
+
}
|
|
48403
49330
|
onKeyDown(e) {
|
|
48404
49331
|
this.isAltMode = e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ALT;
|
|
48405
49332
|
if (!this.isAltMode && this.isResizeMode) {
|
|
@@ -48421,6 +49348,11 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48421
49348
|
return;
|
|
48422
49349
|
}
|
|
48423
49350
|
if (!this.isResizeMode) {
|
|
49351
|
+
// A click in the element's popup, or in a list it opens, works on
|
|
49352
|
+
// the element, so it keeps its frame
|
|
49353
|
+
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)) {
|
|
49354
|
+
return;
|
|
49355
|
+
}
|
|
48424
49356
|
return this.hide();
|
|
48425
49357
|
}
|
|
48426
49358
|
e.stopImmediatePropagation();
|
|
@@ -48587,7 +49519,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48587
49519
|
this.hide();
|
|
48588
49520
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.layer);
|
|
48589
49521
|
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.eventEmitter.off('hideHelpers', this.hide);
|
|
48590
|
-
jodit.e.off(this.j.ow, '.resizer').off('.resizer');
|
|
49522
|
+
jodit.e.off(this.j.ow, '.resizer').off('.resizer').off('keydown', this.onEditorKeyDown);
|
|
48591
49523
|
}
|
|
48592
49524
|
constructor(){
|
|
48593
49525
|
super(...arguments);
|
|
@@ -48612,6 +49544,8 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
48612
49544
|
this.sizeViewer = this.rect.getElementsByTagName('span')[0];
|
|
48613
49545
|
this.pointerX = 0;
|
|
48614
49546
|
this.pointerY = 0;
|
|
49547
|
+
this.__keyDownRange = null;
|
|
49548
|
+
this.__keyDownTable = null;
|
|
48615
49549
|
this.isAltMode = false;
|
|
48616
49550
|
this.onClickElement = (element)=>{
|
|
48617
49551
|
if (this.isResizeMode) {
|
|
@@ -48673,6 +49607,12 @@ __decorate([
|
|
|
48673
49607
|
__decorate([
|
|
48674
49608
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48675
49609
|
], resizer.prototype, "onResize", null);
|
|
49610
|
+
__decorate([
|
|
49611
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
49612
|
+
], resizer.prototype, "onEditorKeyDown", null);
|
|
49613
|
+
__decorate([
|
|
49614
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
|
|
49615
|
+
], resizer.prototype, "onEditorKeyUp", null);
|
|
48676
49616
|
__decorate([
|
|
48677
49617
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48678
49618
|
], resizer.prototype, "onKeyDown", null);
|
|
@@ -49690,8 +50630,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
|
|
|
49690
50630
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
49691
50631
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
49692
50632
|
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
49693
|
-
/* harmony import */ var
|
|
49694
|
-
/* harmony import */ var
|
|
50633
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45124);
|
|
50634
|
+
/* harmony import */ var _modules_table_table_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76014);
|
|
50635
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55311);
|
|
49695
50636
|
/*!
|
|
49696
50637
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
49697
50638
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -49710,19 +50651,24 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
|
|
|
49710
50651
|
|
|
49711
50652
|
|
|
49712
50653
|
|
|
50654
|
+
|
|
49713
50655
|
const key = 'table_processor_observer';
|
|
49714
50656
|
const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
|
|
49715
50657
|
class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
49716
50658
|
/**
|
|
49717
50659
|
* Shortcut for Jodit.modules.Table
|
|
49718
50660
|
*/ get __tableModule() {
|
|
49719
|
-
return this.j.getInstance(
|
|
50661
|
+
return this.j.getInstance(_modules_table_table_js__WEBPACK_IMPORTED_MODULE_7__.Table, this.j.o);
|
|
49720
50662
|
}
|
|
49721
50663
|
afterInit(jodit) {
|
|
49722
50664
|
if (!jodit.o.tableAllowCellSelection) {
|
|
49723
50665
|
return;
|
|
49724
50666
|
}
|
|
49725
|
-
jodit.e
|
|
50667
|
+
jodit.e// Handlers without a namespace run first, ahead of those that
|
|
50668
|
+
// move the caret, as table-keyboard-navigation's do
|
|
50669
|
+
.on('keydown', this.__onKeyDown, {
|
|
50670
|
+
top: true
|
|
50671
|
+
}).on('keydown.select-cells', (event)=>{
|
|
49726
50672
|
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
49727
50673
|
this.unselectCells();
|
|
49728
50674
|
}
|
|
@@ -49746,6 +50692,59 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
49746
50692
|
}
|
|
49747
50693
|
});
|
|
49748
50694
|
}
|
|
50695
|
+
__onKeyDown(event) {
|
|
50696
|
+
// A key held down moves the caret on every repeat, with one keyup
|
|
50697
|
+
if (event === null || event === void 0 ? void 0 : event.repeat) {
|
|
50698
|
+
this.__followCaret();
|
|
50699
|
+
}
|
|
50700
|
+
this.__keyDownCell = this.__caretCell();
|
|
50701
|
+
this.__keyDownRange = this.j.s.range.cloneRange();
|
|
50702
|
+
this.__keyDownInLink = this.__isInLink();
|
|
50703
|
+
}
|
|
50704
|
+
__isInLink() {
|
|
50705
|
+
return Boolean(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(this.j.s.range.startContainer, 'a', this.j.editor));
|
|
50706
|
+
}
|
|
50707
|
+
/**
|
|
50708
|
+
* Where the selection starts rather than `s.current()`, which finds the
|
|
50709
|
+
* first cell when the caret is just before the table
|
|
50710
|
+
*/ __caretCell() {
|
|
50711
|
+
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);
|
|
50712
|
+
}
|
|
50713
|
+
/**
|
|
50714
|
+
* A key that moves the caret into a cell, from another cell or from
|
|
50715
|
+
* outside the table, marks that cell and opens its popup, as a click on
|
|
50716
|
+
* it does. One that moves the caret out of the table unmarks the cells
|
|
50717
|
+
*/ onKeyUp() {
|
|
50718
|
+
this.__followCaret();
|
|
50719
|
+
}
|
|
50720
|
+
__followCaret() {
|
|
50721
|
+
const before = this.__keyDownRange;
|
|
50722
|
+
this.__keyDownRange = null;
|
|
50723
|
+
if (this.j.o.readonly || !(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.isMoved)(this.j, before)) {
|
|
50724
|
+
return;
|
|
50725
|
+
}
|
|
50726
|
+
const cell = this.__caretCell();
|
|
50727
|
+
const hasLeftLink = this.__keyDownInLink && !this.__isInLink();
|
|
50728
|
+
if (cell === this.__keyDownCell && !(cell && hasLeftLink)) {
|
|
50729
|
+
return;
|
|
50730
|
+
}
|
|
50731
|
+
const hadMarked = this.__tableModule.getAllSelectedCells().length > 0;
|
|
50732
|
+
this.unselectCells();
|
|
50733
|
+
if (!cell) {
|
|
50734
|
+
if (hadMarked) {
|
|
50735
|
+
this.j.e.fire('hidePopup', 'cells');
|
|
50736
|
+
}
|
|
50737
|
+
return;
|
|
50738
|
+
}
|
|
50739
|
+
const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(cell, 'table', this.j.editor);
|
|
50740
|
+
if (!table) {
|
|
50741
|
+
return;
|
|
50742
|
+
}
|
|
50743
|
+
// As after a click, the first change to the cell keeps the mark
|
|
50744
|
+
this.__selectedCell = cell;
|
|
50745
|
+
this.__tableModule.addSelection(cell);
|
|
50746
|
+
this.j.e.fire('showPopup', table, ()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.position)(cell, this.j), 'cells');
|
|
50747
|
+
}
|
|
49749
50748
|
/**
|
|
49750
50749
|
* Mouse click inside the table
|
|
49751
50750
|
*/ onStartSelection(cell, event) {
|
|
@@ -50067,10 +51066,17 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
50067
51066
|
}
|
|
50068
51067
|
/** @override */ beforeDestruct(jodit) {
|
|
50069
51068
|
this.__onRemoveSelection();
|
|
50070
|
-
jodit.e.off('.select-cells');
|
|
51069
|
+
jodit.e.off('.select-cells').off('keydown', this.__onKeyDown);
|
|
50071
51070
|
}
|
|
50072
51071
|
constructor(){
|
|
50073
51072
|
super(...arguments);
|
|
51073
|
+
/**
|
|
51074
|
+
* The cell with the caret, and the selection, when a key went down
|
|
51075
|
+
*/ this.__keyDownCell = null;
|
|
51076
|
+
this.__keyDownRange = null;
|
|
51077
|
+
/**
|
|
51078
|
+
* A link's popup replaces the cell's while the caret is in the link
|
|
51079
|
+
*/ this.__keyDownInLink = false;
|
|
50074
51080
|
/**
|
|
50075
51081
|
* First selected cell
|
|
50076
51082
|
*/ this.__selectedCell = null;
|
|
@@ -50082,6 +51088,12 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
50082
51088
|
selectCells.requires = [
|
|
50083
51089
|
'select'
|
|
50084
51090
|
];
|
|
51091
|
+
__decorate([
|
|
51092
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
51093
|
+
], selectCells.prototype, "__onKeyDown", null);
|
|
51094
|
+
__decorate([
|
|
51095
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
|
|
51096
|
+
], selectCells.prototype, "onKeyUp", null);
|
|
50085
51097
|
__decorate([
|
|
50086
51098
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
50087
51099
|
], selectCells.prototype, "onStartSelection", null);
|
|
@@ -54520,7 +55532,9 @@ const WORK_KEYS = new Set([
|
|
|
54520
55532
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT:
|
|
54521
55533
|
{
|
|
54522
55534
|
next = getNextCell();
|
|
54523
|
-
|
|
55535
|
+
// Left in the first cell leaves the table, as Up in the
|
|
55536
|
+
// top row does
|
|
55537
|
+
if (!next && key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
54524
55538
|
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);
|
|
54525
55539
|
next = getNextCell();
|
|
54526
55540
|
}
|
|
@@ -54546,7 +55560,6 @@ const WORK_KEYS = new Set([
|
|
|
54546
55560
|
if (!next) {
|
|
54547
55561
|
return;
|
|
54548
55562
|
}
|
|
54549
|
-
editor.e.fire('hidePopup hideResizer');
|
|
54550
55563
|
if (!next.firstChild) {
|
|
54551
55564
|
const first = editor.createInside.element('br');
|
|
54552
55565
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
|