jodit-pro 4.18.15 → 4.19.2
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 +19 -13
- package/es2015/jodit.js +2535 -266
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +46 -40
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/chart/chart.css +1 -1
- package/es2015/plugins/chart/chart.js +1 -1
- package/es2015/plugins/chart/chart.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/math/math.css +1 -1
- package/es2015/plugins/math/math.js +1 -1
- package/es2015/plugins/math/math.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +19 -13
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +18 -12
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +2 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +28 -21
- package/es2021/jodit.js +2487 -266
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +26 -19
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +2 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +27 -20
- package/es2021.en/jodit.js +2487 -266
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +24 -17
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +3 -3
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +3330 -412
- 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 +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.
|
|
4
|
+
* Version: v4.19.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -741,7 +741,8 @@ let ConfigPrototype = {};
|
|
|
741
741
|
* spaces. An alignment can also list several such sets, to recognise each
|
|
742
742
|
* of them; aligning writes the first. A media wrapper (see
|
|
743
743
|
* `mediaWrappers`), and Jodit's own `jodit` and `jodit-media` wrappers,
|
|
744
|
-
* are aligned with the classes for the media in them
|
|
744
|
+
* are aligned with the classes for the media in them, and a captioned
|
|
745
|
+
* image's wrapper (see `imageCaption`) with those for `img`.
|
|
745
746
|
*
|
|
746
747
|
* ```javascript
|
|
747
748
|
* const media = {
|
|
@@ -1815,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1815
1816
|
* ```
|
|
1816
1817
|
* @packageDocumentation
|
|
1817
1818
|
* @module constants
|
|
1818
|
-
*/ const APP_VERSION = "4.
|
|
1819
|
+
*/ const APP_VERSION = "4.19.2";
|
|
1819
1820
|
// prettier-ignore
|
|
1820
1821
|
const ES = "es2015";
|
|
1821
1822
|
const IS_ES_MODERN = true;
|
|
@@ -3215,7 +3216,10 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3215
3216
|
/**
|
|
3216
3217
|
* The node is editable
|
|
3217
3218
|
*/ static isContentEditable(node, root) {
|
|
3218
|
-
|
|
3219
|
+
// The nearest element that says decides, as an editable caption inside
|
|
3220
|
+
// a non-editable figure is editable
|
|
3221
|
+
const host = Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.hasAttribute('contenteditable'), root);
|
|
3222
|
+
return Dom.isNode(node) && (host === null || host === void 0 ? void 0 : host.getAttribute('contenteditable')) !== 'false';
|
|
3219
3223
|
}
|
|
3220
3224
|
static isEmpty(node, condNoEmptyElement = _constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS) {
|
|
3221
3225
|
if (!node) {
|
|
@@ -3953,6 +3957,7 @@ __decorate([
|
|
|
3953
3957
|
'screenY',
|
|
3954
3958
|
'clientX',
|
|
3955
3959
|
'clientY',
|
|
3960
|
+
'view',
|
|
3956
3961
|
'target',
|
|
3957
3962
|
'srcElement',
|
|
3958
3963
|
'currentTarget',
|
|
@@ -6610,6 +6615,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6610
6615
|
/* harmony export */ cleanFromWord: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord; },
|
|
6611
6616
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearAlign; },
|
|
6612
6617
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearCenterAlign; },
|
|
6618
|
+
/* harmony export */ clearHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearHAlign; },
|
|
6613
6619
|
/* harmony export */ clearTimeout: function() { return /* reexport safe */ _async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout; },
|
|
6614
6620
|
/* harmony export */ cns: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cns; },
|
|
6615
6621
|
/* harmony export */ colorToHex: function() { return /* reexport safe */ _color_index_js__WEBPACK_IMPORTED_MODULE_3__.colorToHex; },
|
|
@@ -6628,11 +6634,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6628
6634
|
/* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
|
|
6629
6635
|
/* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
|
|
6630
6636
|
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
|
|
6637
|
+
/* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionWrapper; },
|
|
6638
|
+
/* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionedImage; },
|
|
6631
6639
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
|
|
6632
6640
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6633
6641
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6634
6642
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6635
6643
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6644
|
+
/* harmony export */ getImageCaption: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getImageCaption; },
|
|
6636
6645
|
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
|
|
6637
6646
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6638
6647
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
@@ -7739,6 +7748,7 @@ function trimChars(value, chars) {
|
|
|
7739
7748
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7740
7749
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7741
7750
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7751
|
+
/* harmony export */ clearHAlign: function() { return /* binding */ clearHAlign; },
|
|
7742
7752
|
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
7743
7753
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7744
7754
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
@@ -7747,7 +7757,8 @@ function trimChars(value, chars) {
|
|
|
7747
7757
|
/* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
7748
7758
|
/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
7749
7759
|
/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
7750
|
-
/* harmony import */ var
|
|
7760
|
+
/* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
|
|
7761
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
|
|
7751
7762
|
/*!
|
|
7752
7763
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7753
7764
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7757,6 +7768,7 @@ function trimChars(value, chars) {
|
|
|
7757
7768
|
|
|
7758
7769
|
|
|
7759
7770
|
|
|
7771
|
+
|
|
7760
7772
|
// The sets of class names an alignment lists, the first being the one to write
|
|
7761
7773
|
const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
|
|
7762
7774
|
value !== null && value !== void 0 ? value : ''
|
|
@@ -7764,17 +7776,17 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
|
|
|
7764
7776
|
/**
|
|
7765
7777
|
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
7766
7778
|
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
7767
|
-
* `jodit-media`)
|
|
7779
|
+
* `jodit-media`) or a captioned image (see `imageCaption`)
|
|
7768
7780
|
*/ function getAlignClasses(jodit, elm) {
|
|
7769
|
-
var _a, _b;
|
|
7781
|
+
var _a, _b, _c;
|
|
7770
7782
|
if (!elm) {
|
|
7771
7783
|
return null;
|
|
7772
7784
|
}
|
|
7773
7785
|
const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
7774
7786
|
'jodit',
|
|
7775
7787
|
'jodit-media'
|
|
7776
|
-
])) ? elm.firstElementChild : (0,
|
|
7777
|
-
return (
|
|
7788
|
+
])) ? elm.firstElementChild : (_a = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm)) !== null && _a !== void 0 ? _a : (0,_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, elm);
|
|
7789
|
+
return (_c = (_b = jodit.o.alignClasses) === null || _b === void 0 ? void 0 : _b[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _c !== void 0 ? _c : null;
|
|
7778
7790
|
}
|
|
7779
7791
|
/**
|
|
7780
7792
|
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
@@ -7782,18 +7794,8 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
|
|
|
7782
7794
|
*/ function hAlignElement(image, align, classes) {
|
|
7783
7795
|
var _a;
|
|
7784
7796
|
if (classes) {
|
|
7785
|
-
|
|
7786
|
-
Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
|
|
7797
|
+
clearHAlign(image, classes);
|
|
7787
7798
|
image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
|
|
7788
|
-
[
|
|
7789
|
-
'class',
|
|
7790
|
-
'style'
|
|
7791
|
-
].forEach((name)=>{
|
|
7792
|
-
var _a;
|
|
7793
|
-
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7794
|
-
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
|
|
7795
|
-
}
|
|
7796
|
-
});
|
|
7797
7799
|
return;
|
|
7798
7800
|
}
|
|
7799
7801
|
if (align && align !== 'normal') {
|
|
@@ -7818,6 +7820,24 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
|
|
|
7818
7820
|
;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7819
7821
|
}
|
|
7820
7822
|
}
|
|
7823
|
+
/**
|
|
7824
|
+
* Remove the alignment `hAlignElement` set on an element, with the classes of
|
|
7825
|
+
* every alignment in `classes`
|
|
7826
|
+
*/ function clearHAlign(elm, classes) {
|
|
7827
|
+
hAlignElement(elm, 'normal');
|
|
7828
|
+
if (classes) {
|
|
7829
|
+
Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>elm.classList.remove(...set)));
|
|
7830
|
+
}
|
|
7831
|
+
[
|
|
7832
|
+
'class',
|
|
7833
|
+
'style'
|
|
7834
|
+
].forEach((name)=>{
|
|
7835
|
+
var _a;
|
|
7836
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7837
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name, null);
|
|
7838
|
+
}
|
|
7839
|
+
});
|
|
7840
|
+
}
|
|
7821
7841
|
/**
|
|
7822
7842
|
* The alignment `hAlignElement` has set on an element
|
|
7823
7843
|
*/ function getHAlign(elm, classes) {
|
|
@@ -8949,21 +8969,70 @@ const getClassName = (obj)=>{
|
|
|
8949
8969
|
/* harmony export */ ]);
|
|
8950
8970
|
|
|
8951
8971
|
|
|
8972
|
+
/***/ }),
|
|
8973
|
+
|
|
8974
|
+
/***/ 68645:
|
|
8975
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8976
|
+
|
|
8977
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8978
|
+
/* harmony export */ getCaptionWrapper: function() { return /* binding */ getCaptionWrapper; },
|
|
8979
|
+
/* harmony export */ getCaptionedImage: function() { return /* binding */ getCaptionedImage; },
|
|
8980
|
+
/* harmony export */ getImageCaption: function() { return /* binding */ getImageCaption; }
|
|
8981
|
+
/* harmony export */ });
|
|
8982
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
8983
|
+
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
|
|
8984
|
+
/*!
|
|
8985
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8986
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8987
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
8988
|
+
*/
|
|
8989
|
+
|
|
8990
|
+
const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === part.tag.toLowerCase() && (!part.className || node.classList.contains(part.className));
|
|
8991
|
+
/**
|
|
8992
|
+
* The caption in `wrapper`, an element holding an image and its caption (see
|
|
8993
|
+
* `imageCaption`)
|
|
8994
|
+
*/ function getImageCaption(jodit, wrapper) {
|
|
8995
|
+
var _a;
|
|
8996
|
+
const markup = jodit.o.imageCaption;
|
|
8997
|
+
if (!markup || !isPart(wrapper, markup.wrapper)) {
|
|
8998
|
+
return null;
|
|
8999
|
+
}
|
|
9000
|
+
return (_a = (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(wrapper.getElementsByTagName(markup.caption.tag)).find((elm)=>isPart(elm, markup.caption))) !== null && _a !== void 0 ? _a : null;
|
|
9001
|
+
}
|
|
9002
|
+
/**
|
|
9003
|
+
* The image in `wrapper` when it is an element holding one image and its
|
|
9004
|
+
* caption (see `imageCaption`)
|
|
9005
|
+
*/ function getCaptionedImage(jodit, wrapper) {
|
|
9006
|
+
const caption = getImageCaption(jodit, wrapper);
|
|
9007
|
+
if (!caption) {
|
|
9008
|
+
return null;
|
|
9009
|
+
}
|
|
9010
|
+
const images = wrapper.getElementsByTagName('img');
|
|
9011
|
+
return images.length === 1 && !caption.contains(images[0]) ? images[0] : null;
|
|
9012
|
+
}
|
|
9013
|
+
/**
|
|
9014
|
+
* The element holding an image and its caption (see `imageCaption`) that is
|
|
9015
|
+
* or holds `node`
|
|
9016
|
+
*/ function getCaptionWrapper(jodit, node) {
|
|
9017
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getCaptionedImage(jodit, elm)), jodit.editor);
|
|
9018
|
+
}
|
|
9019
|
+
|
|
9020
|
+
|
|
8952
9021
|
/***/ }),
|
|
8953
9022
|
|
|
8954
9023
|
/***/ 43555:
|
|
8955
9024
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8956
9025
|
|
|
8957
9026
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8958
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
9027
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.$$; },
|
|
8959
9028
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
8960
9029
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
8961
9030
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
8962
9031
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
8963
9032
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
8964
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
9033
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_29__.LimitedStack; },
|
|
8965
9034
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
8966
|
-
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */
|
|
9035
|
+
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.UNSAFE_PROTO_KEYS; },
|
|
8967
9036
|
/* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
8968
9037
|
/* harmony export */ alignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.alignElement; },
|
|
8969
9038
|
/* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.alreadyLoadedList; },
|
|
@@ -8974,19 +9043,20 @@ const getClassName = (obj)=>{
|
|
|
8974
9043
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
8975
9044
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
8976
9045
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
8977
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
8978
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
8979
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
9046
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.call; },
|
|
9047
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callPromise; },
|
|
9048
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callThis; },
|
|
8980
9049
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
8981
9050
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
8982
|
-
/* harmony export */
|
|
9051
|
+
/* harmony export */ clearHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearHAlign; },
|
|
9052
|
+
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.cns; },
|
|
8983
9053
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
8984
9054
|
/* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
8985
9055
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
8986
|
-
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */
|
|
9056
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.createMediaWrapper; },
|
|
8987
9057
|
/* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
8988
9058
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
8989
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
9059
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.cssPath; },
|
|
8990
9060
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
8991
9061
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
8992
9062
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
@@ -8994,38 +9064,41 @@ const getClassName = (obj)=>{
|
|
|
8994
9064
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
8995
9065
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8996
9066
|
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
9067
|
+
/* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionWrapper; },
|
|
9068
|
+
/* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionedImage; },
|
|
8997
9069
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8998
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
9070
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getDataTransfer; },
|
|
8999
9071
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
9000
|
-
/* harmony export */
|
|
9001
|
-
/* harmony export */
|
|
9002
|
-
/* harmony export */
|
|
9003
|
-
/* harmony export */
|
|
9072
|
+
/* harmony export */ getImageCaption: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getImageCaption; },
|
|
9073
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getMediaWrapper; },
|
|
9074
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getPropertyDescriptor; },
|
|
9075
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getWrappedMedia; },
|
|
9076
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.getXPathByElement; },
|
|
9004
9077
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
9005
9078
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
9006
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
9079
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.inView; },
|
|
9007
9080
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
9008
|
-
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */
|
|
9081
|
+
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.isUnsafeProtoKey; },
|
|
9009
9082
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
9010
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
9011
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
9083
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.keys; },
|
|
9084
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.loadImage; },
|
|
9012
9085
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
9013
9086
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
9014
9087
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
9015
|
-
/* harmony export */ markDeprecated: function() { return /* reexport safe */
|
|
9016
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
9017
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
9088
|
+
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.markDeprecated; },
|
|
9089
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.markOwner; },
|
|
9090
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.memorizeExec; },
|
|
9018
9091
|
/* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
9019
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
9020
|
-
/* harmony export */ prepareEmbedCode: function() { return /* reexport safe */
|
|
9021
|
-
/* harmony export */ prepareMedia: function() { return /* reexport safe */
|
|
9022
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
9023
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
9024
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
9025
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
9026
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
9027
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
9028
|
-
/* harmony export */ wrapMedia: function() { return /* reexport safe */
|
|
9092
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_22__.parseQuery; },
|
|
9093
|
+
/* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareEmbedCode; },
|
|
9094
|
+
/* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareMedia; },
|
|
9095
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_24__.previewBox; },
|
|
9096
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.refs; },
|
|
9097
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_25__.reset; },
|
|
9098
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.resolveElement; },
|
|
9099
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.scrollIntoViewIfNeeded; },
|
|
9100
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_28__.set; },
|
|
9101
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.wrapMedia; }
|
|
9029
9102
|
/* harmony export */ });
|
|
9030
9103
|
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
9031
9104
|
/* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
|
|
@@ -9045,18 +9118,19 @@ const getClassName = (obj)=>{
|
|
|
9045
9118
|
/* harmony import */ var _get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(94643);
|
|
9046
9119
|
/* harmony import */ var _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(80568);
|
|
9047
9120
|
/* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
|
|
9048
|
-
/* harmony import */ var
|
|
9049
|
-
/* harmony import */ var
|
|
9050
|
-
/* harmony import */ var
|
|
9051
|
-
/* harmony import */ var
|
|
9052
|
-
/* harmony import */ var
|
|
9053
|
-
/* harmony import */ var
|
|
9054
|
-
/* harmony import */ var
|
|
9055
|
-
/* harmony import */ var
|
|
9056
|
-
/* harmony import */ var
|
|
9057
|
-
/* harmony import */ var
|
|
9058
|
-
/* harmony import */ var
|
|
9059
|
-
/* harmony import */ var
|
|
9121
|
+
/* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(68645);
|
|
9122
|
+
/* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(69175);
|
|
9123
|
+
/* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(95942);
|
|
9124
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(61477);
|
|
9125
|
+
/* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82501);
|
|
9126
|
+
/* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(96437);
|
|
9127
|
+
/* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(11628);
|
|
9128
|
+
/* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58844);
|
|
9129
|
+
/* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(26395);
|
|
9130
|
+
/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76078);
|
|
9131
|
+
/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(3703);
|
|
9132
|
+
/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(50535);
|
|
9133
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(37790);
|
|
9060
9134
|
/*!
|
|
9061
9135
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9062
9136
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -9093,6 +9167,7 @@ const getClassName = (obj)=>{
|
|
|
9093
9167
|
|
|
9094
9168
|
|
|
9095
9169
|
|
|
9170
|
+
|
|
9096
9171
|
|
|
9097
9172
|
|
|
9098
9173
|
/***/ }),
|
|
@@ -11805,7 +11880,10 @@ class Selection {
|
|
|
11805
11880
|
/**
|
|
11806
11881
|
* Checks whether the editor currently in focus
|
|
11807
11882
|
*/ isFocused() {
|
|
11808
|
-
|
|
11883
|
+
const active = this.doc.activeElement;
|
|
11884
|
+
// An editable element inside the editor, as an image's caption, has the
|
|
11885
|
+
// focus while the caret is in it
|
|
11886
|
+
return Boolean(this.doc.hasFocus && this.doc.hasFocus() && active && (this.area === active || _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(active) && active.isContentEditable && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, active)));
|
|
11809
11887
|
}
|
|
11810
11888
|
/**
|
|
11811
11889
|
* Returns the current element under the cursor inside editor
|
|
@@ -12273,12 +12351,21 @@ class Selection {
|
|
|
12273
12351
|
* there: the arrow keys then have nothing to move from and the selection
|
|
12274
12352
|
* cannot be escaped. Selecting the island itself keeps the range in editable
|
|
12275
12353
|
* content, so the caret can step over it. See #1184
|
|
12354
|
+
*
|
|
12355
|
+
* An editable element inside an island, as an image's caption, is editable
|
|
12356
|
+
* content of its own, so the search stops there.
|
|
12276
12357
|
*/ __closestNotEditable(node) {
|
|
12277
12358
|
const { area } = this;
|
|
12278
12359
|
let result = null, elm = node.parentNode;
|
|
12279
12360
|
while(elm && elm !== area && area.contains(elm)){
|
|
12280
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm)
|
|
12281
|
-
|
|
12361
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm)) {
|
|
12362
|
+
const editable = elm.getAttribute('contenteditable');
|
|
12363
|
+
if (editable === 'true') {
|
|
12364
|
+
break;
|
|
12365
|
+
}
|
|
12366
|
+
if (editable === 'false') {
|
|
12367
|
+
result = elm;
|
|
12368
|
+
}
|
|
12282
12369
|
}
|
|
12283
12370
|
elm = elm.parentNode;
|
|
12284
12371
|
}
|
|
@@ -13214,7 +13301,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
13214
13301
|
/**
|
|
13215
13302
|
* Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
|
|
13216
13303
|
* @private
|
|
13217
|
-
*/ function toggleOrderedList(commitStyle, li, jodit, mode) {
|
|
13304
|
+
*/ function toggleOrderedList(commitStyle, li, jodit, mode, collapsed = false) {
|
|
13218
13305
|
if (!li) {
|
|
13219
13306
|
return mode;
|
|
13220
13307
|
}
|
|
@@ -13243,16 +13330,36 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
13243
13330
|
}
|
|
13244
13331
|
// ul => ol, ol => ul or ul => ul.class1
|
|
13245
13332
|
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
|
|
13246
|
-
|
|
13247
|
-
const
|
|
13333
|
+
// With just a caret, Word converts the whole list
|
|
13334
|
+
const items = collapsed && !isSameList ? Array.from(list.children).filter((item)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(item)) : [
|
|
13335
|
+
li
|
|
13336
|
+
];
|
|
13337
|
+
let newList;
|
|
13338
|
+
for (const item of items){
|
|
13339
|
+
newList = keepNumbering(item, (itemList)=>(0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, itemList, item, jodit, commitStyle), jodit));
|
|
13340
|
+
}
|
|
13248
13341
|
hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
|
|
13249
13342
|
return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
|
|
13250
13343
|
}
|
|
13251
13344
|
}
|
|
13252
|
-
const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"),
|
|
13345
|
+
const wrapper = keepNumbering(li, (itemList)=>unwrapList((/* inlined export .UNWRAP */"unwrap"), itemList, li, jodit, commitStyle));
|
|
13253
13346
|
hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
|
|
13254
13347
|
return (/* inlined export .UNWRAP */"unwrap");
|
|
13255
13348
|
}
|
|
13349
|
+
/**
|
|
13350
|
+
* Takes `item` out of its list with `takeOut`, and carries a numbered list's
|
|
13351
|
+
* count on past it, as Word does: 1, a bullet, then 2
|
|
13352
|
+
*/ function keepNumbering(item, takeOut) {
|
|
13353
|
+
const list = item.parentElement;
|
|
13354
|
+
const rest = item.nextElementSibling;
|
|
13355
|
+
const next = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol') ? (parseInt(list.getAttribute('start') || '1', 10) || 1) + Array.from(list.children).indexOf(item) : 0;
|
|
13356
|
+
const result = takeOut(list);
|
|
13357
|
+
const restList = rest === null || rest === void 0 ? void 0 : rest.parentElement;
|
|
13358
|
+
if (next && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(restList, 'ol')) {
|
|
13359
|
+
next > 1 ? restList.setAttribute('start', String(next)) : restList.removeAttribute('start');
|
|
13360
|
+
}
|
|
13361
|
+
return result;
|
|
13362
|
+
}
|
|
13256
13363
|
/**
|
|
13257
13364
|
* Other attributes, such as a class, still move the items into a new list,
|
|
13258
13365
|
* where the `beforeWrapList` hook can add markup to each of them
|
|
@@ -14052,7 +14159,7 @@ const transactions = {
|
|
|
14052
14159
|
[states.TOGGLE_LIST]: {
|
|
14053
14160
|
exec (value) {
|
|
14054
14161
|
return _object_spread_props(_object_spread({}, value), {
|
|
14055
|
-
mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode),
|
|
14162
|
+
mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode, value.collapsed),
|
|
14056
14163
|
next: states.END
|
|
14057
14164
|
});
|
|
14058
14165
|
}
|
|
@@ -17286,6 +17393,35 @@ UISpacer = __decorate([
|
|
|
17286
17393
|
/* harmony export */ ]);
|
|
17287
17394
|
|
|
17288
17395
|
|
|
17396
|
+
/***/ }),
|
|
17397
|
+
|
|
17398
|
+
/***/ 20014:
|
|
17399
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
17400
|
+
|
|
17401
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17402
|
+
/* harmony export */ focusFormField: function() { return /* binding */ focusFormField; }
|
|
17403
|
+
/* harmony export */ });
|
|
17404
|
+
/* harmony import */ var _helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4510);
|
|
17405
|
+
/*!
|
|
17406
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
17407
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
17408
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
17409
|
+
*/ /**
|
|
17410
|
+
* @module ui
|
|
17411
|
+
*/
|
|
17412
|
+
/**
|
|
17413
|
+
* Focuses the first text field shown in a form inside `box`, so that typing
|
|
17414
|
+
* fills it in rather than replacing the selected content, as in a dialog. A
|
|
17415
|
+
* form round `box`, as the image properties dialog's round its tabs, doesn't
|
|
17416
|
+
* count, and neither do fields outside a form, as the color picker's
|
|
17417
|
+
*/ function focusFormField(box) {
|
|
17418
|
+
var _a;
|
|
17419
|
+
(_a = (0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(box.getElementsByTagName('form')).flatMap((form)=>(0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(form.querySelectorAll('input:not([type]), input[type="text"], input[type="url"], textarea'))).find((field)=>field.offsetParent)) === null || _a === void 0 ? void 0 : _a.focus({
|
|
17420
|
+
preventScroll: true
|
|
17421
|
+
});
|
|
17422
|
+
}
|
|
17423
|
+
|
|
17424
|
+
|
|
17289
17425
|
/***/ }),
|
|
17290
17426
|
|
|
17291
17427
|
/***/ 72157:
|
|
@@ -18708,6 +18844,12 @@ var Jodit_1;
|
|
|
18708
18844
|
|
|
18709
18845
|
|
|
18710
18846
|
|
|
18847
|
+
const FOCUS_EVENTS = new Set([
|
|
18848
|
+
'focus',
|
|
18849
|
+
'blur',
|
|
18850
|
+
'focusin',
|
|
18851
|
+
'focusout'
|
|
18852
|
+
]);
|
|
18711
18853
|
const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
|
|
18712
18854
|
const __defaultClassesKey = 'data-jodit-default-classes';
|
|
18713
18855
|
const NOEDIT = {
|
|
@@ -19747,16 +19889,30 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19747
19889
|
if (place) {
|
|
19748
19890
|
this.setCurrentPlace(place);
|
|
19749
19891
|
}
|
|
19750
|
-
}).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur', (event)=>{
|
|
19892
|
+
}).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur focusin focusout', (event)=>{
|
|
19751
19893
|
if (this.o.readonly || this.__isSilentChange) {
|
|
19752
19894
|
return;
|
|
19753
19895
|
}
|
|
19896
|
+
let type = event.type;
|
|
19897
|
+
// `focus` and `blur` don't bubble from an editable element inside
|
|
19898
|
+
// the editor, as an image's caption, so `focusin` and `focusout`
|
|
19899
|
+
// stand in for them there. The focus moving between the editor
|
|
19900
|
+
// and such an element stays in the editor
|
|
19901
|
+
if (FOCUS_EVENTS.has(type)) {
|
|
19902
|
+
const inner = type === 'focusin' || type === 'focusout';
|
|
19903
|
+
if (inner === (event.target === editor) || _modules_index_js__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(editor, event.relatedTarget)) {
|
|
19904
|
+
return;
|
|
19905
|
+
}
|
|
19906
|
+
if (inner) {
|
|
19907
|
+
type = type === 'focusin' ? 'focus' : 'blur';
|
|
19908
|
+
}
|
|
19909
|
+
}
|
|
19754
19910
|
const w = this.ew;
|
|
19755
19911
|
if (event instanceof w.KeyboardEvent && event.isComposing) {
|
|
19756
19912
|
return;
|
|
19757
19913
|
}
|
|
19758
19914
|
if (this.e && this.e.fire) {
|
|
19759
|
-
if (this.e.fire(
|
|
19915
|
+
if (this.e.fire(type, event) === false) {
|
|
19760
19916
|
return false;
|
|
19761
19917
|
}
|
|
19762
19918
|
this.synchronizeValues();
|
|
@@ -20061,6 +20217,7 @@ function addClassNames(className, elm) {
|
|
|
20061
20217
|
Src: 'Src',
|
|
20062
20218
|
Title: 'العنوان',
|
|
20063
20219
|
Alternative: 'العنوان البديل',
|
|
20220
|
+
Caption: 'تسمية توضيحية',
|
|
20064
20221
|
Link: 'الرابط',
|
|
20065
20222
|
'Open link in new tab': 'افتح الرابط في نافذة جديدة',
|
|
20066
20223
|
Image: 'الصورة',
|
|
@@ -20092,6 +20249,7 @@ function addClassNames(className, elm) {
|
|
|
20092
20249
|
'Insert column after': 'إدراج عمود بعد',
|
|
20093
20250
|
'Insert row above': 'إدراج صف أعلى',
|
|
20094
20251
|
'Insert row below': 'إدراج صف أسفل',
|
|
20252
|
+
'Header row': 'صف الرأس',
|
|
20095
20253
|
'Delete table': 'حذف الجدول',
|
|
20096
20254
|
'Delete row': 'حذف الصف',
|
|
20097
20255
|
'Delete column': 'حذف العمود',
|
|
@@ -20305,6 +20463,7 @@ function addClassNames(className, elm) {
|
|
|
20305
20463
|
Src: 'Mənbə',
|
|
20306
20464
|
Title: 'Başlıq',
|
|
20307
20465
|
Alternative: 'Alternativ mətn',
|
|
20466
|
+
Caption: 'Şəkilaltı yazı',
|
|
20308
20467
|
Link: 'Keçid',
|
|
20309
20468
|
'Open link in new tab': 'Keçidi yeni vərəqdə aç',
|
|
20310
20469
|
Image: 'Şəkil',
|
|
@@ -20343,6 +20502,7 @@ function addClassNames(className, elm) {
|
|
|
20343
20502
|
'Insert column after': 'Sonrasına sütun əlavə et',
|
|
20344
20503
|
'Insert row above': 'Yuxarıya sətir əlavə et',
|
|
20345
20504
|
'Insert row below': 'Aşağıya sətir əlavə et',
|
|
20505
|
+
'Header row': 'Başlıq sətri',
|
|
20346
20506
|
'Delete table': 'Cədvəli sil',
|
|
20347
20507
|
'Delete row': 'Sətri sil',
|
|
20348
20508
|
'Delete column': 'Sütunu sil',
|
|
@@ -20546,6 +20706,7 @@ function addClassNames(className, elm) {
|
|
|
20546
20706
|
Src: 'src',
|
|
20547
20707
|
Title: 'Titulek',
|
|
20548
20708
|
Alternative: 'Alternativní text (alt)',
|
|
20709
|
+
Caption: 'Titulek',
|
|
20549
20710
|
Link: 'Link',
|
|
20550
20711
|
'Open link in new tab': 'Otevřít link v nové záložce',
|
|
20551
20712
|
Image: 'Obrázek',
|
|
@@ -20585,6 +20746,7 @@ function addClassNames(className, elm) {
|
|
|
20585
20746
|
'Insert column after': 'Vložit sloupec za',
|
|
20586
20747
|
'Insert row above': 'Vložit řádek nad',
|
|
20587
20748
|
'Insert row below': 'Vložit řádek pod',
|
|
20749
|
+
'Header row': 'Řádek záhlaví',
|
|
20588
20750
|
'Delete table': 'Vymazat tabulku',
|
|
20589
20751
|
'Delete row': 'Vymazat řádku',
|
|
20590
20752
|
'Delete column': 'Vymazat sloupec',
|
|
@@ -20783,6 +20945,7 @@ function addClassNames(className, elm) {
|
|
|
20783
20945
|
Src: 'Pfad',
|
|
20784
20946
|
Title: 'Titel',
|
|
20785
20947
|
Alternative: 'Alternativer Text',
|
|
20948
|
+
Caption: 'Beschriftung',
|
|
20786
20949
|
Link: 'Link',
|
|
20787
20950
|
'Open link in new tab': 'Link in neuem Tab öffnen',
|
|
20788
20951
|
Image: 'Bild',
|
|
@@ -20821,6 +20984,7 @@ function addClassNames(className, elm) {
|
|
|
20821
20984
|
'Insert column after': 'Spalte danach einfügen',
|
|
20822
20985
|
'Insert row above': 'Zeile oberhalb einfügen',
|
|
20823
20986
|
'Insert row below': 'Zeile unterhalb einfügen',
|
|
20987
|
+
'Header row': 'Kopfzeile',
|
|
20824
20988
|
'Delete table': 'Tabelle löschen',
|
|
20825
20989
|
'Delete row': 'Zeile löschen',
|
|
20826
20990
|
'Delete column': 'Spalte löschen',
|
|
@@ -21041,6 +21205,7 @@ function addClassNames(className, elm) {
|
|
|
21041
21205
|
Src: 'Fuente',
|
|
21042
21206
|
Title: 'Título',
|
|
21043
21207
|
Alternative: 'Texto Alternativo',
|
|
21208
|
+
Caption: 'Leyenda',
|
|
21044
21209
|
Filter: 'Filtrar',
|
|
21045
21210
|
Link: 'Vínculo',
|
|
21046
21211
|
'Open link in new tab': 'Abrir vínculo en nueva pestaña',
|
|
@@ -21080,6 +21245,7 @@ function addClassNames(className, elm) {
|
|
|
21080
21245
|
'Insert column after': 'Interar columna después',
|
|
21081
21246
|
'Insert row above': 'Insertar fila arriba',
|
|
21082
21247
|
'Insert row below': 'Insertar fila debajo',
|
|
21248
|
+
'Header row': 'Fila de encabezado',
|
|
21083
21249
|
'Delete table': 'Borrar tabla',
|
|
21084
21250
|
'Delete row': 'Borrar fila',
|
|
21085
21251
|
'Delete column': 'Borrar columna',
|
|
@@ -21282,6 +21448,7 @@ function addClassNames(className, elm) {
|
|
|
21282
21448
|
Src: 'سورس',
|
|
21283
21449
|
Title: 'عنوان',
|
|
21284
21450
|
Alternative: 'جایگزین',
|
|
21451
|
+
Caption: 'زیرنویس',
|
|
21285
21452
|
Link: 'لینک',
|
|
21286
21453
|
'Open link in new tab': 'باز کزدن لینک در تب جدید',
|
|
21287
21454
|
Image: 'عکس',
|
|
@@ -21320,6 +21487,7 @@ function addClassNames(className, elm) {
|
|
|
21320
21487
|
'Insert column after': 'افزودن ستون بعد از',
|
|
21321
21488
|
'Insert row above': 'افزودن خط قبل از',
|
|
21322
21489
|
'Insert row below': 'افزودن خط بعد از',
|
|
21490
|
+
'Header row': 'خط سرآیند',
|
|
21323
21491
|
'Delete table': 'حذف جدول',
|
|
21324
21492
|
'Delete row': 'حذف خط',
|
|
21325
21493
|
'Delete column': 'حذف ستون',
|
|
@@ -21518,6 +21686,7 @@ function addClassNames(className, elm) {
|
|
|
21518
21686
|
Src: 'Fuente',
|
|
21519
21687
|
Title: 'Otsikko',
|
|
21520
21688
|
Alternative: 'Vaihtoehtoinen teksti',
|
|
21689
|
+
Caption: 'Kuvateksti',
|
|
21521
21690
|
Filter: 'Suodatin',
|
|
21522
21691
|
Link: 'Linkki',
|
|
21523
21692
|
'Open link in new tab': 'Avaa uudessa välilehdessä',
|
|
@@ -21557,6 +21726,7 @@ function addClassNames(className, elm) {
|
|
|
21557
21726
|
'Insert column after': 'Lisää sarake jälkeen',
|
|
21558
21727
|
'Insert row above': 'Lisää rivi ylös',
|
|
21559
21728
|
'Insert row below': 'Lisää rivi alle',
|
|
21729
|
+
'Header row': 'Otsikkorivi',
|
|
21560
21730
|
'Delete table': 'Poista taulukko',
|
|
21561
21731
|
'Delete row': 'Poista rivi',
|
|
21562
21732
|
'Delete column': 'Poista sarake',
|
|
@@ -21759,6 +21929,7 @@ function addClassNames(className, elm) {
|
|
|
21759
21929
|
Src: 'Source',
|
|
21760
21930
|
Title: 'Titre',
|
|
21761
21931
|
Alternative: 'Alternative',
|
|
21932
|
+
Caption: 'Légende',
|
|
21762
21933
|
Filter: 'Filtre',
|
|
21763
21934
|
Link: 'Lien',
|
|
21764
21935
|
'Open link in new tab': 'Ouvrir le lien dans un nouvel onglet',
|
|
@@ -21800,6 +21971,7 @@ function addClassNames(className, elm) {
|
|
|
21800
21971
|
'Insert column after': 'Insérer une colonne après',
|
|
21801
21972
|
'Insert row above': 'Insérer une ligne au dessus',
|
|
21802
21973
|
'Insert row below': 'Insérer une ligne en dessous',
|
|
21974
|
+
'Header row': 'Ligne d’en-tête',
|
|
21803
21975
|
'Delete table': 'Supprimer le tableau',
|
|
21804
21976
|
'Delete row': 'Supprimer la ligne',
|
|
21805
21977
|
'Delete column': 'Supprimer la colonne',
|
|
@@ -21996,6 +22168,7 @@ function addClassNames(className, elm) {
|
|
|
21996
22168
|
Src: 'מקור',
|
|
21997
22169
|
Title: 'כותרת',
|
|
21998
22170
|
Alternative: 'כיתוב חלופי',
|
|
22171
|
+
Caption: 'כיתוב',
|
|
21999
22172
|
Link: 'קישור',
|
|
22000
22173
|
'Open link in new tab': 'פתח בכרטיסיה חדשה',
|
|
22001
22174
|
Image: 'תמונה',
|
|
@@ -22034,6 +22207,7 @@ function addClassNames(className, elm) {
|
|
|
22034
22207
|
'Insert column after': 'הכנס עמודה אחרי',
|
|
22035
22208
|
'Insert row above': 'הכנס שורה מעל',
|
|
22036
22209
|
'Insert row below': 'הכנס שורה מתחת',
|
|
22210
|
+
'Header row': 'שורת כותרת',
|
|
22037
22211
|
'Delete table': 'מחק טבלה',
|
|
22038
22212
|
'Delete row': 'מחק שורה',
|
|
22039
22213
|
'Delete column': 'מחק עמודה',
|
|
@@ -22234,6 +22408,7 @@ function addClassNames(className, elm) {
|
|
|
22234
22408
|
Src: 'Forrás',
|
|
22235
22409
|
Title: 'Cím',
|
|
22236
22410
|
Alternative: 'Helyettesítő szöveg',
|
|
22411
|
+
Caption: 'Képaláírás',
|
|
22237
22412
|
Link: 'Link',
|
|
22238
22413
|
'Open link in new tab': 'Link megnyitása új lapon',
|
|
22239
22414
|
Image: 'Kép',
|
|
@@ -22272,6 +22447,7 @@ function addClassNames(className, elm) {
|
|
|
22272
22447
|
'Insert column after': 'Oszlop beszúrás utána',
|
|
22273
22448
|
'Insert row above': 'Sor beszúrás fölé',
|
|
22274
22449
|
'Insert row below': 'Sor beszúrás alá',
|
|
22450
|
+
'Header row': 'Fejlécsor',
|
|
22275
22451
|
'Delete table': 'Táblázat törlése',
|
|
22276
22452
|
'Delete row': 'Sor törlése',
|
|
22277
22453
|
'Delete column': 'Oszlop törlése',
|
|
@@ -22470,6 +22646,7 @@ function addClassNames(className, elm) {
|
|
|
22470
22646
|
Src: 'Src',
|
|
22471
22647
|
Title: 'Judul',
|
|
22472
22648
|
Alternative: 'Teks alternatif',
|
|
22649
|
+
Caption: 'Keterangan',
|
|
22473
22650
|
Link: 'Tautan',
|
|
22474
22651
|
'Open link in new tab': 'Buka tautan di tab baru',
|
|
22475
22652
|
Image: 'Gambar',
|
|
@@ -22509,6 +22686,7 @@ function addClassNames(className, elm) {
|
|
|
22509
22686
|
'Insert column after': 'Sisipkan kolom setelahnya',
|
|
22510
22687
|
'Insert row above': 'Sisipkan baris di atasnya',
|
|
22511
22688
|
'Insert row below': 'Sisipkan baris di bawahnya',
|
|
22689
|
+
'Header row': 'Baris header',
|
|
22512
22690
|
'Delete table': 'Hapus tabel',
|
|
22513
22691
|
'Delete row': 'Hapus baris',
|
|
22514
22692
|
'Delete column': 'Hapus kolom',
|
|
@@ -22707,6 +22885,7 @@ function addClassNames(className, elm) {
|
|
|
22707
22885
|
Src: 'Fonte',
|
|
22708
22886
|
Title: 'Titolo',
|
|
22709
22887
|
Alternative: 'Testo Alternativo',
|
|
22888
|
+
Caption: 'Didascalia',
|
|
22710
22889
|
Link: 'Link',
|
|
22711
22890
|
'Open link in new tab': 'Apri il link in una nuova scheda',
|
|
22712
22891
|
Image: 'Immagine',
|
|
@@ -22745,6 +22924,7 @@ function addClassNames(className, elm) {
|
|
|
22745
22924
|
'Insert column after': 'Inserisci la colonna dopo',
|
|
22746
22925
|
'Insert row above': 'Inserisci la riga sopra',
|
|
22747
22926
|
'Insert row below': 'Inserisci la riga sotto',
|
|
22927
|
+
'Header row': 'Riga di intestazione',
|
|
22748
22928
|
'Delete table': 'Elimina tabella',
|
|
22749
22929
|
'Delete row': 'Elimina riga',
|
|
22750
22930
|
'Delete column': 'Elimina colonna',
|
|
@@ -22948,6 +23128,7 @@ function addClassNames(className, elm) {
|
|
|
22948
23128
|
Src: 'ソース',
|
|
22949
23129
|
Title: 'タイトル',
|
|
22950
23130
|
Alternative: '代替テキスト',
|
|
23131
|
+
Caption: 'キャプション',
|
|
22951
23132
|
Link: 'リンク',
|
|
22952
23133
|
'Open link in new tab': '新しいタブで開く',
|
|
22953
23134
|
Image: '画像',
|
|
@@ -22986,6 +23167,7 @@ function addClassNames(className, elm) {
|
|
|
22986
23167
|
'Insert column after': '右に列を挿入',
|
|
22987
23168
|
'Insert row above': '上に行を挿入',
|
|
22988
23169
|
'Insert row below': '下に行を挿入',
|
|
23170
|
+
'Header row': 'ヘッダー行',
|
|
22989
23171
|
'Delete table': '表を削除',
|
|
22990
23172
|
'Delete row': '行を削除',
|
|
22991
23173
|
'Delete column': '列を削除',
|
|
@@ -23200,6 +23382,7 @@ function addClassNames(className, elm) {
|
|
|
23200
23382
|
Src: '경로(src)',
|
|
23201
23383
|
Title: '제목',
|
|
23202
23384
|
Alternative: '대체 텍스트(alt)',
|
|
23385
|
+
Caption: '캡션',
|
|
23203
23386
|
Link: '링크',
|
|
23204
23387
|
'Open link in new tab': '새 탭에서 열기',
|
|
23205
23388
|
file: '파일',
|
|
@@ -23238,6 +23421,7 @@ function addClassNames(className, elm) {
|
|
|
23238
23421
|
'Insert column after': '다음 열에 삽입',
|
|
23239
23422
|
'Insert row above': '위 행에 삽입',
|
|
23240
23423
|
'Insert row below': '아래 행에 삽입',
|
|
23424
|
+
'Header row': '머리글 행',
|
|
23241
23425
|
'Delete table': '테이블 삭제',
|
|
23242
23426
|
'Delete row': '행 삭제',
|
|
23243
23427
|
'Delete column': '열 삭제',
|
|
@@ -23436,6 +23620,7 @@ function addClassNames(className, elm) {
|
|
|
23436
23620
|
Src: 'Эх үүсвэр',
|
|
23437
23621
|
Title: 'Гарчиг',
|
|
23438
23622
|
Alternative: 'Алтернатив текст',
|
|
23623
|
+
Caption: 'Тайлбар',
|
|
23439
23624
|
Link: 'Холбоос',
|
|
23440
23625
|
'Open link in new tab': 'Холбоосыг шинэ хавтсанд нээх',
|
|
23441
23626
|
Image: 'Зураг',
|
|
@@ -23474,6 +23659,7 @@ function addClassNames(className, elm) {
|
|
|
23474
23659
|
'Insert column after': 'Ард нь багана нэмэх',
|
|
23475
23660
|
'Insert row above': 'Дээр нь мөр нэмэх',
|
|
23476
23661
|
'Insert row below': 'Доор нь мөр нэмэх',
|
|
23662
|
+
'Header row': 'Толгой мөр',
|
|
23477
23663
|
'Delete table': 'Хүснэгт устгах',
|
|
23478
23664
|
'Delete row': 'Мөр устгах',
|
|
23479
23665
|
'Delete column': 'Багана устгах',
|
|
@@ -23673,6 +23859,7 @@ function addClassNames(className, elm) {
|
|
|
23673
23859
|
Src: 'Src',
|
|
23674
23860
|
Title: 'Titel',
|
|
23675
23861
|
Alternative: 'Alternatieve tekst',
|
|
23862
|
+
Caption: 'Bijschrift',
|
|
23676
23863
|
Link: 'Link',
|
|
23677
23864
|
'Open link in new tab': 'Link in nieuwe tab openen',
|
|
23678
23865
|
Image: 'Afbeelding',
|
|
@@ -23711,6 +23898,7 @@ function addClassNames(className, elm) {
|
|
|
23711
23898
|
'Insert column after': 'Kolom invoegen (na)',
|
|
23712
23899
|
'Insert row above': 'Rij invoegen (boven)',
|
|
23713
23900
|
'Insert row below': 'Rij invoegen (onder)',
|
|
23901
|
+
'Header row': 'Koprij',
|
|
23714
23902
|
'Delete table': 'Tabel verwijderen',
|
|
23715
23903
|
'Delete row': 'Rij verwijderen',
|
|
23716
23904
|
'Delete column': 'Kolom verwijderen',
|
|
@@ -23908,6 +24096,7 @@ function addClassNames(className, elm) {
|
|
|
23908
24096
|
Src: 'Kilde',
|
|
23909
24097
|
Title: 'Tittel',
|
|
23910
24098
|
Alternative: 'Alternativ',
|
|
24099
|
+
Caption: 'Bildetekst',
|
|
23911
24100
|
Filter: 'Filter',
|
|
23912
24101
|
Link: 'Lenke',
|
|
23913
24102
|
'Open link in new tab': 'Åpne lenke i ny fane',
|
|
@@ -23949,6 +24138,7 @@ function addClassNames(className, elm) {
|
|
|
23949
24138
|
'Insert column after': 'Sett inn kolonne etter',
|
|
23950
24139
|
'Insert row above': 'Sett inn rad over',
|
|
23951
24140
|
'Insert row below': 'Sett inn rad under',
|
|
24141
|
+
'Header row': 'Overskriftsrad',
|
|
23952
24142
|
'Delete table': 'Slett tabell',
|
|
23953
24143
|
'Delete row': 'Slett rad',
|
|
23954
24144
|
'Delete column': 'Slett kolonne',
|
|
@@ -24154,6 +24344,7 @@ function addClassNames(className, elm) {
|
|
|
24154
24344
|
Src: 'Źródło',
|
|
24155
24345
|
Title: 'Tytuł',
|
|
24156
24346
|
Alternative: 'Tekst alternatywny',
|
|
24347
|
+
Caption: 'Podpis',
|
|
24157
24348
|
Link: 'Link',
|
|
24158
24349
|
'Open link in new tab': 'Otwórz w nowej zakładce',
|
|
24159
24350
|
Image: 'Grafika',
|
|
@@ -24192,6 +24383,7 @@ function addClassNames(className, elm) {
|
|
|
24192
24383
|
'Insert column after': 'Wstaw kolumnę po',
|
|
24193
24384
|
'Insert row above': 'Wstaw wiersz przed',
|
|
24194
24385
|
'Insert row below': 'Wstaw wiersz po',
|
|
24386
|
+
'Header row': 'Wiersz nagłówka',
|
|
24195
24387
|
'Delete table': 'Usuń tabelę',
|
|
24196
24388
|
'Delete row': 'Usuń wiersz',
|
|
24197
24389
|
'Delete column': 'Usuń kolumnę',
|
|
@@ -24390,6 +24582,7 @@ function addClassNames(className, elm) {
|
|
|
24390
24582
|
Src: 'Fonte',
|
|
24391
24583
|
Title: 'Título',
|
|
24392
24584
|
Alternative: 'Texto Alternativo',
|
|
24585
|
+
Caption: 'Legenda',
|
|
24393
24586
|
Link: 'Link',
|
|
24394
24587
|
'Open link in new tab': 'Abrir link em nova aba',
|
|
24395
24588
|
Image: 'Imagem',
|
|
@@ -24428,6 +24621,7 @@ function addClassNames(className, elm) {
|
|
|
24428
24621
|
'Insert column after': 'Inserir coluna depois',
|
|
24429
24622
|
'Insert row above': 'Inserir linha acima',
|
|
24430
24623
|
'Insert row below': 'Inserir linha abaixo',
|
|
24624
|
+
'Header row': 'Linha de cabeçalho',
|
|
24431
24625
|
'Delete table': 'Excluir tabela',
|
|
24432
24626
|
'Delete row': 'Excluir linha',
|
|
24433
24627
|
'Delete column': 'Excluir coluna',
|
|
@@ -24630,6 +24824,7 @@ function addClassNames(className, elm) {
|
|
|
24630
24824
|
Src: 'src',
|
|
24631
24825
|
Title: 'Заголовок',
|
|
24632
24826
|
Alternative: 'Альтернативный текст (alt)',
|
|
24827
|
+
Caption: 'Подпись',
|
|
24633
24828
|
Link: 'Ссылка',
|
|
24634
24829
|
'Open link in new tab': 'Открывать ссылку в новом окне',
|
|
24635
24830
|
file: 'Файл',
|
|
@@ -24668,6 +24863,7 @@ function addClassNames(className, elm) {
|
|
|
24668
24863
|
'Insert column after': 'Вставить столбец после',
|
|
24669
24864
|
'Insert row above': 'Вставить ряд выше',
|
|
24670
24865
|
'Insert row below': 'Вставить ряд ниже',
|
|
24866
|
+
'Header row': 'Строка заголовка',
|
|
24671
24867
|
'Delete table': 'Удалить таблицу',
|
|
24672
24868
|
'Delete row': 'Удалять ряд',
|
|
24673
24869
|
'Delete column': 'Удалить столбец',
|
|
@@ -24866,6 +25062,7 @@ function addClassNames(className, elm) {
|
|
|
24866
25062
|
Src: 'Zdroj',
|
|
24867
25063
|
Title: 'Názov',
|
|
24868
25064
|
Alternative: 'Alternatívny text (alt)',
|
|
25065
|
+
Caption: 'Popis',
|
|
24869
25066
|
Link: 'Odkaz',
|
|
24870
25067
|
'Open link in new tab': 'Otvoriť odkaz na novej karte',
|
|
24871
25068
|
Image: 'Obrázok',
|
|
@@ -24904,6 +25101,7 @@ function addClassNames(className, elm) {
|
|
|
24904
25101
|
'Insert column after': 'Vložiť stĺpec za',
|
|
24905
25102
|
'Insert row above': 'Vložiť riadok nad',
|
|
24906
25103
|
'Insert row below': 'Vložiť riadok pod',
|
|
25104
|
+
'Header row': 'Riadok hlavičky',
|
|
24907
25105
|
'Delete table': 'Odstrániť tabuľku',
|
|
24908
25106
|
'Delete row': 'Odstrániť riadok',
|
|
24909
25107
|
'Delete column': 'Odstrániť stĺpec',
|
|
@@ -25108,6 +25306,7 @@ function addClassNames(className, elm) {
|
|
|
25108
25306
|
Src: 'Källa',
|
|
25109
25307
|
Title: 'Titel',
|
|
25110
25308
|
Alternative: 'Alternativ',
|
|
25309
|
+
Caption: 'Bildtext',
|
|
25111
25310
|
Filter: 'Filter',
|
|
25112
25311
|
Link: 'Länk',
|
|
25113
25312
|
'Open link in new tab': 'Öppna länk i ny flik',
|
|
@@ -25149,6 +25348,7 @@ function addClassNames(className, elm) {
|
|
|
25149
25348
|
'Insert column after': 'Infoga kolumn efter',
|
|
25150
25349
|
'Insert row above': 'Infoga rad ovanför',
|
|
25151
25350
|
'Insert row below': 'Infoga rad nedanför',
|
|
25351
|
+
'Header row': 'Rubrikrad',
|
|
25152
25352
|
'Delete table': 'Radera tabell',
|
|
25153
25353
|
'Delete row': 'Radera rad',
|
|
25154
25354
|
'Delete column': 'Radera kolumn',
|
|
@@ -25353,6 +25553,7 @@ function addClassNames(className, elm) {
|
|
|
25353
25553
|
Src: 'Kaynak',
|
|
25354
25554
|
Title: 'Başlık',
|
|
25355
25555
|
Alternative: 'Alternatif Yazı',
|
|
25556
|
+
Caption: 'Resim yazısı',
|
|
25356
25557
|
Link: 'Link',
|
|
25357
25558
|
'Open link in new tab': 'Bağlantıyı yeni sekmede aç',
|
|
25358
25559
|
Image: 'Resim',
|
|
@@ -25391,6 +25592,7 @@ function addClassNames(className, elm) {
|
|
|
25391
25592
|
'Insert column after': 'Sonrasına kolon ekle',
|
|
25392
25593
|
'Insert row above': 'Üstüne satır ekle',
|
|
25393
25594
|
'Insert row below': 'Altına satır ekle',
|
|
25595
|
+
'Header row': 'Başlık satırı',
|
|
25394
25596
|
'Delete table': 'Tabloyu sil',
|
|
25395
25597
|
'Delete row': 'Satırı sil',
|
|
25396
25598
|
'Delete column': 'Kolonu sil',
|
|
@@ -25588,6 +25790,7 @@ function addClassNames(className, elm) {
|
|
|
25588
25790
|
Src: 'src',
|
|
25589
25791
|
Title: 'Заголовок',
|
|
25590
25792
|
Alternative: 'Альтернативний текст (alt)',
|
|
25793
|
+
Caption: 'Підпис',
|
|
25591
25794
|
Link: 'Посилання',
|
|
25592
25795
|
'Open link in new tab': 'Відкрити посилання в новій вкладці',
|
|
25593
25796
|
file: 'Файл',
|
|
@@ -25626,6 +25829,7 @@ function addClassNames(className, elm) {
|
|
|
25626
25829
|
'Insert column after': 'Вставити стовпець після',
|
|
25627
25830
|
'Insert row above': 'Вставити рядок вище',
|
|
25628
25831
|
'Insert row below': 'Вставити рядок нижче',
|
|
25832
|
+
'Header row': 'Рядок заголовка',
|
|
25629
25833
|
'Delete table': 'Видалити таблицю',
|
|
25630
25834
|
'Delete row': 'Видалити рядок',
|
|
25631
25835
|
'Delete column': 'Видалити стовпчик',
|
|
@@ -25825,6 +26029,7 @@ function addClassNames(className, elm) {
|
|
|
25825
26029
|
Src: 'Src',
|
|
25826
26030
|
Title: 'Title',
|
|
25827
26031
|
Alternative: 'Alternative',
|
|
26032
|
+
Caption: '题注',
|
|
25828
26033
|
Link: 'Link',
|
|
25829
26034
|
'Open link in new tab': '在新窗口打开链接',
|
|
25830
26035
|
Image: '图片',
|
|
@@ -25863,6 +26068,7 @@ function addClassNames(className, elm) {
|
|
|
25863
26068
|
'Insert column after': '在之后插入列',
|
|
25864
26069
|
'Insert row above': '在之前插入行',
|
|
25865
26070
|
'Insert row below': '在之后插入行',
|
|
26071
|
+
'Header row': '标题行',
|
|
25866
26072
|
'Delete table': '删除表格',
|
|
25867
26073
|
'Delete row': '删除行',
|
|
25868
26074
|
'Delete column': '删除列',
|
|
@@ -26061,6 +26267,7 @@ function addClassNames(className, elm) {
|
|
|
26061
26267
|
Src: 'Src',
|
|
26062
26268
|
Title: 'Title',
|
|
26063
26269
|
Alternative: '替代',
|
|
26270
|
+
Caption: '標號',
|
|
26064
26271
|
Link: 'Link',
|
|
26065
26272
|
'Open link in new tab': '在新分頁開啟連結',
|
|
26066
26273
|
Image: '圖片',
|
|
@@ -26099,6 +26306,7 @@ function addClassNames(className, elm) {
|
|
|
26099
26306
|
'Insert column after': '插入右方欄',
|
|
26100
26307
|
'Insert row above': '插入上方列',
|
|
26101
26308
|
'Insert row below': '插入下方列',
|
|
26309
|
+
'Header row': '標題列',
|
|
26102
26310
|
'Delete table': '刪除表格',
|
|
26103
26311
|
'Delete row': '刪除整列',
|
|
26104
26312
|
'Delete column': '刪除整欄',
|
|
@@ -31356,6 +31564,11 @@ StatusBar = __decorate([
|
|
|
31356
31564
|
|
|
31357
31565
|
|
|
31358
31566
|
|
|
31567
|
+
const SECTIONS = new Set([
|
|
31568
|
+
'thead',
|
|
31569
|
+
'tbody',
|
|
31570
|
+
'tfoot'
|
|
31571
|
+
]);
|
|
31359
31572
|
const markedValue = new WeakMap();
|
|
31360
31573
|
class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
|
|
31361
31574
|
/** @override */ className() {
|
|
@@ -31514,7 +31727,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31514
31727
|
}
|
|
31515
31728
|
});
|
|
31516
31729
|
}
|
|
31517
|
-
|
|
31730
|
+
const section = line && line.parentElement;
|
|
31731
|
+
// Below the header rows, a row is a body row
|
|
31732
|
+
if (after && line && !line.nextElementSibling && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, 'thead')) {
|
|
31733
|
+
const body = Table.__bodyOf(table, section, create);
|
|
31734
|
+
body.insertBefore(row, body.firstChild);
|
|
31735
|
+
Table.__setCellsTag(row, 'td', create);
|
|
31736
|
+
} else if (after && line && line.nextSibling) {
|
|
31518
31737
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
|
|
31519
31738
|
} else if (!after && line) {
|
|
31520
31739
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
|
|
@@ -31522,6 +31741,79 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31522
31741
|
_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);
|
|
31523
31742
|
}
|
|
31524
31743
|
}
|
|
31744
|
+
/**
|
|
31745
|
+
* The table's first `<tbody>`, made after `head` when there's none
|
|
31746
|
+
*/ static __bodyOf(table, head, create) {
|
|
31747
|
+
let body = table.tBodies[0];
|
|
31748
|
+
if (!body) {
|
|
31749
|
+
body = create.element('tbody');
|
|
31750
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(head, body);
|
|
31751
|
+
}
|
|
31752
|
+
return body;
|
|
31753
|
+
}
|
|
31754
|
+
/**
|
|
31755
|
+
* Makes the row's cells `<td>`, or `<th>` with a column scope unless they
|
|
31756
|
+
* have one, keeping their content and attributes. The cells it replaces
|
|
31757
|
+
* go in `replaced`, with their replacements
|
|
31758
|
+
*/ static __setCellsTag(row, tag, create, replaced) {
|
|
31759
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).forEach((cell)=>{
|
|
31760
|
+
const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(cell, tag) ? cell : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.replace(cell, tag, create, true);
|
|
31761
|
+
if (next !== cell) {
|
|
31762
|
+
replaced === null || replaced === void 0 ? void 0 : replaced.set(cell, next);
|
|
31763
|
+
}
|
|
31764
|
+
if (tag === 'td') {
|
|
31765
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', null);
|
|
31766
|
+
} else if (!next.hasAttribute('scope')) {
|
|
31767
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', 'col');
|
|
31768
|
+
}
|
|
31769
|
+
});
|
|
31770
|
+
}
|
|
31771
|
+
/**
|
|
31772
|
+
* The table has a header row: a `<thead>` with a row in it
|
|
31773
|
+
*/ hasHeaderRow(table) {
|
|
31774
|
+
var _a;
|
|
31775
|
+
return Boolean((_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows.length);
|
|
31776
|
+
}
|
|
31777
|
+
/**
|
|
31778
|
+
* Header rows can always go back into the body. The first row can become
|
|
31779
|
+
* one unless a cell in it spans into the next, as a span can't cross from
|
|
31780
|
+
* the `<thead>` into the `<tbody>`
|
|
31781
|
+
*/ canToggleHeaderRow(table) {
|
|
31782
|
+
const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
31783
|
+
return this.hasHeaderRow(table) || Boolean(row && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).every((cell)=>cell.rowSpan < 2));
|
|
31784
|
+
}
|
|
31785
|
+
/**
|
|
31786
|
+
* Moves the first row into a `<thead>`, its cells becoming
|
|
31787
|
+
* `<th scope="col">`, or the header rows back to the start of the
|
|
31788
|
+
* `<tbody>` as `<td>`. Their content, attributes and spans stay. Returns
|
|
31789
|
+
* the cells it replaced, with their replacements
|
|
31790
|
+
*/ toggleHeaderRow(table) {
|
|
31791
|
+
const replaced = new Map();
|
|
31792
|
+
const create = this.j.createInside;
|
|
31793
|
+
const head = table.tHead;
|
|
31794
|
+
if (!this.canToggleHeaderRow(table)) {
|
|
31795
|
+
return replaced;
|
|
31796
|
+
}
|
|
31797
|
+
if (head && this.hasHeaderRow(table)) {
|
|
31798
|
+
const body = Table.__bodyOf(table, head, create);
|
|
31799
|
+
const first = body.firstChild;
|
|
31800
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(head.rows).forEach((row)=>{
|
|
31801
|
+
body.insertBefore(row, first);
|
|
31802
|
+
Table.__setCellsTag(row, 'td', create, replaced);
|
|
31803
|
+
});
|
|
31804
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
|
|
31805
|
+
} else {
|
|
31806
|
+
const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
31807
|
+
const thead = head || create.element('thead');
|
|
31808
|
+
if (!head) {
|
|
31809
|
+
// Setting it puts it after a caption and column groups
|
|
31810
|
+
table.tHead = thead;
|
|
31811
|
+
}
|
|
31812
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(thead, row);
|
|
31813
|
+
Table.__setCellsTag(row, 'th', create, replaced);
|
|
31814
|
+
}
|
|
31815
|
+
return replaced;
|
|
31816
|
+
}
|
|
31525
31817
|
/**
|
|
31526
31818
|
* Inserts a new line after row what contains the selected cell
|
|
31527
31819
|
*
|
|
@@ -31578,7 +31870,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
31578
31870
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
|
|
31579
31871
|
}
|
|
31580
31872
|
});
|
|
31873
|
+
const section = row.parentElement;
|
|
31581
31874
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
|
|
31875
|
+
// A section left without rows goes too, so a table whose header row
|
|
31876
|
+
// was deleted has no `<thead>`
|
|
31877
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, SECTIONS) && !section.rows.length) {
|
|
31878
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(section);
|
|
31879
|
+
}
|
|
31582
31880
|
}
|
|
31583
31881
|
/**
|
|
31584
31882
|
* Remove row
|
|
@@ -32002,7 +32300,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
|
|
|
32002
32300
|
const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
|
|
32003
32301
|
selector && selectors.push(selector);
|
|
32004
32302
|
});
|
|
32005
|
-
|
|
32303
|
+
// Across cells, the browser's own text selection, which a drag makes
|
|
32304
|
+
// as well, isn't shown
|
|
32305
|
+
const hidden = selectors.length > 1 ? selectors.map((selector)=>`${selector}::selection,${selector} ::selection`).join(',') + '{background:transparent}' : '';
|
|
32306
|
+
style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` + hidden : '';
|
|
32006
32307
|
});
|
|
32007
32308
|
}
|
|
32008
32309
|
}
|
|
@@ -32036,10 +32337,11 @@ const instance = (j)=>j.getInstance('Table', j.o);
|
|
|
32036
32337
|
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
|
|
32037
32338
|
/* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37790);
|
|
32038
32339
|
/* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62843);
|
|
32039
|
-
/* harmony import */ var
|
|
32040
|
-
/* harmony import */ var
|
|
32041
|
-
/* harmony import */ var
|
|
32042
|
-
/* harmony import */ var
|
|
32340
|
+
/* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20014);
|
|
32341
|
+
/* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72157);
|
|
32342
|
+
/* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12153);
|
|
32343
|
+
/* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(56917);
|
|
32344
|
+
/* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21491);
|
|
32043
32345
|
function _define_property(obj, key, value) {
|
|
32044
32346
|
if (key in obj) {
|
|
32045
32347
|
Object.defineProperty(obj, key, {
|
|
@@ -32119,6 +32421,7 @@ function _object_spread_props(target, source) {
|
|
|
32119
32421
|
|
|
32120
32422
|
|
|
32121
32423
|
|
|
32424
|
+
|
|
32122
32425
|
|
|
32123
32426
|
|
|
32124
32427
|
const INPUT_TAGS = new Set([
|
|
@@ -32224,7 +32527,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32224
32527
|
configurable: true
|
|
32225
32528
|
});
|
|
32226
32529
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(container, button);
|
|
32227
|
-
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${
|
|
32530
|
+
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.get('chevron')}</span>`);
|
|
32228
32531
|
// For caching
|
|
32229
32532
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(button, trigger);
|
|
32230
32533
|
return container;
|
|
@@ -32281,7 +32584,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32281
32584
|
state.icon.iconURL = ctr.iconURL;
|
|
32282
32585
|
} else {
|
|
32283
32586
|
const name = ctr.icon || ctr.name;
|
|
32284
|
-
state.icon.name =
|
|
32587
|
+
state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
|
|
32285
32588
|
}
|
|
32286
32589
|
if (!ctr.iconURL && !state.icon.name) {
|
|
32287
32590
|
state.text = ctr.text || ctr.name;
|
|
@@ -32312,6 +32615,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32312
32615
|
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
32313
32616
|
if (elm) {
|
|
32314
32617
|
popup.setContent((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? this.j.c.fromHTML(elm) : elm).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
32618
|
+
// The focus stays in the content for a list, which
|
|
32619
|
+
// typing searches, but goes to a form, as in a dialog
|
|
32620
|
+
(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__.focusFormField)(popup.container);
|
|
32315
32621
|
} else {
|
|
32316
32622
|
this.__closePopup();
|
|
32317
32623
|
}
|
|
@@ -32454,7 +32760,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32454
32760
|
* Create an open popup list
|
|
32455
32761
|
*/ __openControlList(control) {
|
|
32456
32762
|
var _a, _b, _c, _d, _e;
|
|
32457
|
-
const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,
|
|
32763
|
+
const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__.findControlType)(key, controls);
|
|
32458
32764
|
const list = control.list;
|
|
32459
32765
|
const menu = this.openPopup();
|
|
32460
32766
|
menu.parentElement = this;
|
|
@@ -32462,7 +32768,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32462
32768
|
if (content) {
|
|
32463
32769
|
return this.__openMenu(menu, content);
|
|
32464
32770
|
}
|
|
32465
|
-
const toolbar = (0,
|
|
32771
|
+
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_22__.makeCollection)(this.j);
|
|
32466
32772
|
toolbar.parentElement = menu;
|
|
32467
32773
|
toolbar.mode = 'vertical';
|
|
32468
32774
|
const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
|
|
@@ -32525,7 +32831,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32525
32831
|
}
|
|
32526
32832
|
openPopup() {
|
|
32527
32833
|
this.__closePopup();
|
|
32528
|
-
this.openedPopup = new
|
|
32834
|
+
this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__.Popup(this.j, false);
|
|
32529
32835
|
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
32530
32836
|
return this.openedPopup;
|
|
32531
32837
|
}
|
|
@@ -32543,15 +32849,18 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
32543
32849
|
this.openedPopup = null;
|
|
32544
32850
|
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
32545
32851
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
32546
|
-
// the button, otherwise it would fall out to the document
|
|
32547
|
-
|
|
32852
|
+
// the button, otherwise it would fall out to the document. A form
|
|
32853
|
+
// gives it back to the content, with the selection it was opened for
|
|
32854
|
+
const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement), inForm = hadFocus && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.closest(activeElement, 'form', popup.container);
|
|
32548
32855
|
this.state.activated = false;
|
|
32549
32856
|
popup.close();
|
|
32550
32857
|
popup.destruct();
|
|
32551
32858
|
if (this.trigger) {
|
|
32552
32859
|
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__.attr)(this.trigger, 'aria-expanded', false);
|
|
32553
32860
|
}
|
|
32554
|
-
if (
|
|
32861
|
+
if (inForm && (0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_9__.isJoditObject)(this.j)) {
|
|
32862
|
+
this.j.s.focus();
|
|
32863
|
+
} else if (hadFocus) {
|
|
32555
32864
|
this.focus();
|
|
32556
32865
|
}
|
|
32557
32866
|
}
|
|
@@ -33534,6 +33843,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
33534
33843
|
continue;
|
|
33535
33844
|
}
|
|
33536
33845
|
const reader = new FileReader();
|
|
33846
|
+
const { name } = file;
|
|
33537
33847
|
const readerPromise = uploader.j.async.promise((resolve, reject)=>{
|
|
33538
33848
|
reader.onerror = reject;
|
|
33539
33849
|
reader.onloadend = ()=>{
|
|
@@ -33544,6 +33854,9 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
33544
33854
|
],
|
|
33545
33855
|
isImages: [
|
|
33546
33856
|
true
|
|
33857
|
+
],
|
|
33858
|
+
fileNames: [
|
|
33859
|
+
name
|
|
33547
33860
|
]
|
|
33548
33861
|
};
|
|
33549
33862
|
const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
|
|
@@ -34177,6 +34490,7 @@ function val(elm, name, value) {
|
|
|
34177
34490
|
/* harmony import */ var _core_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23282);
|
|
34178
34491
|
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29960);
|
|
34179
34492
|
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67510);
|
|
34493
|
+
/* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20014);
|
|
34180
34494
|
/*!
|
|
34181
34495
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
34182
34496
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -34186,6 +34500,7 @@ function val(elm, name, value) {
|
|
|
34186
34500
|
|
|
34187
34501
|
|
|
34188
34502
|
|
|
34503
|
+
|
|
34189
34504
|
/**
|
|
34190
34505
|
* Build tabs system
|
|
34191
34506
|
*
|
|
@@ -34266,6 +34581,7 @@ function val(elm, name, value) {
|
|
|
34266
34581
|
if (state) {
|
|
34267
34582
|
state.activeTab = name;
|
|
34268
34583
|
}
|
|
34584
|
+
;(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__.focusFormField)(tab);
|
|
34269
34585
|
return false;
|
|
34270
34586
|
});
|
|
34271
34587
|
nameToTab[name] = {
|
|
@@ -35226,49 +35542,50 @@ UiAiAssistant = __decorate([
|
|
|
35226
35542
|
/* harmony import */ var _hr_hr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16233);
|
|
35227
35543
|
/* harmony import */ var _iframe_iframe_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(77469);
|
|
35228
35544
|
/* harmony import */ var _image_image_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(23531);
|
|
35229
|
-
/* harmony import */ var
|
|
35230
|
-
/* harmony import */ var
|
|
35231
|
-
/* harmony import */ var
|
|
35232
|
-
/* harmony import */ var
|
|
35233
|
-
/* harmony import */ var
|
|
35234
|
-
/* harmony import */ var
|
|
35235
|
-
/* harmony import */ var
|
|
35236
|
-
/* harmony import */ var
|
|
35237
|
-
/* harmony import */ var
|
|
35238
|
-
/* harmony import */ var
|
|
35239
|
-
/* harmony import */ var
|
|
35240
|
-
/* harmony import */ var
|
|
35241
|
-
/* harmony import */ var
|
|
35242
|
-
/* harmony import */ var
|
|
35243
|
-
/* harmony import */ var
|
|
35244
|
-
/* harmony import */ var
|
|
35245
|
-
/* harmony import */ var
|
|
35246
|
-
/* harmony import */ var
|
|
35247
|
-
/* harmony import */ var
|
|
35248
|
-
/* harmony import */ var
|
|
35249
|
-
/* harmony import */ var
|
|
35250
|
-
/* harmony import */ var
|
|
35251
|
-
/* harmony import */ var
|
|
35252
|
-
/* harmony import */ var
|
|
35253
|
-
/* harmony import */ var
|
|
35254
|
-
/* harmony import */ var
|
|
35255
|
-
/* harmony import */ var
|
|
35256
|
-
/* harmony import */ var
|
|
35257
|
-
/* harmony import */ var
|
|
35258
|
-
/* harmony import */ var
|
|
35259
|
-
/* harmony import */ var
|
|
35260
|
-
/* harmony import */ var
|
|
35261
|
-
/* harmony import */ var
|
|
35262
|
-
/* harmony import */ var
|
|
35263
|
-
/* harmony import */ var
|
|
35264
|
-
/* harmony import */ var
|
|
35265
|
-
/* harmony import */ var
|
|
35266
|
-
/* harmony import */ var
|
|
35267
|
-
/* harmony import */ var
|
|
35268
|
-
/* harmony import */ var
|
|
35269
|
-
/* harmony import */ var
|
|
35270
|
-
/* harmony import */ var
|
|
35271
|
-
/* harmony import */ var
|
|
35545
|
+
/* harmony import */ var _image_caption_image_caption_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84571);
|
|
35546
|
+
/* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(80763);
|
|
35547
|
+
/* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3215);
|
|
35548
|
+
/* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(70045);
|
|
35549
|
+
/* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(93401);
|
|
35550
|
+
/* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76295);
|
|
35551
|
+
/* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(59483);
|
|
35552
|
+
/* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(91071);
|
|
35553
|
+
/* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(61019);
|
|
35554
|
+
/* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(65517);
|
|
35555
|
+
/* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(20071);
|
|
35556
|
+
/* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(32309);
|
|
35557
|
+
/* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(64837);
|
|
35558
|
+
/* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(79799);
|
|
35559
|
+
/* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(31571);
|
|
35560
|
+
/* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(85407);
|
|
35561
|
+
/* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(59451);
|
|
35562
|
+
/* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(18363);
|
|
35563
|
+
/* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(8355);
|
|
35564
|
+
/* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(58519);
|
|
35565
|
+
/* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(6687);
|
|
35566
|
+
/* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(56113);
|
|
35567
|
+
/* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(9159);
|
|
35568
|
+
/* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(12019);
|
|
35569
|
+
/* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(36125);
|
|
35570
|
+
/* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(9881);
|
|
35571
|
+
/* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(28545);
|
|
35572
|
+
/* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(45927);
|
|
35573
|
+
/* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(52951);
|
|
35574
|
+
/* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(43809);
|
|
35575
|
+
/* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(7309);
|
|
35576
|
+
/* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(68687);
|
|
35577
|
+
/* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(59495);
|
|
35578
|
+
/* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(39627);
|
|
35579
|
+
/* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(767);
|
|
35580
|
+
/* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(43003);
|
|
35581
|
+
/* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(72439);
|
|
35582
|
+
/* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(94529);
|
|
35583
|
+
/* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(26551);
|
|
35584
|
+
/* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(96139);
|
|
35585
|
+
/* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(72253);
|
|
35586
|
+
/* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(65735);
|
|
35587
|
+
/* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(83671);
|
|
35588
|
+
/* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(3115);
|
|
35272
35589
|
/*!
|
|
35273
35590
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35274
35591
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35340,6 +35657,7 @@ UiAiAssistant = __decorate([
|
|
|
35340
35657
|
|
|
35341
35658
|
|
|
35342
35659
|
|
|
35660
|
+
|
|
35343
35661
|
|
|
35344
35662
|
|
|
35345
35663
|
// JODIT-START:FAT
|
|
@@ -35428,6 +35746,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
|
|
|
35428
35746
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, fakeNode)) {
|
|
35429
35747
|
return;
|
|
35430
35748
|
}
|
|
35749
|
+
// An editable element inside non-editable content, as an image's
|
|
35750
|
+
// caption is, keeps the caret, so nothing past its edge goes
|
|
35751
|
+
const host = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, (elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(elm) && elm.hasAttribute('contenteditable') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(elm.parentNode, jodit.editor), jodit.editor);
|
|
35752
|
+
if (host && sel.cursorInTheEdge(backspace, host, fakeNode)) {
|
|
35753
|
+
return false;
|
|
35754
|
+
}
|
|
35431
35755
|
if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
|
|
35432
35756
|
return false;
|
|
35433
35757
|
}
|
|
@@ -35476,7 +35800,13 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
|
|
|
35476
35800
|
if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
|
|
35477
35801
|
return;
|
|
35478
35802
|
}
|
|
35479
|
-
|
|
35803
|
+
// The search for text skips text of only non-breaking spaces, but the
|
|
35804
|
+
// browser types after it
|
|
35805
|
+
let before = fakeNode.previousSibling;
|
|
35806
|
+
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && !/\S|\u00A0/.test(before.data)){
|
|
35807
|
+
before = before.previousSibling;
|
|
35808
|
+
}
|
|
35809
|
+
const text = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) ? before : (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
|
|
35480
35810
|
const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
|
|
35481
35811
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(text) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(text, jodit.editor) || link && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(link, fakeNode) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor) !== _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) {
|
|
35482
35812
|
return;
|
|
@@ -36052,7 +36382,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
|
|
|
36052
36382
|
}
|
|
36053
36383
|
if (charRemoved) {
|
|
36054
36384
|
removeEmptyForParent(fakeNode, 'a');
|
|
36055
|
-
addBRInsideEmptyBlock(jodit, fakeNode);
|
|
36385
|
+
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, fakeNode);
|
|
36056
36386
|
jodit.s.setCursorBefore(fakeNode);
|
|
36057
36387
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(fakeNode.previousSibling, 'br') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, false)) {
|
|
36058
36388
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fakeNode, jodit.createInside.element('br'));
|
|
@@ -36087,13 +36417,6 @@ function getNextInlineSibling(sibling, backspace, root) {
|
|
|
36087
36417
|
parent = p;
|
|
36088
36418
|
}
|
|
36089
36419
|
}
|
|
36090
|
-
/**
|
|
36091
|
-
* Helper add BR element inside empty block element
|
|
36092
|
-
*/ function addBRInsideEmptyBlock(jodit, node) {
|
|
36093
|
-
if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode)) {
|
|
36094
|
-
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(node, jodit.createInside.element('br'));
|
|
36095
|
-
}
|
|
36096
|
-
}
|
|
36097
36420
|
function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
36098
36421
|
// For Unicode escapes
|
|
36099
36422
|
let value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
|
|
@@ -36657,6 +36980,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
|
|
|
36657
36980
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36658
36981
|
|
|
36659
36982
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
36983
|
+
/* harmony export */ addBRInsideEmptyBlock: function() { return /* binding */ addBRInsideEmptyBlock; },
|
|
36660
36984
|
/* harmony export */ findMostNestedNeighbor: function() { return /* binding */ findMostNestedNeighbor; },
|
|
36661
36985
|
/* harmony export */ getMoveFilter: function() { return /* binding */ getMoveFilter; }
|
|
36662
36986
|
/* harmony export */ });
|
|
@@ -36692,6 +37016,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
|
|
|
36692
37016
|
*/ function getMoveFilter(jodit) {
|
|
36693
37017
|
return (node)=>jodit.e.fire('backSpaceIsMovedIgnore', node) !== true;
|
|
36694
37018
|
}
|
|
37019
|
+
/**
|
|
37020
|
+
* Helper add BR element inside empty block element
|
|
37021
|
+
* @private
|
|
37022
|
+
*/ function addBRInsideEmptyBlock(jodit, node) {
|
|
37023
|
+
if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmptyTextNode)) {
|
|
37024
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(node, jodit.createInside.element('br'));
|
|
37025
|
+
}
|
|
37026
|
+
}
|
|
36695
37027
|
|
|
36696
37028
|
|
|
36697
37029
|
/***/ }),
|
|
@@ -37133,7 +37465,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
|
|
|
37133
37465
|
beforeCommand(command) {
|
|
37134
37466
|
if (command.toLowerCase() === 'removeformat') {
|
|
37135
37467
|
if (this.j.s.isCollapsed()) {
|
|
37136
|
-
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.
|
|
37468
|
+
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForWord)(this.j);
|
|
37137
37469
|
} else {
|
|
37138
37470
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
|
|
37139
37471
|
}
|
|
@@ -37429,16 +37761,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
37429
37761
|
|
|
37430
37762
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37431
37763
|
/* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
|
|
37432
|
-
/* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
|
|
37433
37764
|
/* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
|
|
37434
|
-
/* harmony export */
|
|
37435
|
-
/* harmony export */
|
|
37765
|
+
/* harmony export */ removeFormatForWord: function() { return /* reexport safe */ _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__.removeFormatForWord; },
|
|
37766
|
+
/* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__.removePlaceholderBr; },
|
|
37767
|
+
/* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__.visitNodeWalker; }
|
|
37436
37768
|
/* harmony export */ });
|
|
37437
37769
|
/* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
|
|
37438
37770
|
/* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
|
|
37439
37771
|
/* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
|
|
37440
|
-
/* harmony import */ var
|
|
37441
|
-
/* harmony import */ var
|
|
37772
|
+
/* harmony import */ var _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70464);
|
|
37773
|
+
/* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56385);
|
|
37774
|
+
/* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39516);
|
|
37442
37775
|
/*!
|
|
37443
37776
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37444
37777
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37453,6 +37786,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
|
|
|
37453
37786
|
|
|
37454
37787
|
|
|
37455
37788
|
|
|
37789
|
+
|
|
37456
37790
|
/***/ }),
|
|
37457
37791
|
|
|
37458
37792
|
/***/ 15908:
|
|
@@ -37605,6 +37939,126 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
|
37605
37939
|
}
|
|
37606
37940
|
|
|
37607
37941
|
|
|
37942
|
+
/***/ }),
|
|
37943
|
+
|
|
37944
|
+
/***/ 70464:
|
|
37945
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37946
|
+
|
|
37947
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37948
|
+
/* harmony export */ removeFormatForWord: function() { return /* binding */ removeFormatForWord; }
|
|
37949
|
+
/* harmony export */ });
|
|
37950
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
37951
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
37952
|
+
/* harmony import */ var _remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
|
|
37953
|
+
/*!
|
|
37954
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37955
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
37956
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
37957
|
+
*/
|
|
37958
|
+
|
|
37959
|
+
|
|
37960
|
+
/**
|
|
37961
|
+
* With just a caret, Word clears the formatting of the word the caret is
|
|
37962
|
+
* inside, and does nothing at a word's start or end. This selects the word,
|
|
37963
|
+
* clears it as a selection, and puts the caret back where it was.
|
|
37964
|
+
* @private
|
|
37965
|
+
*/ function removeFormatForWord(jodit) {
|
|
37966
|
+
const { range } = jodit.s;
|
|
37967
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
|
|
37968
|
+
if (!block) {
|
|
37969
|
+
return;
|
|
37970
|
+
}
|
|
37971
|
+
const texts = textsOf(block);
|
|
37972
|
+
const text = texts.map((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.nodeValue : ' ').join('');
|
|
37973
|
+
const at = textOffset(texts, range);
|
|
37974
|
+
if (!isWordChar(text[at - 1]) || !isWordChar(text[at])) {
|
|
37975
|
+
return;
|
|
37976
|
+
}
|
|
37977
|
+
let start = at, end = at;
|
|
37978
|
+
while(isWordChar(text[start - 1])){
|
|
37979
|
+
start -= 1;
|
|
37980
|
+
}
|
|
37981
|
+
while(isWordChar(text[end])){
|
|
37982
|
+
end += 1;
|
|
37983
|
+
}
|
|
37984
|
+
const word = jodit.s.createRange();
|
|
37985
|
+
word.setStart(...positionAt(texts, start, true));
|
|
37986
|
+
word.setEnd(...positionAt(texts, end, false));
|
|
37987
|
+
jodit.s.selectRange(word);
|
|
37988
|
+
(0,_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection)(jodit);
|
|
37989
|
+
// The text is the same, so the caret goes back to the same character
|
|
37990
|
+
const caret = jodit.s.createRange();
|
|
37991
|
+
caret.setStart(...positionAt(textsOf(block), at, false));
|
|
37992
|
+
jodit.s.selectRange(caret);
|
|
37993
|
+
}
|
|
37994
|
+
function isWordChar(char) {
|
|
37995
|
+
return Boolean(char && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && /\S/.test(char));
|
|
37996
|
+
}
|
|
37997
|
+
/**
|
|
37998
|
+
* The block's own text nodes, in order, leaving out those of blocks inside
|
|
37999
|
+
* it. A line break, an image or another inseparable element ends a word, so
|
|
38000
|
+
* it is kept as a one-character piece
|
|
38001
|
+
*/ function textsOf(block) {
|
|
38002
|
+
const texts = [];
|
|
38003
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
|
|
38004
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, block)) {
|
|
38005
|
+
return;
|
|
38006
|
+
}
|
|
38007
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
38008
|
+
texts.push(node);
|
|
38009
|
+
}
|
|
38010
|
+
});
|
|
38011
|
+
return texts;
|
|
38012
|
+
}
|
|
38013
|
+
function lengthOf(piece) {
|
|
38014
|
+
var _a, _b;
|
|
38015
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? (_b = (_a = piece.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0 : 1;
|
|
38016
|
+
}
|
|
38017
|
+
/**
|
|
38018
|
+
* How many characters of `texts` come before the caret, which can be in a
|
|
38019
|
+
* text node or between nodes
|
|
38020
|
+
*/ function textOffset(texts, caret) {
|
|
38021
|
+
let at = 0;
|
|
38022
|
+
for (const piece of texts){
|
|
38023
|
+
if (piece === caret.startContainer) {
|
|
38024
|
+
return at + caret.startOffset;
|
|
38025
|
+
}
|
|
38026
|
+
const length = lengthOf(piece);
|
|
38027
|
+
// This piece ends after the caret, so the caret is before it
|
|
38028
|
+
if (caret.comparePoint(piece, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? length : 0) > 0) {
|
|
38029
|
+
return at;
|
|
38030
|
+
}
|
|
38031
|
+
at += length;
|
|
38032
|
+
}
|
|
38033
|
+
return at;
|
|
38034
|
+
}
|
|
38035
|
+
/**
|
|
38036
|
+
* The text node and offset of the `at`th character. Where two text nodes
|
|
38037
|
+
* meet, `later` picks the start of the second over the end of the first
|
|
38038
|
+
*/ function positionAt(texts, at, later) {
|
|
38039
|
+
var _a, _b;
|
|
38040
|
+
let before = 0;
|
|
38041
|
+
let last = null;
|
|
38042
|
+
for (const piece of texts){
|
|
38043
|
+
const length = lengthOf(piece);
|
|
38044
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) && (at < before + length || !later && at === before + length)) {
|
|
38045
|
+
return [
|
|
38046
|
+
piece,
|
|
38047
|
+
at - before
|
|
38048
|
+
];
|
|
38049
|
+
}
|
|
38050
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece)) {
|
|
38051
|
+
last = piece;
|
|
38052
|
+
}
|
|
38053
|
+
before += length;
|
|
38054
|
+
}
|
|
38055
|
+
return [
|
|
38056
|
+
last,
|
|
38057
|
+
(_b = (_a = last === null || last === void 0 ? void 0 : last.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0
|
|
38058
|
+
];
|
|
38059
|
+
}
|
|
38060
|
+
|
|
38061
|
+
|
|
37608
38062
|
/***/ }),
|
|
37609
38063
|
|
|
37610
38064
|
/***/ 56385:
|
|
@@ -39542,6 +39996,7 @@ var DragState;
|
|
|
39542
39996
|
/**
|
|
39543
39997
|
* Drag start handler
|
|
39544
39998
|
*/ onDragStart(event) {
|
|
39999
|
+
var _a;
|
|
39545
40000
|
if (event.type === 'dragstart' && this.draggable) {
|
|
39546
40001
|
return false;
|
|
39547
40002
|
}
|
|
@@ -39560,7 +40015,8 @@ var DragState;
|
|
|
39560
40015
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(lastTarget.parentElement, 'a') && lastTarget.parentElement.firstChild === lastTarget && lastTarget.parentElement.lastChild === lastTarget) {
|
|
39561
40016
|
lastTarget = lastTarget.parentElement;
|
|
39562
40017
|
}
|
|
39563
|
-
|
|
40018
|
+
// A captioned image goes with its caption
|
|
40019
|
+
this.startDragging((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, lastTarget)) !== null && _a !== void 0 ? _a : lastTarget, event);
|
|
39564
40020
|
}
|
|
39565
40021
|
/**
|
|
39566
40022
|
* Prepare the ghost element and switch to the waiting state.
|
|
@@ -41642,7 +42098,8 @@ const libraries = new Map();
|
|
|
41642
42098
|
/* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
|
|
41643
42099
|
/* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
|
|
41644
42100
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
|
|
41645
|
-
/* harmony import */ var
|
|
42101
|
+
/* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
|
|
42102
|
+
/* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
|
|
41646
42103
|
/*!
|
|
41647
42104
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41648
42105
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -41652,7 +42109,39 @@ const libraries = new Map();
|
|
|
41652
42109
|
|
|
41653
42110
|
|
|
41654
42111
|
|
|
41655
|
-
|
|
42112
|
+
|
|
42113
|
+
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
|
42114
|
+
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
|
|
42115
|
+
// Opt in: previews keep the toolbar's styles unless the integrator lists
|
|
42116
|
+
// the properties to copy, e.g. ['font-family', 'font-weight', 'color']
|
|
42117
|
+
previewProperties: []
|
|
42118
|
+
};
|
|
42119
|
+
/**
|
|
42120
|
+
* The list is outside the editing area, and in iframe mode outside its
|
|
42121
|
+
* document, so a preview would take the toolbar's styles. This reads how the
|
|
42122
|
+
* content shows a tag from a probe in the editing area
|
|
42123
|
+
*/ function previewStyle(editor, tag) {
|
|
42124
|
+
const { previewProperties } = editor.o.formatBlock;
|
|
42125
|
+
if (!previewProperties.length) {
|
|
42126
|
+
return '';
|
|
42127
|
+
}
|
|
42128
|
+
const probe = editor.createInside.element(tag, {
|
|
42129
|
+
style: 'display: none'
|
|
42130
|
+
});
|
|
42131
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
|
|
42132
|
+
const style = editor.ew.getComputedStyle(probe);
|
|
42133
|
+
const size = parseFloat(style.fontSize) || 16;
|
|
42134
|
+
const css = previewProperties.map((prop)=>{
|
|
42135
|
+
let value = style.getPropertyValue(prop);
|
|
42136
|
+
if (value && prop === 'font-family') {
|
|
42137
|
+
value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
|
|
42138
|
+
}
|
|
42139
|
+
// Each browser knows only one of the smoothing properties
|
|
42140
|
+
return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
|
|
42141
|
+
}).join('');
|
|
42142
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
|
|
42143
|
+
return css;
|
|
42144
|
+
}
|
|
41656
42145
|
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
|
|
41657
42146
|
command: 'formatBlock',
|
|
41658
42147
|
value (editor, button) {
|
|
@@ -41693,11 +42182,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
|
|
|
41693
42182
|
isActive: (editor, button)=>{
|
|
41694
42183
|
return button.state.value !== editor.o.enter && (0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(button.control.list) && Boolean(button.control.list[button.state.value]);
|
|
41695
42184
|
},
|
|
41696
|
-
childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
|
|
42185
|
+
childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
|
|
41697
42186
|
tooltip: 'Insert format block'
|
|
41698
42187
|
};
|
|
41699
42188
|
|
|
41700
42189
|
|
|
42190
|
+
/***/ }),
|
|
42191
|
+
|
|
42192
|
+
/***/ 4932:
|
|
42193
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
42194
|
+
|
|
42195
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
42196
|
+
/* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
|
|
42197
|
+
/* harmony export */ });
|
|
42198
|
+
/*!
|
|
42199
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42200
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
42201
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
42202
|
+
*/ const carried = new WeakMap();
|
|
42203
|
+
const fetched = new Map();
|
|
42204
|
+
let editors = 0;
|
|
42205
|
+
/**
|
|
42206
|
+
* In iframe mode the content's web fonts load only in the iframe, but the
|
|
42207
|
+
* Paragraph list is in the page, so its previews would fall back to the
|
|
42208
|
+
* page's fonts. This adds the content's web fonts to the page under names
|
|
42209
|
+
* only this editor uses, so nothing else on the page can pick them up, and
|
|
42210
|
+
* puts those names first in a preview's `font-family`
|
|
42211
|
+
*/ function withContentFonts(editor, fontFamily) {
|
|
42212
|
+
const { ed, od } = editor;
|
|
42213
|
+
if (ed === od) {
|
|
42214
|
+
return fontFamily;
|
|
42215
|
+
}
|
|
42216
|
+
const state = carriedFor(editor);
|
|
42217
|
+
carry(editor, state);
|
|
42218
|
+
const webFonts = new Set();
|
|
42219
|
+
ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
|
|
42220
|
+
return fontFamily.split(',').map((family)=>{
|
|
42221
|
+
const name = familyName(family);
|
|
42222
|
+
return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
|
|
42223
|
+
}).join(', ');
|
|
42224
|
+
}
|
|
42225
|
+
function carriedFor(editor) {
|
|
42226
|
+
let state = carried.get(editor);
|
|
42227
|
+
if (!state) {
|
|
42228
|
+
const { od } = editor;
|
|
42229
|
+
const created = {
|
|
42230
|
+
prefix: `jodit-preview-${++editors}-`,
|
|
42231
|
+
faces: new Map(),
|
|
42232
|
+
pending: false
|
|
42233
|
+
};
|
|
42234
|
+
carried.set(editor, created);
|
|
42235
|
+
editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
|
|
42236
|
+
state = created;
|
|
42237
|
+
}
|
|
42238
|
+
return state;
|
|
42239
|
+
}
|
|
42240
|
+
/**
|
|
42241
|
+
* It looks each time the list opens, since the content's stylesheets may
|
|
42242
|
+
* still have been loading the time before
|
|
42243
|
+
*/ function carry(editor, state) {
|
|
42244
|
+
// Every preview in the list asks, but one look is enough
|
|
42245
|
+
if (state.pending) {
|
|
42246
|
+
return;
|
|
42247
|
+
}
|
|
42248
|
+
state.pending = true;
|
|
42249
|
+
const { ed, od } = editor;
|
|
42250
|
+
Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
|
|
42251
|
+
state.pending = false;
|
|
42252
|
+
if (editor.isInDestruct) {
|
|
42253
|
+
return;
|
|
42254
|
+
}
|
|
42255
|
+
lists.flat().forEach((font)=>{
|
|
42256
|
+
const key = JSON.stringify(font);
|
|
42257
|
+
if (!state.faces.has(key)) {
|
|
42258
|
+
const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
|
|
42259
|
+
od.fonts.add(face);
|
|
42260
|
+
state.faces.set(key, face);
|
|
42261
|
+
}
|
|
42262
|
+
});
|
|
42263
|
+
});
|
|
42264
|
+
}
|
|
42265
|
+
/**
|
|
42266
|
+
* The web fonts a stylesheet and those it imports declare
|
|
42267
|
+
*/ function fontsOf(sheet, base) {
|
|
42268
|
+
var _a;
|
|
42269
|
+
let rules;
|
|
42270
|
+
try {
|
|
42271
|
+
rules = sheet.cssRules;
|
|
42272
|
+
} catch (_b) {
|
|
42273
|
+
// Another site's stylesheet can't be read, but it can be fetched if
|
|
42274
|
+
// the site allows it, as Google Fonts does
|
|
42275
|
+
const { href } = sheet;
|
|
42276
|
+
if (!href) {
|
|
42277
|
+
return Promise.resolve([]);
|
|
42278
|
+
}
|
|
42279
|
+
let fonts = fetched.get(href);
|
|
42280
|
+
if (!fonts) {
|
|
42281
|
+
fonts = fetchFonts(href);
|
|
42282
|
+
fetched.set(href, fonts);
|
|
42283
|
+
}
|
|
42284
|
+
return fonts;
|
|
42285
|
+
}
|
|
42286
|
+
return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
|
|
42287
|
+
}
|
|
42288
|
+
function fontsIn(rules, base) {
|
|
42289
|
+
return Promise.all(Array.from(rules, (rule)=>{
|
|
42290
|
+
if ('styleSheet' in rule) {
|
|
42291
|
+
const { styleSheet } = rule;
|
|
42292
|
+
return styleSheet ? fontsOf(styleSheet, base) : [];
|
|
42293
|
+
}
|
|
42294
|
+
if ('cssRules' in rule) {
|
|
42295
|
+
return fontsIn(rule.cssRules, base);
|
|
42296
|
+
}
|
|
42297
|
+
return rule.cssText.startsWith('@font-face') ? [
|
|
42298
|
+
fontOf(rule, base)
|
|
42299
|
+
] : [];
|
|
42300
|
+
})).then((lists)=>lists.flat());
|
|
42301
|
+
}
|
|
42302
|
+
function fontOf(rule, base) {
|
|
42303
|
+
const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
|
|
42304
|
+
return {
|
|
42305
|
+
family: familyName(rule.style.getPropertyValue('font-family')),
|
|
42306
|
+
source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
|
|
42307
|
+
descriptors: {
|
|
42308
|
+
style: value('font-style'),
|
|
42309
|
+
weight: value('font-weight'),
|
|
42310
|
+
stretch: value('font-stretch'),
|
|
42311
|
+
unicodeRange: value('unicode-range')
|
|
42312
|
+
}
|
|
42313
|
+
};
|
|
42314
|
+
}
|
|
42315
|
+
function fetchFonts(href) {
|
|
42316
|
+
return fetch(href).then((response)=>response.text()).then((text)=>{
|
|
42317
|
+
const doc = document.implementation.createHTMLDocument('');
|
|
42318
|
+
const style = doc.createElement('style');
|
|
42319
|
+
style.textContent = text;
|
|
42320
|
+
doc.head.appendChild(style);
|
|
42321
|
+
return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
|
|
42322
|
+
}).catch(()=>[]);
|
|
42323
|
+
}
|
|
42324
|
+
function familyName(family) {
|
|
42325
|
+
return family.replace(/["']/g, '').trim().toLowerCase();
|
|
42326
|
+
}
|
|
42327
|
+
/**
|
|
42328
|
+
* The fonts are added to the page, so a relative URL would point somewhere
|
|
42329
|
+
* else
|
|
42330
|
+
*/ function withAbsoluteUrls(css, base) {
|
|
42331
|
+
return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
|
|
42332
|
+
try {
|
|
42333
|
+
return `url("${new URL(url, base).href}")`;
|
|
42334
|
+
} catch (_a) {
|
|
42335
|
+
return match;
|
|
42336
|
+
}
|
|
42337
|
+
});
|
|
42338
|
+
}
|
|
42339
|
+
|
|
42340
|
+
|
|
41701
42341
|
/***/ }),
|
|
41702
42342
|
|
|
41703
42343
|
/***/ 96111:
|
|
@@ -42378,6 +43018,858 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
42378
43018
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
|
|
42379
43019
|
|
|
42380
43020
|
|
|
43021
|
+
/***/ }),
|
|
43022
|
+
|
|
43023
|
+
/***/ 43687:
|
|
43024
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
43025
|
+
|
|
43026
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
|
|
43027
|
+
/*!
|
|
43028
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43029
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
43030
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
43031
|
+
*/
|
|
43032
|
+
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
|
|
43033
|
+
wrapper: {
|
|
43034
|
+
tag: 'figure',
|
|
43035
|
+
className: ''
|
|
43036
|
+
},
|
|
43037
|
+
inner: null,
|
|
43038
|
+
caption: {
|
|
43039
|
+
tag: 'figcaption',
|
|
43040
|
+
className: ''
|
|
43041
|
+
}
|
|
43042
|
+
};
|
|
43043
|
+
|
|
43044
|
+
|
|
43045
|
+
/***/ }),
|
|
43046
|
+
|
|
43047
|
+
/***/ 84571:
|
|
43048
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
43049
|
+
|
|
43050
|
+
/* unused harmony export imageCaption */
|
|
43051
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
43052
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
43053
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
43054
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
43055
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
43056
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
43057
|
+
/* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
|
|
43058
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
|
|
43059
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
|
|
43060
|
+
function _define_property(obj, key, value) {
|
|
43061
|
+
if (key in obj) {
|
|
43062
|
+
Object.defineProperty(obj, key, {
|
|
43063
|
+
value: value,
|
|
43064
|
+
enumerable: true,
|
|
43065
|
+
configurable: true,
|
|
43066
|
+
writable: true
|
|
43067
|
+
});
|
|
43068
|
+
} else obj[key] = value;
|
|
43069
|
+
return obj;
|
|
43070
|
+
}
|
|
43071
|
+
function _object_spread(target) {
|
|
43072
|
+
for(var i = 1; i < arguments.length; i++){
|
|
43073
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
43074
|
+
var ownKeys = Object.keys(source);
|
|
43075
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
43076
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
43077
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
43078
|
+
}));
|
|
43079
|
+
}
|
|
43080
|
+
ownKeys.forEach(function(key) {
|
|
43081
|
+
_define_property(target, key, source[key]);
|
|
43082
|
+
});
|
|
43083
|
+
}
|
|
43084
|
+
return target;
|
|
43085
|
+
}
|
|
43086
|
+
function ownKeys(object, enumerableOnly) {
|
|
43087
|
+
var keys = Object.keys(object);
|
|
43088
|
+
if (Object.getOwnPropertySymbols) {
|
|
43089
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
43090
|
+
if (enumerableOnly) {
|
|
43091
|
+
symbols = symbols.filter(function(sym) {
|
|
43092
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
43093
|
+
});
|
|
43094
|
+
}
|
|
43095
|
+
keys.push.apply(keys, symbols);
|
|
43096
|
+
}
|
|
43097
|
+
return keys;
|
|
43098
|
+
}
|
|
43099
|
+
function _object_spread_props(target, source) {
|
|
43100
|
+
source = source != null ? source : {};
|
|
43101
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
43102
|
+
else {
|
|
43103
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
43104
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
43105
|
+
});
|
|
43106
|
+
}
|
|
43107
|
+
return target;
|
|
43108
|
+
}
|
|
43109
|
+
/*!
|
|
43110
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43111
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
43112
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
43113
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
43114
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
43115
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
43116
|
+
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;
|
|
43117
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
43118
|
+
};
|
|
43119
|
+
|
|
43120
|
+
|
|
43121
|
+
|
|
43122
|
+
|
|
43123
|
+
|
|
43124
|
+
|
|
43125
|
+
|
|
43126
|
+
|
|
43127
|
+
|
|
43128
|
+
const MARGINS = [
|
|
43129
|
+
'margin-top',
|
|
43130
|
+
'margin-right',
|
|
43131
|
+
'margin-bottom',
|
|
43132
|
+
'margin-left'
|
|
43133
|
+
];
|
|
43134
|
+
const ARROWS = new Set([
|
|
43135
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
|
|
43136
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
|
|
43137
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
|
|
43138
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
|
|
43139
|
+
]);
|
|
43140
|
+
// Blocks that only hold text, which a block wrapper can't go inside
|
|
43141
|
+
const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
|
|
43142
|
+
// They would replace the caption with a heading, quote or list
|
|
43143
|
+
const BLOCK_COMMANDS = new Set([
|
|
43144
|
+
'formatblock',
|
|
43145
|
+
'insertorderedlist',
|
|
43146
|
+
'insertunorderedlist'
|
|
43147
|
+
]);
|
|
43148
|
+
const PLACEHOLDER = 'data-jodit-placeholder';
|
|
43149
|
+
/**
|
|
43150
|
+
* Jodit's focus colour round a caption being typed in, in place of the
|
|
43151
|
+
* browser's, and a placeholder in a blank caption. `:where` leaves both for
|
|
43152
|
+
* the content's own styles to change
|
|
43153
|
+
*/ const CAPTION_STYLE = ':where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}' + `:where(.jodit-wysiwyg [${PLACEHOLDER}]){position:relative}` + `:where(.jodit-wysiwyg [${PLACEHOLDER}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${PLACEHOLDER});pointer-events:none}`;
|
|
43154
|
+
/**
|
|
43155
|
+
* Captions images: wraps an image in `imageCaption`'s elements and back, and
|
|
43156
|
+
* keeps the caret in the caption
|
|
43157
|
+
*/ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
43158
|
+
/** @override */ afterInit(jodit) {
|
|
43159
|
+
// It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
43160
|
+
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
|
|
43161
|
+
jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
|
|
43162
|
+
top: true
|
|
43163
|
+
});
|
|
43164
|
+
this.onChangePlace();
|
|
43165
|
+
}
|
|
43166
|
+
/**
|
|
43167
|
+
* Gives `image` a caption, or takes it away, as `on` says, or else the
|
|
43168
|
+
* other way round from how it is. Returns the caption it gave, or null
|
|
43169
|
+
* when it took one away
|
|
43170
|
+
*/ onToggleImageCaption(image, on) {
|
|
43171
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
|
|
43172
|
+
if (wrapper && on !== true) {
|
|
43173
|
+
const fresh = this.__freshCaption(wrapper);
|
|
43174
|
+
if (fresh) {
|
|
43175
|
+
this.__unrecorded(()=>this.__restore(fresh));
|
|
43176
|
+
} else {
|
|
43177
|
+
this.__uncaption(wrapper, image);
|
|
43178
|
+
}
|
|
43179
|
+
return null;
|
|
43180
|
+
}
|
|
43181
|
+
if (!wrapper && on !== false) {
|
|
43182
|
+
return this.__caption(image);
|
|
43183
|
+
}
|
|
43184
|
+
}
|
|
43185
|
+
__freshCaption(wrapper) {
|
|
43186
|
+
const fresh = this.__fresh;
|
|
43187
|
+
if (!fresh || fresh.wrapper !== wrapper || wrapper.parentNode !== fresh.parent || wrapper.previousSibling !== fresh.previous || wrapper.nextSibling !== fresh.next || shape(wrapper, fresh.image) !== fresh.shape || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper) !== fresh.caption || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(fresh.caption)) {
|
|
43188
|
+
return null;
|
|
43189
|
+
}
|
|
43190
|
+
return fresh;
|
|
43191
|
+
}
|
|
43192
|
+
/**
|
|
43193
|
+
* Giving a caption isn't a step in the history of its own, as the first
|
|
43194
|
+
* thing typed in it is, so Undo never brings back a blank caption
|
|
43195
|
+
*/ __caption(image) {
|
|
43196
|
+
const { j } = this;
|
|
43197
|
+
const { snapshot } = j.history;
|
|
43198
|
+
// The steps before it are recorded first
|
|
43199
|
+
j.setEditorValue();
|
|
43200
|
+
j.e.fire('internalUpdate');
|
|
43201
|
+
const before = snapshot.make();
|
|
43202
|
+
let fresh;
|
|
43203
|
+
snapshot.transaction(()=>{
|
|
43204
|
+
fresh = this.__fresh = _object_spread_props(_object_spread({}, this.__wrap(image)), {
|
|
43205
|
+
before
|
|
43206
|
+
});
|
|
43207
|
+
j.setEditorValue();
|
|
43208
|
+
});
|
|
43209
|
+
// The value is as it was, so no `change` updates the toolbars
|
|
43210
|
+
j.e.fire('updateToolbar');
|
|
43211
|
+
return fresh.caption;
|
|
43212
|
+
}
|
|
43213
|
+
/**
|
|
43214
|
+
* Changes the content with no step in the history of its own, so Undo
|
|
43215
|
+
* never brings back a blank caption. A step still open takes it in
|
|
43216
|
+
*/ __unrecorded(changes) {
|
|
43217
|
+
const { j } = this;
|
|
43218
|
+
j.setEditorValue();
|
|
43219
|
+
this.__fresh = null;
|
|
43220
|
+
j.history.snapshot.transaction(()=>{
|
|
43221
|
+
changes();
|
|
43222
|
+
j.setEditorValue();
|
|
43223
|
+
});
|
|
43224
|
+
j.e.fire('internalUpdate');
|
|
43225
|
+
j.e.fire('updateToolbar');
|
|
43226
|
+
}
|
|
43227
|
+
__wrap(image) {
|
|
43228
|
+
var _a;
|
|
43229
|
+
const { j } = this;
|
|
43230
|
+
const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
|
|
43231
|
+
const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
|
|
43232
|
+
const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
|
|
43233
|
+
const attributes = [
|
|
43234
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
|
|
43235
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
|
|
43236
|
+
];
|
|
43237
|
+
const place = target.parentNode;
|
|
43238
|
+
const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(image, 'width') || pixels((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width')) || (image.offsetWidth ? `${image.offsetWidth}px` : '');
|
|
43239
|
+
const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
|
|
43240
|
+
const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
|
|
43241
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
|
|
43242
|
+
const wrapper = this.__create(wrapperPart);
|
|
43243
|
+
const box = inner ? this.__create(inner) : wrapper;
|
|
43244
|
+
const caption = this.__create(captionPart);
|
|
43245
|
+
caption.appendChild(j.createInside.element('br'));
|
|
43246
|
+
const split = this.__insert(wrapper, target);
|
|
43247
|
+
if (box !== wrapper) {
|
|
43248
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
|
|
43249
|
+
}
|
|
43250
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
|
|
43251
|
+
target,
|
|
43252
|
+
caption
|
|
43253
|
+
]);
|
|
43254
|
+
moveMargins(image, wrapper);
|
|
43255
|
+
// The wrapper takes the image's width, and the image fills it, so the
|
|
43256
|
+
// caption wraps under the image
|
|
43257
|
+
if (width) {
|
|
43258
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
|
|
43259
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
|
|
43260
|
+
}
|
|
43261
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
|
|
43262
|
+
this.__mark(wrapper);
|
|
43263
|
+
return {
|
|
43264
|
+
caption,
|
|
43265
|
+
wrapper,
|
|
43266
|
+
image,
|
|
43267
|
+
target,
|
|
43268
|
+
place,
|
|
43269
|
+
split,
|
|
43270
|
+
attributes,
|
|
43271
|
+
parent: wrapper.parentNode,
|
|
43272
|
+
previous: wrapper.previousSibling,
|
|
43273
|
+
next: wrapper.nextSibling,
|
|
43274
|
+
shape: shape(wrapper, image)
|
|
43275
|
+
};
|
|
43276
|
+
}
|
|
43277
|
+
/**
|
|
43278
|
+
* Puts the image back as it was before its caption: in the line the
|
|
43279
|
+
* caption split, and with its own alignment, margins and width. The image
|
|
43280
|
+
* goes into the part of the line holding the caret, so the caret stays
|
|
43281
|
+
*/ __restore(fresh) {
|
|
43282
|
+
var _a, _b;
|
|
43283
|
+
const { wrapper, image, target, place, split, attributes } = fresh;
|
|
43284
|
+
if (!split) {
|
|
43285
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
|
|
43286
|
+
} else if (!split.head && !split.tail) {
|
|
43287
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
|
|
43288
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
|
|
43289
|
+
} else {
|
|
43290
|
+
const { sel } = this.j.s;
|
|
43291
|
+
const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
|
|
43292
|
+
const { head, tail } = split;
|
|
43293
|
+
if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
|
|
43294
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
|
|
43295
|
+
target,
|
|
43296
|
+
...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_a = tail === null || tail === void 0 ? void 0 : tail.childNodes) !== null && _a !== void 0 ? _a : [])
|
|
43297
|
+
]);
|
|
43298
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
|
|
43299
|
+
} else if (tail) {
|
|
43300
|
+
const first = tail.firstChild;
|
|
43301
|
+
[
|
|
43302
|
+
...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_b = head === null || head === void 0 ? void 0 : head.childNodes) !== null && _b !== void 0 ? _b : []),
|
|
43303
|
+
target
|
|
43304
|
+
].forEach((node)=>tail.insertBefore(node, first));
|
|
43305
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
|
|
43306
|
+
}
|
|
43307
|
+
}
|
|
43308
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
|
|
43309
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
|
|
43310
|
+
style: attributes[0],
|
|
43311
|
+
class: attributes[1]
|
|
43312
|
+
});
|
|
43313
|
+
}
|
|
43314
|
+
__uncaption(wrapper, image) {
|
|
43315
|
+
var _a;
|
|
43316
|
+
const { j } = this;
|
|
43317
|
+
// Read while the wrapper is still one, with its caption
|
|
43318
|
+
const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(wrapper, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
|
|
43319
|
+
const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
|
|
43320
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
|
|
43321
|
+
const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
|
|
43322
|
+
moveMargins(wrapper, image);
|
|
43323
|
+
if (width) {
|
|
43324
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
|
|
43325
|
+
}
|
|
43326
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
|
|
43327
|
+
// A block wrapper leaves the image in a paragraph of its own
|
|
43328
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) && wrapper.parentNode === j.editor && j.o.enter.toLowerCase() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.BR) {
|
|
43329
|
+
const line = j.createInside.element(j.o.enter);
|
|
43330
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
|
|
43331
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
|
|
43332
|
+
} else {
|
|
43333
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
|
|
43334
|
+
}
|
|
43335
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
|
|
43336
|
+
}
|
|
43337
|
+
__create({ tag, className }) {
|
|
43338
|
+
return this.j.createInside.element(tag, className ? {
|
|
43339
|
+
class: className
|
|
43340
|
+
} : {});
|
|
43341
|
+
}
|
|
43342
|
+
/**
|
|
43343
|
+
* Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
|
|
43344
|
+
* paragraph is split round it, and a part left empty goes
|
|
43345
|
+
*/ __insert(wrapper, target) {
|
|
43346
|
+
const { j } = this;
|
|
43347
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, j.editor) : null;
|
|
43348
|
+
if (!block || !TEXT_BLOCK.test(block.nodeName)) {
|
|
43349
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
|
|
43350
|
+
return null;
|
|
43351
|
+
}
|
|
43352
|
+
const range = j.ed.createRange();
|
|
43353
|
+
range.setStartBefore(block);
|
|
43354
|
+
range.setEndBefore(target);
|
|
43355
|
+
const start = range.extractContents();
|
|
43356
|
+
range.setStartAfter(target);
|
|
43357
|
+
range.setEndAfter(block);
|
|
43358
|
+
const end = range.extractContents();
|
|
43359
|
+
const [head, tail] = [
|
|
43360
|
+
start,
|
|
43361
|
+
end
|
|
43362
|
+
].map((part, index)=>{
|
|
43363
|
+
const line = part.firstChild;
|
|
43364
|
+
if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
|
|
43365
|
+
return null;
|
|
43366
|
+
}
|
|
43367
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(index ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, block, line);
|
|
43368
|
+
return line;
|
|
43369
|
+
});
|
|
43370
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
|
|
43371
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
|
|
43372
|
+
return {
|
|
43373
|
+
block,
|
|
43374
|
+
head,
|
|
43375
|
+
tail
|
|
43376
|
+
};
|
|
43377
|
+
}
|
|
43378
|
+
/**
|
|
43379
|
+
* The wrapper can't be edited, apart from its caption, so typing can't
|
|
43380
|
+
* land between the image and the caption
|
|
43381
|
+
*/ __mark(wrapper) {
|
|
43382
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
|
|
43383
|
+
const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
|
|
43384
|
+
if (caption) {
|
|
43385
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
|
|
43386
|
+
this.__placeholder(caption);
|
|
43387
|
+
}
|
|
43388
|
+
}
|
|
43389
|
+
__placeholder(caption) {
|
|
43390
|
+
const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
|
|
43391
|
+
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
|
|
43392
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
|
|
43393
|
+
}
|
|
43394
|
+
}
|
|
43395
|
+
onChange() {
|
|
43396
|
+
const { j } = this;
|
|
43397
|
+
if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
43398
|
+
return;
|
|
43399
|
+
}
|
|
43400
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
|
|
43401
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
|
|
43402
|
+
this.__mark(elm);
|
|
43403
|
+
}
|
|
43404
|
+
});
|
|
43405
|
+
}
|
|
43406
|
+
/**
|
|
43407
|
+
* The placeholder goes with the first letter typed or pasted, and comes
|
|
43408
|
+
* back when the last is deleted
|
|
43409
|
+
*/ onInput() {
|
|
43410
|
+
const caption = this.__caretCaption();
|
|
43411
|
+
if (caption) {
|
|
43412
|
+
this.__placeholder(caption);
|
|
43413
|
+
}
|
|
43414
|
+
}
|
|
43415
|
+
/**
|
|
43416
|
+
* The editor's own attributes stay out of the value, as the caption would
|
|
43417
|
+
* be editable on the page. So does a caption given and left blank, as
|
|
43418
|
+
* leaving it takes it off, so saving at once keeps the image as it was
|
|
43419
|
+
*/ onAfterGetValueFromEditor(data) {
|
|
43420
|
+
if (!data.value.includes('contenteditable')) {
|
|
43421
|
+
return;
|
|
43422
|
+
}
|
|
43423
|
+
const { j } = this;
|
|
43424
|
+
const template = j.c.element('template');
|
|
43425
|
+
template.innerHTML = data.value;
|
|
43426
|
+
const wrappers = (root)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(root.querySelectorAll(j.o.imageCaption.wrapper.tag)).filter((wrapper)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper));
|
|
43427
|
+
const copies = wrappers(template.content);
|
|
43428
|
+
const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
|
|
43429
|
+
const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
|
|
43430
|
+
const placed = fresh && copy && placedIn(j, fresh, copy);
|
|
43431
|
+
let changed = false;
|
|
43432
|
+
if (placed) {
|
|
43433
|
+
this.__restore(placed);
|
|
43434
|
+
changed = true;
|
|
43435
|
+
}
|
|
43436
|
+
copies.forEach((wrapper)=>{
|
|
43437
|
+
[
|
|
43438
|
+
wrapper,
|
|
43439
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
|
|
43440
|
+
].forEach((elm)=>[
|
|
43441
|
+
'contenteditable',
|
|
43442
|
+
PLACEHOLDER
|
|
43443
|
+
].forEach((name)=>{
|
|
43444
|
+
if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
|
|
43445
|
+
elm.removeAttribute(name);
|
|
43446
|
+
changed = true;
|
|
43447
|
+
}
|
|
43448
|
+
}));
|
|
43449
|
+
});
|
|
43450
|
+
if (changed) {
|
|
43451
|
+
data.value = template.innerHTML;
|
|
43452
|
+
}
|
|
43453
|
+
}
|
|
43454
|
+
onChangePlace() {
|
|
43455
|
+
const { j } = this;
|
|
43456
|
+
// Captured, to come first: the editor's own `focusout` listener can stop
|
|
43457
|
+
// the event as it fires `blur`, and an image's `mousedown` listener
|
|
43458
|
+
// moves the focus before the press reaches the editor
|
|
43459
|
+
j.e.off([
|
|
43460
|
+
j.editor,
|
|
43461
|
+
j.ow,
|
|
43462
|
+
j.ew
|
|
43463
|
+
], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
|
|
43464
|
+
capture: true
|
|
43465
|
+
}).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
|
|
43466
|
+
capture: true
|
|
43467
|
+
}).on([
|
|
43468
|
+
j.ow,
|
|
43469
|
+
j.ew
|
|
43470
|
+
], 'mouseup.imageCaption', this.__onMouseUp);
|
|
43471
|
+
}
|
|
43472
|
+
__onMouseDown(event) {
|
|
43473
|
+
this.__press = event.target;
|
|
43474
|
+
}
|
|
43475
|
+
/**
|
|
43476
|
+
* A caption left blank goes when the focus leaves it. That's checked once
|
|
43477
|
+
* the focus has landed, as switching windows or opening the editor's own
|
|
43478
|
+
* popups keeps it, and once a press that took the focus is over, as the
|
|
43479
|
+
* browsers fire no click when its target moves
|
|
43480
|
+
*/ __onFocusOut(event) {
|
|
43481
|
+
const caption = event.target;
|
|
43482
|
+
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption)) !== caption) {
|
|
43483
|
+
return;
|
|
43484
|
+
}
|
|
43485
|
+
if (this.__press) {
|
|
43486
|
+
this.__afterPress.push(caption);
|
|
43487
|
+
} else {
|
|
43488
|
+
this.__dropBlank(caption, null);
|
|
43489
|
+
}
|
|
43490
|
+
}
|
|
43491
|
+
__onMouseUp() {
|
|
43492
|
+
const press = this.__press;
|
|
43493
|
+
this.__press = null;
|
|
43494
|
+
this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
|
|
43495
|
+
}
|
|
43496
|
+
__dropBlank(caption, press) {
|
|
43497
|
+
// `async.setTimeout` runs a timeout of 0 at once
|
|
43498
|
+
this.j.async.setTimeout(()=>{
|
|
43499
|
+
const { j } = this;
|
|
43500
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
|
|
43501
|
+
const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
|
|
43502
|
+
if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
|
|
43503
|
+
return;
|
|
43504
|
+
}
|
|
43505
|
+
const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
|
|
43506
|
+
const fresh = this.__freshCaption(wrapper);
|
|
43507
|
+
this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
|
|
43508
|
+
// The click opened the image's popup below the caption, so it
|
|
43509
|
+
// opens again below the image, as after the popup's Caption button
|
|
43510
|
+
if (clicked) {
|
|
43511
|
+
j.e.fire('recalcPositionPopup');
|
|
43512
|
+
j.e.fire('closeAllPopups');
|
|
43513
|
+
}
|
|
43514
|
+
}, 1);
|
|
43515
|
+
}
|
|
43516
|
+
/**
|
|
43517
|
+
* The caption has the focus, or had it when another window took it, or
|
|
43518
|
+
* the editor's own popups and dialogs have it, as the link form
|
|
43519
|
+
*/ __keepsFocus(caption) {
|
|
43520
|
+
const { j } = this;
|
|
43521
|
+
const doc = caption.ownerDocument;
|
|
43522
|
+
if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
|
|
43523
|
+
return true;
|
|
43524
|
+
}
|
|
43525
|
+
const active = j.od.activeElement;
|
|
43526
|
+
return Boolean(active && active !== j.iframe && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.editor, active) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.container, active) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(active, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'data-editor_id') === j.id, j.od.body)));
|
|
43527
|
+
}
|
|
43528
|
+
/**
|
|
43529
|
+
* The caption the caret is in
|
|
43530
|
+
*/ __caretCaption() {
|
|
43531
|
+
const { s } = this.j;
|
|
43532
|
+
if (!s.isInsideArea) {
|
|
43533
|
+
return null;
|
|
43534
|
+
}
|
|
43535
|
+
const node = s.range.startContainer;
|
|
43536
|
+
const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, node));
|
|
43537
|
+
return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
|
|
43538
|
+
}
|
|
43539
|
+
/**
|
|
43540
|
+
* Enter in a caption starts a line after the image, and Shift+Enter
|
|
43541
|
+
* breaks the caption's line, as everywhere
|
|
43542
|
+
*/ onBeforeEnter(event) {
|
|
43543
|
+
const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
|
|
43544
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
|
|
43545
|
+
if (!wrapper) {
|
|
43546
|
+
return;
|
|
43547
|
+
}
|
|
43548
|
+
const { j } = this;
|
|
43549
|
+
this.__focusEditor();
|
|
43550
|
+
// The Enter plugin breaks the line after an inline wrapper
|
|
43551
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
|
|
43552
|
+
j.s.setCursorAfter(wrapper);
|
|
43553
|
+
return;
|
|
43554
|
+
}
|
|
43555
|
+
const line = this.__line();
|
|
43556
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
|
|
43557
|
+
j.s.setCursorIn(line);
|
|
43558
|
+
j.synchronizeValues();
|
|
43559
|
+
return false;
|
|
43560
|
+
}
|
|
43561
|
+
/**
|
|
43562
|
+
* The caption keeps the focus, as an editable element of its own, and
|
|
43563
|
+
* would take the caret back, so the editor takes it before the caret
|
|
43564
|
+
* leaves the caption
|
|
43565
|
+
*/ __focusEditor() {
|
|
43566
|
+
this.j.editor.focus({
|
|
43567
|
+
preventScroll: true
|
|
43568
|
+
});
|
|
43569
|
+
}
|
|
43570
|
+
__line() {
|
|
43571
|
+
const { j } = this;
|
|
43572
|
+
const line = j.createInside.element(j.o.enter);
|
|
43573
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
|
|
43574
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
|
|
43575
|
+
}
|
|
43576
|
+
return line;
|
|
43577
|
+
}
|
|
43578
|
+
/**
|
|
43579
|
+
* A caption holds text. An image, a table or a block put in it would end
|
|
43580
|
+
* the captioned image, so it goes after the image, as Enter would
|
|
43581
|
+
*/ onBeforeInsertNode(node) {
|
|
43582
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
|
|
43583
|
+
if (!wrapper || !holdsMoreThanText(node)) {
|
|
43584
|
+
return;
|
|
43585
|
+
}
|
|
43586
|
+
const { j } = this;
|
|
43587
|
+
this.__focusEditor();
|
|
43588
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
|
|
43589
|
+
j.s.setCursorAfter(wrapper);
|
|
43590
|
+
return;
|
|
43591
|
+
}
|
|
43592
|
+
const line = this.__line();
|
|
43593
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
|
|
43594
|
+
j.s.setCursorIn(line);
|
|
43595
|
+
}
|
|
43596
|
+
/**
|
|
43597
|
+
* A selected captioned image goes as an image on a line of its own does,
|
|
43598
|
+
* leaving the line empty, rather than joining the lines either side
|
|
43599
|
+
*/ onBeforeCommandDelete() {
|
|
43600
|
+
const wrapper = this.__selectedWrapper();
|
|
43601
|
+
if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
|
|
43602
|
+
return;
|
|
43603
|
+
}
|
|
43604
|
+
const line = this.__line();
|
|
43605
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
|
|
43606
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
|
|
43607
|
+
this.j.s.setCursorIn(line);
|
|
43608
|
+
return false;
|
|
43609
|
+
}
|
|
43610
|
+
/**
|
|
43611
|
+
* The captioned image the selection holds, as a click on the image selects
|
|
43612
|
+
*/ __selectedWrapper() {
|
|
43613
|
+
const { s } = this.j;
|
|
43614
|
+
if (!s.isInsideArea || s.isCollapsed()) {
|
|
43615
|
+
return null;
|
|
43616
|
+
}
|
|
43617
|
+
const { startContainer, startOffset, endContainer, endOffset } = s.range;
|
|
43618
|
+
const node = startContainer.childNodes[startOffset];
|
|
43619
|
+
return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
|
|
43620
|
+
}
|
|
43621
|
+
onKeyDown(event) {
|
|
43622
|
+
var _a;
|
|
43623
|
+
this.__arrow = null;
|
|
43624
|
+
// Typing replaces a selected captioned image, on the line it leaves
|
|
43625
|
+
if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
|
|
43626
|
+
this.j.execCommand('Delete');
|
|
43627
|
+
return;
|
|
43628
|
+
}
|
|
43629
|
+
if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
|
|
43630
|
+
return;
|
|
43631
|
+
}
|
|
43632
|
+
const caption = this.__caretCaption();
|
|
43633
|
+
if (caption) {
|
|
43634
|
+
this.__arrow = {
|
|
43635
|
+
key: event.key,
|
|
43636
|
+
range: this.j.s.range.cloneRange(),
|
|
43637
|
+
caption
|
|
43638
|
+
};
|
|
43639
|
+
}
|
|
43640
|
+
}
|
|
43641
|
+
/**
|
|
43642
|
+
* An arrow key that couldn't move the caret in the caption takes it out,
|
|
43643
|
+
* past the image, as the caption is an editable element of its own
|
|
43644
|
+
*/ onKeyUp(event) {
|
|
43645
|
+
const arrow = this.__arrow;
|
|
43646
|
+
this.__arrow = null;
|
|
43647
|
+
if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
|
|
43648
|
+
return;
|
|
43649
|
+
}
|
|
43650
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
|
|
43651
|
+
if (!wrapper) {
|
|
43652
|
+
return;
|
|
43653
|
+
}
|
|
43654
|
+
const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
|
|
43655
|
+
const { s } = this.j;
|
|
43656
|
+
this.__focusEditor();
|
|
43657
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
|
|
43658
|
+
if (forward) {
|
|
43659
|
+
s.setCursorAfter(wrapper);
|
|
43660
|
+
} else {
|
|
43661
|
+
s.setCursorBefore(wrapper);
|
|
43662
|
+
}
|
|
43663
|
+
return;
|
|
43664
|
+
}
|
|
43665
|
+
const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
|
|
43666
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
|
|
43667
|
+
s.setCursorIn(sibling, forward);
|
|
43668
|
+
return;
|
|
43669
|
+
}
|
|
43670
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
|
|
43671
|
+
if (forward) {
|
|
43672
|
+
s.setCursorBefore(sibling);
|
|
43673
|
+
} else {
|
|
43674
|
+
s.setCursorAfter(sibling);
|
|
43675
|
+
}
|
|
43676
|
+
return;
|
|
43677
|
+
}
|
|
43678
|
+
const line = this.__line();
|
|
43679
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(forward ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, wrapper, line);
|
|
43680
|
+
s.setCursorIn(line);
|
|
43681
|
+
this.j.synchronizeValues();
|
|
43682
|
+
}
|
|
43683
|
+
onBeforeCommand(command) {
|
|
43684
|
+
const name = command.toLowerCase();
|
|
43685
|
+
if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
|
|
43686
|
+
return false;
|
|
43687
|
+
}
|
|
43688
|
+
// A caption given and left blank was never a step, so Undo takes it off
|
|
43689
|
+
const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
|
|
43690
|
+
if (fresh) {
|
|
43691
|
+
this.__unrecorded(()=>{
|
|
43692
|
+
this.__restore(fresh);
|
|
43693
|
+
this.j.history.snapshot.restore(fresh.before);
|
|
43694
|
+
});
|
|
43695
|
+
return false;
|
|
43696
|
+
}
|
|
43697
|
+
}
|
|
43698
|
+
/**
|
|
43699
|
+
* Select all in a caption selects the caption, as the caption is an
|
|
43700
|
+
* editable element of its own
|
|
43701
|
+
*/ __onSelectAll() {
|
|
43702
|
+
const caption = this.__caretCaption();
|
|
43703
|
+
if (caption) {
|
|
43704
|
+
this.j.e.stopPropagation('beforeCommandSelectall');
|
|
43705
|
+
this.j.s.select(caption, true);
|
|
43706
|
+
return false;
|
|
43707
|
+
}
|
|
43708
|
+
}
|
|
43709
|
+
/** @override */ beforeDestruct(jodit) {
|
|
43710
|
+
jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
|
|
43711
|
+
jodit.editor,
|
|
43712
|
+
jodit.ow,
|
|
43713
|
+
jodit.ew
|
|
43714
|
+
], '.imageCaption');
|
|
43715
|
+
}
|
|
43716
|
+
constructor(){
|
|
43717
|
+
super(...arguments);
|
|
43718
|
+
/**
|
|
43719
|
+
* The caption given last, while nothing has changed round it and it's
|
|
43720
|
+
* still blank, so taking it off can put everything back as it was
|
|
43721
|
+
*/ this.__fresh = null;
|
|
43722
|
+
this.__press = null;
|
|
43723
|
+
this.__afterPress = [];
|
|
43724
|
+
this.__arrow = null;
|
|
43725
|
+
}
|
|
43726
|
+
}
|
|
43727
|
+
__decorate([
|
|
43728
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
|
|
43729
|
+
], imageCaption.prototype, "onToggleImageCaption", null);
|
|
43730
|
+
__decorate([
|
|
43731
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
43732
|
+
':change',
|
|
43733
|
+
':afterInit',
|
|
43734
|
+
':afterSetMode',
|
|
43735
|
+
':changePlace'
|
|
43736
|
+
]),
|
|
43737
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
43738
|
+
], imageCaption.prototype, "onChange", null);
|
|
43739
|
+
__decorate([
|
|
43740
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
43741
|
+
':input',
|
|
43742
|
+
':keyup',
|
|
43743
|
+
':afterPaste'
|
|
43744
|
+
])
|
|
43745
|
+
], imageCaption.prototype, "onInput", null);
|
|
43746
|
+
__decorate([
|
|
43747
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
|
|
43748
|
+
], imageCaption.prototype, "onAfterGetValueFromEditor", null);
|
|
43749
|
+
__decorate([
|
|
43750
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
|
|
43751
|
+
], imageCaption.prototype, "onChangePlace", null);
|
|
43752
|
+
__decorate([
|
|
43753
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
43754
|
+
], imageCaption.prototype, "__onMouseDown", null);
|
|
43755
|
+
__decorate([
|
|
43756
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
43757
|
+
], imageCaption.prototype, "__onFocusOut", null);
|
|
43758
|
+
__decorate([
|
|
43759
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
43760
|
+
], imageCaption.prototype, "__onMouseUp", null);
|
|
43761
|
+
__decorate([
|
|
43762
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
|
|
43763
|
+
], imageCaption.prototype, "onBeforeEnter", null);
|
|
43764
|
+
__decorate([
|
|
43765
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
|
|
43766
|
+
], imageCaption.prototype, "onBeforeInsertNode", null);
|
|
43767
|
+
__decorate([
|
|
43768
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
|
|
43769
|
+
], imageCaption.prototype, "onBeforeCommandDelete", null);
|
|
43770
|
+
__decorate([
|
|
43771
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
|
|
43772
|
+
], imageCaption.prototype, "onKeyDown", null);
|
|
43773
|
+
__decorate([
|
|
43774
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
|
|
43775
|
+
], imageCaption.prototype, "onKeyUp", null);
|
|
43776
|
+
__decorate([
|
|
43777
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
|
|
43778
|
+
], imageCaption.prototype, "onBeforeCommand", null);
|
|
43779
|
+
__decorate([
|
|
43780
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
43781
|
+
], imageCaption.prototype, "__onSelectAll", null);
|
|
43782
|
+
/**
|
|
43783
|
+
* `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
|
|
43784
|
+
* from the editor's value
|
|
43785
|
+
*/ function placedIn(jodit, fresh, wrapper) {
|
|
43786
|
+
var _a;
|
|
43787
|
+
const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
|
|
43788
|
+
const { split } = fresh;
|
|
43789
|
+
if (!image) {
|
|
43790
|
+
return null;
|
|
43791
|
+
}
|
|
43792
|
+
const placed = {
|
|
43793
|
+
wrapper,
|
|
43794
|
+
image,
|
|
43795
|
+
target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
|
|
43796
|
+
place: fresh.place,
|
|
43797
|
+
split: null,
|
|
43798
|
+
attributes: fresh.attributes
|
|
43799
|
+
};
|
|
43800
|
+
if (split) {
|
|
43801
|
+
const head = split.head ? wrapper.previousSibling : null;
|
|
43802
|
+
const tail = split.tail ? wrapper.nextSibling : null;
|
|
43803
|
+
if (split.head && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(head) || split.tail && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(tail)) {
|
|
43804
|
+
return null;
|
|
43805
|
+
}
|
|
43806
|
+
const block = split.block.cloneNode(true);
|
|
43807
|
+
placed.split = {
|
|
43808
|
+
block,
|
|
43809
|
+
head: head,
|
|
43810
|
+
tail: tail
|
|
43811
|
+
};
|
|
43812
|
+
placed.place = counterpart(split.block, fresh.place, block);
|
|
43813
|
+
}
|
|
43814
|
+
return placed;
|
|
43815
|
+
}
|
|
43816
|
+
/**
|
|
43817
|
+
* The node in `copy`, a clone of `root`, where `node` is in `root`
|
|
43818
|
+
*/ function counterpart(root, node, copy) {
|
|
43819
|
+
const path = [];
|
|
43820
|
+
for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
|
|
43821
|
+
path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
|
|
43822
|
+
}
|
|
43823
|
+
return path.reduce((elm, index)=>elm.childNodes[index], copy);
|
|
43824
|
+
}
|
|
43825
|
+
/**
|
|
43826
|
+
* The attributes of a caption's wrapper and image that the image's
|
|
43827
|
+
* alignment, margins and size are in
|
|
43828
|
+
*/ function shape(wrapper, image) {
|
|
43829
|
+
return [
|
|
43830
|
+
wrapper,
|
|
43831
|
+
image
|
|
43832
|
+
].flatMap((elm)=>[
|
|
43833
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
|
|
43834
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
|
|
43835
|
+
]).join('|');
|
|
43836
|
+
}
|
|
43837
|
+
/**
|
|
43838
|
+
* The node is, or holds, more than text and inline formatting: an image, a
|
|
43839
|
+
* table, a rule or another block
|
|
43840
|
+
*/ function holdsMoreThanText(node) {
|
|
43841
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
|
|
43842
|
+
return false;
|
|
43843
|
+
}
|
|
43844
|
+
return [
|
|
43845
|
+
node,
|
|
43846
|
+
...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
|
|
43847
|
+
].some((elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(elm) || _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS.has(elm.nodeName.toLowerCase())));
|
|
43848
|
+
}
|
|
43849
|
+
/**
|
|
43850
|
+
* A `width` attribute's value as a CSS width
|
|
43851
|
+
*/ function pixels(value) {
|
|
43852
|
+
if (!value) {
|
|
43853
|
+
return '';
|
|
43854
|
+
}
|
|
43855
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
|
|
43856
|
+
}
|
|
43857
|
+
function moveMargins(from, to) {
|
|
43858
|
+
var _a;
|
|
43859
|
+
MARGINS.forEach((side)=>{
|
|
43860
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
|
|
43861
|
+
if (value) {
|
|
43862
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
|
|
43863
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
|
|
43864
|
+
}
|
|
43865
|
+
});
|
|
43866
|
+
if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
43867
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
|
|
43868
|
+
}
|
|
43869
|
+
}
|
|
43870
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
|
|
43871
|
+
|
|
43872
|
+
|
|
42381
43873
|
/***/ }),
|
|
42382
43874
|
|
|
42383
43875
|
/***/ 85745:
|
|
@@ -42509,7 +44001,8 @@ const SELECTED_TAGS = new Set([
|
|
|
42509
44001
|
* paints the rest of a block image's line with its parent's highlight. See #1528.
|
|
42510
44002
|
* Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
|
|
42511
44003
|
* one from `mediaWrappers`) isn't highlighted either, as Safari paints its
|
|
42512
|
-
* wrapper's whole line, and its resize frame shows it's selected
|
|
44004
|
+
* wrapper's whole line, and its resize frame shows it's selected. Nor is
|
|
44005
|
+
* a captioned image's caption
|
|
42513
44006
|
*/ onSelectionChange() {
|
|
42514
44007
|
const { jodit } = this;
|
|
42515
44008
|
jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
|
|
@@ -42533,9 +44026,12 @@ const SELECTED_TAGS = new Set([
|
|
|
42533
44026
|
if (elm.src && /^data:/.test(elm.src)) {
|
|
42534
44027
|
replaceDataURIToBlobUUID(editor, elm);
|
|
42535
44028
|
}
|
|
44029
|
+
// A captioned image is selected with its caption, so Delete
|
|
44030
|
+
// removes both
|
|
42536
44031
|
editor.e.on(elm, 'mousedown touchstart', ()=>{
|
|
44032
|
+
var _a;
|
|
42537
44033
|
removeCaretText(elm);
|
|
42538
|
-
editor.s.select(elm);
|
|
44034
|
+
editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
|
|
42539
44035
|
});
|
|
42540
44036
|
}
|
|
42541
44037
|
});
|
|
@@ -42560,13 +44056,14 @@ __decorate([
|
|
|
42560
44056
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
42561
44057
|
], imageProcessor.prototype, "afterChange", null);
|
|
42562
44058
|
function isImageSelected(jodit) {
|
|
44059
|
+
var _a;
|
|
42563
44060
|
const { sel } = jodit.s;
|
|
42564
44061
|
if (!sel || !sel.rangeCount) {
|
|
42565
44062
|
return false;
|
|
42566
44063
|
}
|
|
42567
44064
|
const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
|
|
42568
44065
|
const node = startContainer.childNodes[startOffset];
|
|
42569
|
-
return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
|
|
44066
|
+
return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node)) !== null && _a !== void 0 ? _a : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
|
|
42570
44067
|
}
|
|
42571
44068
|
/**
|
|
42572
44069
|
* Remove the invisible-space text beside an image, which only held a caret.
|
|
@@ -42630,6 +44127,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
|
|
|
42630
44127
|
useImageEditor: true,
|
|
42631
44128
|
editTitle: true,
|
|
42632
44129
|
editAlt: true,
|
|
44130
|
+
showCaptionCheckbox: true,
|
|
42633
44131
|
editLink: true,
|
|
42634
44132
|
editSize: true,
|
|
42635
44133
|
editBorderRadius: true,
|
|
@@ -42750,10 +44248,13 @@ function _async_to_generator(fn) {
|
|
|
42750
44248
|
dialog.close();
|
|
42751
44249
|
});
|
|
42752
44250
|
buttons.remove.onAction(()=>{
|
|
44251
|
+
var _a;
|
|
44252
|
+
const { sourceImage } = this.state;
|
|
44253
|
+
const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
|
|
42753
44254
|
const caret = j.s.createRange();
|
|
42754
|
-
caret.setStartBefore(
|
|
44255
|
+
caret.setStartBefore(target);
|
|
42755
44256
|
caret.collapse(true);
|
|
42756
|
-
j.s.removeNode(
|
|
44257
|
+
j.s.removeNode(target);
|
|
42757
44258
|
dialog.close();
|
|
42758
44259
|
j.s.selectRange(caret);
|
|
42759
44260
|
});
|
|
@@ -42775,12 +44276,22 @@ function _async_to_generator(fn) {
|
|
|
42775
44276
|
if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
|
|
42776
44277
|
return;
|
|
42777
44278
|
}
|
|
44279
|
+
const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
|
|
44280
|
+
const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
|
|
44281
|
+
// A blank caption, as one the dialog has added, takes the caret, as
|
|
44282
|
+
// the image popup's Caption button does
|
|
44283
|
+
if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
|
|
44284
|
+
j.s.setCursorIn(caption);
|
|
44285
|
+
return;
|
|
44286
|
+
}
|
|
44287
|
+
// A captioned image is selected with its caption, as a click selects it
|
|
44288
|
+
const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
|
|
42778
44289
|
if (j.o.image.selectImageAfterClose) {
|
|
42779
|
-
j.s.select(
|
|
44290
|
+
j.s.select(target);
|
|
42780
44291
|
return;
|
|
42781
44292
|
}
|
|
42782
44293
|
const caret = j.s.createRange();
|
|
42783
|
-
caret.setStartAfter(
|
|
44294
|
+
caret.setStartAfter(target);
|
|
42784
44295
|
caret.collapse(true);
|
|
42785
44296
|
j.s.selectRange(caret);
|
|
42786
44297
|
});
|
|
@@ -42918,6 +44429,7 @@ function _async_to_generator(fn) {
|
|
|
42918
44429
|
borderRadius: 0,
|
|
42919
44430
|
imageTitle: '',
|
|
42920
44431
|
imageAlt: '',
|
|
44432
|
+
imageCaption: false,
|
|
42921
44433
|
imageLink: '',
|
|
42922
44434
|
imageLinkOpenInNewTab: false,
|
|
42923
44435
|
imageWidth: 0,
|
|
@@ -42984,10 +44496,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
42984
44496
|
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
42985
44497
|
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
42986
44498
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
42987
|
-
/* harmony import */ var
|
|
42988
|
-
/* harmony import */ var
|
|
42989
|
-
/* harmony import */ var
|
|
42990
|
-
/* harmony import */ var
|
|
44499
|
+
/* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
|
|
44500
|
+
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
|
|
44501
|
+
/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
|
|
44502
|
+
/* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
|
|
44503
|
+
/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
|
|
42991
44504
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
42992
44505
|
try {
|
|
42993
44506
|
var info = gen[key](arg);
|
|
@@ -43025,13 +44538,19 @@ function _async_to_generator(fn) {
|
|
|
43025
44538
|
|
|
43026
44539
|
|
|
43027
44540
|
|
|
44541
|
+
|
|
43028
44542
|
/**
|
|
43029
44543
|
* Read values from image and set it to state
|
|
43030
44544
|
* @private
|
|
43031
44545
|
*/ function readValuesFromImage(j, state) {
|
|
43032
44546
|
return _async_to_generator(function*() {
|
|
43033
44547
|
const { sourceImage: image, values } = state;
|
|
43034
|
-
|
|
44548
|
+
// A captioned image's caption element holds its place on the page and
|
|
44549
|
+
// its width
|
|
44550
|
+
const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
|
|
44551
|
+
const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
|
|
44552
|
+
values.imageCaption = Boolean(wrapper);
|
|
44553
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
|
|
43035
44554
|
// Border radius
|
|
43036
44555
|
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
43037
44556
|
// Id
|
|
@@ -43045,13 +44564,13 @@ function _async_to_generator(fn) {
|
|
|
43045
44564
|
// Classes
|
|
43046
44565
|
values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
43047
44566
|
// Margins
|
|
43048
|
-
(0,
|
|
44567
|
+
(0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
|
|
43049
44568
|
// Link
|
|
43050
|
-
(0,
|
|
44569
|
+
(0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
|
|
43051
44570
|
// Src
|
|
43052
44571
|
values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
|
|
43053
44572
|
// Image size
|
|
43054
|
-
return (0,
|
|
44573
|
+
return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
|
|
43055
44574
|
})();
|
|
43056
44575
|
}
|
|
43057
44576
|
|
|
@@ -43169,20 +44688,18 @@ function _async_to_generator(fn) {
|
|
|
43169
44688
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43170
44689
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
43171
44690
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
43172
|
-
*/ /**
|
|
43173
|
-
* @module plugins/image-properties
|
|
43174
44691
|
*/ ;
|
|
43175
44692
|
|
|
43176
44693
|
|
|
43177
44694
|
|
|
43178
|
-
/** @private */ function readSizes(image, values, state) {
|
|
44695
|
+
/** @private */ function readSizes(image, values, state, captionWrapper) {
|
|
43179
44696
|
return _async_to_generator(function*() {
|
|
43180
44697
|
try {
|
|
43181
44698
|
yield image.decode();
|
|
43182
44699
|
} catch (e) {
|
|
43183
44700
|
console.error(e);
|
|
43184
44701
|
}
|
|
43185
|
-
const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
|
|
44702
|
+
const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(captionWrapper !== null && captionWrapper !== void 0 ? captionWrapper : image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
|
|
43186
44703
|
const height = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'height') || false;
|
|
43187
44704
|
values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
|
|
43188
44705
|
if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
|
|
@@ -43484,6 +45001,12 @@ function _async_to_generator(fn) {
|
|
|
43484
45001
|
<label>~Alternative~</label>
|
|
43485
45002
|
<input type="text" class="jodit-input &__imageAlt"/>
|
|
43486
45003
|
</div>
|
|
45004
|
+
<div class="jodit-form__group &__captionCheckbox">
|
|
45005
|
+
<label class="jodit_vertical_middle">
|
|
45006
|
+
<input type="checkbox" class="jodit-checkbox &__imageCaption"/>
|
|
45007
|
+
<span>~Caption~</span>
|
|
45008
|
+
</label>
|
|
45009
|
+
</div>
|
|
43487
45010
|
<div class="jodit-form__group &__editLink">
|
|
43488
45011
|
<label>~Link~</label>
|
|
43489
45012
|
<input type="text" class="jodit-input &__imageLink"/>
|
|
@@ -43530,6 +45053,13 @@ function _async_to_generator(fn) {
|
|
|
43530
45053
|
onAltChange() {
|
|
43531
45054
|
this.state.values.imageAlt = this.getElm('imageAlt').value;
|
|
43532
45055
|
}
|
|
45056
|
+
onStateCaptionChange() {
|
|
45057
|
+
const caption = this.getElm('imageCaption');
|
|
45058
|
+
caption.checked = this.state.values.imageCaption;
|
|
45059
|
+
}
|
|
45060
|
+
onCaptionChange() {
|
|
45061
|
+
this.state.values.imageCaption = this.getElm('imageCaption').checked;
|
|
45062
|
+
}
|
|
43533
45063
|
onStateImageLinkChange() {
|
|
43534
45064
|
const imageLink = this.getElm('imageLink');
|
|
43535
45065
|
imageLink.value = this.state.values.imageLink;
|
|
@@ -43560,6 +45090,10 @@ function _async_to_generator(fn) {
|
|
|
43560
45090
|
'editAlt',
|
|
43561
45091
|
'editAlt'
|
|
43562
45092
|
],
|
|
45093
|
+
[
|
|
45094
|
+
'showCaptionCheckbox',
|
|
45095
|
+
'captionCheckbox'
|
|
45096
|
+
],
|
|
43563
45097
|
[
|
|
43564
45098
|
'editLink',
|
|
43565
45099
|
'editLink'
|
|
@@ -43615,6 +45149,12 @@ __decorate([
|
|
|
43615
45149
|
__decorate([
|
|
43616
45150
|
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
|
|
43617
45151
|
], UIImageMainTab.prototype, "onAltChange", null);
|
|
45152
|
+
__decorate([
|
|
45153
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
|
|
45154
|
+
], UIImageMainTab.prototype, "onStateCaptionChange", null);
|
|
45155
|
+
__decorate([
|
|
45156
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
|
|
45157
|
+
], UIImageMainTab.prototype, "onCaptionChange", null);
|
|
43618
45158
|
__decorate([
|
|
43619
45159
|
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
|
|
43620
45160
|
], UIImageMainTab.prototype, "onStateImageLinkChange", null);
|
|
@@ -44085,6 +45625,33 @@ function _async_to_generator(fn) {
|
|
|
44085
45625
|
/* harmony export */ ]);
|
|
44086
45626
|
|
|
44087
45627
|
|
|
45628
|
+
/***/ }),
|
|
45629
|
+
|
|
45630
|
+
/***/ 29509:
|
|
45631
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
45632
|
+
|
|
45633
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45634
|
+
/* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
|
|
45635
|
+
/* harmony export */ });
|
|
45636
|
+
/* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
|
|
45637
|
+
/*!
|
|
45638
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
45639
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
45640
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
45641
|
+
*/
|
|
45642
|
+
/**
|
|
45643
|
+
* Gives the image a caption or takes it away, and returns the element that
|
|
45644
|
+
* holds the image's place on the page: the caption's, or the image
|
|
45645
|
+
* @private
|
|
45646
|
+
*/ function applyCaption(j, image, imageCaption) {
|
|
45647
|
+
var _a;
|
|
45648
|
+
if (j.o.image.showCaptionCheckbox) {
|
|
45649
|
+
j.e.fire('toggleImageCaption', image, imageCaption);
|
|
45650
|
+
}
|
|
45651
|
+
return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
|
|
45652
|
+
}
|
|
45653
|
+
|
|
45654
|
+
|
|
44088
45655
|
/***/ }),
|
|
44089
45656
|
|
|
44090
45657
|
/***/ 34755:
|
|
@@ -44096,9 +45663,10 @@ function _async_to_generator(fn) {
|
|
|
44096
45663
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
44097
45664
|
/* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
|
|
44098
45665
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
44099
|
-
/* harmony import */ var
|
|
44100
|
-
/* harmony import */ var
|
|
44101
|
-
/* harmony import */ var
|
|
45666
|
+
/* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
|
|
45667
|
+
/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
|
|
45668
|
+
/* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
|
|
45669
|
+
/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
|
|
44102
45670
|
/*!
|
|
44103
45671
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44104
45672
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44109,11 +45677,13 @@ function _async_to_generator(fn) {
|
|
|
44109
45677
|
|
|
44110
45678
|
|
|
44111
45679
|
|
|
45680
|
+
|
|
44112
45681
|
/**
|
|
44113
45682
|
* Apply form's values to image
|
|
44114
45683
|
* @private
|
|
44115
45684
|
*/ function applyValuesToImage(j, state, image) {
|
|
44116
|
-
|
|
45685
|
+
var _a;
|
|
45686
|
+
const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
|
|
44117
45687
|
const opt = j.o;
|
|
44118
45688
|
// styles
|
|
44119
45689
|
if (opt.image.editStyle) {
|
|
@@ -44123,7 +45693,7 @@ function _async_to_generator(fn) {
|
|
|
44123
45693
|
if (imageSrc) {
|
|
44124
45694
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
|
|
44125
45695
|
} else {
|
|
44126
|
-
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
|
|
45696
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove((_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image);
|
|
44127
45697
|
return;
|
|
44128
45698
|
}
|
|
44129
45699
|
// Border radius
|
|
@@ -44133,21 +45703,24 @@ function _async_to_generator(fn) {
|
|
|
44133
45703
|
// Alt
|
|
44134
45704
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
|
|
44135
45705
|
// Link
|
|
44136
|
-
(0,
|
|
44137
|
-
// Size
|
|
44138
|
-
(0,_size_js__WEBPACK_IMPORTED_MODULE_5__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked);
|
|
44139
|
-
// Margin
|
|
44140
|
-
if (j.o.image.editMargins) {
|
|
44141
|
-
(0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
|
|
44142
|
-
}
|
|
45706
|
+
(0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
|
|
44143
45707
|
if (opt.image.editClass) {
|
|
44144
45708
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
|
|
44145
45709
|
}
|
|
44146
45710
|
if (opt.image.editId) {
|
|
44147
45711
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
44148
45712
|
}
|
|
45713
|
+
// The caption's element takes the image's place on the page and its width,
|
|
45714
|
+
// so it's added or taken away after the image's own style and classes
|
|
45715
|
+
const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
|
|
45716
|
+
// Size
|
|
45717
|
+
(0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
|
|
45718
|
+
// Margin
|
|
45719
|
+
if (j.o.image.editMargins) {
|
|
45720
|
+
(0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
|
|
45721
|
+
}
|
|
44149
45722
|
if (opt.image.editAlign) {
|
|
44150
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(
|
|
45723
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(box, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, box));
|
|
44151
45724
|
}
|
|
44152
45725
|
}
|
|
44153
45726
|
|
|
@@ -44162,12 +45735,14 @@ function _async_to_generator(fn) {
|
|
|
44162
45735
|
/* harmony export */ });
|
|
44163
45736
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
44164
45737
|
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
45738
|
+
/* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
|
|
44165
45739
|
/*!
|
|
44166
45740
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44167
45741
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
44168
45742
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
44169
45743
|
*/
|
|
44170
45744
|
|
|
45745
|
+
|
|
44171
45746
|
/** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
|
|
44172
45747
|
// Link
|
|
44173
45748
|
let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
|
|
@@ -44181,8 +45756,11 @@ function _async_to_generator(fn) {
|
|
|
44181
45756
|
const relParts = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
|
|
44182
45757
|
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
44183
45758
|
}
|
|
44184
|
-
} else {
|
|
44185
|
-
|
|
45759
|
+
} else if (link && link.parentNode) {
|
|
45760
|
+
// Froala keeps a linked image's caption inside the link
|
|
45761
|
+
if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
|
|
45762
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
|
|
45763
|
+
} else {
|
|
44186
45764
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
|
|
44187
45765
|
}
|
|
44188
45766
|
}
|
|
@@ -44260,7 +45838,19 @@ function _async_to_generator(fn) {
|
|
|
44260
45838
|
|
|
44261
45839
|
|
|
44262
45840
|
|
|
44263
|
-
/**
|
|
45841
|
+
/**
|
|
45842
|
+
* A captioned image fills its caption's element, `box`, which takes the width
|
|
45843
|
+
* @private
|
|
45844
|
+
*/ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
|
|
45845
|
+
if (box !== image) {
|
|
45846
|
+
const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
|
|
45847
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
|
|
45848
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
|
|
45849
|
+
width: width && '100%',
|
|
45850
|
+
height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
|
|
45851
|
+
});
|
|
45852
|
+
return;
|
|
45853
|
+
}
|
|
44264
45854
|
// Size
|
|
44265
45855
|
if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
|
|
44266
45856
|
const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
|
|
@@ -44450,19 +46040,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
|
|
|
44450
46040
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
44451
46041
|
|
|
44452
46042
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
46043
|
+
/* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
|
|
46044
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
44453
46045
|
/*!
|
|
44454
46046
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44455
46047
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
44456
46048
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
44457
|
-
*/ /**
|
|
44458
|
-
* @module plugins/indent
|
|
44459
46049
|
*/
|
|
46050
|
+
|
|
46051
|
+
|
|
44460
46052
|
/**
|
|
44461
46053
|
* Get style rule key for current direction
|
|
44462
46054
|
* @internal
|
|
44463
46055
|
*/ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
|
|
46056
|
+
/**
|
|
46057
|
+
* Indents or outdents a box by `indentMargin`
|
|
46058
|
+
* @internal
|
|
46059
|
+
*/ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
|
|
46060
|
+
if (!currentBox) {
|
|
46061
|
+
return;
|
|
46062
|
+
}
|
|
46063
|
+
if (processedElements.has(currentBox)) {
|
|
46064
|
+
return;
|
|
46065
|
+
}
|
|
46066
|
+
const key = getKey(editor.o.direction, currentBox);
|
|
46067
|
+
processedElements.add(currentBox);
|
|
46068
|
+
const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
|
|
46069
|
+
let value = current ? parseInt(current, 10) : 0;
|
|
46070
|
+
value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
|
|
46071
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
|
|
46072
|
+
if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
|
|
46073
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
|
|
46074
|
+
}
|
|
46075
|
+
};
|
|
44464
46076
|
|
|
44465
46077
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
46078
|
+
/* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
|
|
44466
46079
|
/* harmony export */ "getKey", 0, /* binding */ getKey
|
|
44467
46080
|
/* harmony export */ ]);
|
|
44468
46081
|
|
|
@@ -44493,9 +46106,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
|
|
|
44493
46106
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
44494
46107
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
44495
46108
|
/* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43555);
|
|
44496
|
-
/* harmony import */ var
|
|
44497
|
-
/* harmony import */ var
|
|
44498
|
-
/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(302);
|
|
46109
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
|
|
46110
|
+
/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
|
|
44499
46111
|
/*!
|
|
44500
46112
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44501
46113
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44506,24 +46118,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
|
|
|
44506
46118
|
|
|
44507
46119
|
|
|
44508
46120
|
|
|
44509
|
-
|
|
44510
|
-
const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
|
|
44511
|
-
if (!currentBox) {
|
|
44512
|
-
return;
|
|
44513
|
-
}
|
|
44514
|
-
if (processedElements.has(currentBox)) {
|
|
44515
|
-
return;
|
|
44516
|
-
}
|
|
44517
|
-
const key = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_6__.getKey)(editor.o.direction, currentBox);
|
|
44518
|
-
processedElements.add(currentBox);
|
|
44519
|
-
const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.cssInline)(currentBox, key);
|
|
44520
|
-
let value = current ? parseInt(current, 10) : 0;
|
|
44521
|
-
value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
|
|
44522
|
-
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(currentBox, key, value > 0 ? value : '');
|
|
44523
|
-
if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style')) {
|
|
44524
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style', null);
|
|
44525
|
-
}
|
|
44526
|
-
};
|
|
44527
46121
|
/**
|
|
44528
46122
|
* Indents the line containing the selection or insertion point.
|
|
44529
46123
|
*/ function indent(editor) {
|
|
@@ -44542,7 +46136,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
|
|
|
44542
46136
|
if (isBrMode && editor.s.isCollapsed()) {
|
|
44543
46137
|
if (current) {
|
|
44544
46138
|
const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
|
|
44545
|
-
applyIndentToBox(processedElements, box, editor, command);
|
|
46139
|
+
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
|
|
44546
46140
|
return false;
|
|
44547
46141
|
}
|
|
44548
46142
|
}
|
|
@@ -44556,7 +46150,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
|
|
|
44556
46150
|
editor.s.restore();
|
|
44557
46151
|
return false;
|
|
44558
46152
|
}
|
|
44559
|
-
applyIndentToBox(processedElements, currentBox, editor, command);
|
|
46153
|
+
;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
|
|
44560
46154
|
editor.s.restore();
|
|
44561
46155
|
});
|
|
44562
46156
|
editor.synchronizeValues();
|
|
@@ -44657,11 +46251,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
|
|
|
44657
46251
|
/* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
|
|
44658
46252
|
/* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
|
|
44659
46253
|
/* harmony import */ var _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75393);
|
|
44660
|
-
/* harmony import */ var
|
|
44661
|
-
/* harmony import */ var
|
|
44662
|
-
/* harmony import */ var
|
|
44663
|
-
/* harmony import */ var
|
|
44664
|
-
/* harmony import */ var
|
|
46254
|
+
/* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
|
|
46255
|
+
/* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
|
|
46256
|
+
/* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
|
|
46257
|
+
/* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
|
|
46258
|
+
/* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
|
|
46259
|
+
/* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
|
|
46260
|
+
/* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
|
|
44665
46261
|
/*!
|
|
44666
46262
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44667
46263
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44681,13 +46277,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
|
|
|
44681
46277
|
|
|
44682
46278
|
|
|
44683
46279
|
|
|
46280
|
+
|
|
46281
|
+
|
|
44684
46282
|
_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
|
|
44685
46283
|
_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
|
|
44686
46284
|
_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
|
|
44687
46285
|
_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
|
|
44688
46286
|
'source'
|
|
44689
46287
|
];
|
|
44690
|
-
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('merge',
|
|
46288
|
+
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('caption', _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('headerrow', _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__["default"]);
|
|
44691
46289
|
// Register cell popup buttons as global controls so they can be
|
|
44692
46290
|
// referenced by name in custom popup configurations.
|
|
44693
46291
|
// Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
|
|
@@ -44764,15 +46362,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
|
|
|
44764
46362
|
/***/ 62000:
|
|
44765
46363
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
44766
46364
|
|
|
44767
|
-
/* harmony import */ var
|
|
44768
|
-
/* harmony import */ var
|
|
46365
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
46366
|
+
/* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
|
|
46367
|
+
/* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
|
|
46368
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
44769
46369
|
/*!
|
|
44770
46370
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44771
46371
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
44772
46372
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
44773
46373
|
*/
|
|
44774
46374
|
|
|
44775
|
-
|
|
46375
|
+
|
|
46376
|
+
|
|
46377
|
+
const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
44776
46378
|
/* harmony default export */ __webpack_exports__["default"] = ([
|
|
44777
46379
|
'brushCell',
|
|
44778
46380
|
{
|
|
@@ -44787,7 +46389,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44787
46389
|
exec: (editor, table, { control })=>{
|
|
44788
46390
|
const command = cmd(control);
|
|
44789
46391
|
editor.getInstance('Table', editor.o).getAllSelectedCells().forEach((cell)=>{
|
|
44790
|
-
(0,
|
|
46392
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
|
|
44791
46393
|
});
|
|
44792
46394
|
},
|
|
44793
46395
|
tooltip: 'Vertical align'
|
|
@@ -44817,7 +46419,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44817
46419
|
tableaddcolumnafter: 'Insert column after'
|
|
44818
46420
|
},
|
|
44819
46421
|
exec: (editor, table, { control })=>{
|
|
44820
|
-
if (!(0,
|
|
46422
|
+
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
|
|
44821
46423
|
return;
|
|
44822
46424
|
}
|
|
44823
46425
|
if (!control.args) {
|
|
@@ -44835,7 +46437,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44835
46437
|
tableaddrowafter: 'Insert row below'
|
|
44836
46438
|
},
|
|
44837
46439
|
exec: (editor, table, { control })=>{
|
|
44838
|
-
if (!(0,
|
|
46440
|
+
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
|
|
44839
46441
|
return;
|
|
44840
46442
|
}
|
|
44841
46443
|
if (!control.args) {
|
|
@@ -44846,6 +46448,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44846
46448
|
},
|
|
44847
46449
|
tooltip: 'Add row'
|
|
44848
46450
|
},
|
|
46451
|
+
{
|
|
46452
|
+
name: 'headerrow',
|
|
46453
|
+
exec: (editor, table)=>{
|
|
46454
|
+
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(table, 'table')) {
|
|
46455
|
+
return;
|
|
46456
|
+
}
|
|
46457
|
+
editor.execCommand('tableheaderrow', false, table);
|
|
46458
|
+
const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
|
|
46459
|
+
// Beside the cell that replaced the one it opened for
|
|
46460
|
+
if (cell) {
|
|
46461
|
+
editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
|
|
46462
|
+
}
|
|
46463
|
+
// The popup stays open, so the button shows the new state
|
|
46464
|
+
return true;
|
|
46465
|
+
},
|
|
46466
|
+
isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
|
|
46467
|
+
isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
|
|
46468
|
+
tooltip: 'Header row'
|
|
46469
|
+
},
|
|
44849
46470
|
{
|
|
44850
46471
|
name: 'deleteTable',
|
|
44851
46472
|
icon: 'bin',
|
|
@@ -44856,7 +46477,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44856
46477
|
tableempty: 'Empty cell'
|
|
44857
46478
|
},
|
|
44858
46479
|
exec: (editor, table, { control })=>{
|
|
44859
|
-
if (!(0,
|
|
46480
|
+
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
|
|
44860
46481
|
return;
|
|
44861
46482
|
}
|
|
44862
46483
|
if (!control.args) {
|
|
@@ -44916,7 +46537,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44916
46537
|
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
|
|
44917
46538
|
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
|
|
44918
46539
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
44919
|
-
/* harmony import */ var
|
|
46540
|
+
/* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
|
|
46541
|
+
/* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
|
|
44920
46542
|
/*!
|
|
44921
46543
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44922
46544
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44926,6 +46548,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
44926
46548
|
|
|
44927
46549
|
|
|
44928
46550
|
|
|
46551
|
+
|
|
44929
46552
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
44930
46553
|
const lineAlign = (editor, elm)=>{
|
|
44931
46554
|
const block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
|
|
@@ -44946,7 +46569,15 @@ const lineAlign = (editor, elm)=>{
|
|
|
44946
46569
|
return 'left';
|
|
44947
46570
|
}
|
|
44948
46571
|
};
|
|
44949
|
-
|
|
46572
|
+
// A captioned image is aligned by the element holding it and its caption
|
|
46573
|
+
const alignedBox = (editor, elm)=>{
|
|
46574
|
+
var _a;
|
|
46575
|
+
return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
|
|
46576
|
+
};
|
|
46577
|
+
const currentAlign = (editor, elm)=>{
|
|
46578
|
+
const box = alignedBox(editor, elm);
|
|
46579
|
+
return box ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(box, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box)) : 'normal';
|
|
46580
|
+
};
|
|
44950
46581
|
const align = {
|
|
44951
46582
|
name: 'left',
|
|
44952
46583
|
childTemplate: (_, __, value)=>value,
|
|
@@ -44972,14 +46603,15 @@ const align = {
|
|
|
44972
46603
|
'img',
|
|
44973
46604
|
'jodit',
|
|
44974
46605
|
'jodit-media'
|
|
44975
|
-
])) && (0,
|
|
46606
|
+
])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
|
|
44976
46607
|
return;
|
|
44977
46608
|
}
|
|
44978
46609
|
const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
44979
46610
|
if (!command) {
|
|
44980
46611
|
return false;
|
|
44981
46612
|
}
|
|
44982
|
-
|
|
46613
|
+
const box = alignedBox(editor, elm);
|
|
46614
|
+
(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(box, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box));
|
|
44983
46615
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
44984
46616
|
'jodit',
|
|
44985
46617
|
'jodit-media'
|
|
@@ -44998,7 +46630,8 @@ const align = {
|
|
|
44998
46630
|
icon: 'bin',
|
|
44999
46631
|
tooltip: 'Delete',
|
|
45000
46632
|
exec: (editor, image)=>{
|
|
45001
|
-
|
|
46633
|
+
var _a;
|
|
46634
|
+
image && editor.s.removeNode((_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)) !== null && _a !== void 0 ? _a : image);
|
|
45002
46635
|
}
|
|
45003
46636
|
},
|
|
45004
46637
|
{
|
|
@@ -45011,6 +46644,24 @@ const align = {
|
|
|
45011
46644
|
},
|
|
45012
46645
|
tooltip: 'Edit'
|
|
45013
46646
|
},
|
|
46647
|
+
{
|
|
46648
|
+
name: 'caption',
|
|
46649
|
+
exec: (editor, image)=>{
|
|
46650
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
|
|
46651
|
+
return;
|
|
46652
|
+
}
|
|
46653
|
+
const caption = editor.e.fire('toggleImageCaption', image);
|
|
46654
|
+
editor.synchronizeValues();
|
|
46655
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
|
|
46656
|
+
editor.e.fire('hideResizer');
|
|
46657
|
+
editor.s.setCursorIn(caption);
|
|
46658
|
+
} else {
|
|
46659
|
+
editor.e.fire('recalcPositionPopup');
|
|
46660
|
+
}
|
|
46661
|
+
},
|
|
46662
|
+
isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
|
|
46663
|
+
tooltip: 'Caption'
|
|
46664
|
+
},
|
|
45014
46665
|
{
|
|
45015
46666
|
name: 'valign',
|
|
45016
46667
|
list: [
|
|
@@ -45020,13 +46671,14 @@ const align = {
|
|
|
45020
46671
|
'Normal'
|
|
45021
46672
|
],
|
|
45022
46673
|
tooltip: 'Vertical align',
|
|
45023
|
-
// `vertical-align` only moves an image in the line, not a floated or block
|
|
46674
|
+
// `vertical-align` only moves an image in the line, not a floated or block
|
|
46675
|
+
// one, nor a captioned one, which is placed by its caption's element
|
|
45024
46676
|
isDisabled: (editor, button)=>{
|
|
45025
46677
|
const image = button.target;
|
|
45026
46678
|
return Boolean(image && ([
|
|
45027
46679
|
'left',
|
|
45028
46680
|
'right'
|
|
45029
|
-
].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
|
|
46681
|
+
].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block' || (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)));
|
|
45030
46682
|
},
|
|
45031
46683
|
exec: (editor, image, { control })=>{
|
|
45032
46684
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
|
|
@@ -45104,6 +46756,22 @@ const align = {
|
|
|
45104
46756
|
/* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"7\" rx=\"1\"/><path d=\"M12 3v7M12 14v7m-3.5-3.5h7\"/> </g> </svg> ");
|
|
45105
46757
|
|
|
45106
46758
|
|
|
46759
|
+
/***/ }),
|
|
46760
|
+
|
|
46761
|
+
/***/ 72972:
|
|
46762
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
46763
|
+
|
|
46764
|
+
/* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3 13 5-4 4 3 3-3 6 5\"/><path d=\"M7 21h10\"/> </g> </svg> ");
|
|
46765
|
+
|
|
46766
|
+
|
|
46767
|
+
/***/ }),
|
|
46768
|
+
|
|
46769
|
+
/***/ 44597:
|
|
46770
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
46771
|
+
|
|
46772
|
+
/* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2.5\"/><path d=\"M3 9V5.5A2.5 2.5 0 0 1 5.5 3h13A2.5 2.5 0 0 1 21 5.5V9z\" fill=\"currentColor\"/><path d=\"M3 15h18M9 9v12M15 9v12\"/> </g> </svg> ");
|
|
46773
|
+
|
|
46774
|
+
|
|
45107
46775
|
/***/ }),
|
|
45108
46776
|
|
|
45109
46777
|
/***/ 14862:
|
|
@@ -45245,8 +46913,8 @@ function _object_spread_props(target, source) {
|
|
|
45245
46913
|
if (target && type && this.canShowPopupForType(type)) {
|
|
45246
46914
|
const isMedia = type === 'jodit-media';
|
|
45247
46915
|
// Beside the media in a wrapper kept in the content, which can fill
|
|
45248
|
-
// the line
|
|
45249
|
-
const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
|
|
46916
|
+
// the line, and below a captioned image's caption, so it stays in view
|
|
46917
|
+
const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, target) || target;
|
|
45250
46918
|
this.showPopup(()=>this.__bound(bound, isMedia), type, target);
|
|
45251
46919
|
return false;
|
|
45252
46920
|
}
|
|
@@ -48551,6 +50219,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
48551
50219
|
* Check if root node is empty
|
|
48552
50220
|
* @private
|
|
48553
50221
|
*/ function isEditorEmpty(root) {
|
|
50222
|
+
var _a;
|
|
50223
|
+
// A non-breaking space is typed, where other white space can just lay out
|
|
50224
|
+
// the HTML
|
|
50225
|
+
return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
|
|
50226
|
+
}
|
|
50227
|
+
function isBlank(root) {
|
|
48554
50228
|
var _a;
|
|
48555
50229
|
if (!root.firstChild) {
|
|
48556
50230
|
return true;
|
|
@@ -49071,6 +50745,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
|
|
|
49071
50745
|
|
|
49072
50746
|
|
|
49073
50747
|
const key = 'table_processor_observer-resize';
|
|
50748
|
+
/**
|
|
50749
|
+
* How near the top or bottom of what a row scrolls in the pointer starts
|
|
50750
|
+
* scrolling it, as the editor's iframe passes on no moves outside it
|
|
50751
|
+
*/ const SCROLL_EDGE = 20;
|
|
49074
50752
|
/**
|
|
49075
50753
|
* Process tables in editor
|
|
49076
50754
|
*/ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
@@ -49090,7 +50768,11 @@ const key = 'table_processor_observer-resize';
|
|
|
49090
50768
|
}
|
|
49091
50769
|
hideResizeHandle() {
|
|
49092
50770
|
this.hideTimeout = this.j.async.setTimeout(()=>{
|
|
49093
|
-
|
|
50771
|
+
// A late move from inside the cell can come once the pointer
|
|
50772
|
+
// is on the handle, which covers the border
|
|
50773
|
+
if (!this.resizeHandler.matches(':hover')) {
|
|
50774
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
|
|
50775
|
+
}
|
|
49094
50776
|
}, {
|
|
49095
50777
|
timeout: this.j.defaultTimeout,
|
|
49096
50778
|
label: 'hideResizer'
|
|
@@ -49107,6 +50789,30 @@ const key = 'table_processor_observer-resize';
|
|
|
49107
50789
|
this.startX = event.clientX;
|
|
49108
50790
|
this.j.lock(key);
|
|
49109
50791
|
this.resizeHandler.classList.add('jodit-table-resizer_moved');
|
|
50792
|
+
if (this.workRow) {
|
|
50793
|
+
this.startY = event.clientY;
|
|
50794
|
+
this.startHeight = this.workRow.offsetHeight;
|
|
50795
|
+
this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
|
|
50796
|
+
this.scrolled = 0;
|
|
50797
|
+
this.anchored = scrollersOf(this.workRow).map((elm)=>{
|
|
50798
|
+
const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
|
|
50799
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
|
|
50800
|
+
return [
|
|
50801
|
+
elm,
|
|
50802
|
+
style
|
|
50803
|
+
];
|
|
50804
|
+
});
|
|
50805
|
+
return false;
|
|
50806
|
+
}
|
|
50807
|
+
this.startStyles = [
|
|
50808
|
+
this.workTable,
|
|
50809
|
+
...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
|
|
50810
|
+
].map((elm)=>[
|
|
50811
|
+
elm,
|
|
50812
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
|
|
50813
|
+
]);
|
|
50814
|
+
this.startLeft = parseFloat(this.resizeHandler.style.left);
|
|
50815
|
+
this.startEdge = this.columnEdge();
|
|
49110
50816
|
let box;
|
|
49111
50817
|
this.minX = 0;
|
|
49112
50818
|
this.maxX = 1000000;
|
|
@@ -49133,12 +50839,21 @@ const key = 'table_processor_observer-resize';
|
|
|
49133
50839
|
/**
|
|
49134
50840
|
* Mouse move after click on resize handle
|
|
49135
50841
|
*/ onMouseMove(event) {
|
|
50842
|
+
var _a;
|
|
49136
50843
|
if (!this.drag) {
|
|
49137
50844
|
return;
|
|
49138
50845
|
}
|
|
49139
50846
|
this.j.e.fire('closeAllPopups');
|
|
49140
50847
|
let x = event.clientX;
|
|
49141
50848
|
const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.resizeHandler.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
|
|
50849
|
+
if (this.workRow) {
|
|
50850
|
+
const view = scrollViewOf(this.workRow);
|
|
50851
|
+
this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
|
|
50852
|
+
this.resizeRow(this.workRow);
|
|
50853
|
+
this.scrollAlong(view, event.clientY);
|
|
50854
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
50855
|
+
return;
|
|
50856
|
+
}
|
|
49142
50857
|
if (x < this.minX) {
|
|
49143
50858
|
x = this.minX;
|
|
49144
50859
|
}
|
|
@@ -49146,7 +50861,14 @@ const key = 'table_processor_observer-resize';
|
|
|
49146
50861
|
x = this.maxX;
|
|
49147
50862
|
}
|
|
49148
50863
|
this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
49149
|
-
|
|
50864
|
+
this.restoreStyles();
|
|
50865
|
+
this.resizeColumnsOrTable();
|
|
50866
|
+
const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
|
|
50867
|
+
Object.assign(this.resizeHandler.style, {
|
|
50868
|
+
left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
|
|
50869
|
+
top: tableBox.top - workplacePosition.top + 'px',
|
|
50870
|
+
height: tableBox.height + 'px'
|
|
50871
|
+
});
|
|
49150
50872
|
const sel = this.j.s.sel;
|
|
49151
50873
|
sel && sel.removeAllRanges();
|
|
49152
50874
|
}
|
|
@@ -49163,17 +50885,96 @@ const key = 'table_processor_observer-resize';
|
|
|
49163
50885
|
this.drag = false;
|
|
49164
50886
|
this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
|
|
49165
50887
|
this.resizeHandler.classList.remove('jodit-table-resizer_moved');
|
|
49166
|
-
if (this.
|
|
49167
|
-
|
|
49168
|
-
|
|
49169
|
-
|
|
50888
|
+
if (this.workRow) {
|
|
50889
|
+
this.j.async.cancelAnimationFrame(this.scrollFrame);
|
|
50890
|
+
this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
|
|
50891
|
+
this.anchored = [];
|
|
50892
|
+
const height = this.workRow.offsetHeight;
|
|
50893
|
+
if (height !== this.startHeight) {
|
|
50894
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
|
|
49170
50895
|
} else {
|
|
49171
|
-
this.
|
|
50896
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
|
|
50897
|
+
}
|
|
50898
|
+
} else {
|
|
50899
|
+
this.restoreStyles();
|
|
50900
|
+
if (this.startX !== e.clientX) {
|
|
50901
|
+
this.resizeColumnsOrTable();
|
|
49172
50902
|
}
|
|
49173
50903
|
}
|
|
49174
50904
|
this.j.synchronizeValues();
|
|
49175
50905
|
this.j.s.focus();
|
|
49176
50906
|
}
|
|
50907
|
+
resizeColumnsOrTable() {
|
|
50908
|
+
if (this.wholeTable == null) {
|
|
50909
|
+
this.resizeColumns();
|
|
50910
|
+
} else {
|
|
50911
|
+
this.resizeTable();
|
|
50912
|
+
}
|
|
50913
|
+
}
|
|
50914
|
+
restoreStyles() {
|
|
50915
|
+
this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
|
|
50916
|
+
}
|
|
50917
|
+
/**
|
|
50918
|
+
* Where the border the handle is on lies: the work cell's left side
|
|
50919
|
+
* for the table's left edge, otherwise its right side
|
|
50920
|
+
*/ columnEdge() {
|
|
50921
|
+
const { left, right } = this.workCell.getBoundingClientRect();
|
|
50922
|
+
return this.wholeTable === true ? left : right;
|
|
50923
|
+
}
|
|
50924
|
+
/**
|
|
50925
|
+
* Sets the row's height from where the pointer is, and how far the drag
|
|
50926
|
+
* has scrolled. The browser keeps the row as tall as its content
|
|
50927
|
+
*/ resizeRow(row) {
|
|
50928
|
+
const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
|
|
50929
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
|
|
50930
|
+
this.placeRowHandle(row);
|
|
50931
|
+
return row.offsetHeight === height;
|
|
50932
|
+
}
|
|
50933
|
+
/**
|
|
50934
|
+
* While the pointer is near or past the top or bottom of the part of the
|
|
50935
|
+
* row's scroller in view, scrolls it on, and the row's border with it
|
|
50936
|
+
*/ scrollAlong(view, clientY) {
|
|
50937
|
+
this.j.async.cancelAnimationFrame(this.scrollFrame);
|
|
50938
|
+
const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
|
|
50939
|
+
if (!past) {
|
|
50940
|
+
return;
|
|
50941
|
+
}
|
|
50942
|
+
const { scroller } = view;
|
|
50943
|
+
const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
|
|
50944
|
+
const scroll = ()=>{
|
|
50945
|
+
const { workRow } = this;
|
|
50946
|
+
if (!workRow) {
|
|
50947
|
+
return;
|
|
50948
|
+
}
|
|
50949
|
+
const scrollTop = scroller.scrollTop;
|
|
50950
|
+
if (step > 0) {
|
|
50951
|
+
// Growing the row first makes the room to scroll down into
|
|
50952
|
+
this.scrolled += step;
|
|
50953
|
+
this.resizeRow(workRow);
|
|
50954
|
+
scroller.scrollTop = scrollTop + step;
|
|
50955
|
+
const missed = step - (scroller.scrollTop - scrollTop);
|
|
50956
|
+
if (missed > 0.5) {
|
|
50957
|
+
this.scrolled -= missed;
|
|
50958
|
+
this.resizeRow(workRow);
|
|
50959
|
+
return;
|
|
50960
|
+
}
|
|
50961
|
+
this.placeRowHandle(workRow);
|
|
50962
|
+
} else {
|
|
50963
|
+
scroller.scrollTop = scrollTop + step;
|
|
50964
|
+
const moved = scroller.scrollTop - scrollTop;
|
|
50965
|
+
this.scrolled += moved;
|
|
50966
|
+
// A row at its content's height can't follow the pointer up
|
|
50967
|
+
if (!moved || !this.resizeRow(workRow)) {
|
|
50968
|
+
scroller.scrollTop = scrollTop;
|
|
50969
|
+
this.scrolled -= moved;
|
|
50970
|
+
this.resizeRow(workRow);
|
|
50971
|
+
return;
|
|
50972
|
+
}
|
|
50973
|
+
}
|
|
50974
|
+
this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
|
|
50975
|
+
};
|
|
50976
|
+
this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
|
|
50977
|
+
}
|
|
49177
50978
|
/**
|
|
49178
50979
|
* Resize only one column
|
|
49179
50980
|
*/ resizeColumns() {
|
|
@@ -49216,15 +51017,20 @@ const key = 'table_processor_observer-resize';
|
|
|
49216
51017
|
}
|
|
49217
51018
|
/**
|
|
49218
51019
|
* Calc helper resize handle position
|
|
49219
|
-
*/ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
|
|
51020
|
+
*/ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
|
|
49220
51021
|
const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
|
|
49221
51022
|
if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
|
|
49222
|
-
this.
|
|
51023
|
+
if (!this.calcRowHandlePosition(cell, clientY)) {
|
|
51024
|
+
this.hideResizeHandle();
|
|
51025
|
+
}
|
|
49223
51026
|
return;
|
|
49224
51027
|
}
|
|
51028
|
+
this.workRow = null;
|
|
51029
|
+
this.resizeHandler.classList.remove('jodit-table-resizer_row');
|
|
49225
51030
|
const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), parentBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(table, this.j, this.j.ed);
|
|
49226
51031
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', (offsetX <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + 'px');
|
|
49227
51032
|
Object.assign(this.resizeHandler.style, {
|
|
51033
|
+
width: '',
|
|
49228
51034
|
height: parentBox.height + 'px',
|
|
49229
51035
|
top: parentBox.top - workplacePosition.top + 'px'
|
|
49230
51036
|
});
|
|
@@ -49237,6 +51043,36 @@ const key = 'table_processor_observer-resize';
|
|
|
49237
51043
|
this.setWorkCell(cell, !nextTD ? false : null);
|
|
49238
51044
|
}
|
|
49239
51045
|
}
|
|
51046
|
+
/**
|
|
51047
|
+
* Shows the handle across the table on the border below a row, near the
|
|
51048
|
+
* cell's bottom or near its top, which is the bottom of the row above.
|
|
51049
|
+
* The table's top edge has no row above it
|
|
51050
|
+
*/ calcRowHandlePosition(cell, clientY) {
|
|
51051
|
+
const { top, bottom } = cell.getBoundingClientRect();
|
|
51052
|
+
const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(cell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), this.j.editor);
|
|
51053
|
+
const index = cell.parentNode.rowIndex;
|
|
51054
|
+
const row = Math.abs(bottom - clientY) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index + cell.rowSpan - 1] : Math.abs(clientY - top) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index - 1] : null;
|
|
51055
|
+
if (!row) {
|
|
51056
|
+
return false;
|
|
51057
|
+
}
|
|
51058
|
+
this.workRow = row;
|
|
51059
|
+
this.workTable = table;
|
|
51060
|
+
this.resizeHandler.classList.add('jodit-table-resizer_row');
|
|
51061
|
+
this.placeRowHandle(row);
|
|
51062
|
+
this.showResizeHandle();
|
|
51063
|
+
return true;
|
|
51064
|
+
}
|
|
51065
|
+
/**
|
|
51066
|
+
* Lays the handle across the table on the border below the row
|
|
51067
|
+
*/ placeRowHandle(row) {
|
|
51068
|
+
const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed), rowBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(row, this.j, this.j.ed);
|
|
51069
|
+
Object.assign(this.resizeHandler.style, {
|
|
51070
|
+
left: tableBox.left - workplacePosition.left + 'px',
|
|
51071
|
+
width: tableBox.width + 'px',
|
|
51072
|
+
height: '',
|
|
51073
|
+
top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
|
|
51074
|
+
});
|
|
51075
|
+
}
|
|
49240
51076
|
/** @override */ afterInit(editor) {
|
|
49241
51077
|
if (!editor.o.tableAllowCellResize) {
|
|
49242
51078
|
return;
|
|
@@ -49244,7 +51080,7 @@ const key = 'table_processor_observer-resize';
|
|
|
49244
51080
|
editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
|
|
49245
51081
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
|
|
49246
51082
|
}).on(this.j.ow, 'scroll.resize-cells', ()=>{
|
|
49247
|
-
if (!this.drag) {
|
|
51083
|
+
if (!this.drag || this.workRow) {
|
|
49248
51084
|
return;
|
|
49249
51085
|
}
|
|
49250
51086
|
const parent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.workCell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), editor.editor);
|
|
@@ -49268,7 +51104,7 @@ const key = 'table_processor_observer-resize';
|
|
|
49268
51104
|
}
|
|
49269
51105
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
|
|
49270
51106
|
this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
|
|
49271
|
-
if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
|
|
51107
|
+
if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
|
|
49272
51108
|
this.hideResizeHandle();
|
|
49273
51109
|
}
|
|
49274
51110
|
}).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
|
|
@@ -49279,7 +51115,7 @@ const key = 'table_processor_observer-resize';
|
|
|
49279
51115
|
if (!cell) {
|
|
49280
51116
|
return;
|
|
49281
51117
|
}
|
|
49282
|
-
this.calcHandlePosition(table, cell, event.offsetX);
|
|
51118
|
+
this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
|
|
49283
51119
|
}, {
|
|
49284
51120
|
timeout: this.j.defaultTimeout
|
|
49285
51121
|
}));
|
|
@@ -49300,6 +51136,10 @@ const key = 'table_processor_observer-resize';
|
|
|
49300
51136
|
this.resizeHandler = this.j.c.div('jodit-table-resizer');
|
|
49301
51137
|
this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
|
|
49302
51138
|
this.j.async.clearTimeout(this.hideTimeout);
|
|
51139
|
+
}).on(this.resizeHandler, 'mouseleave.table', ()=>{
|
|
51140
|
+
if (!this.drag) {
|
|
51141
|
+
this.hideResizeHandle();
|
|
51142
|
+
}
|
|
49303
51143
|
});
|
|
49304
51144
|
}
|
|
49305
51145
|
};
|
|
@@ -49308,6 +51148,25 @@ const key = 'table_processor_observer-resize';
|
|
|
49308
51148
|
this.minX = 0;
|
|
49309
51149
|
this.maxX = 0;
|
|
49310
51150
|
this.startX = 0;
|
|
51151
|
+
/**
|
|
51152
|
+
* The table's and its cells' styles as a column drag started, put back
|
|
51153
|
+
* before each new width
|
|
51154
|
+
*/ this.startStyles = [];
|
|
51155
|
+
this.startLeft = 0;
|
|
51156
|
+
this.startEdge = 0;
|
|
51157
|
+
/**
|
|
51158
|
+
* The row whose height the handle sets, or null while it sets a width
|
|
51159
|
+
*/ this.workRow = null;
|
|
51160
|
+
this.startY = 0;
|
|
51161
|
+
this.startHeight = 0;
|
|
51162
|
+
this.rowStyle = null;
|
|
51163
|
+
/**
|
|
51164
|
+
* The boxes that scroll the row, with their styles, as a row drag turns
|
|
51165
|
+
* off their scroll anchoring, which would move the border off the pointer
|
|
51166
|
+
*/ this.anchored = [];
|
|
51167
|
+
this.scrolled = 0;
|
|
51168
|
+
this.scrollFrame = 0;
|
|
51169
|
+
this.pointerY = 0;
|
|
49311
51170
|
}
|
|
49312
51171
|
}
|
|
49313
51172
|
__decorate([
|
|
@@ -49322,6 +51181,45 @@ __decorate([
|
|
|
49322
51181
|
__decorate([
|
|
49323
51182
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
49324
51183
|
], resizeCells.prototype, "observe", null);
|
|
51184
|
+
/**
|
|
51185
|
+
* The boxes around the row that can scroll it, nearest first, and its
|
|
51186
|
+
* document's
|
|
51187
|
+
*/ function scrollersOf(row) {
|
|
51188
|
+
const doc = row.ownerDocument;
|
|
51189
|
+
const root = doc.scrollingElement || doc.documentElement;
|
|
51190
|
+
const scrollers = [];
|
|
51191
|
+
for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
|
|
51192
|
+
if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
|
|
51193
|
+
scrollers.push(elm);
|
|
51194
|
+
}
|
|
51195
|
+
}
|
|
51196
|
+
return [
|
|
51197
|
+
...scrollers,
|
|
51198
|
+
root
|
|
51199
|
+
];
|
|
51200
|
+
}
|
|
51201
|
+
/**
|
|
51202
|
+
* What scrolls the row up and down, the nearest box around it with more
|
|
51203
|
+
* than it shows or else its document, and the part of it in the window's view
|
|
51204
|
+
*/ function scrollViewOf(row) {
|
|
51205
|
+
var _a, _b, _c;
|
|
51206
|
+
const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
|
|
51207
|
+
const scrollers = scrollersOf(row);
|
|
51208
|
+
const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
|
|
51209
|
+
if (scroller === scrollers[scrollers.length - 1]) {
|
|
51210
|
+
return {
|
|
51211
|
+
scroller,
|
|
51212
|
+
top: 0,
|
|
51213
|
+
bottom: height
|
|
51214
|
+
};
|
|
51215
|
+
}
|
|
51216
|
+
const top = scroller.getBoundingClientRect().top + scroller.clientTop;
|
|
51217
|
+
return {
|
|
51218
|
+
scroller,
|
|
51219
|
+
top: Math.max(top, 0),
|
|
51220
|
+
bottom: Math.min(top + scroller.clientHeight, height)
|
|
51221
|
+
};
|
|
51222
|
+
}
|
|
49325
51223
|
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
|
|
49326
51224
|
|
|
49327
51225
|
|
|
@@ -49797,6 +51695,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
49797
51695
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
|
|
49798
51696
|
}
|
|
49799
51697
|
applySize(element, key, value) {
|
|
51698
|
+
// A captioned image fills the element holding it and its caption,
|
|
51699
|
+
// which takes the width
|
|
51700
|
+
const wrapper = key === 'width' && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'img') ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, element) : null;
|
|
51701
|
+
if (wrapper) {
|
|
51702
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
|
|
51703
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
|
|
51704
|
+
return;
|
|
51705
|
+
}
|
|
49800
51706
|
const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
|
|
49801
51707
|
if (changeAttrs) {
|
|
49802
51708
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
|
|
@@ -49811,6 +51717,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
49811
51717
|
return Boolean(this.element && this.j.editor.contains(this.element));
|
|
49812
51718
|
}
|
|
49813
51719
|
onDelete(e) {
|
|
51720
|
+
var _a;
|
|
49814
51721
|
if (!this.element) {
|
|
49815
51722
|
return;
|
|
49816
51723
|
}
|
|
@@ -49819,7 +51726,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
49819
51726
|
return;
|
|
49820
51727
|
}
|
|
49821
51728
|
if (this.element.tagName !== 'JODIT') {
|
|
49822
|
-
this.j.s.select(this.element);
|
|
51729
|
+
this.j.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.element)) !== null && _a !== void 0 ? _a : this.element);
|
|
49823
51730
|
} else {
|
|
49824
51731
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
|
|
49825
51732
|
this.hide();
|
|
@@ -51115,8 +53022,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
51115
53022
|
'touchstartTd',
|
|
51116
53023
|
'touchstartTh'
|
|
51117
53024
|
].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
|
|
51118
|
-
// and mouseup on another cell call `click` only for
|
|
51119
|
-
|
|
53025
|
+
// and mouseup on another cell call `click` only for their common
|
|
53026
|
+
// ancestor: the row, the section, or the table across sections
|
|
53027
|
+
.on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
|
|
51120
53028
|
var _a;
|
|
51121
53029
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
51122
53030
|
if (cellsCount) {
|
|
@@ -51280,14 +53188,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
51280
53188
|
}
|
|
51281
53189
|
this.j.e.fire('hidePopup');
|
|
51282
53190
|
e.stopPropagation();
|
|
51283
|
-
// Hack for FireFox for force redraw selection
|
|
51284
|
-
(()=>{
|
|
51285
|
-
const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
51286
|
-
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, n);
|
|
51287
|
-
this.j.async.setTimeout(()=>{
|
|
51288
|
-
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(n);
|
|
51289
|
-
}, this.j.defaultTimeout / 5);
|
|
51290
|
-
})();
|
|
51291
53191
|
}
|
|
51292
53192
|
/**
|
|
51293
53193
|
* On click in outside - remove selection
|
|
@@ -51386,7 +53286,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
51386
53286
|
this.j.synchronizeValues();
|
|
51387
53287
|
return false;
|
|
51388
53288
|
}
|
|
51389
|
-
if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
|
|
53289
|
+
if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
|
|
51390
53290
|
command = command.replace('table', '');
|
|
51391
53291
|
const cells = this.__tableModule.getAllSelectedCells();
|
|
51392
53292
|
if (cells.length) {
|
|
@@ -51453,6 +53353,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
51453
53353
|
case 'addrowbefore':
|
|
51454
53354
|
this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
|
|
51455
53355
|
break;
|
|
53356
|
+
case 'headerrow':
|
|
53357
|
+
this.__toggleHeaderRow(table, cells);
|
|
53358
|
+
break;
|
|
51456
53359
|
}
|
|
51457
53360
|
if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
|
|
51458
53361
|
this.__removeTable(table);
|
|
@@ -51461,6 +53364,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
|
|
|
51461
53364
|
return false;
|
|
51462
53365
|
}
|
|
51463
53366
|
}
|
|
53367
|
+
/**
|
|
53368
|
+
* Turns the table's header row on or off. The caret and the marked cells
|
|
53369
|
+
* move to the cells that replace them
|
|
53370
|
+
*/ __toggleHeaderRow(table, cells) {
|
|
53371
|
+
var _a, _b;
|
|
53372
|
+
const module = this.__tableModule;
|
|
53373
|
+
this.j.s.save();
|
|
53374
|
+
const replaced = module.toggleHeaderRow(table);
|
|
53375
|
+
this.j.s.restore();
|
|
53376
|
+
cells.forEach((cell)=>{
|
|
53377
|
+
const next = replaced.get(cell);
|
|
53378
|
+
if (next) {
|
|
53379
|
+
module.removeSelection(cell);
|
|
53380
|
+
module.addSelection(next);
|
|
53381
|
+
}
|
|
53382
|
+
});
|
|
53383
|
+
// As after the click that marked it, the command's own change keeps
|
|
53384
|
+
// the marks, so the popup can stay open for another toggle
|
|
53385
|
+
const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
|
|
53386
|
+
this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
|
|
53387
|
+
}
|
|
51464
53388
|
/**
|
|
51465
53389
|
* The cell that takes the caret when rows or columns are deleted: the next
|
|
51466
53390
|
* one in the same column (or row) that is not deleted, else the previous one
|
|
@@ -55716,9 +57640,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
|
|
|
55716
57640
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
55717
57641
|
|
|
55718
57642
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
55719
|
-
/* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; }
|
|
57643
|
+
/* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
|
|
57644
|
+
/* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
|
|
57645
|
+
/* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
|
|
57646
|
+
/* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
|
|
55720
57647
|
/* harmony export */ });
|
|
55721
57648
|
/* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
|
|
57649
|
+
/* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
|
|
55722
57650
|
/*!
|
|
55723
57651
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
55724
57652
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -55728,6 +57656,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
|
|
|
55728
57656
|
*/
|
|
55729
57657
|
|
|
55730
57658
|
|
|
57659
|
+
|
|
55731
57660
|
/***/ }),
|
|
55732
57661
|
|
|
55733
57662
|
/***/ 26658:
|
|
@@ -55749,7 +57678,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
|
|
|
55749
57678
|
* If so then add an internal list
|
|
55750
57679
|
* @private
|
|
55751
57680
|
*/ function onTabInsideLi(jodit, shift = false) {
|
|
55752
|
-
|
|
57681
|
+
// Focused with no range, as WebKit can leave it, there's no caret to
|
|
57682
|
+
// mark
|
|
57683
|
+
if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
|
|
55753
57684
|
return false;
|
|
55754
57685
|
}
|
|
55755
57686
|
const [fake, fake2] = fakeCursors(jodit);
|
|
@@ -55846,6 +57777,279 @@ function removeNestedList(jodit, list, li) {
|
|
|
55846
57777
|
}
|
|
55847
57778
|
|
|
55848
57779
|
|
|
57780
|
+
/***/ }),
|
|
57781
|
+
|
|
57782
|
+
/***/ 39481:
|
|
57783
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
57784
|
+
|
|
57785
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
57786
|
+
/* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
|
|
57787
|
+
/* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
|
|
57788
|
+
/* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
|
|
57789
|
+
/* harmony export */ });
|
|
57790
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
57791
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
57792
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
57793
|
+
/* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
|
|
57794
|
+
/* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
|
|
57795
|
+
/*!
|
|
57796
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
57797
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
57798
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
57799
|
+
*/
|
|
57800
|
+
|
|
57801
|
+
|
|
57802
|
+
|
|
57803
|
+
|
|
57804
|
+
const KEEPS_TABS = new Set([
|
|
57805
|
+
'pre',
|
|
57806
|
+
'pre-wrap',
|
|
57807
|
+
'break-spaces'
|
|
57808
|
+
]);
|
|
57809
|
+
const KEEPS_TABS_TAGS = new Set([
|
|
57810
|
+
'pre',
|
|
57811
|
+
'textarea',
|
|
57812
|
+
'style',
|
|
57813
|
+
'script'
|
|
57814
|
+
]);
|
|
57815
|
+
/**
|
|
57816
|
+
* With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
|
|
57817
|
+
* or a tab where white space is kept, as in `pre`, and in a list's first item
|
|
57818
|
+
* it indents the list, as Word does. Shift+Tab takes them out again. Tab or
|
|
57819
|
+
* Shift+Tab with a selection indents or outdents it. Neither moves the focus
|
|
57820
|
+
* on: Escape and then Tab does that
|
|
57821
|
+
* @private
|
|
57822
|
+
*/ function onTabSpaces(jodit, shift) {
|
|
57823
|
+
const { spaces } = jodit.o.tab;
|
|
57824
|
+
const current = jodit.s.current();
|
|
57825
|
+
if (!spaces || jodit.o.readonly || jodit.isLocked) {
|
|
57826
|
+
return false;
|
|
57827
|
+
}
|
|
57828
|
+
// The editor has the focus but no caret, so there's nowhere to put
|
|
57829
|
+
// anything, but the focus stays
|
|
57830
|
+
if (!current) {
|
|
57831
|
+
return true;
|
|
57832
|
+
}
|
|
57833
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
|
|
57834
|
+
return false;
|
|
57835
|
+
}
|
|
57836
|
+
if (!jodit.s.isCollapsed()) {
|
|
57837
|
+
jodit.execCommand(shift ? 'outdent' : 'indent');
|
|
57838
|
+
return true;
|
|
57839
|
+
}
|
|
57840
|
+
const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
|
|
57841
|
+
const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
|
|
57842
|
+
if (list && (!shift || isIndented(jodit, list))) {
|
|
57843
|
+
(0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
|
|
57844
|
+
jodit.synchronizeValues();
|
|
57845
|
+
return true;
|
|
57846
|
+
}
|
|
57847
|
+
if (shift) {
|
|
57848
|
+
unindent(jodit, current, spaces);
|
|
57849
|
+
return true;
|
|
57850
|
+
}
|
|
57851
|
+
const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
|
|
57852
|
+
const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
|
|
57853
|
+
jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
|
|
57854
|
+
return true;
|
|
57855
|
+
}
|
|
57856
|
+
/**
|
|
57857
|
+
* Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
|
|
57858
|
+
* it, then a tab or up to `spaces` spaces at the start of its line, then the
|
|
57859
|
+
* indent of its block
|
|
57860
|
+
*/ function unindent(jodit, current, spaces) {
|
|
57861
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
|
|
57862
|
+
const caret = jodit.createInside.fake();
|
|
57863
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
|
|
57864
|
+
let removed;
|
|
57865
|
+
try {
|
|
57866
|
+
removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
|
|
57867
|
+
if (removed) {
|
|
57868
|
+
(0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
|
|
57869
|
+
}
|
|
57870
|
+
} finally{
|
|
57871
|
+
jodit.s.setCursorBefore(caret);
|
|
57872
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
|
|
57873
|
+
}
|
|
57874
|
+
if (removed) {
|
|
57875
|
+
jodit.synchronizeValues();
|
|
57876
|
+
} else if (block && isIndented(jodit, block)) {
|
|
57877
|
+
jodit.execCommand('outdent');
|
|
57878
|
+
}
|
|
57879
|
+
}
|
|
57880
|
+
function removeTabBefore(caret) {
|
|
57881
|
+
const before = caret.previousSibling;
|
|
57882
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
|
|
57883
|
+
before.deleteData(before.length - 1, 1);
|
|
57884
|
+
return true;
|
|
57885
|
+
}
|
|
57886
|
+
return false;
|
|
57887
|
+
}
|
|
57888
|
+
function removeLineIndent(jodit, block, caret, spaces) {
|
|
57889
|
+
const { whiteSpace } = jodit.ew.getComputedStyle(block);
|
|
57890
|
+
const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
|
|
57891
|
+
acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
57892
|
+
});
|
|
57893
|
+
const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
|
|
57894
|
+
return removeIndentAt(walker, start, offset, caret, spaces);
|
|
57895
|
+
}
|
|
57896
|
+
/**
|
|
57897
|
+
* Where the caret's line starts: after a `<br>`, after a newline where white
|
|
57898
|
+
* space keeps it, or at the caret
|
|
57899
|
+
*/ function lineStart(walker, caret, keepsBreaks) {
|
|
57900
|
+
let start = null;
|
|
57901
|
+
let offset = 0;
|
|
57902
|
+
for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
|
|
57903
|
+
const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
|
|
57904
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
|
|
57905
|
+
start = null;
|
|
57906
|
+
} else if (lineBreak >= 0) {
|
|
57907
|
+
start = node;
|
|
57908
|
+
offset = lineBreak + 1;
|
|
57909
|
+
} else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
|
|
57910
|
+
start = node;
|
|
57911
|
+
offset = 0;
|
|
57912
|
+
}
|
|
57913
|
+
}
|
|
57914
|
+
return start ? [
|
|
57915
|
+
start,
|
|
57916
|
+
offset
|
|
57917
|
+
] : [
|
|
57918
|
+
caret,
|
|
57919
|
+
0
|
|
57920
|
+
];
|
|
57921
|
+
}
|
|
57922
|
+
function removeIndentAt(walker, start, startOffset, caret, spaces) {
|
|
57923
|
+
let removed = 0;
|
|
57924
|
+
let offset = startOffset;
|
|
57925
|
+
walker.currentNode = start;
|
|
57926
|
+
for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
|
|
57927
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
|
|
57928
|
+
const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
|
|
57929
|
+
node.deleteData(offset, end - offset);
|
|
57930
|
+
removed += count;
|
|
57931
|
+
if (offset < node.length) {
|
|
57932
|
+
break;
|
|
57933
|
+
}
|
|
57934
|
+
}
|
|
57935
|
+
offset = 0;
|
|
57936
|
+
}
|
|
57937
|
+
return removed > 0;
|
|
57938
|
+
}
|
|
57939
|
+
/**
|
|
57940
|
+
* Where up to `count` spaces from `offset` end, and how many there were. A
|
|
57941
|
+
* tab at the start of a line is a whole indent
|
|
57942
|
+
*/ function scanIndent(text, offset, count, atLineStart) {
|
|
57943
|
+
if (atLineStart && text[offset] === '\t') {
|
|
57944
|
+
return [
|
|
57945
|
+
offset + 1,
|
|
57946
|
+
count
|
|
57947
|
+
];
|
|
57948
|
+
}
|
|
57949
|
+
let end = offset;
|
|
57950
|
+
let found = 0;
|
|
57951
|
+
for(; end < text.length && found < count; end += 1){
|
|
57952
|
+
const char = text[end];
|
|
57953
|
+
if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
57954
|
+
break;
|
|
57955
|
+
}
|
|
57956
|
+
if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
57957
|
+
found += 1;
|
|
57958
|
+
}
|
|
57959
|
+
}
|
|
57960
|
+
return [
|
|
57961
|
+
end,
|
|
57962
|
+
found
|
|
57963
|
+
];
|
|
57964
|
+
}
|
|
57965
|
+
function isIndented(jodit, box) {
|
|
57966
|
+
return parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(box, (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.getKey)(jodit.o.direction, box)) || '0', 10) > 0;
|
|
57967
|
+
}
|
|
57968
|
+
/**
|
|
57969
|
+
* With `tab.spaces`, Backspace just after that many spaces removes them
|
|
57970
|
+
* together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
|
|
57971
|
+
* if one of them is non-breaking, so a space between words stays
|
|
57972
|
+
* @private
|
|
57973
|
+
*/ function removeTabSpaces(jodit, caret, upTo = false) {
|
|
57974
|
+
const { spaces } = jodit.o.tab;
|
|
57975
|
+
if (!spaces) {
|
|
57976
|
+
return false;
|
|
57977
|
+
}
|
|
57978
|
+
const range = jodit.s.createRange();
|
|
57979
|
+
range.setEndBefore(caret);
|
|
57980
|
+
let count = 0;
|
|
57981
|
+
let nonBreaking = false;
|
|
57982
|
+
for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
|
|
57983
|
+
let offset = node.length;
|
|
57984
|
+
for(; offset > 0 && count < spaces; offset -= 1){
|
|
57985
|
+
const char = node.data[offset - 1];
|
|
57986
|
+
if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
|
|
57987
|
+
nonBreaking = true;
|
|
57988
|
+
} else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
57989
|
+
break;
|
|
57990
|
+
}
|
|
57991
|
+
if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
57992
|
+
count += 1;
|
|
57993
|
+
}
|
|
57994
|
+
}
|
|
57995
|
+
range.setStart(node, offset);
|
|
57996
|
+
if (offset && count < spaces) {
|
|
57997
|
+
break;
|
|
57998
|
+
}
|
|
57999
|
+
}
|
|
58000
|
+
if (upTo ? !nonBreaking : count < spaces) {
|
|
58001
|
+
return false;
|
|
58002
|
+
}
|
|
58003
|
+
range.deleteContents();
|
|
58004
|
+
// An emptied line keeps a <br>, as after any Backspace, or it has no
|
|
58005
|
+
// height to hold the caret
|
|
58006
|
+
(0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
|
|
58007
|
+
return true;
|
|
58008
|
+
}
|
|
58009
|
+
/**
|
|
58010
|
+
* With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
|
|
58011
|
+
* show it as one space. Tabs in white space that's kept, and those that only
|
|
58012
|
+
* lay out the HTML, stay as they are
|
|
58013
|
+
* @private
|
|
58014
|
+
*/ function tabsToSpaces(jodit, html) {
|
|
58015
|
+
var _a;
|
|
58016
|
+
const { spaces } = jodit.o.tab;
|
|
58017
|
+
const current = jodit.s.current();
|
|
58018
|
+
const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
|
|
58019
|
+
if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
|
|
58020
|
+
return;
|
|
58021
|
+
}
|
|
58022
|
+
// A template parses without loading images or running scripts
|
|
58023
|
+
const template = jodit.ed.createElement('template');
|
|
58024
|
+
template.innerHTML = html;
|
|
58025
|
+
const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
|
|
58026
|
+
let changed = false;
|
|
58027
|
+
for(let node = walker.nextNode(); node; node = walker.nextNode()){
|
|
58028
|
+
const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
|
|
58029
|
+
if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
|
|
58030
|
+
node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
|
|
58031
|
+
changed = true;
|
|
58032
|
+
}
|
|
58033
|
+
}
|
|
58034
|
+
return changed ? template.innerHTML : undefined;
|
|
58035
|
+
}
|
|
58036
|
+
/**
|
|
58037
|
+
* The fragment isn't rendered, so this reads the white space its own styles
|
|
58038
|
+
* and tags set. The text of `<style>` and `<script>` isn't shown at all
|
|
58039
|
+
*/ function keepsTabs(node) {
|
|
58040
|
+
for(let el = node.parentElement; el; el = el.parentElement){
|
|
58041
|
+
const { whiteSpace } = el.style;
|
|
58042
|
+
if (whiteSpace) {
|
|
58043
|
+
return KEEPS_TABS.has(whiteSpace);
|
|
58044
|
+
}
|
|
58045
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
|
|
58046
|
+
return true;
|
|
58047
|
+
}
|
|
58048
|
+
}
|
|
58049
|
+
return false;
|
|
58050
|
+
}
|
|
58051
|
+
|
|
58052
|
+
|
|
55849
58053
|
/***/ }),
|
|
55850
58054
|
|
|
55851
58055
|
/***/ 66288:
|
|
@@ -55860,7 +58064,8 @@ function removeNestedList(jodit, list, li) {
|
|
|
55860
58064
|
* @module plugins/tab
|
|
55861
58065
|
*/
|
|
55862
58066
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
|
|
55863
|
-
tabInsideLiInsertNewList: true
|
|
58067
|
+
tabInsideLiInsertNewList: true,
|
|
58068
|
+
spaces: 0
|
|
55864
58069
|
};
|
|
55865
58070
|
|
|
55866
58071
|
|
|
@@ -55872,9 +58077,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
|
|
|
55872
58077
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
55873
58078
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
55874
58079
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
55875
|
-
/* harmony import */ var
|
|
55876
|
-
/* harmony import */ var
|
|
55877
|
-
/* harmony import */ var
|
|
58080
|
+
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
|
|
58081
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
|
|
58082
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
|
|
58083
|
+
/* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
|
|
55878
58084
|
/*!
|
|
55879
58085
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
55880
58086
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -55891,30 +58097,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
|
|
|
55891
58097
|
|
|
55892
58098
|
|
|
55893
58099
|
|
|
55894
|
-
|
|
55895
|
-
|
|
58100
|
+
|
|
58101
|
+
const MODIFIER_KEYS = new Set([
|
|
58102
|
+
'Shift',
|
|
58103
|
+
'Control',
|
|
58104
|
+
'Alt',
|
|
58105
|
+
'Meta',
|
|
58106
|
+
'CapsLock'
|
|
58107
|
+
]);
|
|
58108
|
+
class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
|
|
58109
|
+
afterInit(jodit) {
|
|
58110
|
+
// Without a namespace it runs ahead of table navigation, which would
|
|
58111
|
+
// take a released Tab
|
|
58112
|
+
jodit.e.on('keydown', this.__onKeyDownFirst, {
|
|
58113
|
+
top: true
|
|
58114
|
+
});
|
|
58115
|
+
}
|
|
58116
|
+
// An Escape that closes a popup has done its job
|
|
58117
|
+
__endRelease() {
|
|
58118
|
+
this.__released = false;
|
|
58119
|
+
}
|
|
58120
|
+
__onKeyDownFirst(event) {
|
|
58121
|
+
const released = this.__released;
|
|
58122
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
58123
|
+
this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
|
|
58124
|
+
}
|
|
58125
|
+
// The browser moves the focus
|
|
58126
|
+
if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
58127
|
+
this.j.e.stopPropagation('keydown');
|
|
58128
|
+
}
|
|
58129
|
+
}
|
|
55896
58130
|
__onTab(event) {
|
|
55897
|
-
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
|
|
58131
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && (this.__onShift(event.shiftKey) || (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabSpaces)(this.j, event.shiftKey))) {
|
|
55898
58132
|
return false;
|
|
55899
58133
|
}
|
|
55900
58134
|
}
|
|
58135
|
+
__onBackspace(backspace, fakeNode) {
|
|
58136
|
+
if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
|
|
58137
|
+
return true;
|
|
58138
|
+
}
|
|
58139
|
+
}
|
|
58140
|
+
__onPasteInsert(html) {
|
|
58141
|
+
if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
|
|
58142
|
+
return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
|
|
58143
|
+
}
|
|
58144
|
+
}
|
|
55901
58145
|
__onCommand(command) {
|
|
55902
58146
|
if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
|
|
55903
58147
|
return false;
|
|
55904
58148
|
}
|
|
55905
58149
|
}
|
|
55906
58150
|
__onShift(shift) {
|
|
55907
|
-
const res = (0,
|
|
58151
|
+
const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
|
|
55908
58152
|
if (res) {
|
|
55909
58153
|
this.j.e.fire('afterTab', shift);
|
|
55910
58154
|
}
|
|
55911
58155
|
return res;
|
|
55912
58156
|
}
|
|
55913
|
-
beforeDestruct(jodit) {
|
|
58157
|
+
beforeDestruct(jodit) {
|
|
58158
|
+
jodit.e.off('keydown', this.__onKeyDownFirst);
|
|
58159
|
+
}
|
|
58160
|
+
constructor(){
|
|
58161
|
+
super(...arguments);
|
|
58162
|
+
/**
|
|
58163
|
+
* With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
|
|
58164
|
+
* Tab move the focus on, as in code editors. A modifier key keeps it, and
|
|
58165
|
+
* any other key or a click ends it
|
|
58166
|
+
*/ this.__released = false;
|
|
58167
|
+
}
|
|
55914
58168
|
}
|
|
58169
|
+
__decorate([
|
|
58170
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
58171
|
+
':mousedown.tab',
|
|
58172
|
+
':beforePopupClose.tab'
|
|
58173
|
+
])
|
|
58174
|
+
], tab.prototype, "__endRelease", null);
|
|
58175
|
+
__decorate([
|
|
58176
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
58177
|
+
], tab.prototype, "__onKeyDownFirst", null);
|
|
55915
58178
|
__decorate([
|
|
55916
58179
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
|
|
55917
58180
|
], tab.prototype, "__onTab", null);
|
|
58181
|
+
__decorate([
|
|
58182
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
|
|
58183
|
+
], tab.prototype, "__onBackspace", null);
|
|
58184
|
+
__decorate([
|
|
58185
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
|
|
58186
|
+
], tab.prototype, "__onPasteInsert", null);
|
|
55918
58187
|
__decorate([
|
|
55919
58188
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
|
|
55920
58189
|
], tab.prototype, "__onCommand", null);
|