jodit-pro 1.3.39 → 2.0.0-beta.10
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/.nvmrc +1 -0
- package/CHANGELOG.md +982 -0
- package/LICENSE.txt +1 -0
- package/README.md +27 -27
- package/SECURITY.md +10 -0
- package/es2015/jodit.css +4945 -0
- package/es2015/jodit.fat.min.css +1 -0
- package/es2015/jodit.fat.min.js +10 -0
- package/es2015/jodit.js +42706 -0
- package/es2015/jodit.min.css +1 -0
- package/es2015/jodit.min.js +10 -0
- package/es2015/plugins/autocomplete/autocomplete.css +26 -0
- package/es2015/plugins/autocomplete/autocomplete.js +473 -0
- package/es2015/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2015/plugins/backup/backup.css +48 -0
- package/es2015/plugins/backup/backup.js +567 -0
- package/{build/plugins/backup/backup.css → es2015/plugins/backup/backup.min.css} +1 -1
- package/es2015/plugins/backup/backup.min.js +10 -0
- package/es2015/plugins/button-generator/button-generator.css +316 -0
- package/es2015/plugins/button-generator/button-generator.js +1363 -0
- package/es2015/plugins/button-generator/button-generator.min.css +1 -0
- package/es2015/plugins/button-generator/button-generator.min.js +10 -0
- package/es2015/plugins/change-case/change-case.js +171 -0
- package/es2015/plugins/change-case/change-case.min.js +10 -0
- package/es2015/plugins/color-picker/color-picker.css +133 -0
- package/es2015/plugins/color-picker/color-picker.js +519 -0
- package/es2015/plugins/color-picker/color-picker.min.css +1 -0
- package/es2015/plugins/color-picker/color-picker.min.js +10 -0
- package/es2015/plugins/emoji/emoji.css +108 -0
- package/es2015/plugins/emoji/emoji.js +421 -0
- package/es2015/plugins/emoji/emoji.min.css +1 -0
- package/es2015/plugins/emoji/emoji.min.js +10 -0
- package/es2015/plugins/export-docs/export-docs.js +153 -0
- package/es2015/plugins/export-docs/export-docs.min.js +10 -0
- package/es2015/plugins/finder/finder.css +1342 -0
- package/es2015/plugins/finder/finder.js +3175 -0
- package/es2015/plugins/finder/finder.min.css +1 -0
- package/es2015/plugins/finder/finder.min.js +10 -0
- package/es2015/plugins/google-maps/google-maps.css +397 -0
- package/es2015/plugins/google-maps/google-maps.js +2492 -0
- package/es2015/plugins/google-maps/google-maps.min.css +1 -0
- package/es2015/plugins/google-maps/google-maps.min.js +10 -0
- package/es2015/plugins/google-search/google-search.js +108 -0
- package/es2015/plugins/google-search/google-search.min.js +10 -0
- package/es2015/plugins/highlight-signature/highlight-signature.js +233 -0
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2015/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2015/plugins/iframe-editor/iframe-editor.js +310 -0
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2015/plugins/keyboard/keyboard.css +48 -0
- package/es2015/plugins/keyboard/keyboard.js +539 -0
- package/es2015/plugins/keyboard/keyboard.min.js +10 -0
- package/es2015/plugins/mobile-view/mobile-view.js +170 -0
- package/es2015/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2015/plugins/page-break/page-break.js +181 -0
- package/es2015/plugins/page-break/page-break.min.js +10 -0
- package/es2015/plugins/paste-code/paste-code.css +21 -0
- package/es2015/plugins/paste-code/paste-code.js +320 -0
- package/es2015/plugins/paste-code/paste-code.min.js +10 -0
- package/es2015/plugins/paste-from-word/paste-from-word.js +1541 -0
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2015/plugins/show-blocks/show-blocks.js +645 -0
- package/es2015/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2015/plugins/todo-list/todo-list.css +77 -0
- package/es2015/plugins/todo-list/todo-list.js +314 -0
- package/es2015/plugins/todo-list/todo-list.min.css +1 -0
- package/es2015/plugins/todo-list/todo-list.min.js +10 -0
- package/es2015/plugins/translate/translate.css +91 -0
- package/es2015/plugins/translate/translate.js +630 -0
- package/es2015/plugins/translate/translate.min.js +10 -0
- package/es2015/plugins/tune-block/tune-block.css +37 -0
- package/es2015/plugins/tune-block/tune-block.js +387 -0
- package/{build/plugins/tune-block/tune-block.css → es2015/plugins/tune-block/tune-block.min.css} +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +10 -0
- package/es2018/jodit.css +4945 -0
- package/es2018/jodit.fat.min.css +1 -0
- package/es2018/jodit.fat.min.js +10 -0
- package/es2018/jodit.js +42762 -0
- package/es2018/jodit.min.css +1 -0
- package/es2018/jodit.min.js +10 -0
- package/es2018/plugins/autocomplete/autocomplete.css +26 -0
- package/es2018/plugins/autocomplete/autocomplete.js +471 -0
- package/es2018/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2018/plugins/backup/backup.css +48 -0
- package/es2018/plugins/backup/backup.js +561 -0
- package/{build/plugins/backup/backup.es5.css → es2018/plugins/backup/backup.min.css} +1 -1
- package/es2018/plugins/backup/backup.min.js +10 -0
- package/es2018/plugins/button-generator/button-generator.css +316 -0
- package/es2018/plugins/button-generator/button-generator.js +1387 -0
- package/es2018/plugins/button-generator/button-generator.min.css +1 -0
- package/es2018/plugins/button-generator/button-generator.min.js +10 -0
- package/es2018/plugins/change-case/change-case.js +171 -0
- package/es2018/plugins/change-case/change-case.min.js +10 -0
- package/es2018/plugins/color-picker/color-picker.css +133 -0
- package/es2018/plugins/color-picker/color-picker.js +519 -0
- package/es2018/plugins/color-picker/color-picker.min.css +1 -0
- package/es2018/plugins/color-picker/color-picker.min.js +10 -0
- package/es2018/plugins/emoji/emoji.css +108 -0
- package/es2018/plugins/emoji/emoji.js +425 -0
- package/es2018/plugins/emoji/emoji.min.css +1 -0
- package/es2018/plugins/emoji/emoji.min.js +10 -0
- package/es2018/plugins/export-docs/export-docs.js +157 -0
- package/es2018/plugins/export-docs/export-docs.min.js +10 -0
- package/es2018/plugins/finder/finder.css +1342 -0
- package/es2018/plugins/finder/finder.js +3160 -0
- package/es2018/plugins/finder/finder.min.css +1 -0
- package/es2018/plugins/finder/finder.min.js +10 -0
- package/es2018/plugins/google-maps/google-maps.css +397 -0
- package/es2018/plugins/google-maps/google-maps.js +2556 -0
- package/es2018/plugins/google-maps/google-maps.min.css +1 -0
- package/es2018/plugins/google-maps/google-maps.min.js +10 -0
- package/es2018/plugins/google-search/google-search.js +108 -0
- package/es2018/plugins/google-search/google-search.min.js +10 -0
- package/es2018/plugins/highlight-signature/highlight-signature.js +233 -0
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2018/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2018/plugins/iframe-editor/iframe-editor.js +310 -0
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2018/plugins/keyboard/keyboard.css +48 -0
- package/es2018/plugins/keyboard/keyboard.js +539 -0
- package/es2018/plugins/keyboard/keyboard.min.js +10 -0
- package/es2018/plugins/mobile-view/mobile-view.js +170 -0
- package/es2018/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2018/plugins/page-break/page-break.js +181 -0
- package/es2018/plugins/page-break/page-break.min.js +10 -0
- package/es2018/plugins/paste-code/paste-code.css +21 -0
- package/es2018/plugins/paste-code/paste-code.js +318 -0
- package/es2018/plugins/paste-code/paste-code.min.js +10 -0
- package/es2018/plugins/paste-from-word/paste-from-word.js +1541 -0
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2018/plugins/show-blocks/show-blocks.js +645 -0
- package/es2018/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2018/plugins/todo-list/todo-list.css +77 -0
- package/es2018/plugins/todo-list/todo-list.js +314 -0
- package/es2018/plugins/todo-list/todo-list.min.css +1 -0
- package/es2018/plugins/todo-list/todo-list.min.js +10 -0
- package/es2018/plugins/translate/translate.css +91 -0
- package/es2018/plugins/translate/translate.js +639 -0
- package/es2018/plugins/translate/translate.min.js +10 -0
- package/es2018/plugins/tune-block/tune-block.css +37 -0
- package/es2018/plugins/tune-block/tune-block.js +387 -0
- package/{build/plugins/tune-block/tune-block.es5.css → es2018/plugins/tune-block/tune-block.min.css} +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +10 -0
- package/es2021/jodit.css +4945 -0
- package/es2021/jodit.fat.min.css +1 -0
- package/es2021/jodit.fat.min.js +10 -0
- package/es2021/jodit.js +42643 -0
- package/es2021/jodit.min.css +1 -0
- package/es2021/jodit.min.js +10 -0
- package/es2021/plugins/autocomplete/autocomplete.css +26 -0
- package/es2021/plugins/autocomplete/autocomplete.js +463 -0
- package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2021/plugins/backup/backup.css +48 -0
- package/es2021/plugins/backup/backup.js +554 -0
- package/es2021/plugins/backup/backup.min.css +1 -0
- package/es2021/plugins/backup/backup.min.js +10 -0
- package/es2021/plugins/button-generator/button-generator.css +316 -0
- package/es2021/plugins/button-generator/button-generator.js +1382 -0
- package/es2021/plugins/button-generator/button-generator.min.css +1 -0
- package/es2021/plugins/button-generator/button-generator.min.js +10 -0
- package/es2021/plugins/change-case/change-case.js +171 -0
- package/es2021/plugins/change-case/change-case.min.js +10 -0
- package/es2021/plugins/color-picker/color-picker.css +133 -0
- package/es2021/plugins/color-picker/color-picker.js +517 -0
- package/es2021/plugins/color-picker/color-picker.min.css +1 -0
- package/es2021/plugins/color-picker/color-picker.min.js +10 -0
- package/es2021/plugins/emoji/emoji.css +108 -0
- package/es2021/plugins/emoji/emoji.js +425 -0
- package/es2021/plugins/emoji/emoji.min.css +1 -0
- package/es2021/plugins/emoji/emoji.min.js +10 -0
- package/es2021/plugins/export-docs/export-docs.js +156 -0
- package/es2021/plugins/export-docs/export-docs.min.js +10 -0
- package/es2021/plugins/finder/finder.css +1342 -0
- package/es2021/plugins/finder/finder.js +3152 -0
- package/es2021/plugins/finder/finder.min.css +1 -0
- package/es2021/plugins/finder/finder.min.js +10 -0
- package/es2021/plugins/google-maps/google-maps.css +397 -0
- package/es2021/plugins/google-maps/google-maps.js +2540 -0
- package/es2021/plugins/google-maps/google-maps.min.css +1 -0
- package/es2021/plugins/google-maps/google-maps.min.js +10 -0
- package/es2021/plugins/google-search/google-search.js +107 -0
- package/es2021/plugins/google-search/google-search.min.js +10 -0
- package/es2021/plugins/highlight-signature/highlight-signature.js +231 -0
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2021/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2021/plugins/iframe-editor/iframe-editor.js +308 -0
- package/es2021/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2021/plugins/keyboard/keyboard.css +48 -0
- package/es2021/plugins/keyboard/keyboard.js +537 -0
- package/es2021/plugins/keyboard/keyboard.min.css +1 -0
- package/es2021/plugins/keyboard/keyboard.min.js +10 -0
- package/es2021/plugins/mobile-view/mobile-view.js +168 -0
- package/es2021/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2021/plugins/page-break/page-break.js +181 -0
- package/es2021/plugins/page-break/page-break.min.js +10 -0
- package/es2021/plugins/paste-code/paste-code.css +21 -0
- package/es2021/plugins/paste-code/paste-code.js +318 -0
- package/es2021/plugins/paste-code/paste-code.min.css +1 -0
- package/es2021/plugins/paste-code/paste-code.min.js +10 -0
- package/es2021/plugins/paste-from-word/paste-from-word.js +1528 -0
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2021/plugins/show-blocks/show-blocks.js +645 -0
- package/es2021/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2021/plugins/todo-list/todo-list.css +77 -0
- package/es2021/plugins/todo-list/todo-list.js +313 -0
- package/es2021/plugins/todo-list/todo-list.min.css +1 -0
- package/es2021/plugins/todo-list/todo-list.min.js +10 -0
- package/es2021/plugins/translate/translate.css +91 -0
- package/es2021/plugins/translate/translate.js +636 -0
- package/es2021/plugins/translate/translate.min.css +1 -0
- package/es2021/plugins/translate/translate.min.js +10 -0
- package/es2021/plugins/tune-block/tune-block.css +37 -0
- package/es2021/plugins/tune-block/tune-block.js +385 -0
- package/es2021/plugins/tune-block/tune-block.min.css +1 -0
- package/es2021/plugins/tune-block/tune-block.min.js +10 -0
- package/es2021.en/jodit.css +4945 -0
- package/es2021.en/jodit.fat.min.css +1 -0
- package/es2021.en/jodit.fat.min.js +10 -0
- package/es2021.en/jodit.js +40989 -0
- package/es2021.en/jodit.min.css +1 -0
- package/es2021.en/jodit.min.js +10 -0
- package/es2021.en/plugins/autocomplete/autocomplete.css +26 -0
- package/es2021.en/plugins/autocomplete/autocomplete.js +463 -0
- package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2021.en/plugins/backup/backup.css +48 -0
- package/es2021.en/plugins/backup/backup.js +554 -0
- package/es2021.en/plugins/backup/backup.min.css +1 -0
- package/es2021.en/plugins/backup/backup.min.js +10 -0
- package/es2021.en/plugins/button-generator/button-generator.css +316 -0
- package/es2021.en/plugins/button-generator/button-generator.js +1382 -0
- package/es2021.en/plugins/button-generator/button-generator.min.css +1 -0
- package/es2021.en/plugins/button-generator/button-generator.min.js +10 -0
- package/es2021.en/plugins/change-case/change-case.js +171 -0
- package/es2021.en/plugins/change-case/change-case.min.js +10 -0
- package/es2021.en/plugins/color-picker/color-picker.css +133 -0
- package/es2021.en/plugins/color-picker/color-picker.js +517 -0
- package/es2021.en/plugins/color-picker/color-picker.min.css +1 -0
- package/es2021.en/plugins/color-picker/color-picker.min.js +10 -0
- package/es2021.en/plugins/emoji/emoji.css +108 -0
- package/es2021.en/plugins/emoji/emoji.js +425 -0
- package/es2021.en/plugins/emoji/emoji.min.css +1 -0
- package/es2021.en/plugins/emoji/emoji.min.js +10 -0
- package/es2021.en/plugins/export-docs/export-docs.js +156 -0
- package/es2021.en/plugins/export-docs/export-docs.min.js +10 -0
- package/es2021.en/plugins/finder/finder.css +1342 -0
- package/es2021.en/plugins/finder/finder.js +3117 -0
- package/es2021.en/plugins/finder/finder.min.css +1 -0
- package/es2021.en/plugins/finder/finder.min.js +10 -0
- package/es2021.en/plugins/google-maps/google-maps.css +397 -0
- package/es2021.en/plugins/google-maps/google-maps.js +2540 -0
- package/es2021.en/plugins/google-maps/google-maps.min.css +1 -0
- package/es2021.en/plugins/google-maps/google-maps.min.js +10 -0
- package/es2021.en/plugins/google-search/google-search.js +107 -0
- package/es2021.en/plugins/google-search/google-search.min.js +10 -0
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +231 -0
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +308 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2021.en/plugins/keyboard/keyboard.css +48 -0
- package/es2021.en/plugins/keyboard/keyboard.js +537 -0
- package/es2021.en/plugins/keyboard/keyboard.min.css +1 -0
- package/es2021.en/plugins/keyboard/keyboard.min.js +10 -0
- package/es2021.en/plugins/mobile-view/mobile-view.js +168 -0
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2021.en/plugins/page-break/page-break.js +181 -0
- package/es2021.en/plugins/page-break/page-break.min.js +10 -0
- package/es2021.en/plugins/paste-code/paste-code.css +21 -0
- package/es2021.en/plugins/paste-code/paste-code.js +318 -0
- package/es2021.en/plugins/paste-code/paste-code.min.css +1 -0
- package/es2021.en/plugins/paste-code/paste-code.min.js +10 -0
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1528 -0
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2021.en/plugins/show-blocks/show-blocks.js +322 -0
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2021.en/plugins/todo-list/todo-list.css +77 -0
- package/es2021.en/plugins/todo-list/todo-list.js +313 -0
- package/es2021.en/plugins/todo-list/todo-list.min.css +1 -0
- package/es2021.en/plugins/todo-list/todo-list.min.js +10 -0
- package/es2021.en/plugins/translate/translate.css +91 -0
- package/es2021.en/plugins/translate/translate.js +636 -0
- package/es2021.en/plugins/translate/translate.min.css +1 -0
- package/es2021.en/plugins/translate/translate.min.js +10 -0
- package/es2021.en/plugins/tune-block/tune-block.css +37 -0
- package/es2021.en/plugins/tune-block/tune-block.js +385 -0
- package/es2021.en/plugins/tune-block/tune-block.min.css +1 -0
- package/es2021.en/plugins/tune-block/tune-block.min.js +10 -0
- package/es5/jodit.css +5956 -0
- package/es5/jodit.fat.min.css +1 -0
- package/es5/jodit.fat.min.js +10 -0
- package/es5/jodit.js +49879 -0
- package/es5/jodit.min.css +15 -0
- package/es5/jodit.min.js +10 -0
- package/es5/plugins/autocomplete/autocomplete.css +26 -0
- package/es5/plugins/autocomplete/autocomplete.js +536 -0
- package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es5/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es5/plugins/backup/backup.css +48 -0
- package/es5/plugins/backup/backup.js +599 -0
- package/es5/plugins/backup/backup.min.css +1 -0
- package/es5/plugins/backup/backup.min.js +10 -0
- package/es5/plugins/button-generator/button-generator.css +316 -0
- package/es5/plugins/button-generator/button-generator.js +1310 -0
- package/es5/plugins/button-generator/button-generator.min.css +1 -0
- package/es5/plugins/button-generator/button-generator.min.js +10 -0
- package/es5/plugins/change-case/change-case.js +179 -0
- package/es5/plugins/change-case/change-case.min.js +10 -0
- package/es5/plugins/color-picker/color-picker.css +133 -0
- package/es5/plugins/color-picker/color-picker.js +525 -0
- package/es5/plugins/color-picker/color-picker.min.css +1 -0
- package/es5/plugins/color-picker/color-picker.min.js +10 -0
- package/es5/plugins/emoji/emoji.css +108 -0
- package/es5/plugins/emoji/emoji.js +459 -0
- package/es5/plugins/emoji/emoji.min.css +1 -0
- package/es5/plugins/emoji/emoji.min.js +10 -0
- package/es5/plugins/export-docs/export-docs.js +174 -0
- package/es5/plugins/export-docs/export-docs.min.js +10 -0
- package/es5/plugins/finder/finder.css +1342 -0
- package/es5/plugins/finder/finder.js +3335 -0
- package/es5/plugins/finder/finder.min.css +1 -0
- package/es5/plugins/finder/finder.min.js +10 -0
- package/es5/plugins/google-maps/google-maps.css +397 -0
- package/es5/plugins/google-maps/google-maps.js +2463 -0
- package/es5/plugins/google-maps/google-maps.min.css +1 -0
- package/es5/plugins/google-maps/google-maps.min.js +10 -0
- package/es5/plugins/google-search/google-search.js +113 -0
- package/es5/plugins/google-search/google-search.min.js +10 -0
- package/es5/plugins/highlight-signature/highlight-signature.js +253 -0
- package/es5/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es5/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es5/plugins/iframe-editor/iframe-editor.js +319 -0
- package/es5/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es5/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es5/plugins/keyboard/keyboard.css +48 -0
- package/es5/plugins/keyboard/keyboard.js +556 -0
- package/es5/plugins/keyboard/keyboard.min.css +1 -0
- package/es5/plugins/keyboard/keyboard.min.js +10 -0
- package/es5/plugins/mobile-view/mobile-view.js +176 -0
- package/es5/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es5/plugins/page-break/page-break.js +169 -0
- package/es5/plugins/page-break/page-break.min.js +10 -0
- package/es5/plugins/paste-code/paste-code.css +21 -0
- package/es5/plugins/paste-code/paste-code.js +348 -0
- package/es5/plugins/paste-code/paste-code.min.css +1 -0
- package/es5/plugins/paste-code/paste-code.min.js +10 -0
- package/es5/plugins/paste-from-word/paste-from-word.js +1670 -0
- package/es5/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es5/plugins/show-blocks/show-blocks.js +649 -0
- package/es5/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es5/plugins/todo-list/todo-list.css +77 -0
- package/es5/plugins/todo-list/todo-list.js +324 -0
- package/es5/plugins/todo-list/todo-list.min.css +1 -0
- package/es5/plugins/todo-list/todo-list.min.js +10 -0
- package/es5/plugins/translate/translate.css +91 -0
- package/es5/plugins/translate/translate.js +657 -0
- package/es5/plugins/translate/translate.min.css +1 -0
- package/es5/plugins/translate/translate.min.js +10 -0
- package/es5/plugins/tune-block/tune-block.css +37 -0
- package/es5/plugins/tune-block/tune-block.js +397 -0
- package/es5/plugins/tune-block/tune-block.min.css +1 -0
- package/es5/plugins/tune-block/tune-block.min.js +10 -0
- package/examples/arabic.lang.html +8 -8
- package/examples/color-picker.html +6 -6
- package/examples/custom-icons.html +8 -8
- package/examples/custom-toolbar.html +8 -8
- package/examples/example.default.html +6 -6
- package/examples/fullsize.html +8 -8
- package/examples/index.html +6 -6
- package/examples/inline-mode.html +8 -8
- package/examples/oneinstance.html +8 -8
- package/examples/theme.html +6 -6
- package/package.json +6 -22
- package/LICENSE.md +0 -3
- package/build/jodit.css +0 -1
- package/build/jodit.es5.css +0 -8
- package/build/jodit.es5.js +0 -1
- package/build/jodit.fat.css +0 -1
- package/build/jodit.fat.es5.css +0 -1
- package/build/jodit.fat.es5.js +0 -1
- package/build/jodit.fat.js +0 -1
- package/build/jodit.js +0 -1
- package/build/plugins/autocomplete/autocomplete.es5.js +0 -1
- package/build/plugins/autocomplete/autocomplete.js +0 -1
- package/build/plugins/backup/backup.es5.js +0 -1
- package/build/plugins/backup/backup.js +0 -1
- package/build/plugins/button-generator/button-generator.css +0 -1
- package/build/plugins/button-generator/button-generator.es5.css +0 -1
- package/build/plugins/button-generator/button-generator.es5.js +0 -1
- package/build/plugins/button-generator/button-generator.js +0 -1
- package/build/plugins/change-case/change-case.es5.js +0 -1
- package/build/plugins/change-case/change-case.js +0 -1
- package/build/plugins/color-picker/color-picker.css +0 -1
- package/build/plugins/color-picker/color-picker.es5.css +0 -1
- package/build/plugins/color-picker/color-picker.es5.js +0 -1
- package/build/plugins/color-picker/color-picker.js +0 -1
- package/build/plugins/emoji/emoji.css +0 -1
- package/build/plugins/emoji/emoji.es5.css +0 -1
- package/build/plugins/emoji/emoji.es5.js +0 -1
- package/build/plugins/emoji/emoji.js +0 -1
- package/build/plugins/export-docs/export-docs.es5.js +0 -1
- package/build/plugins/export-docs/export-docs.js +0 -1
- package/build/plugins/finder/finder.css +0 -1
- package/build/plugins/finder/finder.es5.css +0 -1
- package/build/plugins/finder/finder.es5.js +0 -1
- package/build/plugins/finder/finder.js +0 -1
- package/build/plugins/google-maps/google-maps.css +0 -1
- package/build/plugins/google-maps/google-maps.es5.css +0 -1
- package/build/plugins/google-maps/google-maps.es5.js +0 -1
- package/build/plugins/google-maps/google-maps.js +0 -1
- package/build/plugins/google-search/google-search.es5.js +0 -1
- package/build/plugins/google-search/google-search.js +0 -1
- package/build/plugins/highlight-signature/highlight-signature.es5.js +0 -1
- package/build/plugins/highlight-signature/highlight-signature.js +0 -1
- package/build/plugins/iframe-editor/iframe-editor.es5.js +0 -1
- package/build/plugins/iframe-editor/iframe-editor.js +0 -1
- package/build/plugins/keyboard/keyboard.es5.js +0 -1
- package/build/plugins/keyboard/keyboard.js +0 -1
- package/build/plugins/mobile-view/mobile-view.css +0 -0
- package/build/plugins/mobile-view/mobile-view.es5.css +0 -0
- package/build/plugins/mobile-view/mobile-view.es5.js +0 -1
- package/build/plugins/mobile-view/mobile-view.js +0 -1
- package/build/plugins/page-break/page-break.css +0 -1
- package/build/plugins/page-break/page-break.es5.css +0 -1
- package/build/plugins/page-break/page-break.es5.js +0 -1
- package/build/plugins/page-break/page-break.js +0 -1
- package/build/plugins/paste-code/paste-code.es5.js +0 -1
- package/build/plugins/paste-code/paste-code.js +0 -1
- package/build/plugins/paste-from-word/paste-from-word.es5.js +0 -1
- package/build/plugins/paste-from-word/paste-from-word.js +0 -1
- package/build/plugins/show-blocks/show-blocks.es5.js +0 -1
- package/build/plugins/show-blocks/show-blocks.js +0 -1
- package/build/plugins/todo-list/todo-list.css +0 -1
- package/build/plugins/todo-list/todo-list.es5.css +0 -1
- package/build/plugins/todo-list/todo-list.es5.js +0 -1
- package/build/plugins/todo-list/todo-list.js +0 -1
- package/build/plugins/translate/translate.es5.js +0 -1
- package/build/plugins/translate/translate.js +0 -1
- package/build/plugins/tune-block/tune-block.es5.js +0 -1
- package/build/plugins/tune-block/tune-block.js +0 -1
- package/index.html +0 -268
- /package/{build/config.js → config.js} +0 -0
- /package/{build/plugins/autocomplete/autocomplete.css → es2015/plugins/autocomplete/autocomplete.min.css} +0 -0
- /package/{build/plugins/iframe-editor/iframe-editor.css → es2015/plugins/iframe-editor/iframe-editor.min.css} +0 -0
- /package/{build/plugins/keyboard/keyboard.css → es2015/plugins/keyboard/keyboard.min.css} +0 -0
- /package/{build/plugins/paste-code/paste-code.css → es2015/plugins/paste-code/paste-code.min.css} +0 -0
- /package/{build/plugins/translate/translate.css → es2015/plugins/translate/translate.min.css} +0 -0
- /package/{build/plugins/autocomplete/autocomplete.es5.css → es2018/plugins/autocomplete/autocomplete.min.css} +0 -0
- /package/{build/plugins/iframe-editor/iframe-editor.es5.css → es2018/plugins/iframe-editor/iframe-editor.min.css} +0 -0
- /package/{build/plugins/keyboard/keyboard.es5.css → es2018/plugins/keyboard/keyboard.min.css} +0 -0
- /package/{build/plugins/paste-code/paste-code.es5.css → es2018/plugins/paste-code/paste-code.min.css} +0 -0
- /package/{build/plugins/translate/translate.es5.css → es2018/plugins/translate/translate.min.css} +0 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jodit-pro - PRO Version of Jodit Editor
|
|
3
|
+
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
+
* Version: v2.0.0-beta.10
|
|
5
|
+
* Url: https://xdsoft.net/jodit/pro/
|
|
6
|
+
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory();
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define([], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = factory();
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(self, function() {
|
|
19
|
+
return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[81],{
|
|
20
|
+
|
|
21
|
+
/***/ 9026:
|
|
22
|
+
/***/ (function(module) {
|
|
23
|
+
|
|
24
|
+
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M13.98 22L6 30l7.98 8v-6H28v-4H13.98v-6zM42 18l-7.98-8v6H20v4h14.02v6L42 18z\"/> <path d=\"M0 0h48v48H0z\" fill=\"none\"/> </svg>"
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
27
|
+
|
|
28
|
+
/***/ 70134:
|
|
29
|
+
/***/ (function(module) {
|
|
30
|
+
|
|
31
|
+
module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z\"/> <path d=\"M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z\"/> </svg>"
|
|
32
|
+
|
|
33
|
+
/***/ }),
|
|
34
|
+
|
|
35
|
+
/***/ 50461:
|
|
36
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
37
|
+
|
|
38
|
+
"use strict";
|
|
39
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77628);
|
|
40
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10503);
|
|
41
|
+
/*!
|
|
42
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
43
|
+
* See LICENSE.md in the project root for license information.
|
|
44
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.translate = {
|
|
49
|
+
hotkeys: {
|
|
50
|
+
translateSelection: ['ctrl+shift+o', 'cmd+shift+o'],
|
|
51
|
+
translateOptions: ['ctrl+shift+p', 'cmd+shift+p']
|
|
52
|
+
},
|
|
53
|
+
provider: 'google',
|
|
54
|
+
googleProviderOptions: {
|
|
55
|
+
url: 'https://translation.googleapis.com/language/translate/v2',
|
|
56
|
+
key: ''
|
|
57
|
+
},
|
|
58
|
+
defaultSourceLang: '',
|
|
59
|
+
defaultTargetLang: 'de'
|
|
60
|
+
};
|
|
61
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.translate = {
|
|
62
|
+
translate: {
|
|
63
|
+
tooltip: 'Translate selected text',
|
|
64
|
+
icon: 'translate',
|
|
65
|
+
command: 'translate',
|
|
66
|
+
exec(editor) {
|
|
67
|
+
editor.execCommand('translate');
|
|
68
|
+
},
|
|
69
|
+
list: ['Options'],
|
|
70
|
+
childExec(editor, _, { control }) {
|
|
71
|
+
editor.execCommand('translate' + control.name);
|
|
72
|
+
},
|
|
73
|
+
mods: {
|
|
74
|
+
stroke: false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon.set */ .J.set('translate', __webpack_require__(70134)).set('translate-swap', __webpack_require__(9026));
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/***/ }),
|
|
82
|
+
|
|
83
|
+
/***/ 88987:
|
|
84
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
85
|
+
|
|
86
|
+
"use strict";
|
|
87
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
88
|
+
/* harmony export */ "A": function() { return /* binding */ GoogleTranslateProvider; }
|
|
89
|
+
/* harmony export */ });
|
|
90
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52378);
|
|
91
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0__);
|
|
92
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11612);
|
|
93
|
+
/* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89569);
|
|
94
|
+
/*!
|
|
95
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
96
|
+
* See LICENSE.md in the project root for license information.
|
|
97
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class GoogleTranslateProvider {
|
|
103
|
+
constructor(jodit) {
|
|
104
|
+
this.jodit = jodit;
|
|
105
|
+
}
|
|
106
|
+
__fetch(command, data = {}) {
|
|
107
|
+
const opt = this.jodit.o.translate.googleProviderOptions;
|
|
108
|
+
void 0;
|
|
109
|
+
return this.jodit
|
|
110
|
+
.fetch(opt.url + '?key=' + opt.key, {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
data: {
|
|
113
|
+
...data,
|
|
114
|
+
ui: this.jodit.o.language
|
|
115
|
+
},
|
|
116
|
+
contentType: 'application/json; charset=utf-8',
|
|
117
|
+
withCredentials: false
|
|
118
|
+
})
|
|
119
|
+
.then((resp) => resp.json())
|
|
120
|
+
.catch((resp) => {
|
|
121
|
+
try {
|
|
122
|
+
this.jodit.message.error(resp.json().message);
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
126
|
+
console.error(e);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
translate(q, source, target) {
|
|
132
|
+
return this.__fetch('translate', {
|
|
133
|
+
q,
|
|
134
|
+
source,
|
|
135
|
+
target,
|
|
136
|
+
format: 'html'
|
|
137
|
+
}).then((resp) => {
|
|
138
|
+
return { text: resp.data.translations[0].translatedText };
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
supportedLanguages() {
|
|
142
|
+
return Promise.resolve({
|
|
143
|
+
langs: _languages__WEBPACK_IMPORTED_MODULE_2__/* .languages */ .M
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/***/ }),
|
|
150
|
+
|
|
151
|
+
/***/ 89569:
|
|
152
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
153
|
+
|
|
154
|
+
"use strict";
|
|
155
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
156
|
+
/* harmony export */ "M": function() { return /* binding */ languages; }
|
|
157
|
+
/* harmony export */ });
|
|
158
|
+
/*!
|
|
159
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
160
|
+
* See LICENSE.md in the project root for license information.
|
|
161
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
162
|
+
*/
|
|
163
|
+
const languages = {
|
|
164
|
+
Afrikaans: 'af',
|
|
165
|
+
Albanian: 'sq',
|
|
166
|
+
Amharic: 'am',
|
|
167
|
+
Arabic: 'ar',
|
|
168
|
+
Armenian: 'hy',
|
|
169
|
+
'Assamese*': 'as',
|
|
170
|
+
'Aymara*': 'ay',
|
|
171
|
+
Azerbaijani: 'az',
|
|
172
|
+
'Bambara*': 'bm',
|
|
173
|
+
Basque: 'eu',
|
|
174
|
+
Belarusian: 'be',
|
|
175
|
+
Bengali: 'bn',
|
|
176
|
+
'Bhojpuri*': 'bho',
|
|
177
|
+
Bosnian: 'bs',
|
|
178
|
+
Bulgarian: 'bg',
|
|
179
|
+
Catalan: 'ca',
|
|
180
|
+
Cebuano: 'ceb',
|
|
181
|
+
'Chinese (Simplified)': 'zh-CN',
|
|
182
|
+
'Chinese (Traditional)': 'zh-TW',
|
|
183
|
+
Corsican: 'co',
|
|
184
|
+
Croatian: 'hr',
|
|
185
|
+
Czech: 'cs',
|
|
186
|
+
Danish: 'da',
|
|
187
|
+
'Dhivehi*': 'dv',
|
|
188
|
+
'Dogri*': 'doi',
|
|
189
|
+
Dutch: 'nl',
|
|
190
|
+
English: 'en',
|
|
191
|
+
Esperanto: 'eo',
|
|
192
|
+
Estonian: 'et',
|
|
193
|
+
'Ewe*': 'ee',
|
|
194
|
+
'Filipino (Tagalog)': 'fil',
|
|
195
|
+
Finnish: 'fi',
|
|
196
|
+
French: 'fr',
|
|
197
|
+
Frisian: 'fy',
|
|
198
|
+
Galician: 'gl',
|
|
199
|
+
Georgian: 'ka',
|
|
200
|
+
German: 'de',
|
|
201
|
+
Greek: 'el',
|
|
202
|
+
'Guarani*': 'gn',
|
|
203
|
+
Gujarati: 'gu',
|
|
204
|
+
'Haitian Creole': 'ht',
|
|
205
|
+
Hausa: 'ha',
|
|
206
|
+
Hawaiian: 'haw',
|
|
207
|
+
Hebrew: 'he',
|
|
208
|
+
Hindi: 'hi',
|
|
209
|
+
Hmong: 'hmn',
|
|
210
|
+
Hungarian: 'hu',
|
|
211
|
+
Icelandic: 'is',
|
|
212
|
+
Igbo: 'ig',
|
|
213
|
+
'Ilocano*': 'ilo',
|
|
214
|
+
Indonesian: 'id',
|
|
215
|
+
Irish: 'ga',
|
|
216
|
+
Italian: 'it',
|
|
217
|
+
Japanese: 'ja',
|
|
218
|
+
Kannada: 'kn',
|
|
219
|
+
Kazakh: 'kk',
|
|
220
|
+
Khmer: 'km',
|
|
221
|
+
Kinyarwanda: 'rw',
|
|
222
|
+
'Konkani*': 'gom',
|
|
223
|
+
Korean: 'ko',
|
|
224
|
+
'Krio*': 'kri',
|
|
225
|
+
Kurdish: 'ku',
|
|
226
|
+
'Kurdish (Sorani)*': 'ckb',
|
|
227
|
+
Kyrgyz: 'ky',
|
|
228
|
+
Lao: 'lo',
|
|
229
|
+
Latin: 'la',
|
|
230
|
+
Latvian: 'lv',
|
|
231
|
+
'Lingala*': 'ln',
|
|
232
|
+
Lithuanian: 'lt',
|
|
233
|
+
'Luganda*': 'lg',
|
|
234
|
+
Luxembourgish: 'lb',
|
|
235
|
+
Macedonian: 'mk',
|
|
236
|
+
'Maithili*': 'mai',
|
|
237
|
+
Malagasy: 'mg',
|
|
238
|
+
Malay: 'ms',
|
|
239
|
+
Malayalam: 'ml',
|
|
240
|
+
Maltese: 'mt',
|
|
241
|
+
Maori: 'mi',
|
|
242
|
+
Marathi: 'mr',
|
|
243
|
+
'Meiteilon (Manipuri)*': 'mni-Mtei',
|
|
244
|
+
Mizo: 'lus',
|
|
245
|
+
Mongolian: 'mn',
|
|
246
|
+
'Myanmar (Burmese)': 'my',
|
|
247
|
+
Nepali: 'ne',
|
|
248
|
+
Norwegian: 'no',
|
|
249
|
+
'Nyanja (Chichewa)': 'ny',
|
|
250
|
+
'Odia (Oriya)': 'or',
|
|
251
|
+
'Oromo*': 'om',
|
|
252
|
+
Pashto: 'ps',
|
|
253
|
+
Persian: 'fa',
|
|
254
|
+
Polish: 'pl',
|
|
255
|
+
Portuguese: 'pt',
|
|
256
|
+
Punjabi: 'pa',
|
|
257
|
+
'Quechua*': 'qu',
|
|
258
|
+
Romanian: 'ro',
|
|
259
|
+
Russian: 'ru',
|
|
260
|
+
Samoan: 'sm',
|
|
261
|
+
'Sanskrit*': 'sa',
|
|
262
|
+
'Scots Gaelic': 'gd',
|
|
263
|
+
'Sepedi*': 'nso',
|
|
264
|
+
Serbian: 'sr',
|
|
265
|
+
Sesotho: 'st',
|
|
266
|
+
Shona: 'sn',
|
|
267
|
+
Sindhi: 'sd',
|
|
268
|
+
'Sinhala (Sinhalese)': 'si',
|
|
269
|
+
Slovak: 'sk',
|
|
270
|
+
Slovenian: 'sl',
|
|
271
|
+
Somali: 'so',
|
|
272
|
+
Spanish: 'es',
|
|
273
|
+
Sundanese: 'su',
|
|
274
|
+
Swahili: 'sw',
|
|
275
|
+
Swedish: 'sv',
|
|
276
|
+
'Tagalog (Filipino)': 'tl',
|
|
277
|
+
Tajik: 'tg',
|
|
278
|
+
Tamil: 'ta',
|
|
279
|
+
Tatar: 'tt',
|
|
280
|
+
Telugu: 'te',
|
|
281
|
+
Thai: 'th',
|
|
282
|
+
'Tigrinya*': 'ti',
|
|
283
|
+
'Tsonga*': 'ts',
|
|
284
|
+
Turkish: 'tr',
|
|
285
|
+
Turkmen: 'tk',
|
|
286
|
+
'Twi (Akan)*': 'ak',
|
|
287
|
+
Ukrainian: 'uk',
|
|
288
|
+
Urdu: 'ur',
|
|
289
|
+
Uyghur: 'ug',
|
|
290
|
+
Uzbek: 'uz',
|
|
291
|
+
Vietnamese: 'vi',
|
|
292
|
+
Welsh: 'cy',
|
|
293
|
+
Xhosa: 'xh',
|
|
294
|
+
Yiddish: 'yi',
|
|
295
|
+
Yoruba: 'yo',
|
|
296
|
+
Zulu: 'zu'
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
/***/ }),
|
|
301
|
+
|
|
302
|
+
/***/ 46753:
|
|
303
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
304
|
+
|
|
305
|
+
"use strict";
|
|
306
|
+
__webpack_require__.r(__webpack_exports__);
|
|
307
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
308
|
+
/* harmony export */ "Translate": function() { return /* binding */ Translate; }
|
|
309
|
+
/* harmony export */ });
|
|
310
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(97582);
|
|
311
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7324);
|
|
312
|
+
/* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88292);
|
|
313
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52378);
|
|
314
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
315
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4682);
|
|
316
|
+
/* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3262);
|
|
317
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50526);
|
|
318
|
+
/* harmony import */ var _providers_google_google__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88987);
|
|
319
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50461);
|
|
320
|
+
/* harmony import */ var _ui_settings_settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16874);
|
|
321
|
+
/* harmony import */ var jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53025);
|
|
322
|
+
/*!
|
|
323
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
324
|
+
* See LICENSE.md in the project root for license information.
|
|
325
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class Translate extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */ .S {
|
|
340
|
+
constructor() {
|
|
341
|
+
super(...arguments);
|
|
342
|
+
this.buttons = [
|
|
343
|
+
{
|
|
344
|
+
name: 'translate.translate',
|
|
345
|
+
group: 'insert'
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
this.state = {
|
|
349
|
+
sourceLang: this.jodit.o.translate.defaultSourceLang || 'en',
|
|
350
|
+
targetLang: this.jodit.o.translate.defaultTargetLang
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
__getProvider() {
|
|
354
|
+
const { provider } = this.jodit.options.translate;
|
|
355
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__/* .isString */ .H)(provider)) {
|
|
356
|
+
switch (provider) {
|
|
357
|
+
case 'google':
|
|
358
|
+
return new _providers_google_google__WEBPACK_IMPORTED_MODULE_4__/* .GoogleTranslateProvider */ .A(this.j);
|
|
359
|
+
default:
|
|
360
|
+
throw new Error('Unknown provider');
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
void 0;
|
|
364
|
+
return provider(this.jodit);
|
|
365
|
+
}
|
|
366
|
+
afterInit(jodit) {
|
|
367
|
+
const defaultLanguage = (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_9__/* .defaultLanguage */ .X)(jodit.o.language, _JoditPro__WEBPACK_IMPORTED_MODULE_1__/* .JoditPro.defaultOptions.language */ .y.defaultOptions.language), language = (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_9__/* .defaultLanguage */ .X)(jodit.o.language, defaultLanguage);
|
|
368
|
+
const provider = this.__getProvider();
|
|
369
|
+
jodit
|
|
370
|
+
.registerCommand('translateOptions', {
|
|
371
|
+
exec: async () => {
|
|
372
|
+
let newState = this.state;
|
|
373
|
+
const dlg = jodit.dlg();
|
|
374
|
+
dlg.setHeader('Translate options');
|
|
375
|
+
const langs = await provider.supportedLanguages();
|
|
376
|
+
const settings = new _ui_settings_settings__WEBPACK_IMPORTED_MODULE_6__/* .UITranslateSettings */ .h(dlg, this.state, {
|
|
377
|
+
sourceList: langs.langs,
|
|
378
|
+
targetList: langs.langs,
|
|
379
|
+
onChange(state) {
|
|
380
|
+
newState = state;
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
dlg.setContent(settings);
|
|
384
|
+
dlg.setFooter([
|
|
385
|
+
(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_7__/* .Button */ .zx)(jodit, 'cancel', 'Cancel').onAction(() => dlg.close()),
|
|
386
|
+
(0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_7__/* .Button */ .zx)(jodit, 'ok', 'Save', 'primary').onAction(() => {
|
|
387
|
+
this.state = newState;
|
|
388
|
+
dlg.close();
|
|
389
|
+
})
|
|
390
|
+
]);
|
|
391
|
+
settings.bindDestruct(dlg);
|
|
392
|
+
dlg.setSize(500, 400).open(true);
|
|
393
|
+
},
|
|
394
|
+
hotkeys: jodit.o.translate.hotkeys.translateOptions
|
|
395
|
+
})
|
|
396
|
+
.registerCommand('translate', {
|
|
397
|
+
exec: () => {
|
|
398
|
+
const selection = jodit.s.html;
|
|
399
|
+
if (!selection) {
|
|
400
|
+
jodit.message.error('Select text for translate');
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
return provider
|
|
404
|
+
.translate(selection, !this.state.sourceLang ||
|
|
405
|
+
this.state.sourceLang === 'auto'
|
|
406
|
+
? language
|
|
407
|
+
: this.state.sourceLang, this.state.targetLang)
|
|
408
|
+
.then((response) => {
|
|
409
|
+
const range = jodit.s.range;
|
|
410
|
+
range.deleteContents();
|
|
411
|
+
jodit.s.insertNode(jodit.createInside.text(response.text));
|
|
412
|
+
})
|
|
413
|
+
.catch((error) => {
|
|
414
|
+
jodit.message.error((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__/* .isString */ .H)(error) ? error : error.message);
|
|
415
|
+
});
|
|
416
|
+
},
|
|
417
|
+
hotkeys: jodit.o.translate.hotkeys.translateSelection
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
beforeDestruct(jodit) { }
|
|
421
|
+
}
|
|
422
|
+
Translate.requires = ['license'];
|
|
423
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .gn)([
|
|
424
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_3__.persistent
|
|
425
|
+
], Translate.prototype, "state", void 0);
|
|
426
|
+
_JoditPro__WEBPACK_IMPORTED_MODULE_1__/* .JoditPro.plugins.add */ .y.plugins.add('translate', Translate);
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
/***/ }),
|
|
430
|
+
|
|
431
|
+
/***/ 48458:
|
|
432
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
433
|
+
|
|
434
|
+
"use strict";
|
|
435
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
436
|
+
/* harmony export */ "r": function() { return /* binding */ UITranslateList; }
|
|
437
|
+
/* harmony export */ });
|
|
438
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97582);
|
|
439
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84789);
|
|
440
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
441
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44913);
|
|
442
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77233);
|
|
443
|
+
/* harmony import */ var jodit_core_ui_form_inputs_input_input__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77902);
|
|
444
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
|
|
445
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11612);
|
|
446
|
+
/*!
|
|
447
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
448
|
+
* See LICENSE.md in the project root for license information.
|
|
449
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
450
|
+
*/
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
let UITranslateList = class UITranslateList extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u {
|
|
461
|
+
className() {
|
|
462
|
+
return 'UITranslateList';
|
|
463
|
+
}
|
|
464
|
+
get items() {
|
|
465
|
+
return this.getElms('item');
|
|
466
|
+
}
|
|
467
|
+
render(options) {
|
|
468
|
+
const list = [];
|
|
469
|
+
Object.keys(options.list)
|
|
470
|
+
.sort()
|
|
471
|
+
.forEach((lang) => {
|
|
472
|
+
const key = options.list[lang];
|
|
473
|
+
list.push(`<a role='button' tabindex='0' class='&__item' data-lang='${key}'>
|
|
474
|
+
<span class='&__item-key'>${key}</span>
|
|
475
|
+
<span class='&__item-title'>${this.j.i18n(lang)}</span>
|
|
476
|
+
</a>`);
|
|
477
|
+
});
|
|
478
|
+
return `<div class='&'>
|
|
479
|
+
<div class='&__input'></div>
|
|
480
|
+
<div class='&__list'>${list.join('')}</div>
|
|
481
|
+
</div>`;
|
|
482
|
+
}
|
|
483
|
+
constructor(jodit, options) {
|
|
484
|
+
super(jodit, options);
|
|
485
|
+
this.options = options;
|
|
486
|
+
this.state = {
|
|
487
|
+
active: ''
|
|
488
|
+
};
|
|
489
|
+
this.state.active = options.active;
|
|
490
|
+
const input = new jodit_core_ui_form_inputs_input_input__WEBPACK_IMPORTED_MODULE_4__/* .UIInput */ .u(jodit, {
|
|
491
|
+
placeholder: jodit.i18n('Filter'),
|
|
492
|
+
icon: 'search',
|
|
493
|
+
onChange: this.__onChangeFilter,
|
|
494
|
+
clearButton: true
|
|
495
|
+
});
|
|
496
|
+
this.getElm('input')?.appendChild(input.container);
|
|
497
|
+
this.__onActiveChange();
|
|
498
|
+
}
|
|
499
|
+
__onChangeFilter(value) {
|
|
500
|
+
this.items.forEach((elm) => {
|
|
501
|
+
const key = elm.textContent?.toLowerCase() ?? '';
|
|
502
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .L)(elm, 'data-hidden', (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .L)(elm, 'data-active') !== 'true' &&
|
|
503
|
+
!key.includes(value.toLowerCase()));
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
__scrollToActive() {
|
|
507
|
+
const active = this.container.querySelector('[data-active="true"]');
|
|
508
|
+
const list = this.getElm('list');
|
|
509
|
+
active && list && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.scrollIntoViewIfNeeded)(active, list, this.j.od);
|
|
510
|
+
}
|
|
511
|
+
onClickItem(e) {
|
|
512
|
+
if (e.type === 'keydown' && 'key' in e && e.key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_ENTER) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
const target = e.target;
|
|
516
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom.isHTMLElement */ .i.isHTMLElement(target) && target.getAttribute('data-lang')) {
|
|
517
|
+
const newValue = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .L)(target, 'data-lang');
|
|
518
|
+
this.options.onChange(newValue);
|
|
519
|
+
this.state.active = newValue;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
__onActiveChange() {
|
|
523
|
+
this.items.forEach((elm) => (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .L)(elm, 'data-active', (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .L)(elm, 'data-lang') === this.state.active));
|
|
524
|
+
this.__scrollToActive();
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
528
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
529
|
+
], UITranslateList.prototype, "__onChangeFilter", null);
|
|
530
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
531
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterOpen')
|
|
532
|
+
], UITranslateList.prototype, "__scrollToActive", null);
|
|
533
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
534
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:click', 'container:keydown'])
|
|
535
|
+
], UITranslateList.prototype, "onClickItem", null);
|
|
536
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
537
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.active'),
|
|
538
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
539
|
+
], UITranslateList.prototype, "__onActiveChange", null);
|
|
540
|
+
UITranslateList = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
541
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
542
|
+
], UITranslateList);
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
/***/ }),
|
|
546
|
+
|
|
547
|
+
/***/ 16874:
|
|
548
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
549
|
+
|
|
550
|
+
"use strict";
|
|
551
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
552
|
+
/* harmony export */ "h": function() { return /* binding */ UITranslateSettings; }
|
|
553
|
+
/* harmony export */ });
|
|
554
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
555
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
556
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
557
|
+
/* harmony import */ var _list_list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48458);
|
|
558
|
+
/*!
|
|
559
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
560
|
+
* See LICENSE.md in the project root for license information.
|
|
561
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
562
|
+
*/
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
let UITranslateSettings = class UITranslateSettings extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
|
|
569
|
+
className() {
|
|
570
|
+
return 'UITranslateSettings';
|
|
571
|
+
}
|
|
572
|
+
render() {
|
|
573
|
+
return `<div>
|
|
574
|
+
<div class='&__list &__source-list'></div>
|
|
575
|
+
<div class='&__arrow'>
|
|
576
|
+
<a class='&__arrow-swap'>*translate-swap*</a>
|
|
577
|
+
</div>
|
|
578
|
+
<div class='&__list &__target-list'></div>
|
|
579
|
+
</div>`;
|
|
580
|
+
}
|
|
581
|
+
constructor(jodit, state, options) {
|
|
582
|
+
super(jodit);
|
|
583
|
+
this.state = state;
|
|
584
|
+
this.options = options;
|
|
585
|
+
this.__sourceList = new _list_list__WEBPACK_IMPORTED_MODULE_2__/* .UITranslateList */ .r(jodit, {
|
|
586
|
+
list: options.sourceList,
|
|
587
|
+
active: state.sourceLang,
|
|
588
|
+
onChange: (lang) => {
|
|
589
|
+
this.state.sourceLang = lang;
|
|
590
|
+
this.options.onChange({
|
|
591
|
+
...this.state
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
this.getElm('source-list')?.appendChild(this.__sourceList.container);
|
|
596
|
+
this.__targetList = new _list_list__WEBPACK_IMPORTED_MODULE_2__/* .UITranslateList */ .r(jodit, {
|
|
597
|
+
list: options.targetList,
|
|
598
|
+
active: state.targetLang,
|
|
599
|
+
onChange: (lang) => {
|
|
600
|
+
this.state.targetLang = lang;
|
|
601
|
+
this.options.onChange({
|
|
602
|
+
...this.state
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
this.getElm('target-list')?.appendChild(this.__targetList.container);
|
|
607
|
+
}
|
|
608
|
+
__onSwap() {
|
|
609
|
+
const tmp = this.state.sourceLang;
|
|
610
|
+
this.state.sourceLang = this.state.targetLang;
|
|
611
|
+
this.state.targetLang = tmp;
|
|
612
|
+
this.__sourceList.state.active = this.state.sourceLang;
|
|
613
|
+
this.__targetList.state.active = this.state.targetLang;
|
|
614
|
+
this.options.onChange({
|
|
615
|
+
...this.state
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
620
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('arrow-swap:click')
|
|
621
|
+
], UITranslateSettings.prototype, "__onSwap", null);
|
|
622
|
+
UITranslateSettings = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
623
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
624
|
+
], UITranslateSettings);
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
/***/ })
|
|
628
|
+
|
|
629
|
+
},
|
|
630
|
+
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
|
631
|
+
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
632
|
+
/******/ var __webpack_exports__ = (__webpack_exec__(46753));
|
|
633
|
+
/******/ return __webpack_exports__;
|
|
634
|
+
/******/ }
|
|
635
|
+
]);
|
|
636
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.jodit-ui-translate-settings{display:flex;height:100%;justify-content:stretch;min-height:300px;padding:var(--jd-padding-default) var(--jd-padding-default) 0}.jodit-ui-translate-settings__arrow{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:30px}.jodit-ui-translate-settings__arrow a{display:block;width:100%}.jodit-ui-translate-settings__arrow svg{fill:var(--jd-color-background-gray);cursor:pointer;transition:transform .2s linear}.jodit-ui-translate-settings__arrow svg:hover{fill:var(--jd-color-background-active)}.jodit-ui-translate-settings__arrow svg:active{transform:scale(1.15)}.jodit-ui-translate-settings__list{width:calc(50% - 15px)}.jodit-ui-translate-list{display:flex;flex-direction:column;height:100%}.jodit-ui-translate-list__list{border:1px solid var(--jd-color-border);box-sizing:border-box;cursor:pointer;flex:1;flex-wrap:nowrap;font-size:14px;overflow:auto}.jodit-ui-translate-list__item{color:var(--jd-color-gray-dark);display:flex;line-height:16px}.jodit-ui-translate-list__item:hover,.jodit-ui-translate-list__item[data-active=true]{background-color:var(--jd-color-background-active);color:#fff}.jodit-ui-translate-list__item:focus{outline:2px solid var(--jd-color-background-active)}.jodit-ui-translate-list__item[data-hidden=true]{display:none}.jodit-ui-translate-list__item-key{background-color:var(--jd-color-background-light-gray);box-sizing:border-box;flex:0 0 40px;font-size:13px;padding:7px 5px;pointer-events:none;text-align:center}.jodit-ui-translate-list__item:hover .jodit-ui-translate-list__item-key,.jodit-ui-translate-list__item[data-active=true] .jodit-ui-translate-list__item-key{background-color:var(--jd-color-background-active)}.jodit-ui-translate-list__item-title{flex:1 1 auto;padding:7px;pointer-events:none}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jodit-pro - PRO Version of Jodit Editor
|
|
3
|
+
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
+
* Version: v2.0.0-beta.10
|
|
5
|
+
* Url: https://xdsoft.net/jodit/pro/
|
|
6
|
+
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var a=e();for(var s in a)("object"==typeof exports?exports:t)[s]=a[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[81],{9026(t){t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M13.98 22L6 30l7.98 8v-6H28v-4H13.98v-6zM42 18l-7.98-8v6H20v4h14.02v6L42 18z"/> <path d="M0 0h48v48H0z" fill="none"/> </svg>'},70134(t){t.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/> <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/> </svg>'},50461(t,e,a){"use strict";var s=a(77628),n=a(10503);s.Config.prototype.translate={hotkeys:{translateSelection:["ctrl+shift+o","cmd+shift+o"],translateOptions:["ctrl+shift+p","cmd+shift+p"]},provider:"google",googleProviderOptions:{url:"https://translation.googleapis.com/language/translate/v2",key:""},defaultSourceLang:"",defaultTargetLang:"de"},s.Config.prototype.controls.translate={translate:{tooltip:"Translate selected text",icon:"translate",command:"translate",exec(t){t.execCommand("translate")},list:["Options"],childExec(t,e,{control:a}){t.execCommand("translate"+a.name)},mods:{stroke:!1}}},n.J.set("translate",a(70134)).set("translate-swap",a(9026))},88987(t,e,a){"use strict";a.d(e,{A(){return n}}),a(52378),a(11612);var s=a(89569);class n{constructor(t){this.jodit=t}__fetch(t,e={}){const a=this.jodit.o.translate.googleProviderOptions;return this.jodit.fetch(a.url+"?key="+a.key,{method:"POST",data:{...e,ui:this.jodit.o.language},contentType:"application/json; charset=utf-8",withCredentials:!1}).then((t=>t.json())).catch((t=>{try{this.jodit.message.error(t.json().message)}catch(t){}}))}translate(t,e,a){return this.__fetch("translate",{q:t,source:e,target:a,format:"html"}).then((t=>({text:t.data.translations[0].translatedText})))}supportedLanguages(){return Promise.resolve({langs:s.M})}}},89569(t,e,a){"use strict";a.d(e,{M(){return s}});const s={Afrikaans:"af",Albanian:"sq",Amharic:"am",Arabic:"ar",Armenian:"hy","Assamese*":"as","Aymara*":"ay",Azerbaijani:"az","Bambara*":"bm",Basque:"eu",Belarusian:"be",Bengali:"bn","Bhojpuri*":"bho",Bosnian:"bs",Bulgarian:"bg",Catalan:"ca",Cebuano:"ceb","Chinese (Simplified)":"zh-CN","Chinese (Traditional)":"zh-TW",Corsican:"co",Croatian:"hr",Czech:"cs",Danish:"da","Dhivehi*":"dv","Dogri*":"doi",Dutch:"nl",English:"en",Esperanto:"eo",Estonian:"et","Ewe*":"ee","Filipino (Tagalog)":"fil",Finnish:"fi",French:"fr",Frisian:"fy",Galician:"gl",Georgian:"ka",German:"de",Greek:"el","Guarani*":"gn",Gujarati:"gu","Haitian Creole":"ht",Hausa:"ha",Hawaiian:"haw",Hebrew:"he",Hindi:"hi",Hmong:"hmn",Hungarian:"hu",Icelandic:"is",Igbo:"ig","Ilocano*":"ilo",Indonesian:"id",Irish:"ga",Italian:"it",Japanese:"ja",Kannada:"kn",Kazakh:"kk",Khmer:"km",Kinyarwanda:"rw","Konkani*":"gom",Korean:"ko","Krio*":"kri",Kurdish:"ku","Kurdish (Sorani)*":"ckb",Kyrgyz:"ky",Lao:"lo",Latin:"la",Latvian:"lv","Lingala*":"ln",Lithuanian:"lt","Luganda*":"lg",Luxembourgish:"lb",Macedonian:"mk","Maithili*":"mai",Malagasy:"mg",Malay:"ms",Malayalam:"ml",Maltese:"mt",Maori:"mi",Marathi:"mr","Meiteilon (Manipuri)*":"mni-Mtei",Mizo:"lus",Mongolian:"mn","Myanmar (Burmese)":"my",Nepali:"ne",Norwegian:"no","Nyanja (Chichewa)":"ny","Odia (Oriya)":"or","Oromo*":"om",Pashto:"ps",Persian:"fa",Polish:"pl",Portuguese:"pt",Punjabi:"pa","Quechua*":"qu",Romanian:"ro",Russian:"ru",Samoan:"sm","Sanskrit*":"sa","Scots Gaelic":"gd","Sepedi*":"nso",Serbian:"sr",Sesotho:"st",Shona:"sn",Sindhi:"sd","Sinhala (Sinhalese)":"si",Slovak:"sk",Slovenian:"sl",Somali:"so",Spanish:"es",Sundanese:"su",Swahili:"sw",Swedish:"sv","Tagalog (Filipino)":"tl",Tajik:"tg",Tamil:"ta",Tatar:"tt",Telugu:"te",Thai:"th","Tigrinya*":"ti","Tsonga*":"ts",Turkish:"tr",Turkmen:"tk","Twi (Akan)*":"ak",Ukrainian:"uk",Urdu:"ur",Uyghur:"ug",Uzbek:"uz",Vietnamese:"vi",Welsh:"cy",Xhosa:"xh",Yiddish:"yi",Yoruba:"yo",Zulu:"zu"}},46753(t,e,a){"use strict";a.r(e),a.d(e,{Translate(){return u}});var s=a(97582),n=a(7324),i=a(88292),o=(a(52378),a(4682)),r=a(3262),l=a(50526),c=a(88987),h=(a(50461),a(16874)),g=a(53025);class u extends n.S{constructor(){super(...arguments),this.buttons=[{name:"translate.translate",group:"insert"}],this.state={sourceLang:this.jodit.o.translate.defaultSourceLang||"en",targetLang:this.jodit.o.translate.defaultTargetLang}}__getProvider(){const{provider:t}=this.jodit.options.translate;if((0,o.H)(t)){if("google"===t)return new c.A(this.j);throw Error("Unknown provider")}return t(this.jodit)}afterInit(t){const e=(0,r.X)(t.o.language,i.y.defaultOptions.language),a=(0,r.X)(t.o.language,e),s=this.__getProvider();t.registerCommand("translateOptions",{exec:async()=>{let e=this.state;const a=t.dlg();a.setHeader("Translate options");const n=await s.supportedLanguages(),i=new h.h(a,this.state,{sourceList:n.langs,targetList:n.langs,onChange(t){e=t}});a.setContent(i),a.setFooter([(0,g.zx)(t,"cancel","Cancel").onAction((()=>a.close())),(0,g.zx)(t,"ok","Save","primary").onAction((()=>{this.state=e,a.close()}))]),i.bindDestruct(a),a.setSize(500,400).open(!0)},hotkeys:t.o.translate.hotkeys.translateOptions}).registerCommand("translate",{exec:()=>{const e=t.s.html;if(e)return s.translate(e,this.state.sourceLang&&"auto"!==this.state.sourceLang?this.state.sourceLang:a,this.state.targetLang).then((e=>{t.s.range.deleteContents(),t.s.insertNode(t.createInside.text(e.text))})).catch((e=>{t.message.error((0,o.H)(e)?e:e.message)}));t.message.error("Select text for translate")},hotkeys:t.o.translate.hotkeys.translateSelection})}beforeDestruct(t){}}u.requires=["license"],(0,s.gn)([l.persistent],u.prototype,"state",void 0),i.y.plugins.add("translate",u)},48458(t,e,a){"use strict";a.d(e,{r(){return g}});var s=a(97582),n=a(84789),i=a(50526),o=a(44913),r=a(77233),l=a(77902),c=a(95582),h=a(11612);let g=class t extends n.u{className(){return"UITranslateList"}get items(){return this.getElms("item")}render(t){const e=[];return Object.keys(t.list).sort().forEach((a=>{const s=t.list[a];e.push(`<a role='button' tabindex='0' class='&__item' data-lang='${s}'>\n\t\t\t\t\t\t<span class='&__item-key'>${s}</span>\n\t\t\t\t\t\t<span class='&__item-title'>${this.j.i18n(a)}</span>\n\t\t\t\t\t</a>`)})),`<div class='&'>\n\t\t\t<div class='&__input'></div>\n\t\t\t<div class='&__list'>${e.join("")}</div>\n\t\t</div>`}constructor(t,e){super(t,e),this.options=e,this.state={active:""},this.state.active=e.active;const a=new l.u(t,{placeholder:t.i18n("Filter"),icon:"search",onChange:this.__onChangeFilter,clearButton:!0});this.getElm("input")?.appendChild(a.container),this.__onActiveChange()}__onChangeFilter(t){this.items.forEach((e=>{const a=e.textContent?.toLowerCase()??"";(0,r.L)(e,"data-hidden","true"!==(0,r.L)(e,"data-active")&&!a.includes(t.toLowerCase()))}))}__scrollToActive(){const t=this.container.querySelector('[data-active="true"]'),e=this.getElm("list");t&&e&&(0,c.scrollIntoViewIfNeeded)(t,e,this.j.od)}onClickItem(t){if("keydown"===t.type&&"key"in t&&t.key!==h.KEY_ENTER)return;const e=t.target;if(o.i.isHTMLElement(e)&&e.getAttribute("data-lang")){const t=(0,r.L)(e,"data-lang");this.options.onChange(t),this.state.active=t}}__onActiveChange(){this.items.forEach((t=>(0,r.L)(t,"data-active",(0,r.L)(t,"data-lang")===this.state.active))),this.__scrollToActive()}};(0,s.gn)([(0,i.debounce)()],g.prototype,"__onChangeFilter",null),(0,s.gn)([(0,i.watch)(":afterOpen")],g.prototype,"__scrollToActive",null),(0,s.gn)([(0,i.watch)(["container:click","container:keydown"])],g.prototype,"onClickItem",null),(0,s.gn)([(0,i.watch)("state.active"),(0,i.debounce)()],g.prototype,"__onActiveChange",null),g=(0,s.gn)([i.component],g)},16874(t,e,a){"use strict";a.d(e,{h(){return r}});var s=a(97582),n=a(75004),i=a(50526),o=a(48458);let r=class t extends n.u1{className(){return"UITranslateSettings"}render(){return"<div>\n\t\t\t<div class='&__list &__source-list'></div>\n\t\t\t<div class='&__arrow'>\n\t\t\t\t<a class='&__arrow-swap'>*translate-swap*</a>\n\t\t\t</div>\n\t\t\t<div class='&__list &__target-list'></div>\n\t\t</div>"}constructor(t,e,a){super(t),this.state=e,this.options=a,this.__sourceList=new o.r(t,{list:a.sourceList,active:e.sourceLang,onChange:t=>{this.state.sourceLang=t,this.options.onChange({...this.state})}}),this.getElm("source-list")?.appendChild(this.__sourceList.container),this.__targetList=new o.r(t,{list:a.targetList,active:e.targetLang,onChange:t=>{this.state.targetLang=t,this.options.onChange({...this.state})}}),this.getElm("target-list")?.appendChild(this.__targetList.container)}__onSwap(){const t=this.state.sourceLang;this.state.sourceLang=this.state.targetLang,this.state.targetLang=t,this.__sourceList.state.active=this.state.sourceLang,this.__targetList.state.active=this.state.targetLang,this.options.onChange({...this.state})}};(0,s.gn)([(0,i.watch)("arrow-swap:click")],r.prototype,"__onSwap",null),r=(0,s.gn)([i.component],r)}},t=>t(t.s=46753)])}));
|