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/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1816,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1816
1816
|
* ```
|
|
1817
1817
|
* @packageDocumentation
|
|
1818
1818
|
* @module constants
|
|
1819
|
-
*/ const APP_VERSION = "4.19.
|
|
1819
|
+
*/ const APP_VERSION = "4.19.4";
|
|
1820
1820
|
// prettier-ignore
|
|
1821
1821
|
const ES = "es2015";
|
|
1822
1822
|
const IS_ES_MODERN = true;
|
|
@@ -11245,7 +11245,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
11245
11245
|
* When the cursor is positioned in its place, it must be inside the element and not outside its border.
|
|
11246
11246
|
* @private
|
|
11247
11247
|
*/ function moveNodeInsideStart(j, node, start) {
|
|
11248
|
-
|
|
11248
|
+
// A text node of non-breaking spaces trims to nothing, but it's text the
|
|
11249
|
+
// node mustn't move past
|
|
11250
|
+
const isContent = (n)=>{
|
|
11251
|
+
var _a;
|
|
11252
|
+
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));
|
|
11253
|
+
};
|
|
11254
|
+
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);
|
|
11249
11255
|
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))){
|
|
11250
11256
|
if (start || !sibling.firstChild) {
|
|
11251
11257
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
|
|
@@ -41208,11 +41214,35 @@ function brBefore(start) {
|
|
|
41208
41214
|
|
|
41209
41215
|
|
|
41210
41216
|
|
|
41217
|
+
/**
|
|
41218
|
+
* Selected text becomes the link's text, as the Link button does, instead
|
|
41219
|
+
* of being replaced by the file's name. Returns false with nothing selected
|
|
41220
|
+
*/ function wrapSelectionInLink(editor, href, title = '') {
|
|
41221
|
+
if (editor.s.isCollapsed()) {
|
|
41222
|
+
return false;
|
|
41223
|
+
}
|
|
41224
|
+
const links = editor.s.wrapInTag('a');
|
|
41225
|
+
if (!links.length) {
|
|
41226
|
+
return false;
|
|
41227
|
+
}
|
|
41228
|
+
links.forEach((link)=>{
|
|
41229
|
+
;(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
|
|
41230
|
+
if (title) {
|
|
41231
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'title', title);
|
|
41232
|
+
}
|
|
41233
|
+
});
|
|
41234
|
+
editor.s.setCursorAfter(links[links.length - 1]);
|
|
41235
|
+
return true;
|
|
41236
|
+
}
|
|
41211
41237
|
function insertLinks(data) {
|
|
41212
41238
|
var _a;
|
|
41213
41239
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
41240
|
+
const href = data.baseurl + file;
|
|
41241
|
+
if (wrapSelectionInLink(this, href)) {
|
|
41242
|
+
return;
|
|
41243
|
+
}
|
|
41214
41244
|
const link = this.createInside.element('a', {
|
|
41215
|
-
href
|
|
41245
|
+
href
|
|
41216
41246
|
});
|
|
41217
41247
|
link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
|
|
41218
41248
|
this.s.insertNode(link);
|
|
@@ -41223,7 +41253,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
|
|
|
41223
41253
|
};
|
|
41224
41254
|
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
41225
41255
|
popup: (editor, current, close)=>{
|
|
41256
|
+
// The popup's first field takes the focus, so the selection the
|
|
41257
|
+
// popup was opened for is kept and put back before the link goes in
|
|
41258
|
+
const selected = editor.s.isCollapsed() ? null : editor.s.range;
|
|
41259
|
+
const restoreSelection = ()=>{
|
|
41260
|
+
if (selected) {
|
|
41261
|
+
editor.s.selectRange(selected);
|
|
41262
|
+
}
|
|
41263
|
+
};
|
|
41226
41264
|
const insert = (url, title = '')=>{
|
|
41265
|
+
restoreSelection();
|
|
41266
|
+
if (wrapSelectionInLink(editor, url, title)) {
|
|
41267
|
+
return;
|
|
41268
|
+
}
|
|
41227
41269
|
editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
|
|
41228
41270
|
};
|
|
41229
41271
|
let sourceAnchor = null;
|
|
@@ -41237,6 +41279,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
|
41237
41279
|
},
|
|
41238
41280
|
upload: (data)=>{
|
|
41239
41281
|
var _a, _b;
|
|
41282
|
+
restoreSelection();
|
|
41240
41283
|
((_b = (_a = editor.o.file) === null || _a === void 0 ? void 0 : _a.defaultHandlerSuccess) !== null && _b !== void 0 ? _b : insertLinks).call(editor, data);
|
|
41241
41284
|
},
|
|
41242
41285
|
url: (url, text)=>{
|
|
@@ -48188,6 +48231,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
48188
48231
|
followOnDblClick: false,
|
|
48189
48232
|
processVideoLink: true,
|
|
48190
48233
|
processPastedLink: true,
|
|
48234
|
+
processTypedLink: false,
|
|
48235
|
+
typedLinkTlds: [],
|
|
48236
|
+
typedLinkFileEndings: [
|
|
48237
|
+
'zip',
|
|
48238
|
+
'mov',
|
|
48239
|
+
'md',
|
|
48240
|
+
'py',
|
|
48241
|
+
'sh',
|
|
48242
|
+
'pub'
|
|
48243
|
+
],
|
|
48191
48244
|
deriveUrlFromText: false,
|
|
48192
48245
|
noFollowCheckbox: true,
|
|
48193
48246
|
openInNewTabCheckbox: true,
|
|
@@ -48252,12 +48305,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48252
48305
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
48253
48306
|
|
|
48254
48307
|
/* unused harmony export link */
|
|
48255
|
-
/* harmony import */ var
|
|
48256
|
-
/* harmony import */ var
|
|
48257
|
-
/* harmony import */ var
|
|
48258
|
-
/* harmony import */ var
|
|
48259
|
-
/* harmony import */ var
|
|
48260
|
-
/* harmony import */ var
|
|
48308
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
48309
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
48310
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
48311
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
48312
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
48313
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
48314
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
|
|
48315
|
+
/* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
|
|
48261
48316
|
/*!
|
|
48262
48317
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48263
48318
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -48274,9 +48329,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48274
48329
|
|
|
48275
48330
|
|
|
48276
48331
|
|
|
48332
|
+
|
|
48333
|
+
|
|
48277
48334
|
/**
|
|
48278
48335
|
* Process link. Insert, dblclick or remove format
|
|
48279
|
-
*/ class link extends
|
|
48336
|
+
*/ class link extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
48280
48337
|
/** @override */ afterInit(jodit) {
|
|
48281
48338
|
if (jodit.o.link.followOnDblClick) {
|
|
48282
48339
|
jodit.e.on('dblclick.link', this.__onDblClickOnLink);
|
|
@@ -48285,6 +48342,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48285
48342
|
if (jodit.o.link.processPastedLink) {
|
|
48286
48343
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
48287
48344
|
}
|
|
48345
|
+
if (jodit.o.link.processTypedLink) {
|
|
48346
|
+
this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
|
|
48347
|
+
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,
|
|
48348
|
+
// which moves the caret on Tab, and of the backspace plugin
|
|
48349
|
+
.on('keydown', this.__onKeyDown, {
|
|
48350
|
+
top: true
|
|
48351
|
+
});
|
|
48352
|
+
}
|
|
48288
48353
|
jodit.e.on('generateLinkForm.link', this.__generateForm);
|
|
48289
48354
|
jodit.registerCommand('openLinkDialog', {
|
|
48290
48355
|
exec: ()=>{
|
|
@@ -48298,7 +48363,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48298
48363
|
dialog.setContent(htmlForm);
|
|
48299
48364
|
dialog.open();
|
|
48300
48365
|
jodit.async.requestIdleCallback(()=>{
|
|
48301
|
-
const { url_input } = (0,
|
|
48366
|
+
const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container);
|
|
48302
48367
|
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
48303
48368
|
});
|
|
48304
48369
|
},
|
|
@@ -48306,10 +48371,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48306
48371
|
});
|
|
48307
48372
|
}
|
|
48308
48373
|
__onDblClickOnLink(e) {
|
|
48309
|
-
if (!
|
|
48374
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
48310
48375
|
return;
|
|
48311
48376
|
}
|
|
48312
|
-
const href = (0,
|
|
48377
|
+
const href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
|
|
48313
48378
|
if (href) {
|
|
48314
48379
|
location.href = href;
|
|
48315
48380
|
e.preventDefault();
|
|
@@ -48318,23 +48383,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48318
48383
|
onProcessPasteLink(ignore, html) {
|
|
48319
48384
|
var _a, _b, _c, _d;
|
|
48320
48385
|
const { jodit } = this;
|
|
48321
|
-
if (!(0,
|
|
48386
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
48322
48387
|
return;
|
|
48323
48388
|
}
|
|
48324
48389
|
jodit.e.stopPropagation('processPaste');
|
|
48325
48390
|
if (jodit.o.link.processVideoLink) {
|
|
48326
|
-
const embed = (0,
|
|
48391
|
+
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, {
|
|
48327
48392
|
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
48328
48393
|
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
48329
48394
|
});
|
|
48330
48395
|
if (embed !== html) {
|
|
48331
|
-
const media = (0,
|
|
48332
|
-
return (0,
|
|
48396
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
|
|
48397
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
|
|
48333
48398
|
}
|
|
48334
48399
|
}
|
|
48335
48400
|
if (jodit.s.isCollapsed()) {
|
|
48336
48401
|
const a = jodit.createInside.element('a');
|
|
48337
|
-
(0,
|
|
48402
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
|
|
48338
48403
|
a.textContent = html;
|
|
48339
48404
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
48340
48405
|
return a;
|
|
@@ -48352,16 +48417,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48352
48417
|
const i18n = jodit.i18n.bind(jodit);
|
|
48353
48418
|
const { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
48354
48419
|
const html = formTemplate(jodit);
|
|
48355
|
-
const form = (0,
|
|
48420
|
+
const form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
48356
48421
|
target_checkbox_box: openInNewTabCheckbox,
|
|
48357
48422
|
nofollow_checkbox_box: noFollowCheckbox
|
|
48358
48423
|
}) : html;
|
|
48359
|
-
const htmlForm =
|
|
48360
|
-
const elements = (0,
|
|
48424
|
+
const htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
|
|
48425
|
+
const elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
|
|
48361
48426
|
const { insert, unlink, content_input_box } = elements;
|
|
48362
48427
|
const { target_checkbox, nofollow_checkbox, url_input } = elements;
|
|
48363
48428
|
const currentElement = current;
|
|
48364
|
-
const isImageContent =
|
|
48429
|
+
const isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
|
|
48365
48430
|
let { content_input } = elements;
|
|
48366
48431
|
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
48367
48432
|
if (!content_input) {
|
|
@@ -48374,12 +48439,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48374
48439
|
htmlForm.classList.add(formClassName);
|
|
48375
48440
|
}
|
|
48376
48441
|
if (isImageContent) {
|
|
48377
|
-
|
|
48442
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
|
|
48378
48443
|
}
|
|
48379
48444
|
let link;
|
|
48380
|
-
const getSelectionText = ()=>link ? link.innerText : (0,
|
|
48381
|
-
if (current &&
|
|
48382
|
-
link =
|
|
48445
|
+
const getSelectionText = ()=>link ? link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
|
|
48446
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
|
|
48447
|
+
link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
|
|
48383
48448
|
} else {
|
|
48384
48449
|
link = false;
|
|
48385
48450
|
}
|
|
@@ -48387,22 +48452,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48387
48452
|
content_input.value = getSelectionText();
|
|
48388
48453
|
}
|
|
48389
48454
|
if (aria_label_input) {
|
|
48390
|
-
aria_label_input.value = link ? (0,
|
|
48455
|
+
aria_label_input.value = link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'aria-label') || '' : '';
|
|
48391
48456
|
}
|
|
48392
48457
|
if (link) {
|
|
48393
|
-
url_input.value = (0,
|
|
48458
|
+
url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'href') || '';
|
|
48394
48459
|
if (modeClassName) {
|
|
48395
48460
|
readClassnames(modeClassName, className_input, link, className_select);
|
|
48396
48461
|
}
|
|
48397
48462
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
48398
|
-
target_checkbox.checked = (0,
|
|
48463
|
+
target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'target') === '_blank';
|
|
48399
48464
|
}
|
|
48400
48465
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
48401
|
-
nofollow_checkbox.checked = ((0,
|
|
48466
|
+
nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
48402
48467
|
}
|
|
48403
48468
|
insert.textContent = i18n('Update');
|
|
48404
48469
|
} else {
|
|
48405
|
-
|
|
48470
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
|
|
48406
48471
|
if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
|
|
48407
48472
|
url_input.value = guessUrlFromText(content_input.value);
|
|
48408
48473
|
}
|
|
@@ -48417,7 +48482,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48417
48482
|
jodit.s.restore();
|
|
48418
48483
|
jodit.history.snapshot.restore(snapshot);
|
|
48419
48484
|
if (link) {
|
|
48420
|
-
|
|
48485
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
48421
48486
|
}
|
|
48422
48487
|
jodit.synchronizeValues();
|
|
48423
48488
|
close();
|
|
@@ -48438,12 +48503,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48438
48503
|
const textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
48439
48504
|
const ci = jodit.createInside;
|
|
48440
48505
|
let caretAfter = null;
|
|
48441
|
-
if (!link || !
|
|
48506
|
+
if (!link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, link)) {
|
|
48442
48507
|
if (!jodit.s.isCollapsed()) {
|
|
48443
48508
|
const node = jodit.s.current();
|
|
48444
|
-
if (
|
|
48509
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
|
|
48445
48510
|
links = [
|
|
48446
|
-
|
|
48511
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
|
|
48447
48512
|
];
|
|
48448
48513
|
} else {
|
|
48449
48514
|
links = jodit.s.wrapInTag('a');
|
|
@@ -48463,27 +48528,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48463
48528
|
];
|
|
48464
48529
|
}
|
|
48465
48530
|
links.forEach((a)=>{
|
|
48466
|
-
;(0,
|
|
48531
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
|
|
48467
48532
|
writeClasses(modeClassName, className_input, className_select, a);
|
|
48468
48533
|
if (!isImageContent) {
|
|
48469
48534
|
writeImage(a, content_input, textWasChanged, url_input);
|
|
48470
48535
|
}
|
|
48471
48536
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
48472
|
-
(0,
|
|
48537
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
48473
48538
|
}
|
|
48474
48539
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
48475
|
-
const relParts = ((0,
|
|
48540
|
+
const relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
48476
48541
|
const hasNofollow = relParts.includes('nofollow');
|
|
48477
48542
|
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
48478
48543
|
relParts.push('nofollow');
|
|
48479
48544
|
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
48480
48545
|
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
48481
48546
|
}
|
|
48482
|
-
;(0,
|
|
48547
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
48483
48548
|
}
|
|
48484
48549
|
if (aria_label_input) {
|
|
48485
48550
|
const ariaLabel = aria_label_input.value.trim();
|
|
48486
|
-
(0,
|
|
48551
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
|
|
48487
48552
|
}
|
|
48488
48553
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
48489
48554
|
});
|
|
@@ -48498,7 +48563,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48498
48563
|
close();
|
|
48499
48564
|
return false;
|
|
48500
48565
|
};
|
|
48501
|
-
if (
|
|
48566
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
|
|
48502
48567
|
jodit.e.on(form, 'submit', (event)=>{
|
|
48503
48568
|
event.preventDefault();
|
|
48504
48569
|
event.stopImmediatePropagation();
|
|
@@ -48511,11 +48576,96 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48511
48576
|
return form;
|
|
48512
48577
|
}
|
|
48513
48578
|
/** @override */ beforeDestruct(jodit) {
|
|
48514
|
-
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
|
|
48579
|
+
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);
|
|
48580
|
+
}
|
|
48581
|
+
__onTypedSpace(event) {
|
|
48582
|
+
if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
|
|
48583
|
+
return;
|
|
48584
|
+
}
|
|
48585
|
+
const { range } = this.j.s;
|
|
48586
|
+
if (range.collapsed) {
|
|
48587
|
+
this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
|
|
48588
|
+
}
|
|
48589
|
+
}
|
|
48590
|
+
__onBeforeEnter() {
|
|
48591
|
+
const { range } = this.j.s;
|
|
48592
|
+
this.__enteredAt = range.collapsed ? [
|
|
48593
|
+
range.startContainer,
|
|
48594
|
+
range.startOffset
|
|
48595
|
+
] : null;
|
|
48596
|
+
}
|
|
48597
|
+
__onAfterEnter() {
|
|
48598
|
+
if (this.__enteredAt) {
|
|
48599
|
+
this.__linkAfterEnter(...this.__enteredAt);
|
|
48600
|
+
this.__enteredAt = null;
|
|
48601
|
+
}
|
|
48602
|
+
}
|
|
48603
|
+
__forgetLink() {
|
|
48604
|
+
this.__justLinked = null;
|
|
48605
|
+
}
|
|
48606
|
+
__onKeyDown(event) {
|
|
48607
|
+
const { jodit } = this;
|
|
48608
|
+
if (jodit.o.readonly) {
|
|
48609
|
+
return;
|
|
48610
|
+
}
|
|
48611
|
+
const link = this.__justLinked;
|
|
48612
|
+
const modified = event.ctrlKey || event.metaKey || event.altKey;
|
|
48613
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
48614
|
+
this.__justLinked = null;
|
|
48615
|
+
}
|
|
48616
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (link === null || link === void 0 ? void 0 : link.isConnected)) {
|
|
48617
|
+
this.__recordStep();
|
|
48618
|
+
jodit.s.save();
|
|
48619
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
48620
|
+
jodit.s.restore();
|
|
48621
|
+
this.__recordStep();
|
|
48622
|
+
// Or the backspace plugin takes a character too
|
|
48623
|
+
jodit.e.stopPropagation('keydown');
|
|
48624
|
+
return false;
|
|
48625
|
+
}
|
|
48626
|
+
const { range } = jodit.s;
|
|
48627
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
|
|
48628
|
+
this.__linkTyped(range.startContainer, range.startOffset);
|
|
48629
|
+
}
|
|
48630
|
+
}
|
|
48631
|
+
/**
|
|
48632
|
+
* Links the address that ends at `end` in a text node, as a step of its
|
|
48633
|
+
* own in the history, so Undo straight after takes the link off and
|
|
48634
|
+
* leaves the text
|
|
48635
|
+
*/ __linkTyped(node, end) {
|
|
48636
|
+
const { jodit } = this;
|
|
48637
|
+
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)) {
|
|
48638
|
+
return;
|
|
48639
|
+
}
|
|
48640
|
+
const found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
|
|
48641
|
+
if (!found) {
|
|
48642
|
+
return;
|
|
48643
|
+
}
|
|
48644
|
+
const [start, stop, href] = found;
|
|
48645
|
+
this.__recordStep();
|
|
48646
|
+
// The text round the caret splits, and WebKit doesn't keep the caret
|
|
48647
|
+
// where it was
|
|
48648
|
+
jodit.s.save();
|
|
48649
|
+
const range = jodit.ed.createRange();
|
|
48650
|
+
range.setStart(node, start);
|
|
48651
|
+
range.setEnd(node, stop);
|
|
48652
|
+
const a = jodit.createInside.element('a');
|
|
48653
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
|
|
48654
|
+
range.surroundContents(a);
|
|
48655
|
+
jodit.s.restore();
|
|
48656
|
+
jodit.e.fire('applyLink', jodit, a, null);
|
|
48657
|
+
this.__recordStep();
|
|
48658
|
+
this.__justLinked = a;
|
|
48659
|
+
}
|
|
48660
|
+
/**
|
|
48661
|
+
* Reports what's changed and makes it a history step of its own
|
|
48662
|
+
*/ __recordStep() {
|
|
48663
|
+
this.j.setEditorValue();
|
|
48664
|
+
this.j.e.fire('internalChange');
|
|
48515
48665
|
}
|
|
48516
48666
|
__onClickReadOnlyLink(e) {
|
|
48517
48667
|
const { jodit } = this;
|
|
48518
|
-
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation &&
|
|
48668
|
+
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
48519
48669
|
e.preventDefault();
|
|
48520
48670
|
}
|
|
48521
48671
|
}
|
|
@@ -48527,21 +48677,61 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
48527
48677
|
group: 'insert'
|
|
48528
48678
|
}
|
|
48529
48679
|
];
|
|
48680
|
+
/**
|
|
48681
|
+
* Where the caret was when Enter was pressed. Enter splits the line in a
|
|
48682
|
+
* history transaction, so the link waits until it's over
|
|
48683
|
+
*/ this.__enteredAt = null;
|
|
48684
|
+
this.__linkAfterEnter = ()=>{};
|
|
48685
|
+
/**
|
|
48686
|
+
* The link just made, which Backspace straight after takes off again, as
|
|
48687
|
+
* in CKEditor 5. Any other key but a modifier, a click or a command
|
|
48688
|
+
* forgets it
|
|
48689
|
+
*/ this.__justLinked = null;
|
|
48530
48690
|
}
|
|
48531
48691
|
}
|
|
48532
48692
|
__decorate([
|
|
48533
|
-
|
|
48693
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48534
48694
|
], link.prototype, "__onDblClickOnLink", null);
|
|
48535
48695
|
__decorate([
|
|
48536
|
-
|
|
48696
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48537
48697
|
], link.prototype, "onProcessPasteLink", null);
|
|
48538
48698
|
__decorate([
|
|
48539
|
-
|
|
48699
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48540
48700
|
], link.prototype, "__generateForm", null);
|
|
48541
48701
|
__decorate([
|
|
48542
|
-
|
|
48702
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48703
|
+
], link.prototype, "__onTypedSpace", null);
|
|
48704
|
+
__decorate([
|
|
48705
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48706
|
+
], link.prototype, "__onBeforeEnter", null);
|
|
48707
|
+
__decorate([
|
|
48708
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48709
|
+
], link.prototype, "__onAfterEnter", null);
|
|
48710
|
+
__decorate([
|
|
48711
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48712
|
+
], link.prototype, "__forgetLink", null);
|
|
48713
|
+
__decorate([
|
|
48714
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48715
|
+
], link.prototype, "__onKeyDown", null);
|
|
48716
|
+
__decorate([
|
|
48717
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48718
|
+
], link.prototype, "__linkTyped", null);
|
|
48719
|
+
__decorate([
|
|
48720
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48543
48721
|
], link.prototype, "__onClickReadOnlyLink", null);
|
|
48544
|
-
|
|
48722
|
+
const NO_TYPED_LINKS = new Set([
|
|
48723
|
+
'a',
|
|
48724
|
+
'pre',
|
|
48725
|
+
'code'
|
|
48726
|
+
]);
|
|
48727
|
+
const MODIFIER_KEYS = new Set([
|
|
48728
|
+
'Shift',
|
|
48729
|
+
'Control',
|
|
48730
|
+
'Alt',
|
|
48731
|
+
'Meta',
|
|
48732
|
+
'CapsLock'
|
|
48733
|
+
]);
|
|
48734
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
|
|
48545
48735
|
/**
|
|
48546
48736
|
* Guess a usable `href` from the selected text for the link dialog.
|
|
48547
48737
|
* Returns an empty string when the text is not a plausible URL/email,
|
|
@@ -48556,7 +48746,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
|
|
|
48556
48746
|
return value;
|
|
48557
48747
|
}
|
|
48558
48748
|
// email address -> mailto:
|
|
48559
|
-
if (
|
|
48749
|
+
if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
|
|
48560
48750
|
return `mailto:${value}`;
|
|
48561
48751
|
}
|
|
48562
48752
|
// bare domain like example.com or www.example.com/path -> https://
|
|
@@ -48570,14 +48760,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
48570
48760
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
48571
48761
|
if (modeClassName === 'input') {
|
|
48572
48762
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
48573
|
-
(0,
|
|
48763
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
48574
48764
|
}
|
|
48575
48765
|
if (className_input.value !== '') {
|
|
48576
|
-
(0,
|
|
48766
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
|
|
48577
48767
|
}
|
|
48578
48768
|
} else if (modeClassName === 'select') {
|
|
48579
48769
|
if (a.hasAttribute('class')) {
|
|
48580
|
-
(0,
|
|
48770
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
48581
48771
|
}
|
|
48582
48772
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
48583
48773
|
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
@@ -48594,7 +48784,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
48594
48784
|
switch(modeClassName){
|
|
48595
48785
|
case 'input':
|
|
48596
48786
|
if (className_input) {
|
|
48597
|
-
className_input.value = (0,
|
|
48787
|
+
className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
48598
48788
|
}
|
|
48599
48789
|
break;
|
|
48600
48790
|
case 'select':
|
|
@@ -48605,7 +48795,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
48605
48795
|
option.selected = false;
|
|
48606
48796
|
}
|
|
48607
48797
|
}
|
|
48608
|
-
const classNames = (0,
|
|
48798
|
+
const classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
48609
48799
|
classNames.split(/\s+/).filter((cn)=>cn.trim().length > 0).forEach((className)=>{
|
|
48610
48800
|
if (className) {
|
|
48611
48801
|
for(let i = 0; i < className_select.options.length; i++){
|
|
@@ -48733,6 +48923,154 @@ const formTemplate = (editor)=>{
|
|
|
48733
48923
|
/* harmony export */ ]);
|
|
48734
48924
|
|
|
48735
48925
|
|
|
48926
|
+
/***/ }),
|
|
48927
|
+
|
|
48928
|
+
/***/ 67272:
|
|
48929
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
48930
|
+
|
|
48931
|
+
/*!
|
|
48932
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48933
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
48934
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
48935
|
+
*/ /**
|
|
48936
|
+
* @module plugins/link
|
|
48937
|
+
*/ /**
|
|
48938
|
+
* The endings a bare domain links with, besides those `link.typedLinkTlds`
|
|
48939
|
+
* adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
|
|
48940
|
+
* million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
|
|
48941
|
+
* two-letter one in IANA's list (version 2026102900,
|
|
48942
|
+
* https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
|
|
48943
|
+
* endings of 96% of those sites
|
|
48944
|
+
* @private
|
|
48945
|
+
*/ const TLDS = new Set(`
|
|
48946
|
+
app biz casino click cloud club com dev edu gov info live net online org pro
|
|
48947
|
+
shop site space store tech top vip xyz
|
|
48948
|
+
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
|
|
48949
|
+
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
|
|
48950
|
+
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
|
|
48951
|
+
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
|
|
48952
|
+
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
|
|
48953
|
+
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
|
|
48954
|
+
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
|
|
48955
|
+
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
|
|
48956
|
+
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
|
|
48957
|
+
tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw
|
|
48958
|
+
`.trim().split(/\s+/));
|
|
48959
|
+
|
|
48960
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
48961
|
+
/* harmony export */ "TLDS", 0, /* binding */ TLDS
|
|
48962
|
+
/* harmony export */ ]);
|
|
48963
|
+
|
|
48964
|
+
|
|
48965
|
+
/***/ }),
|
|
48966
|
+
|
|
48967
|
+
/***/ 58970:
|
|
48968
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
48969
|
+
|
|
48970
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
48971
|
+
/* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
|
|
48972
|
+
/* harmony export */ });
|
|
48973
|
+
/* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
|
|
48974
|
+
/* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
|
|
48975
|
+
/*!
|
|
48976
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48977
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
48978
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
48979
|
+
*/ /**
|
|
48980
|
+
* @module plugins/link
|
|
48981
|
+
*/
|
|
48982
|
+
|
|
48983
|
+
/**
|
|
48984
|
+
* An email address, for `mailto:`
|
|
48985
|
+
* @private
|
|
48986
|
+
*/ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
48987
|
+
const OPENING = new Set([
|
|
48988
|
+
'(',
|
|
48989
|
+
'[',
|
|
48990
|
+
'"',
|
|
48991
|
+
"'",
|
|
48992
|
+
'“',
|
|
48993
|
+
'‘',
|
|
48994
|
+
'<'
|
|
48995
|
+
]);
|
|
48996
|
+
const CLOSING = new Set([
|
|
48997
|
+
'.',
|
|
48998
|
+
',',
|
|
48999
|
+
';',
|
|
49000
|
+
':',
|
|
49001
|
+
'!',
|
|
49002
|
+
'?',
|
|
49003
|
+
'"',
|
|
49004
|
+
"'",
|
|
49005
|
+
'”',
|
|
49006
|
+
'’',
|
|
49007
|
+
'>'
|
|
49008
|
+
]);
|
|
49009
|
+
const BRACKETS = {
|
|
49010
|
+
')': '(',
|
|
49011
|
+
']': '['
|
|
49012
|
+
};
|
|
49013
|
+
const LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
|
|
49014
|
+
/**
|
|
49015
|
+
* The address that ends at `end` in a line of text typed, back to the
|
|
49016
|
+
* whitespace before it, as `[start, end, href]`. Punctuation round it, such as
|
|
49017
|
+
* a sentence's full stop or a bracket the address doesn't open, stays out.
|
|
49018
|
+
* An address counts with a scheme, with `www.`, as an email address, or as a
|
|
49019
|
+
* bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
|
|
49020
|
+
* @private
|
|
49021
|
+
*/ function findTypedLink(text, end, tlds, fileEndings) {
|
|
49022
|
+
let start = end;
|
|
49023
|
+
while(start > 0 && !/\s/.test(text[start - 1])){
|
|
49024
|
+
start -= 1;
|
|
49025
|
+
}
|
|
49026
|
+
while(start < end && OPENING.has(text[start])){
|
|
49027
|
+
start += 1;
|
|
49028
|
+
}
|
|
49029
|
+
while(end > start){
|
|
49030
|
+
const char = text[end - 1];
|
|
49031
|
+
const opening = BRACKETS[char];
|
|
49032
|
+
if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
|
|
49033
|
+
end -= 1;
|
|
49034
|
+
} else {
|
|
49035
|
+
break;
|
|
49036
|
+
}
|
|
49037
|
+
}
|
|
49038
|
+
const href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
|
|
49039
|
+
return href ? [
|
|
49040
|
+
start,
|
|
49041
|
+
end,
|
|
49042
|
+
href
|
|
49043
|
+
] : null;
|
|
49044
|
+
}
|
|
49045
|
+
function typedLinkHref(address, tlds, fileEndings) {
|
|
49046
|
+
const email = address.replace(/^mailto:/i, '');
|
|
49047
|
+
if (EMAIL.test(email)) {
|
|
49048
|
+
return `mailto:${email}`;
|
|
49049
|
+
}
|
|
49050
|
+
if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
|
|
49051
|
+
return `https://${address}`;
|
|
49052
|
+
}
|
|
49053
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
|
|
49054
|
+
}
|
|
49055
|
+
/**
|
|
49056
|
+
* A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
|
|
49057
|
+
* or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
|
|
49058
|
+
* case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
|
|
49059
|
+
* not in `fileEndings`, as in `photos.zip`. The first part has a letter,
|
|
49060
|
+
* which leaves out a time or a numbered step such as `11.am`
|
|
49061
|
+
*/ function isBareDomain(address, tlds, fileEndings) {
|
|
49062
|
+
const cut = address.search(/[/?#]/);
|
|
49063
|
+
const host = cut < 0 ? address : address.slice(0, cut);
|
|
49064
|
+
const labels = host.split('.');
|
|
49065
|
+
const ending = labels[labels.length - 1];
|
|
49066
|
+
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]);
|
|
49067
|
+
}
|
|
49068
|
+
|
|
49069
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
49070
|
+
/* harmony export */ "EMAIL", 0, /* binding */ EMAIL
|
|
49071
|
+
/* harmony export */ ]);
|
|
49072
|
+
|
|
49073
|
+
|
|
48736
49074
|
/***/ }),
|
|
48737
49075
|
|
|
48738
49076
|
/***/ 757:
|