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/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);
|
|
@@ -40178,11 +40184,35 @@ function brBefore(start) {
|
|
|
40178
40184
|
|
|
40179
40185
|
|
|
40180
40186
|
|
|
40187
|
+
/**
|
|
40188
|
+
* Selected text becomes the link's text, as the Link button does, instead
|
|
40189
|
+
* of being replaced by the file's name. Returns false with nothing selected
|
|
40190
|
+
*/ function wrapSelectionInLink(editor, href, title = '') {
|
|
40191
|
+
if (editor.s.isCollapsed()) {
|
|
40192
|
+
return false;
|
|
40193
|
+
}
|
|
40194
|
+
const links = editor.s.wrapInTag('a');
|
|
40195
|
+
if (!links.length) {
|
|
40196
|
+
return false;
|
|
40197
|
+
}
|
|
40198
|
+
links.forEach((link)=>{
|
|
40199
|
+
;(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
|
|
40200
|
+
if (title) {
|
|
40201
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'title', title);
|
|
40202
|
+
}
|
|
40203
|
+
});
|
|
40204
|
+
editor.s.setCursorAfter(links[links.length - 1]);
|
|
40205
|
+
return true;
|
|
40206
|
+
}
|
|
40181
40207
|
function insertLinks(data) {
|
|
40182
40208
|
var _a;
|
|
40183
40209
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
40210
|
+
const href = data.baseurl + file;
|
|
40211
|
+
if (wrapSelectionInLink(this, href)) {
|
|
40212
|
+
return;
|
|
40213
|
+
}
|
|
40184
40214
|
const link = this.createInside.element('a', {
|
|
40185
|
-
href
|
|
40215
|
+
href
|
|
40186
40216
|
});
|
|
40187
40217
|
link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
|
|
40188
40218
|
this.s.insertNode(link);
|
|
@@ -40193,7 +40223,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
|
|
|
40193
40223
|
};
|
|
40194
40224
|
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
40195
40225
|
popup: (editor, current, close)=>{
|
|
40226
|
+
// The popup's first field takes the focus, so the selection the
|
|
40227
|
+
// popup was opened for is kept and put back before the link goes in
|
|
40228
|
+
const selected = editor.s.isCollapsed() ? null : editor.s.range;
|
|
40229
|
+
const restoreSelection = ()=>{
|
|
40230
|
+
if (selected) {
|
|
40231
|
+
editor.s.selectRange(selected);
|
|
40232
|
+
}
|
|
40233
|
+
};
|
|
40196
40234
|
const insert = (url, title = '')=>{
|
|
40235
|
+
restoreSelection();
|
|
40236
|
+
if (wrapSelectionInLink(editor, url, title)) {
|
|
40237
|
+
return;
|
|
40238
|
+
}
|
|
40197
40239
|
editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
|
|
40198
40240
|
};
|
|
40199
40241
|
let sourceAnchor = null;
|
|
@@ -40207,6 +40249,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
|
|
|
40207
40249
|
},
|
|
40208
40250
|
upload: (data)=>{
|
|
40209
40251
|
var _a, _b;
|
|
40252
|
+
restoreSelection();
|
|
40210
40253
|
((_b = (_a = editor.o.file) === null || _a === void 0 ? void 0 : _a.defaultHandlerSuccess) !== null && _b !== void 0 ? _b : insertLinks).call(editor, data);
|
|
40211
40254
|
},
|
|
40212
40255
|
url: (url, text)=>{
|
|
@@ -46822,6 +46865,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
|
|
|
46822
46865
|
followOnDblClick: false,
|
|
46823
46866
|
processVideoLink: true,
|
|
46824
46867
|
processPastedLink: true,
|
|
46868
|
+
processTypedLink: false,
|
|
46869
|
+
typedLinkTlds: [],
|
|
46870
|
+
typedLinkFileEndings: [
|
|
46871
|
+
'zip',
|
|
46872
|
+
'mov',
|
|
46873
|
+
'md',
|
|
46874
|
+
'py',
|
|
46875
|
+
'sh',
|
|
46876
|
+
'pub'
|
|
46877
|
+
],
|
|
46825
46878
|
deriveUrlFromText: false,
|
|
46826
46879
|
noFollowCheckbox: true,
|
|
46827
46880
|
openInNewTabCheckbox: true,
|
|
@@ -46886,12 +46939,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46886
46939
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
46887
46940
|
|
|
46888
46941
|
/* unused harmony export link */
|
|
46889
|
-
/* harmony import */ var
|
|
46890
|
-
/* harmony import */ var
|
|
46891
|
-
/* harmony import */ var
|
|
46892
|
-
/* harmony import */ var
|
|
46893
|
-
/* harmony import */ var
|
|
46894
|
-
/* harmony import */ var
|
|
46942
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
46943
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
46944
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
46945
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
46946
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
46947
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
46948
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
|
|
46949
|
+
/* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
|
|
46895
46950
|
/*!
|
|
46896
46951
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
46897
46952
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -46908,9 +46963,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46908
46963
|
|
|
46909
46964
|
|
|
46910
46965
|
|
|
46966
|
+
|
|
46967
|
+
|
|
46911
46968
|
/**
|
|
46912
46969
|
* Process link. Insert, dblclick or remove format
|
|
46913
|
-
*/ class link extends
|
|
46970
|
+
*/ class link extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
46914
46971
|
/** @override */ afterInit(jodit) {
|
|
46915
46972
|
if (jodit.o.link.followOnDblClick) {
|
|
46916
46973
|
jodit.e.on('dblclick.link', this.__onDblClickOnLink);
|
|
@@ -46919,6 +46976,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46919
46976
|
if (jodit.o.link.processPastedLink) {
|
|
46920
46977
|
jodit.e.on('processPaste.link', this.onProcessPasteLink);
|
|
46921
46978
|
}
|
|
46979
|
+
if (jodit.o.link.processTypedLink) {
|
|
46980
|
+
this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
|
|
46981
|
+
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,
|
|
46982
|
+
// which moves the caret on Tab, and of the backspace plugin
|
|
46983
|
+
.on('keydown', this.__onKeyDown, {
|
|
46984
|
+
top: true
|
|
46985
|
+
});
|
|
46986
|
+
}
|
|
46922
46987
|
jodit.e.on('generateLinkForm.link', this.__generateForm);
|
|
46923
46988
|
jodit.registerCommand('openLinkDialog', {
|
|
46924
46989
|
exec: ()=>{
|
|
@@ -46932,7 +46997,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46932
46997
|
dialog.setContent(htmlForm);
|
|
46933
46998
|
dialog.open();
|
|
46934
46999
|
jodit.async.requestIdleCallback(()=>{
|
|
46935
|
-
const { url_input } = (0,
|
|
47000
|
+
const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container);
|
|
46936
47001
|
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
46937
47002
|
});
|
|
46938
47003
|
},
|
|
@@ -46940,10 +47005,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46940
47005
|
});
|
|
46941
47006
|
}
|
|
46942
47007
|
__onDblClickOnLink(e) {
|
|
46943
|
-
if (!
|
|
47008
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
46944
47009
|
return;
|
|
46945
47010
|
}
|
|
46946
|
-
const href = (0,
|
|
47011
|
+
const href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
|
|
46947
47012
|
if (href) {
|
|
46948
47013
|
location.href = href;
|
|
46949
47014
|
e.preventDefault();
|
|
@@ -46952,23 +47017,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46952
47017
|
onProcessPasteLink(ignore, html) {
|
|
46953
47018
|
var _a, _b, _c, _d;
|
|
46954
47019
|
const { jodit } = this;
|
|
46955
|
-
if (!(0,
|
|
47020
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
46956
47021
|
return;
|
|
46957
47022
|
}
|
|
46958
47023
|
jodit.e.stopPropagation('processPaste');
|
|
46959
47024
|
if (jodit.o.link.processVideoLink) {
|
|
46960
|
-
const embed = (0,
|
|
47025
|
+
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, {
|
|
46961
47026
|
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
46962
47027
|
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
46963
47028
|
});
|
|
46964
47029
|
if (embed !== html) {
|
|
46965
|
-
const media = (0,
|
|
46966
|
-
return (0,
|
|
47030
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
|
|
47031
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
|
|
46967
47032
|
}
|
|
46968
47033
|
}
|
|
46969
47034
|
if (jodit.s.isCollapsed()) {
|
|
46970
47035
|
const a = jodit.createInside.element('a');
|
|
46971
|
-
(0,
|
|
47036
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
|
|
46972
47037
|
a.textContent = html;
|
|
46973
47038
|
jodit.e.fire('applyLink', jodit, a, null);
|
|
46974
47039
|
return a;
|
|
@@ -46986,16 +47051,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
46986
47051
|
const i18n = jodit.i18n.bind(jodit);
|
|
46987
47052
|
const { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
|
|
46988
47053
|
const html = formTemplate(jodit);
|
|
46989
|
-
const form = (0,
|
|
47054
|
+
const form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
|
|
46990
47055
|
target_checkbox_box: openInNewTabCheckbox,
|
|
46991
47056
|
nofollow_checkbox_box: noFollowCheckbox
|
|
46992
47057
|
}) : html;
|
|
46993
|
-
const htmlForm =
|
|
46994
|
-
const elements = (0,
|
|
47058
|
+
const htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
|
|
47059
|
+
const elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
|
|
46995
47060
|
const { insert, unlink, content_input_box } = elements;
|
|
46996
47061
|
const { target_checkbox, nofollow_checkbox, url_input } = elements;
|
|
46997
47062
|
const currentElement = current;
|
|
46998
|
-
const isImageContent =
|
|
47063
|
+
const isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
|
|
46999
47064
|
let { content_input } = elements;
|
|
47000
47065
|
const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
|
|
47001
47066
|
if (!content_input) {
|
|
@@ -47008,12 +47073,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47008
47073
|
htmlForm.classList.add(formClassName);
|
|
47009
47074
|
}
|
|
47010
47075
|
if (isImageContent) {
|
|
47011
|
-
|
|
47076
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
|
|
47012
47077
|
}
|
|
47013
47078
|
let link;
|
|
47014
|
-
const getSelectionText = ()=>link ? link.innerText : (0,
|
|
47015
|
-
if (current &&
|
|
47016
|
-
link =
|
|
47079
|
+
const getSelectionText = ()=>link ? link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
|
|
47080
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
|
|
47081
|
+
link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
|
|
47017
47082
|
} else {
|
|
47018
47083
|
link = false;
|
|
47019
47084
|
}
|
|
@@ -47021,22 +47086,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47021
47086
|
content_input.value = getSelectionText();
|
|
47022
47087
|
}
|
|
47023
47088
|
if (aria_label_input) {
|
|
47024
|
-
aria_label_input.value = link ? (0,
|
|
47089
|
+
aria_label_input.value = link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'aria-label') || '' : '';
|
|
47025
47090
|
}
|
|
47026
47091
|
if (link) {
|
|
47027
|
-
url_input.value = (0,
|
|
47092
|
+
url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'href') || '';
|
|
47028
47093
|
if (modeClassName) {
|
|
47029
47094
|
readClassnames(modeClassName, className_input, link, className_select);
|
|
47030
47095
|
}
|
|
47031
47096
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
47032
|
-
target_checkbox.checked = (0,
|
|
47097
|
+
target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'target') === '_blank';
|
|
47033
47098
|
}
|
|
47034
47099
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
47035
|
-
nofollow_checkbox.checked = ((0,
|
|
47100
|
+
nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
|
|
47036
47101
|
}
|
|
47037
47102
|
insert.textContent = i18n('Update');
|
|
47038
47103
|
} else {
|
|
47039
|
-
|
|
47104
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
|
|
47040
47105
|
if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
|
|
47041
47106
|
url_input.value = guessUrlFromText(content_input.value);
|
|
47042
47107
|
}
|
|
@@ -47051,7 +47116,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47051
47116
|
jodit.s.restore();
|
|
47052
47117
|
jodit.history.snapshot.restore(snapshot);
|
|
47053
47118
|
if (link) {
|
|
47054
|
-
|
|
47119
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
47055
47120
|
}
|
|
47056
47121
|
jodit.synchronizeValues();
|
|
47057
47122
|
close();
|
|
@@ -47072,12 +47137,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47072
47137
|
const textWasChanged = getSelectionText() !== content_input.value.trim();
|
|
47073
47138
|
const ci = jodit.createInside;
|
|
47074
47139
|
let caretAfter = null;
|
|
47075
|
-
if (!link || !
|
|
47140
|
+
if (!link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, link)) {
|
|
47076
47141
|
if (!jodit.s.isCollapsed()) {
|
|
47077
47142
|
const node = jodit.s.current();
|
|
47078
|
-
if (
|
|
47143
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
|
|
47079
47144
|
links = [
|
|
47080
|
-
|
|
47145
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
|
|
47081
47146
|
];
|
|
47082
47147
|
} else {
|
|
47083
47148
|
links = jodit.s.wrapInTag('a');
|
|
@@ -47097,27 +47162,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47097
47162
|
];
|
|
47098
47163
|
}
|
|
47099
47164
|
links.forEach((a)=>{
|
|
47100
|
-
;(0,
|
|
47165
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
|
|
47101
47166
|
writeClasses(modeClassName, className_input, className_select, a);
|
|
47102
47167
|
if (!isImageContent) {
|
|
47103
47168
|
writeImage(a, content_input, textWasChanged, url_input);
|
|
47104
47169
|
}
|
|
47105
47170
|
if (openInNewTabCheckbox && target_checkbox) {
|
|
47106
|
-
(0,
|
|
47171
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
|
|
47107
47172
|
}
|
|
47108
47173
|
if (noFollowCheckbox && nofollow_checkbox) {
|
|
47109
|
-
const relParts = ((0,
|
|
47174
|
+
const relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
|
|
47110
47175
|
const hasNofollow = relParts.includes('nofollow');
|
|
47111
47176
|
if (nofollow_checkbox.checked && !hasNofollow) {
|
|
47112
47177
|
relParts.push('nofollow');
|
|
47113
47178
|
} else if (!nofollow_checkbox.checked && hasNofollow) {
|
|
47114
47179
|
relParts.splice(relParts.indexOf('nofollow'), 1);
|
|
47115
47180
|
}
|
|
47116
|
-
;(0,
|
|
47181
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
|
|
47117
47182
|
}
|
|
47118
47183
|
if (aria_label_input) {
|
|
47119
47184
|
const ariaLabel = aria_label_input.value.trim();
|
|
47120
|
-
(0,
|
|
47185
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
|
|
47121
47186
|
}
|
|
47122
47187
|
jodit.e.fire('applyLink', jodit, a, form);
|
|
47123
47188
|
});
|
|
@@ -47132,7 +47197,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47132
47197
|
close();
|
|
47133
47198
|
return false;
|
|
47134
47199
|
};
|
|
47135
|
-
if (
|
|
47200
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
|
|
47136
47201
|
jodit.e.on(form, 'submit', (event)=>{
|
|
47137
47202
|
event.preventDefault();
|
|
47138
47203
|
event.stopImmediatePropagation();
|
|
@@ -47145,11 +47210,96 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47145
47210
|
return form;
|
|
47146
47211
|
}
|
|
47147
47212
|
/** @override */ beforeDestruct(jodit) {
|
|
47148
|
-
jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
|
|
47213
|
+
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);
|
|
47214
|
+
}
|
|
47215
|
+
__onTypedSpace(event) {
|
|
47216
|
+
if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
|
|
47217
|
+
return;
|
|
47218
|
+
}
|
|
47219
|
+
const { range } = this.j.s;
|
|
47220
|
+
if (range.collapsed) {
|
|
47221
|
+
this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
|
|
47222
|
+
}
|
|
47223
|
+
}
|
|
47224
|
+
__onBeforeEnter() {
|
|
47225
|
+
const { range } = this.j.s;
|
|
47226
|
+
this.__enteredAt = range.collapsed ? [
|
|
47227
|
+
range.startContainer,
|
|
47228
|
+
range.startOffset
|
|
47229
|
+
] : null;
|
|
47230
|
+
}
|
|
47231
|
+
__onAfterEnter() {
|
|
47232
|
+
if (this.__enteredAt) {
|
|
47233
|
+
this.__linkAfterEnter(...this.__enteredAt);
|
|
47234
|
+
this.__enteredAt = null;
|
|
47235
|
+
}
|
|
47236
|
+
}
|
|
47237
|
+
__forgetLink() {
|
|
47238
|
+
this.__justLinked = null;
|
|
47239
|
+
}
|
|
47240
|
+
__onKeyDown(event) {
|
|
47241
|
+
const { jodit } = this;
|
|
47242
|
+
if (jodit.o.readonly) {
|
|
47243
|
+
return;
|
|
47244
|
+
}
|
|
47245
|
+
const link = this.__justLinked;
|
|
47246
|
+
const modified = event.ctrlKey || event.metaKey || event.altKey;
|
|
47247
|
+
if (!MODIFIER_KEYS.has(event.key)) {
|
|
47248
|
+
this.__justLinked = null;
|
|
47249
|
+
}
|
|
47250
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (link === null || link === void 0 ? void 0 : link.isConnected)) {
|
|
47251
|
+
this.__recordStep();
|
|
47252
|
+
jodit.s.save();
|
|
47253
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
|
|
47254
|
+
jodit.s.restore();
|
|
47255
|
+
this.__recordStep();
|
|
47256
|
+
// Or the backspace plugin takes a character too
|
|
47257
|
+
jodit.e.stopPropagation('keydown');
|
|
47258
|
+
return false;
|
|
47259
|
+
}
|
|
47260
|
+
const { range } = jodit.s;
|
|
47261
|
+
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
|
|
47262
|
+
this.__linkTyped(range.startContainer, range.startOffset);
|
|
47263
|
+
}
|
|
47264
|
+
}
|
|
47265
|
+
/**
|
|
47266
|
+
* Links the address that ends at `end` in a text node, as a step of its
|
|
47267
|
+
* own in the history, so Undo straight after takes the link off and
|
|
47268
|
+
* leaves the text
|
|
47269
|
+
*/ __linkTyped(node, end) {
|
|
47270
|
+
const { jodit } = this;
|
|
47271
|
+
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)) {
|
|
47272
|
+
return;
|
|
47273
|
+
}
|
|
47274
|
+
const found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
|
|
47275
|
+
if (!found) {
|
|
47276
|
+
return;
|
|
47277
|
+
}
|
|
47278
|
+
const [start, stop, href] = found;
|
|
47279
|
+
this.__recordStep();
|
|
47280
|
+
// The text round the caret splits, and WebKit doesn't keep the caret
|
|
47281
|
+
// where it was
|
|
47282
|
+
jodit.s.save();
|
|
47283
|
+
const range = jodit.ed.createRange();
|
|
47284
|
+
range.setStart(node, start);
|
|
47285
|
+
range.setEnd(node, stop);
|
|
47286
|
+
const a = jodit.createInside.element('a');
|
|
47287
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
|
|
47288
|
+
range.surroundContents(a);
|
|
47289
|
+
jodit.s.restore();
|
|
47290
|
+
jodit.e.fire('applyLink', jodit, a, null);
|
|
47291
|
+
this.__recordStep();
|
|
47292
|
+
this.__justLinked = a;
|
|
47293
|
+
}
|
|
47294
|
+
/**
|
|
47295
|
+
* Reports what's changed and makes it a history step of its own
|
|
47296
|
+
*/ __recordStep() {
|
|
47297
|
+
this.j.setEditorValue();
|
|
47298
|
+
this.j.e.fire('internalChange');
|
|
47149
47299
|
}
|
|
47150
47300
|
__onClickReadOnlyLink(e) {
|
|
47151
47301
|
const { jodit } = this;
|
|
47152
|
-
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation &&
|
|
47302
|
+
if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
|
|
47153
47303
|
e.preventDefault();
|
|
47154
47304
|
}
|
|
47155
47305
|
}
|
|
@@ -47161,21 +47311,61 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
|
|
|
47161
47311
|
group: 'insert'
|
|
47162
47312
|
}
|
|
47163
47313
|
];
|
|
47314
|
+
/**
|
|
47315
|
+
* Where the caret was when Enter was pressed. Enter splits the line in a
|
|
47316
|
+
* history transaction, so the link waits until it's over
|
|
47317
|
+
*/ this.__enteredAt = null;
|
|
47318
|
+
this.__linkAfterEnter = ()=>{};
|
|
47319
|
+
/**
|
|
47320
|
+
* The link just made, which Backspace straight after takes off again, as
|
|
47321
|
+
* in CKEditor 5. Any other key but a modifier, a click or a command
|
|
47322
|
+
* forgets it
|
|
47323
|
+
*/ this.__justLinked = null;
|
|
47164
47324
|
}
|
|
47165
47325
|
}
|
|
47166
47326
|
__decorate([
|
|
47167
|
-
|
|
47327
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47168
47328
|
], link.prototype, "__onDblClickOnLink", null);
|
|
47169
47329
|
__decorate([
|
|
47170
|
-
|
|
47330
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47171
47331
|
], link.prototype, "onProcessPasteLink", null);
|
|
47172
47332
|
__decorate([
|
|
47173
|
-
|
|
47333
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47174
47334
|
], link.prototype, "__generateForm", null);
|
|
47175
47335
|
__decorate([
|
|
47176
|
-
|
|
47336
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47337
|
+
], link.prototype, "__onTypedSpace", null);
|
|
47338
|
+
__decorate([
|
|
47339
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47340
|
+
], link.prototype, "__onBeforeEnter", null);
|
|
47341
|
+
__decorate([
|
|
47342
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47343
|
+
], link.prototype, "__onAfterEnter", null);
|
|
47344
|
+
__decorate([
|
|
47345
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47346
|
+
], link.prototype, "__forgetLink", null);
|
|
47347
|
+
__decorate([
|
|
47348
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47349
|
+
], link.prototype, "__onKeyDown", null);
|
|
47350
|
+
__decorate([
|
|
47351
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47352
|
+
], link.prototype, "__linkTyped", null);
|
|
47353
|
+
__decorate([
|
|
47354
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
47177
47355
|
], link.prototype, "__onClickReadOnlyLink", null);
|
|
47178
|
-
|
|
47356
|
+
const NO_TYPED_LINKS = new Set([
|
|
47357
|
+
'a',
|
|
47358
|
+
'pre',
|
|
47359
|
+
'code'
|
|
47360
|
+
]);
|
|
47361
|
+
const MODIFIER_KEYS = new Set([
|
|
47362
|
+
'Shift',
|
|
47363
|
+
'Control',
|
|
47364
|
+
'Alt',
|
|
47365
|
+
'Meta',
|
|
47366
|
+
'CapsLock'
|
|
47367
|
+
]);
|
|
47368
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
|
|
47179
47369
|
/**
|
|
47180
47370
|
* Guess a usable `href` from the selected text for the link dialog.
|
|
47181
47371
|
* Returns an empty string when the text is not a plausible URL/email,
|
|
@@ -47190,7 +47380,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
|
|
|
47190
47380
|
return value;
|
|
47191
47381
|
}
|
|
47192
47382
|
// email address -> mailto:
|
|
47193
|
-
if (
|
|
47383
|
+
if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
|
|
47194
47384
|
return `mailto:${value}`;
|
|
47195
47385
|
}
|
|
47196
47386
|
// bare domain like example.com or www.example.com/path -> https://
|
|
@@ -47204,14 +47394,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
47204
47394
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
47205
47395
|
if (modeClassName === 'input') {
|
|
47206
47396
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
47207
|
-
(0,
|
|
47397
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
47208
47398
|
}
|
|
47209
47399
|
if (className_input.value !== '') {
|
|
47210
|
-
(0,
|
|
47400
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
|
|
47211
47401
|
}
|
|
47212
47402
|
} else if (modeClassName === 'select') {
|
|
47213
47403
|
if (a.hasAttribute('class')) {
|
|
47214
|
-
(0,
|
|
47404
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
|
|
47215
47405
|
}
|
|
47216
47406
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
47217
47407
|
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
@@ -47228,7 +47418,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
47228
47418
|
switch(modeClassName){
|
|
47229
47419
|
case 'input':
|
|
47230
47420
|
if (className_input) {
|
|
47231
|
-
className_input.value = (0,
|
|
47421
|
+
className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
47232
47422
|
}
|
|
47233
47423
|
break;
|
|
47234
47424
|
case 'select':
|
|
@@ -47239,7 +47429,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
47239
47429
|
option.selected = false;
|
|
47240
47430
|
}
|
|
47241
47431
|
}
|
|
47242
|
-
const classNames = (0,
|
|
47432
|
+
const classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
|
|
47243
47433
|
classNames.split(/\s+/).filter((cn)=>cn.trim().length > 0).forEach((className)=>{
|
|
47244
47434
|
if (className) {
|
|
47245
47435
|
for(let i = 0; i < className_select.options.length; i++){
|
|
@@ -47367,6 +47557,154 @@ const formTemplate = (editor)=>{
|
|
|
47367
47557
|
/* harmony export */ ]);
|
|
47368
47558
|
|
|
47369
47559
|
|
|
47560
|
+
/***/ }),
|
|
47561
|
+
|
|
47562
|
+
/***/ 67272:
|
|
47563
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
47564
|
+
|
|
47565
|
+
/*!
|
|
47566
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
47567
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
47568
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
47569
|
+
*/ /**
|
|
47570
|
+
* @module plugins/link
|
|
47571
|
+
*/ /**
|
|
47572
|
+
* The endings a bare domain links with, besides those `link.typedLinkTlds`
|
|
47573
|
+
* adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
|
|
47574
|
+
* million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
|
|
47575
|
+
* two-letter one in IANA's list (version 2026102900,
|
|
47576
|
+
* https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
|
|
47577
|
+
* endings of 96% of those sites
|
|
47578
|
+
* @private
|
|
47579
|
+
*/ const TLDS = new Set(`
|
|
47580
|
+
app biz casino click cloud club com dev edu gov info live net online org pro
|
|
47581
|
+
shop site space store tech top vip xyz
|
|
47582
|
+
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
|
|
47583
|
+
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
|
|
47584
|
+
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
|
|
47585
|
+
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
|
|
47586
|
+
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
|
|
47587
|
+
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
|
|
47588
|
+
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
|
|
47589
|
+
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
|
|
47590
|
+
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
|
|
47591
|
+
tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw
|
|
47592
|
+
`.trim().split(/\s+/));
|
|
47593
|
+
|
|
47594
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
47595
|
+
/* harmony export */ "TLDS", 0, /* binding */ TLDS
|
|
47596
|
+
/* harmony export */ ]);
|
|
47597
|
+
|
|
47598
|
+
|
|
47599
|
+
/***/ }),
|
|
47600
|
+
|
|
47601
|
+
/***/ 58970:
|
|
47602
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
47603
|
+
|
|
47604
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47605
|
+
/* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
|
|
47606
|
+
/* harmony export */ });
|
|
47607
|
+
/* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
|
|
47608
|
+
/* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
|
|
47609
|
+
/*!
|
|
47610
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
47611
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
47612
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
47613
|
+
*/ /**
|
|
47614
|
+
* @module plugins/link
|
|
47615
|
+
*/
|
|
47616
|
+
|
|
47617
|
+
/**
|
|
47618
|
+
* An email address, for `mailto:`
|
|
47619
|
+
* @private
|
|
47620
|
+
*/ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
47621
|
+
const OPENING = new Set([
|
|
47622
|
+
'(',
|
|
47623
|
+
'[',
|
|
47624
|
+
'"',
|
|
47625
|
+
"'",
|
|
47626
|
+
'“',
|
|
47627
|
+
'‘',
|
|
47628
|
+
'<'
|
|
47629
|
+
]);
|
|
47630
|
+
const CLOSING = new Set([
|
|
47631
|
+
'.',
|
|
47632
|
+
',',
|
|
47633
|
+
';',
|
|
47634
|
+
':',
|
|
47635
|
+
'!',
|
|
47636
|
+
'?',
|
|
47637
|
+
'"',
|
|
47638
|
+
"'",
|
|
47639
|
+
'”',
|
|
47640
|
+
'’',
|
|
47641
|
+
'>'
|
|
47642
|
+
]);
|
|
47643
|
+
const BRACKETS = {
|
|
47644
|
+
')': '(',
|
|
47645
|
+
']': '['
|
|
47646
|
+
};
|
|
47647
|
+
const LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
|
|
47648
|
+
/**
|
|
47649
|
+
* The address that ends at `end` in a line of text typed, back to the
|
|
47650
|
+
* whitespace before it, as `[start, end, href]`. Punctuation round it, such as
|
|
47651
|
+
* a sentence's full stop or a bracket the address doesn't open, stays out.
|
|
47652
|
+
* An address counts with a scheme, with `www.`, as an email address, or as a
|
|
47653
|
+
* bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
|
|
47654
|
+
* @private
|
|
47655
|
+
*/ function findTypedLink(text, end, tlds, fileEndings) {
|
|
47656
|
+
let start = end;
|
|
47657
|
+
while(start > 0 && !/\s/.test(text[start - 1])){
|
|
47658
|
+
start -= 1;
|
|
47659
|
+
}
|
|
47660
|
+
while(start < end && OPENING.has(text[start])){
|
|
47661
|
+
start += 1;
|
|
47662
|
+
}
|
|
47663
|
+
while(end > start){
|
|
47664
|
+
const char = text[end - 1];
|
|
47665
|
+
const opening = BRACKETS[char];
|
|
47666
|
+
if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
|
|
47667
|
+
end -= 1;
|
|
47668
|
+
} else {
|
|
47669
|
+
break;
|
|
47670
|
+
}
|
|
47671
|
+
}
|
|
47672
|
+
const href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
|
|
47673
|
+
return href ? [
|
|
47674
|
+
start,
|
|
47675
|
+
end,
|
|
47676
|
+
href
|
|
47677
|
+
] : null;
|
|
47678
|
+
}
|
|
47679
|
+
function typedLinkHref(address, tlds, fileEndings) {
|
|
47680
|
+
const email = address.replace(/^mailto:/i, '');
|
|
47681
|
+
if (EMAIL.test(email)) {
|
|
47682
|
+
return `mailto:${email}`;
|
|
47683
|
+
}
|
|
47684
|
+
if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
|
|
47685
|
+
return `https://${address}`;
|
|
47686
|
+
}
|
|
47687
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
|
|
47688
|
+
}
|
|
47689
|
+
/**
|
|
47690
|
+
* A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
|
|
47691
|
+
* or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
|
|
47692
|
+
* case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
|
|
47693
|
+
* not in `fileEndings`, as in `photos.zip`. The first part has a letter,
|
|
47694
|
+
* which leaves out a time or a numbered step such as `11.am`
|
|
47695
|
+
*/ function isBareDomain(address, tlds, fileEndings) {
|
|
47696
|
+
const cut = address.search(/[/?#]/);
|
|
47697
|
+
const host = cut < 0 ? address : address.slice(0, cut);
|
|
47698
|
+
const labels = host.split('.');
|
|
47699
|
+
const ending = labels[labels.length - 1];
|
|
47700
|
+
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]);
|
|
47701
|
+
}
|
|
47702
|
+
|
|
47703
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
47704
|
+
/* harmony export */ "EMAIL", 0, /* binding */ EMAIL
|
|
47705
|
+
/* harmony export */ ]);
|
|
47706
|
+
|
|
47707
|
+
|
|
47370
47708
|
/***/ }),
|
|
47371
47709
|
|
|
47372
47710
|
/***/ 757:
|