jodit-pro 4.19.2 → 4.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +17 -4
- package/es2015/jodit.js +393 -55
- package/es2015/jodit.min.js +53 -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.js +17 -4
- package/es2018/jodit.min.js +24 -11
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +18 -5
- package/es2021/jodit.js +393 -55
- package/es2021/jodit.min.js +30 -17
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +18 -5
- package/es2021.en/jodit.js +393 -55
- package/es2021.en/jodit.min.js +29 -16
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +460 -55
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2021.en/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1768,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1768
1768
|
* ```
|
|
1769
1769
|
* @packageDocumentation
|
|
1770
1770
|
* @module constants
|
|
1771
|
-
*/ const APP_VERSION = "4.19.
|
|
1771
|
+
*/ const APP_VERSION = "4.19.4";
|
|
1772
1772
|
// prettier-ignore
|
|
1773
1773
|
const ES = "es2021";
|
|
1774
1774
|
const IS_ES_MODERN = true;
|
|
@@ -10977,7 +10977,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10977
10977
|
* When the cursor is positioned in its place, it must be inside the element and not outside its border.
|
|
10978
10978
|
* @private
|
|
10979
10979
|
*/ function moveNodeInsideStart(j, node, start) {
|
|
10980
|
-
|
|
10980
|
+
// A text node of non-breaking spaces trims to nothing, but it's text the
|
|
10981
|
+
// node mustn't move past
|
|
10982
|
+
const isContent = (n)=>{
|
|
10983
|
+
var _a;
|
|
10984
|
+
return !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(n) || Boolean((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.includes(_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
|
|
10985
|
+
};
|
|
10986
|
+
let sibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start, isContent), anotherSibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start, isContent);
|
|
10981
10987
|
while(_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, j.editor) && (!anotherSibling || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement, j.editor))){
|
|
10982
10988
|
if (start || !sibling.firstChild) {
|
|
10983
10989
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
|
|
@@ -39793,11 +39799,35 @@ function brBefore(start) {
|
|
|
39793
39799
|
|
|
39794
39800
|
|
|
39795
39801
|
|
|
39802
|
+
/**
|
|
39803
|
+
* Selected text becomes the link's text, as the Link button does, instead
|
|
39804
|
+
* of being replaced by the file's name. Returns false with nothing selected
|
|
39805
|
+
*/ function wrapSelectionInLink(editor, href, title = '') {
|
|
39806
|
+
if (editor.s.isCollapsed()) {
|
|
39807
|
+
return false;
|
|
39808
|
+
}
|
|
39809
|
+
const links = editor.s.wrapInTag('a');
|
|
39810
|
+
if (!links.length) {
|
|
39811
|
+
return false;
|
|
39812
|
+
}
|
|
39813
|
+
links.forEach((link)=>{
|
|
39814
|
+
;(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
|
|
39815
|
+
if (title) {
|
|
39816
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'title', title);
|
|
39817
|
+
}
|
|
39818
|
+
});
|
|
39819
|
+
editor.s.setCursorAfter(links[links.length - 1]);
|
|
39820
|
+
return true;
|
|
39821
|
+
}
|
|
39796
39822
|
function insertLinks(data) {
|
|
39797
39823
|
var _a;
|
|
39798
39824
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
39825
|
+
const href = data.baseurl + file;
|
|
39826
|
+
if (wrapSelectionInLink(this, href)) {
|
|
39827
|
+
return;
|
|
39828
|
+
}
|
|
39799
39829
|
const link = this.createInside.element('a', {
|
|
39800
|
-
href
|
|
39830
|
+
href
|
|
39801
39831
|
});
|
|
39802
39832
|
link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
|
|
39803
39833
|
this.s.insertNode(link);
|
|
@@ -39808,7 +39838,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
|
|
|
39808
39838
|
};
|
|
39809
39839
|
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
39810
39840
|
popup: (editor, current, close)=>{
|
|
39841
|
+
// The popup's first field takes the focus, so the selection the
|
|
39842
|
+
// popup was opened for is kept and put back before the link goes in
|
|
39843
|
+
const selected = editor.s.isCollapsed() ? null : editor.s.range;
|
|
39844
|
+
const restoreSelection = ()=>{
|
|
39845
|
+
if (selected) {
|
|
39846
|
+
editor.s.selectRange(selected);
|
|
39847
|
+
}
|
|
39848
|
+
};
|
|
39811
39849
|
const insert = (url, title = '')=>{
|
|
39850
|
+
restoreSelection();
|
|
39851
|
+
if (wrapSelectionInLink(editor, url, title)) {
|
|
39852
|
+
return;
|
|
39853
|
+
}
|
|
39812
39854
|
editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
|
|
39813
39855
|
};
|
|
39814
39856
|
let sourceAnchor = null;
|
|
@@ -39822,6 +39864,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
|
39822
39864
|
},
|
|
39823
39865
|
upload: (data)=>{
|
|
39824
39866
|
var _a, _b;
|
|
39867
|
+
restoreSelection();
|
|
39825
39868
|
((_b = (_a = editor.o.file) === null || _a === void 0 ? void 0 : _a.defaultHandlerSuccess) !== null && _b !== void 0 ? _b : insertLinks).call(editor, data);
|
|
39826
39869
|
},
|
|
39827
39870
|
url: (url, text)=>{
|
|
@@ -46048,6 +46091,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
46048
46091
|
followOnDblClick: false,
|
|
46049
46092
|
processVideoLink: true,
|
|
46050
46093
|
processPastedLink: true,
|
|
46094
|
+
processTypedLink: false,
|
|
46095
|
+
typedLinkTlds: [],
|
|
46096
|
+
typedLinkFileEndings: [
|
|
46097
|
+
'zip',
|
|
46098
|
+
'mov',
|
|
46099
|
+
'md',
|
|
46100
|
+
'py',
|
|
46101
|
+
'sh',
|
|
46102
|
+
'pub'
|
|
46103
|
+
],
|
|
46051
46104
|
deriveUrlFromText: false,
|
|
46052
46105
|
noFollowCheckbox: true,
|
|
46053
46106
|
openInNewTabCheckbox: true,
|
|
@@ -46112,12 +46165,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46112
46165
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
46113
46166
|
|
|
46114
46167
|
/* unused harmony export link */
|
|
46115
|
-
/* harmony import */ var
|
|
46116
|
-
/* harmony import */ var
|
|
46117
|
-
/* harmony import */ var
|
|
46118
|
-
/* harmony import */ var
|
|
46119
|
-
/* harmony import */ var
|
|
46120
|
-
/* harmony import */ var
|
|
46168
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
46169
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
46170
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
46171
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
46172
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
46173
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
46174
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
|
|
46175
|
+
/* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
|
|
46121
46176
|
/*!
|
|
46122
46177
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46123
46178
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -46134,9 +46189,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46134
46189
|
|
|
46135
46190
|
|
|
46136
46191
|
|
|
46192
|
+
|
|
46193
|
+
|
|
46137
46194
|
/**
|
|
46138
46195
|
* Process link. Insert, dblclick or remove format
|
|
46139
|
-
*/ class link extends
|
|
46196
|
+
*/ class link extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
46140
46197
|
/** @override */ afterInit(jodit) {
|
|
46141
46198
|
if (jodit.o.link.followOnDblClick) {
|
|
46142
46199
|
jodit.e.on('dblclick.link', this.__onDblClickOnLink);
|
|
@@ -46145,6 +46202,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46145
46202
|
if (jodit.o.link.processPastedLink) {
|
|
46146
46203
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
46147
46204
|
}
|
|
46205
|
+
if (jodit.o.link.processTypedLink) {
|
|
46206
|
+
this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
|
|
46207
|
+
jodit.e.on('input.link', this.__onTypedSpace).on('beforeEnter.link', this.__onBeforeEnter).on('afterEnter.link', this.__onAfterEnter).on('mousedown.link blur.link beforeCommand.link', this.__forgetLink)// Without a namespace it runs ahead of table navigation,
|
|
46208
|
+
// which moves the caret on Tab, and of the backspace plugin
|
|
46209
|
+
.on('keydown', this.__onKeyDown, {
|
|
46210
|
+
top: true
|
|
46211
|
+
});
|
|
46212
|
+
}
|
|
46148
46213
|
jodit.e.on('generateLinkForm.link', this.__generateForm);
|
|
46149
46214
|
jodit.registerCommand('openLinkDialog', {
|
|
46150
46215
|
exec: ()=>{
|
|
@@ -46158,7 +46223,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46158
46223
|
dialog.setContent(htmlForm);
|
|
46159
46224
|
dialog.open();
|
|
46160
46225
|
jodit.async.requestIdleCallback(()=>{
|
|
46161
|
-
const { url_input } = (0,
|
|
46226
|
+
const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container);
|
|
46162
46227
|
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
46163
46228
|
});
|
|
46164
46229
|
},
|
|
@@ -46166,10 +46231,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46166
46231
|
});
|
|
46167
46232
|
}
|
|
46168
46233
|
__onDblClickOnLink(e) {
|
|
46169
|
-
if (!
|
|
46234
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
46170
46235
|
return;
|
|
46171
46236
|
}
|
|
46172
|
-
const href = (0,
|
|
46237
|
+
const href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
|
|
46173
46238
|
if (href) {
|
|
46174
46239
|
location.href = href;
|
|
46175
46240
|
e.preventDefault();
|
|
@@ -46178,23 +46243,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46178
46243
|
onProcessPasteLink(ignore, html) {
|
|
46179
46244
|
var _a, _b, _c, _d;
|
|
46180
46245
|
const { jodit } = this;
|
|
46181
|
-
if (!(0,
|
|
46246
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
46182
46247
|
return;
|
|
46183
46248
|
}
|
|
46184
46249
|
jodit.e.stopPropagation('processPaste');
|
|
46185
46250
|
if (jodit.o.link.processVideoLink) {
|
|
46186
|
-
const embed = (0,
|
|
46251
|
+
const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.convertMediaUrlToVideoEmbed, html, {
|
|
46187
46252
|
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
46188
46253
|
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
46189
46254
|
});
|
|
46190
46255
|
if (embed !== html) {
|
|
46191
|
-
const media = (0,
|
|
46192
|
-
return (0,
|
|
46256
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
|
|
46257
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
|
|
46193
46258
|
}
|
|
46194
46259
|
}
|
|
46195
46260
|
if (jodit.s.isCollapsed()) {
|
|
46196
46261
|
const a = jodit.createInside.element('a');
|
|
46197
|
-
(0,
|
|
46262
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
|
|
46198
46263
|
a.textContent = html;
|
|
46199
46264
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
46200
46265
|
return a;
|
|
@@ -46212,16 +46277,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46212
46277
|
const i18n = jodit.i18n.bind(jodit);
|
|
46213
46278
|
const { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
46214
46279
|
const html = formTemplate(jodit);
|
|
46215
|
-
const form = (0,
|
|
46280
|
+
const form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
46216
46281
|
target_checkbox_box: openInNewTabCheckbox,
|
|
46217
46282
|
nofollow_checkbox_box: noFollowCheckbox
|
|
46218
46283
|
}) : html;
|
|
46219
|
-
const htmlForm =
|
|
46220
|
-
const elements = (0,
|
|
46284
|
+
const htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
|
|
46285
|
+
const elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
|
|
46221
46286
|
const { insert, unlink, content_input_box } = elements;
|
|
46222
46287
|
const { target_checkbox, nofollow_checkbox, url_input } = elements;
|
|
46223
46288
|
const currentElement = current;
|
|
46224
|
-
const isImageContent =
|
|
46289
|
+
const isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
|
|
46225
46290
|
let { content_input } = elements;
|
|
46226
46291
|
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
46227
46292
|
if (!content_input) {
|
|
@@ -46234,12 +46299,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46234
46299
|
htmlForm.classList.add(formClassName);
|
|
46235
46300
|
}
|
|
46236
46301
|
if (isImageContent) {
|
|
46237
|
-
|
|
46302
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
|
|
46238
46303
|
}
|
|
46239
46304
|
let link;
|
|
46240
|
-
const getSelectionText = ()=>link ? link.innerText : (0,
|
|
46241
|
-
if (current &&
|
|
46242
|
-
link =
|
|
46305
|
+
const getSelectionText = ()=>link ? link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
|
|
46306
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
|
|
46307
|
+
link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
|
|
46243
46308
|
} else {
|
|
46244
46309
|
link = false;
|
|
46245
46310
|
}
|
|
@@ -46247,22 +46312,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46247
46312
|
content_input.value = getSelectionText();
|
|
46248
46313
|
}
|
|
46249
46314
|
if (aria_label_input) {
|
|
46250
|
-
aria_label_input.value = link ? (0,
|
|
46315
|
+
aria_label_input.value = link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'aria-label') || '' : '';
|
|
46251
46316
|
}
|
|
46252
46317
|
if (link) {
|
|
46253
|
-
url_input.value = (0,
|
|
46318
|
+
url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'href') || '';
|
|
46254
46319
|
if (modeClassName) {
|
|
46255
46320
|
readClassnames(modeClassName, className_input, link, className_select);
|
|
46256
46321
|
}
|
|
46257
46322
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
46258
|
-
target_checkbox.checked = (0,
|
|
46323
|
+
target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'target') === '_blank';
|
|
46259
46324
|
}
|
|
46260
46325
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
46261
|
-
nofollow_checkbox.checked = ((0,
|
|
46326
|
+
nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
46262
46327
|
}
|
|
46263
46328
|
insert.textContent = i18n('Update');
|
|
46264
46329
|
} else {
|
|
46265
|
-
|
|
46330
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
|
|
46266
46331
|
if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
|
|
46267
46332
|
url_input.value = guessUrlFromText(content_input.value);
|
|
46268
46333
|
}
|
|
@@ -46277,7 +46342,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46277
46342
|
jodit.s.restore();
|
|
46278
46343
|
jodit.history.snapshot.restore(snapshot);
|
|
46279
46344
|
if (link) {
|
|
46280
|
-
|
|
46345
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
46281
46346
|
}
|
|
46282
46347
|
jodit.synchronizeValues();
|
|
46283
46348
|
close();
|
|
@@ -46298,12 +46363,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46298
46363
|
const textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
46299
46364
|
const ci = jodit.createInside;
|
|
46300
46365
|
let caretAfter = null;
|
|
46301
|
-
if (!link || !
|
|
46366
|
+
if (!link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, link)) {
|
|
46302
46367
|
if (!jodit.s.isCollapsed()) {
|
|
46303
46368
|
const node = jodit.s.current();
|
|
46304
|
-
if (
|
|
46369
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
|
|
46305
46370
|
links = [
|
|
46306
|
-
|
|
46371
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
|
|
46307
46372
|
];
|
|
46308
46373
|
} else {
|
|
46309
46374
|
links = jodit.s.wrapInTag('a');
|
|
@@ -46323,27 +46388,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46323
46388
|
];
|
|
46324
46389
|
}
|
|
46325
46390
|
links.forEach((a)=>{
|
|
46326
|
-
;(0,
|
|
46391
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
|
|
46327
46392
|
writeClasses(modeClassName, className_input, className_select, a);
|
|
46328
46393
|
if (!isImageContent) {
|
|
46329
46394
|
writeImage(a, content_input, textWasChanged, url_input);
|
|
46330
46395
|
}
|
|
46331
46396
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
46332
|
-
(0,
|
|
46397
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
46333
46398
|
}
|
|
46334
46399
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
46335
|
-
const relParts = ((0,
|
|
46400
|
+
const relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
46336
46401
|
const hasNofollow = relParts.includes('nofollow');
|
|
46337
46402
|
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
46338
46403
|
relParts.push('nofollow');
|
|
46339
46404
|
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
46340
46405
|
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
46341
46406
|
}
|
|
46342
|
-
;(0,
|
|
46407
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
46343
46408
|
}
|
|
46344
46409
|
if (aria_label_input) {
|
|
46345
46410
|
const ariaLabel = aria_label_input.value.trim();
|
|
46346
|
-
(0,
|
|
46411
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
|
|
46347
46412
|
}
|
|
46348
46413
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
46349
46414
|
});
|
|
@@ -46358,7 +46423,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46358
46423
|
close();
|
|
46359
46424
|
return false;
|
|
46360
46425
|
};
|
|
46361
|
-
if (
|
|
46426
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
|
|
46362
46427
|
jodit.e.on(form, 'submit', (event)=>{
|
|
46363
46428
|
event.preventDefault();
|
|
46364
46429
|
event.stopImmediatePropagation();
|
|
@@ -46371,11 +46436,96 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46371
46436
|
return form;
|
|
46372
46437
|
}
|
|
46373
46438
|
/** @override */ beforeDestruct(jodit) {
|
|
46374
|
-
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
|
|
46439
|
+
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink).off('input.link', this.__onTypedSpace).off('beforeEnter.link', this.__onBeforeEnter).off('afterEnter.link', this.__onAfterEnter).off('mousedown.link blur.link beforeCommand.link', this.__forgetLink).off('keydown', this.__onKeyDown);
|
|
46440
|
+
}
|
|
46441
|
+
__onTypedSpace(event) {
|
|
46442
|
+
if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
|
|
46443
|
+
return;
|
|
46444
|
+
}
|
|
46445
|
+
const { range } = this.j.s;
|
|
46446
|
+
if (range.collapsed) {
|
|
46447
|
+
this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
|
|
46448
|
+
}
|
|
46449
|
+
}
|
|
46450
|
+
__onBeforeEnter() {
|
|
46451
|
+
const { range } = this.j.s;
|
|
46452
|
+
this.__enteredAt = range.collapsed ? [
|
|
46453
|
+
range.startContainer,
|
|
46454
|
+
range.startOffset
|
|
46455
|
+
] : null;
|
|
46456
|
+
}
|
|
46457
|
+
__onAfterEnter() {
|
|
46458
|
+
if (this.__enteredAt) {
|
|
46459
|
+
this.__linkAfterEnter(...this.__enteredAt);
|
|
46460
|
+
this.__enteredAt = null;
|
|
46461
|
+
}
|
|
46462
|
+
}
|
|
46463
|
+
__forgetLink() {
|
|
46464
|
+
this.__justLinked = null;
|
|
46465
|
+
}
|
|
46466
|
+
__onKeyDown(event) {
|
|
46467
|
+
const { jodit } = this;
|
|
46468
|
+
if (jodit.o.readonly) {
|
|
46469
|
+
return;
|
|
46470
|
+
}
|
|
46471
|
+
const link = this.__justLinked;
|
|
46472
|
+
const modified = event.ctrlKey || event.metaKey || event.altKey;
|
|
46473
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
46474
|
+
this.__justLinked = null;
|
|
46475
|
+
}
|
|
46476
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (link === null || link === void 0 ? void 0 : link.isConnected)) {
|
|
46477
|
+
this.__recordStep();
|
|
46478
|
+
jodit.s.save();
|
|
46479
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
46480
|
+
jodit.s.restore();
|
|
46481
|
+
this.__recordStep();
|
|
46482
|
+
// Or the backspace plugin takes a character too
|
|
46483
|
+
jodit.e.stopPropagation('keydown');
|
|
46484
|
+
return false;
|
|
46485
|
+
}
|
|
46486
|
+
const { range } = jodit.s;
|
|
46487
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
|
|
46488
|
+
this.__linkTyped(range.startContainer, range.startOffset);
|
|
46489
|
+
}
|
|
46490
|
+
}
|
|
46491
|
+
/**
|
|
46492
|
+
* Links the address that ends at `end` in a text node, as a step of its
|
|
46493
|
+
* own in the history, so Undo straight after takes the link off and
|
|
46494
|
+
* leaves the text
|
|
46495
|
+
*/ __linkTyped(node, end) {
|
|
46496
|
+
const { jodit } = this;
|
|
46497
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) || !node.isConnected || end < 0 || end > node.length || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, NO_TYPED_LINKS, jodit.editor)) {
|
|
46498
|
+
return;
|
|
46499
|
+
}
|
|
46500
|
+
const found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
|
|
46501
|
+
if (!found) {
|
|
46502
|
+
return;
|
|
46503
|
+
}
|
|
46504
|
+
const [start, stop, href] = found;
|
|
46505
|
+
this.__recordStep();
|
|
46506
|
+
// The text round the caret splits, and WebKit doesn't keep the caret
|
|
46507
|
+
// where it was
|
|
46508
|
+
jodit.s.save();
|
|
46509
|
+
const range = jodit.ed.createRange();
|
|
46510
|
+
range.setStart(node, start);
|
|
46511
|
+
range.setEnd(node, stop);
|
|
46512
|
+
const a = jodit.createInside.element('a');
|
|
46513
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
|
|
46514
|
+
range.surroundContents(a);
|
|
46515
|
+
jodit.s.restore();
|
|
46516
|
+
jodit.e.fire('applyLink', jodit, a, null);
|
|
46517
|
+
this.__recordStep();
|
|
46518
|
+
this.__justLinked = a;
|
|
46519
|
+
}
|
|
46520
|
+
/**
|
|
46521
|
+
* Reports what's changed and makes it a history step of its own
|
|
46522
|
+
*/ __recordStep() {
|
|
46523
|
+
this.j.setEditorValue();
|
|
46524
|
+
this.j.e.fire('internalChange');
|
|
46375
46525
|
}
|
|
46376
46526
|
__onClickReadOnlyLink(e) {
|
|
46377
46527
|
const { jodit } = this;
|
|
46378
|
-
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation &&
|
|
46528
|
+
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
46379
46529
|
e.preventDefault();
|
|
46380
46530
|
}
|
|
46381
46531
|
}
|
|
@@ -46387,21 +46537,61 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46387
46537
|
group: 'insert'
|
|
46388
46538
|
}
|
|
46389
46539
|
];
|
|
46540
|
+
/**
|
|
46541
|
+
* Where the caret was when Enter was pressed. Enter splits the line in a
|
|
46542
|
+
* history transaction, so the link waits until it's over
|
|
46543
|
+
*/ this.__enteredAt = null;
|
|
46544
|
+
this.__linkAfterEnter = ()=>{};
|
|
46545
|
+
/**
|
|
46546
|
+
* The link just made, which Backspace straight after takes off again, as
|
|
46547
|
+
* in CKEditor 5. Any other key but a modifier, a click or a command
|
|
46548
|
+
* forgets it
|
|
46549
|
+
*/ this.__justLinked = null;
|
|
46390
46550
|
}
|
|
46391
46551
|
}
|
|
46392
46552
|
__decorate([
|
|
46393
|
-
|
|
46553
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46394
46554
|
], link.prototype, "__onDblClickOnLink", null);
|
|
46395
46555
|
__decorate([
|
|
46396
|
-
|
|
46556
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46397
46557
|
], link.prototype, "onProcessPasteLink", null);
|
|
46398
46558
|
__decorate([
|
|
46399
|
-
|
|
46559
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46400
46560
|
], link.prototype, "__generateForm", null);
|
|
46401
46561
|
__decorate([
|
|
46402
|
-
|
|
46562
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46563
|
+
], link.prototype, "__onTypedSpace", null);
|
|
46564
|
+
__decorate([
|
|
46565
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46566
|
+
], link.prototype, "__onBeforeEnter", null);
|
|
46567
|
+
__decorate([
|
|
46568
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46569
|
+
], link.prototype, "__onAfterEnter", null);
|
|
46570
|
+
__decorate([
|
|
46571
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46572
|
+
], link.prototype, "__forgetLink", null);
|
|
46573
|
+
__decorate([
|
|
46574
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46575
|
+
], link.prototype, "__onKeyDown", null);
|
|
46576
|
+
__decorate([
|
|
46577
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46578
|
+
], link.prototype, "__linkTyped", null);
|
|
46579
|
+
__decorate([
|
|
46580
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
46403
46581
|
], link.prototype, "__onClickReadOnlyLink", null);
|
|
46404
|
-
|
|
46582
|
+
const NO_TYPED_LINKS = new Set([
|
|
46583
|
+
'a',
|
|
46584
|
+
'pre',
|
|
46585
|
+
'code'
|
|
46586
|
+
]);
|
|
46587
|
+
const MODIFIER_KEYS = new Set([
|
|
46588
|
+
'Shift',
|
|
46589
|
+
'Control',
|
|
46590
|
+
'Alt',
|
|
46591
|
+
'Meta',
|
|
46592
|
+
'CapsLock'
|
|
46593
|
+
]);
|
|
46594
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
|
|
46405
46595
|
/**
|
|
46406
46596
|
* Guess a usable `href` from the selected text for the link dialog.
|
|
46407
46597
|
* Returns an empty string when the text is not a plausible URL/email,
|
|
@@ -46416,7 +46606,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
|
|
|
46416
46606
|
return value;
|
|
46417
46607
|
}
|
|
46418
46608
|
// email address -> mailto:
|
|
46419
|
-
if (
|
|
46609
|
+
if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
|
|
46420
46610
|
return `mailto:${value}`;
|
|
46421
46611
|
}
|
|
46422
46612
|
// bare domain like example.com or www.example.com/path -> https://
|
|
@@ -46430,14 +46620,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
46430
46620
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
46431
46621
|
if (modeClassName === 'input') {
|
|
46432
46622
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
46433
|
-
(0,
|
|
46623
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
46434
46624
|
}
|
|
46435
46625
|
if (className_input.value !== '') {
|
|
46436
|
-
(0,
|
|
46626
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
|
|
46437
46627
|
}
|
|
46438
46628
|
} else if (modeClassName === 'select') {
|
|
46439
46629
|
if (a.hasAttribute('class')) {
|
|
46440
|
-
(0,
|
|
46630
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
46441
46631
|
}
|
|
46442
46632
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
46443
46633
|
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
@@ -46454,7 +46644,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
46454
46644
|
switch(modeClassName){
|
|
46455
46645
|
case 'input':
|
|
46456
46646
|
if (className_input) {
|
|
46457
|
-
className_input.value = (0,
|
|
46647
|
+
className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
46458
46648
|
}
|
|
46459
46649
|
break;
|
|
46460
46650
|
case 'select':
|
|
@@ -46465,7 +46655,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
46465
46655
|
option.selected = false;
|
|
46466
46656
|
}
|
|
46467
46657
|
}
|
|
46468
|
-
const classNames = (0,
|
|
46658
|
+
const classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
46469
46659
|
classNames.split(/\s+/).filter((cn)=>cn.trim().length > 0).forEach((className)=>{
|
|
46470
46660
|
if (className) {
|
|
46471
46661
|
for(let i = 0; i < className_select.options.length; i++){
|
|
@@ -46593,6 +46783,154 @@ const formTemplate = (editor)=>{
|
|
|
46593
46783
|
/* harmony export */ ]);
|
|
46594
46784
|
|
|
46595
46785
|
|
|
46786
|
+
/***/ }),
|
|
46787
|
+
|
|
46788
|
+
/***/ 67272:
|
|
46789
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
46790
|
+
|
|
46791
|
+
/*!
|
|
46792
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46793
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
46794
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
46795
|
+
*/ /**
|
|
46796
|
+
* @module plugins/link
|
|
46797
|
+
*/ /**
|
|
46798
|
+
* The endings a bare domain links with, besides those `link.typedLinkTlds`
|
|
46799
|
+
* adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
|
|
46800
|
+
* million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
|
|
46801
|
+
* two-letter one in IANA's list (version 2026102900,
|
|
46802
|
+
* https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
|
|
46803
|
+
* endings of 96% of those sites
|
|
46804
|
+
* @private
|
|
46805
|
+
*/ const TLDS = new Set(`
|
|
46806
|
+
app biz casino click cloud club com dev edu gov info live net online org pro
|
|
46807
|
+
shop site space store tech top vip xyz
|
|
46808
|
+
ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi
|
|
46809
|
+
bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu
|
|
46810
|
+
cv cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga
|
|
46811
|
+
gb gd ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id
|
|
46812
|
+
ie il im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la
|
|
46813
|
+
lb lc li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms
|
|
46814
|
+
mt mu mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph
|
|
46815
|
+
pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk
|
|
46816
|
+
sl sm sn so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt
|
|
46817
|
+
tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw
|
|
46818
|
+
`.trim().split(/\s+/));
|
|
46819
|
+
|
|
46820
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
46821
|
+
/* harmony export */ "TLDS", 0, /* binding */ TLDS
|
|
46822
|
+
/* harmony export */ ]);
|
|
46823
|
+
|
|
46824
|
+
|
|
46825
|
+
/***/ }),
|
|
46826
|
+
|
|
46827
|
+
/***/ 58970:
|
|
46828
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
46829
|
+
|
|
46830
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46831
|
+
/* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
|
|
46832
|
+
/* harmony export */ });
|
|
46833
|
+
/* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
|
|
46834
|
+
/* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
|
|
46835
|
+
/*!
|
|
46836
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46837
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
46838
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
46839
|
+
*/ /**
|
|
46840
|
+
* @module plugins/link
|
|
46841
|
+
*/
|
|
46842
|
+
|
|
46843
|
+
/**
|
|
46844
|
+
* An email address, for `mailto:`
|
|
46845
|
+
* @private
|
|
46846
|
+
*/ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
46847
|
+
const OPENING = new Set([
|
|
46848
|
+
'(',
|
|
46849
|
+
'[',
|
|
46850
|
+
'"',
|
|
46851
|
+
"'",
|
|
46852
|
+
'“',
|
|
46853
|
+
'‘',
|
|
46854
|
+
'<'
|
|
46855
|
+
]);
|
|
46856
|
+
const CLOSING = new Set([
|
|
46857
|
+
'.',
|
|
46858
|
+
',',
|
|
46859
|
+
';',
|
|
46860
|
+
':',
|
|
46861
|
+
'!',
|
|
46862
|
+
'?',
|
|
46863
|
+
'"',
|
|
46864
|
+
"'",
|
|
46865
|
+
'”',
|
|
46866
|
+
'’',
|
|
46867
|
+
'>'
|
|
46868
|
+
]);
|
|
46869
|
+
const BRACKETS = {
|
|
46870
|
+
')': '(',
|
|
46871
|
+
']': '['
|
|
46872
|
+
};
|
|
46873
|
+
const LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
|
|
46874
|
+
/**
|
|
46875
|
+
* The address that ends at `end` in a line of text typed, back to the
|
|
46876
|
+
* whitespace before it, as `[start, end, href]`. Punctuation round it, such as
|
|
46877
|
+
* a sentence's full stop or a bracket the address doesn't open, stays out.
|
|
46878
|
+
* An address counts with a scheme, with `www.`, as an email address, or as a
|
|
46879
|
+
* bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
|
|
46880
|
+
* @private
|
|
46881
|
+
*/ function findTypedLink(text, end, tlds, fileEndings) {
|
|
46882
|
+
let start = end;
|
|
46883
|
+
while(start > 0 && !/\s/.test(text[start - 1])){
|
|
46884
|
+
start -= 1;
|
|
46885
|
+
}
|
|
46886
|
+
while(start < end && OPENING.has(text[start])){
|
|
46887
|
+
start += 1;
|
|
46888
|
+
}
|
|
46889
|
+
while(end > start){
|
|
46890
|
+
const char = text[end - 1];
|
|
46891
|
+
const opening = BRACKETS[char];
|
|
46892
|
+
if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
|
|
46893
|
+
end -= 1;
|
|
46894
|
+
} else {
|
|
46895
|
+
break;
|
|
46896
|
+
}
|
|
46897
|
+
}
|
|
46898
|
+
const href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
|
|
46899
|
+
return href ? [
|
|
46900
|
+
start,
|
|
46901
|
+
end,
|
|
46902
|
+
href
|
|
46903
|
+
] : null;
|
|
46904
|
+
}
|
|
46905
|
+
function typedLinkHref(address, tlds, fileEndings) {
|
|
46906
|
+
const email = address.replace(/^mailto:/i, '');
|
|
46907
|
+
if (EMAIL.test(email)) {
|
|
46908
|
+
return `mailto:${email}`;
|
|
46909
|
+
}
|
|
46910
|
+
if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
|
|
46911
|
+
return `https://${address}`;
|
|
46912
|
+
}
|
|
46913
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
|
|
46914
|
+
}
|
|
46915
|
+
/**
|
|
46916
|
+
* A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
|
|
46917
|
+
* or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
|
|
46918
|
+
* case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
|
|
46919
|
+
* not in `fileEndings`, as in `photos.zip`. The first part has a letter,
|
|
46920
|
+
* which leaves out a time or a numbered step such as `11.am`
|
|
46921
|
+
*/ function isBareDomain(address, tlds, fileEndings) {
|
|
46922
|
+
const cut = address.search(/[/?#]/);
|
|
46923
|
+
const host = cut < 0 ? address : address.slice(0, cut);
|
|
46924
|
+
const labels = host.split('.');
|
|
46925
|
+
const ending = labels[labels.length - 1];
|
|
46926
|
+
return labels.length > 1 && labels.every((label)=>LABEL.test(label) && !label.endsWith('-')) && (_tlds_js__WEBPACK_IMPORTED_MODULE_1__.TLDS.has(ending) || tlds.includes(ending)) && !fileEndings.includes(ending) && /[a-z]/i.test(labels[0]);
|
|
46927
|
+
}
|
|
46928
|
+
|
|
46929
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
46930
|
+
/* harmony export */ "EMAIL", 0, /* binding */ EMAIL
|
|
46931
|
+
/* harmony export */ ]);
|
|
46932
|
+
|
|
46933
|
+
|
|
46596
46934
|
/***/ }),
|
|
46597
46935
|
|
|
46598
46936
|
/***/ 757:
|