jodit-pro 4.12.26 → 4.12.32
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.css +1 -1
- package/es2015/jodit.fat.min.js +16 -14
- package/es2015/jodit.js +419 -122
- package/es2015/jodit.min.js +11 -11
- 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 +62 -0
- package/es2015/plugins/autocomplete/autocomplete.js +29 -2
- package/es2015/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2015/plugins/autocomplete/autocomplete.min.js +2 -2
- 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/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/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/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 +23 -2
- package/es2015/plugins/page-break/page-break.min.js +2 -2
- package/es2015/plugins/paste-code/paste-code.css +28 -1
- package/es2015/plugins/paste-code/paste-code.js +489 -64
- package/es2015/plugins/paste-code/paste-code.min.css +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +4 -2
- 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 +9 -1
- package/es2015/plugins/todo-list/todo-list.min.js +2 -2
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +16 -14
- package/es2018/jodit.min.js +11 -11
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2018/plugins/autocomplete/autocomplete.min.js +2 -2
- 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/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/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +2 -2
- package/es2018/plugins/paste-code/paste-code.min.css +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +4 -2
- 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 +2 -2
- 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.css +1 -1
- package/es2021/jodit.fat.min.js +19 -17
- package/es2021/jodit.js +418 -121
- package/es2021/jodit.min.js +14 -14
- 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 +62 -0
- package/es2021/plugins/autocomplete/autocomplete.js +29 -2
- package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021/plugins/autocomplete/autocomplete.min.js +2 -2
- 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/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/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/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 +23 -2
- package/es2021/plugins/page-break/page-break.min.js +2 -2
- package/es2021/plugins/paste-code/paste-code.css +28 -1
- package/es2021/plugins/paste-code/paste-code.js +488 -64
- package/es2021/plugins/paste-code/paste-code.min.css +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +4 -2
- 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 +9 -1
- package/es2021/plugins/todo-list/todo-list.min.js +2 -2
- 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.css +1 -1
- package/es2021.en/jodit.fat.min.js +31 -29
- package/es2021.en/jodit.js +418 -121
- package/es2021.en/jodit.min.js +14 -14
- 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 +62 -0
- package/es2021.en/plugins/autocomplete/autocomplete.js +29 -2
- package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +2 -2
- 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/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/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/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 +23 -2
- package/es2021.en/plugins/page-break/page-break.min.js +2 -2
- package/es2021.en/plugins/paste-code/paste-code.css +28 -1
- package/es2021.en/plugins/paste-code/paste-code.js +488 -64
- package/es2021.en/plugins/paste-code/paste-code.min.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +4 -2
- 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 +9 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +2 -2
- 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.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +565 -157
- 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 +62 -0
- package/es5/plugins/autocomplete/autocomplete.js +29 -2
- package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es5/plugins/autocomplete/autocomplete.min.js +2 -2
- 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/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/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/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 +23 -2
- package/es5/plugins/page-break/page-break.min.js +2 -2
- package/es5/plugins/paste-code/paste-code.css +28 -1
- package/es5/plugins/paste-code/paste-code.js +586 -66
- package/es5/plugins/paste-code/paste-code.min.css +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +2 -2
- 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 +9 -1
- package/es5/plugins/todo-list/todo-list.min.js +2 -2
- 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/esm/config.d.ts +6 -1
- package/esm/plugins/all.d.ts +1 -1
- package/esm/plugins/all.js +1 -1
- package/esm/plugins/autocomplete/autocomplete.d.ts +2 -26
- package/esm/plugins/autocomplete/autocomplete.impl.d.ts +31 -0
- package/esm/plugins/autocomplete/autocomplete.impl.js +1 -0
- package/esm/plugins/autocomplete/autocomplete.js +1 -1
- package/esm/plugins/index.d.ts +1 -1
- package/esm/plugins/index.js +1 -1
- package/esm/plugins/page-break/page-break.js +1 -1
- package/esm/plugins/paste-code/config.d.ts +6 -1
- package/esm/plugins/paste-code/config.js +1 -1
- package/esm/plugins/paste-code/helpers.d.ts +25 -0
- package/esm/plugins/paste-code/helpers.js +1 -0
- package/esm/plugins/paste-code/paste-code.d.ts +9 -0
- package/esm/plugins/paste-code/paste-code.js +1 -1
- package/esm/plugins/paste-code/ui/code-tuner/code-tuner.d.ts +87 -0
- package/esm/plugins/paste-code/ui/code-tuner/code-tuner.js +3 -0
- package/esm/plugins/paste-code/ui/code-tuner/drag.svg.js +1 -0
- package/esm/plugins/todo-list/todo-list.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +6 -1
- package/types/plugins/autocomplete/autocomplete.d.ts +2 -26
- package/types/plugins/autocomplete/autocomplete.impl.d.ts +31 -0
- package/types/plugins/index.d.ts +1 -1
- package/types/plugins/paste-code/config.d.ts +6 -1
- package/types/plugins/paste-code/helpers.d.ts +25 -0
- package/types/plugins/paste-code/paste-code.d.ts +9 -0
- package/types/plugins/paste-code/ui/code-tuner/code-tuner.d.ts +87 -0
|
@@ -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.12.
|
|
4
|
+
* Version: v4.12.32
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -29,10 +29,12 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xml:space=\"preserve\" xmlns=\"http
|
|
|
29
29
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
30
30
|
|
|
31
31
|
"use strict";
|
|
32
|
-
/* harmony import */ var
|
|
33
|
-
/* harmony import */ var
|
|
34
|
-
/* harmony import */ var
|
|
35
|
-
/* harmony import */ var
|
|
32
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35960);
|
|
33
|
+
/* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75689);
|
|
34
|
+
/* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_icon_svg__WEBPACK_IMPORTED_MODULE_1__);
|
|
35
|
+
/* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
|
|
36
|
+
/* harmony import */ var jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22732);
|
|
37
|
+
/* harmony import */ var jodit_esm_core_helpers_html_htmlspecialchars__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53326);
|
|
36
38
|
/*!
|
|
37
39
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
38
40
|
* See LICENSE.md in the project root for license information.
|
|
@@ -40,12 +42,44 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xml:space=\"preserve\" xmlns=\"http
|
|
|
40
42
|
*/
|
|
41
43
|
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.pasteCode = {
|
|
48
|
+
icon: (_icon_svg__WEBPACK_IMPORTED_MODULE_1___default()),
|
|
45
49
|
tooltip: 'Paste code',
|
|
46
50
|
command: 'pasteCode'
|
|
47
51
|
};
|
|
48
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Buttons of the contextual popup shown for a `<pre>` code block.
|
|
54
|
+
* The language dropdown is always prepended by the plugin.
|
|
55
|
+
*/ jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.codeBlock = {
|
|
56
|
+
edit: {
|
|
57
|
+
icon: 'pencil',
|
|
58
|
+
tooltip: 'Edit code',
|
|
59
|
+
exec: function exec(jodit, target) {
|
|
60
|
+
jodit.e.fire('editPreInPasteCode', target);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
copy: {
|
|
64
|
+
icon: 'copy',
|
|
65
|
+
tooltip: 'Copy code',
|
|
66
|
+
exec: function exec(jodit, target) {
|
|
67
|
+
if (jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(target, 'pre')) {
|
|
68
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_0__.copyCodeToClipboard)(jodit, target);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
remove: {
|
|
73
|
+
icon: 'bin',
|
|
74
|
+
tooltip: 'Delete',
|
|
75
|
+
exec: function exec(jodit, target) {
|
|
76
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(target);
|
|
77
|
+
jodit.e.fire('synchro');
|
|
78
|
+
jodit.e.fire('hideCodeTuner.pasteCode');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.pasteCode = {
|
|
49
83
|
globalHighlightLib: false,
|
|
50
84
|
canonicalLanguageCode: function canonicalLanguageCode(lang) {
|
|
51
85
|
switch(lang){
|
|
@@ -66,7 +100,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.pasteCode = {
|
|
|
66
100
|
window.Prism.manual = true;
|
|
67
101
|
},
|
|
68
102
|
highlight: function highlight(code, language) {
|
|
69
|
-
return typeof Prism !== 'undefined' ? Prism.highlight(code, Prism.languages[language] || Prism.languages.plain, language) : (0,
|
|
103
|
+
return typeof Prism !== 'undefined' ? Prism.highlight(code, Prism.languages[language] || Prism.languages.plain, language) : (0,jodit_esm_core_helpers_html_htmlspecialchars__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(code);
|
|
70
104
|
},
|
|
71
105
|
isLangLoaded: function isLangLoaded(lang) {
|
|
72
106
|
if (lang === 'html') {
|
|
@@ -87,8 +121,14 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.pasteCode = {
|
|
|
87
121
|
},
|
|
88
122
|
defaultLanguage: 'html',
|
|
89
123
|
insertTemplate: function insertTemplate(jodit, language, value) {
|
|
90
|
-
return '<pre class="language-'.concat(language, '">').concat((0,
|
|
124
|
+
return '<pre class="language-'.concat(language, '">').concat((0,jodit_esm_core_helpers_html_htmlspecialchars__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(value), "</pre>");
|
|
91
125
|
},
|
|
126
|
+
popup: [
|
|
127
|
+
'codeBlock.edit',
|
|
128
|
+
'codeBlock.copy',
|
|
129
|
+
'|',
|
|
130
|
+
'codeBlock.remove'
|
|
131
|
+
],
|
|
92
132
|
languages: [
|
|
93
133
|
{
|
|
94
134
|
value: 'plaintext',
|
|
@@ -198,6 +238,110 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.pasteCode = {
|
|
|
198
238
|
};
|
|
199
239
|
|
|
200
240
|
|
|
241
|
+
/***/ }),
|
|
242
|
+
|
|
243
|
+
/***/ 35960:
|
|
244
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
245
|
+
|
|
246
|
+
"use strict";
|
|
247
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
248
|
+
/* harmony export */ copyCodeToClipboard: function() { return /* binding */ copyCodeToClipboard; },
|
|
249
|
+
/* harmony export */ languageTitle: function() { return /* binding */ languageTitle; },
|
|
250
|
+
/* harmony export */ parseLanguage: function() { return /* binding */ parseLanguage; },
|
|
251
|
+
/* harmony export */ setPreLanguage: function() { return /* binding */ setPreLanguage; }
|
|
252
|
+
/* harmony export */ });
|
|
253
|
+
/* harmony import */ var jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
254
|
+
/*!
|
|
255
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
256
|
+
* See LICENSE.md in the project root for license information.
|
|
257
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
258
|
+
*/
|
|
259
|
+
/**
|
|
260
|
+
* Returns the inner `<code>` element of a `<pre>` when the pre wraps a single
|
|
261
|
+
* code element, otherwise the pre itself. The language class lives on whichever
|
|
262
|
+
* is returned.
|
|
263
|
+
*/ function codeContainer(pre) {
|
|
264
|
+
if (pre.firstElementChild === pre.lastElementChild && jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(pre.firstElementChild, 'code')) {
|
|
265
|
+
return pre.firstElementChild;
|
|
266
|
+
}
|
|
267
|
+
return pre;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Reads the canonical language code of a `<pre>` block from its `language-*`
|
|
271
|
+
* class (checked on the pre and on the inner `<code>` element).
|
|
272
|
+
*/ function parseLanguage(jodit, pre) {
|
|
273
|
+
var language = null;
|
|
274
|
+
var getLang = function getLang(el) {
|
|
275
|
+
return el.classList.forEach(function(className) {
|
|
276
|
+
var match = /^language-(.+)/.exec(className);
|
|
277
|
+
if (match && match[1]) {
|
|
278
|
+
language = match[1];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
getLang(pre);
|
|
283
|
+
var code = codeContainer(pre);
|
|
284
|
+
if (language == null && code !== pre) {
|
|
285
|
+
getLang(code);
|
|
286
|
+
}
|
|
287
|
+
return jodit.o.pasteCode.canonicalLanguageCode(language || 'html');
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Human readable title of a language code, taken from `pasteCode.languages`.
|
|
291
|
+
*/ function languageTitle(jodit, lang) {
|
|
292
|
+
var option = jodit.o.pasteCode.languages.find(function(item) {
|
|
293
|
+
return String(item.value) === lang;
|
|
294
|
+
});
|
|
295
|
+
return jodit.i18n(String(option ? option.text : lang));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Replaces the `language-*` class on a `<pre>` block (and its inner `<code>`)
|
|
299
|
+
* and asks the paste-code plugin to re-highlight it.
|
|
300
|
+
*/ function setPreLanguage(jodit, pre, lang) {
|
|
301
|
+
var strip = function strip(el) {
|
|
302
|
+
return Array.from(el.classList).forEach(function(className) {
|
|
303
|
+
if (/^language-/.test(className)) {
|
|
304
|
+
el.classList.remove(className);
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
strip(pre);
|
|
309
|
+
var code = codeContainer(pre);
|
|
310
|
+
if (code !== pre) {
|
|
311
|
+
strip(code);
|
|
312
|
+
}
|
|
313
|
+
code.classList.add("language-".concat(lang));
|
|
314
|
+
jodit.e.fire('rehighlightPasteCode', pre);
|
|
315
|
+
jodit.e.fire('synchro');
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Copies the raw text of a code block to the clipboard and fires
|
|
319
|
+
* `afterCopyCode.pasteCode` with the copied text.
|
|
320
|
+
*/ function copyCodeToClipboard(jodit, pre) {
|
|
321
|
+
var text = pre.innerText;
|
|
322
|
+
var navigator = jodit.ow.navigator;
|
|
323
|
+
if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
|
|
324
|
+
navigator.clipboard.writeText(text).catch(function() {
|
|
325
|
+
return null;
|
|
326
|
+
});
|
|
327
|
+
} else {
|
|
328
|
+
var textarea = jodit.create.element('textarea');
|
|
329
|
+
textarea.value = text;
|
|
330
|
+
textarea.style.position = 'fixed';
|
|
331
|
+
textarea.style.opacity = '0';
|
|
332
|
+
jodit.od.body.appendChild(textarea);
|
|
333
|
+
textarea.select();
|
|
334
|
+
try {
|
|
335
|
+
jodit.od.execCommand('copy');
|
|
336
|
+
} catch (unused) {
|
|
337
|
+
// ignore – clipboard not available
|
|
338
|
+
}
|
|
339
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(textarea);
|
|
340
|
+
}
|
|
341
|
+
jodit.e.fire('afterCopyCode.pasteCode', text);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
201
345
|
/***/ }),
|
|
202
346
|
|
|
203
347
|
/***/ 41406:
|
|
@@ -218,15 +362,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
218
362
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
219
363
|
/* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(62361);
|
|
220
364
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(83967);
|
|
221
|
-
/* harmony import */ var
|
|
222
|
-
/* harmony import */ var
|
|
223
|
-
/* harmony import */ var
|
|
224
|
-
/* harmony import */ var
|
|
225
|
-
/* harmony import */ var
|
|
226
|
-
/* harmony import */ var
|
|
227
|
-
/* harmony import */ var
|
|
228
|
-
/* harmony import */ var
|
|
229
|
-
/* harmony import */ var
|
|
365
|
+
/* harmony import */ var _ui_code_tuner_code_tuner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(24397);
|
|
366
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(35960);
|
|
367
|
+
/* harmony import */ var jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82758);
|
|
368
|
+
/* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65478);
|
|
369
|
+
/* harmony import */ var jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(21537);
|
|
370
|
+
/* harmony import */ var jodit_esm_core_helpers_checker_is_boolean__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(87612);
|
|
371
|
+
/* harmony import */ var jodit_esm_core_helpers_html_htmlspecialchars__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(53326);
|
|
372
|
+
/* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(50911);
|
|
373
|
+
/* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(67510);
|
|
374
|
+
/* harmony import */ var jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41409);
|
|
375
|
+
/* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2692);
|
|
230
376
|
/*!
|
|
231
377
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
232
378
|
* See LICENSE.md in the project root for license information.
|
|
@@ -250,6 +396,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
250
396
|
|
|
251
397
|
|
|
252
398
|
|
|
399
|
+
|
|
400
|
+
|
|
253
401
|
|
|
254
402
|
var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
255
403
|
"use strict";
|
|
@@ -263,7 +411,9 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
263
411
|
name: 'pasteCode',
|
|
264
412
|
group: 'clipboard'
|
|
265
413
|
}
|
|
266
|
-
]),
|
|
414
|
+
]), /**
|
|
415
|
+
* Contextual UI (drag anchor + popup toolbar) for existing code blocks
|
|
416
|
+
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_4__._)(_this, "__codeTuner", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_4__._)(_this, "__highlightLibJSIsLoaded", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_4__._)(_this, "__loadLanguage", new Map()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_4__._)(_this, "__initHighlightLibLoading", function(language) {
|
|
267
417
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
268
418
|
var _this_j_o_pasteCode, globalHighlightLib, _this_j_o_pasteCode_highlightLib, css, js, langUrl, highlight, isLangLoaded, beforeLibLoad, afterLibLoad;
|
|
269
419
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_8__._)(this, function(_state) {
|
|
@@ -273,10 +423,10 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
273
423
|
if (!_this1.__highlightLibJSIsLoaded && !globalHighlightLib) {
|
|
274
424
|
_this1.__highlightLibJSIsLoaded = Promise.resolve(beforeLibLoad === null || beforeLibLoad === void 0 ? void 0 : beforeLibLoad()).then(function() {
|
|
275
425
|
return waitingPromise(_this1.async, Promise.allSettled([
|
|
276
|
-
(0,
|
|
426
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.loadNextStyle)(_this1.jodit, css).catch(function() {
|
|
277
427
|
return null;
|
|
278
428
|
}),
|
|
279
|
-
(0,
|
|
429
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.loadNext)(_this1.jodit, js).catch(function() {
|
|
280
430
|
return null;
|
|
281
431
|
})
|
|
282
432
|
]));
|
|
@@ -284,7 +434,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
284
434
|
return afterLibLoad === null || afterLibLoad === void 0 ? void 0 : afterLibLoad();
|
|
285
435
|
});
|
|
286
436
|
}
|
|
287
|
-
if (!!(0,
|
|
437
|
+
if (!!(0,jodit_esm_core_helpers_checker_is_boolean__WEBPACK_IMPORTED_MODULE_15__.isBoolean)(_this1.__highlightLibJSIsLoaded)) return [
|
|
288
438
|
3,
|
|
289
439
|
2
|
|
290
440
|
];
|
|
@@ -301,11 +451,11 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
301
451
|
4
|
|
302
452
|
];
|
|
303
453
|
if (!_this1.__loadLanguage.has(language)) {
|
|
304
|
-
if (!
|
|
454
|
+
if (!jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_12__.IS_PROD) {
|
|
305
455
|
// eslint-disable-next-line no-console
|
|
306
456
|
console.log('Load language', language, 'for paste-code');
|
|
307
457
|
}
|
|
308
|
-
_this1.__loadLanguage.set(language, waitingPromise(_this1.async, (0,
|
|
458
|
+
_this1.__loadLanguage.set(language, waitingPromise(_this1.async, (0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.appendScriptAsync)(_this1.jodit, langUrl(language)).catch(function() {
|
|
309
459
|
return null;
|
|
310
460
|
})));
|
|
311
461
|
}
|
|
@@ -343,6 +493,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
343
493
|
jodit.registerCommand('pasteCode', function() {
|
|
344
494
|
return _this.__openCodeEditDialog();
|
|
345
495
|
});
|
|
496
|
+
this.__codeTuner = new _ui_code_tuner_code_tuner__WEBPACK_IMPORTED_MODULE_10__.UICodeTuner(jodit);
|
|
346
497
|
jodit.async.requestIdleCallback(function() {
|
|
347
498
|
return _this.__initHighlightLibLoading();
|
|
348
499
|
});
|
|
@@ -354,7 +505,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
354
505
|
var _this = this;
|
|
355
506
|
var jodit = this.j;
|
|
356
507
|
var form = this.__createForm();
|
|
357
|
-
var _refs = (0,
|
|
508
|
+
var _refs = (0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.refs)(form.container), code = _refs.code, language = _refs.language;
|
|
358
509
|
if (defLanguage) {
|
|
359
510
|
language.value = defLanguage;
|
|
360
511
|
}
|
|
@@ -370,11 +521,11 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
370
521
|
jodit.s.restore();
|
|
371
522
|
var newPre = jodit.createInside.fromHTML(jodit.o.pasteCode.insertTemplate(jodit, language.value, code.value));
|
|
372
523
|
if (pre) {
|
|
373
|
-
|
|
524
|
+
jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.replace(pre, newPre, jodit.createInside, false, true);
|
|
374
525
|
} else {
|
|
375
526
|
var current = jodit.s.current();
|
|
376
|
-
var block =
|
|
377
|
-
block && !
|
|
527
|
+
var block = jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.up(current, jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isBlock, jodit.editor);
|
|
528
|
+
block && !jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isCell(block) ? jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.after(block, newPre) : jodit.s.insertNode(newPre);
|
|
378
529
|
}
|
|
379
530
|
_this.__imdOnChange();
|
|
380
531
|
return;
|
|
@@ -388,21 +539,38 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
388
539
|
},
|
|
389
540
|
{
|
|
390
541
|
key: "beforeDestruct",
|
|
391
|
-
value: /** @override */ function beforeDestruct(jodit) {
|
|
542
|
+
value: /** @override */ function beforeDestruct(jodit) {
|
|
543
|
+
var _this___codeTuner;
|
|
544
|
+
(_this___codeTuner = this.__codeTuner) === null || _this___codeTuner === void 0 ? void 0 : _this___codeTuner.destruct();
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
key: "onRehighlightPasteCode",
|
|
549
|
+
value: /**
|
|
550
|
+
* Re-highlights a code block, e.g. after its language was changed from the
|
|
551
|
+
* contextual popup.
|
|
552
|
+
*/ function onRehighlightPasteCode(pre) {
|
|
553
|
+
if (jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isTag(pre, 'pre')) {
|
|
554
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.attr)(pre, 'contenteditable', false);
|
|
555
|
+
this.__highlightCode(pre).catch(function() {
|
|
556
|
+
return null;
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
}
|
|
392
560
|
},
|
|
393
561
|
{
|
|
394
562
|
key: "__createForm",
|
|
395
563
|
value: function __createForm() {
|
|
396
564
|
var jodit = this.jodit;
|
|
397
|
-
return new
|
|
398
|
-
new
|
|
565
|
+
return new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__.UIForm(jodit, [
|
|
566
|
+
new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__.UISelect(jodit, {
|
|
399
567
|
name: 'language',
|
|
400
568
|
label: 'Language',
|
|
401
569
|
value: jodit.o.pasteCode.defaultLanguage,
|
|
402
570
|
options: jodit.o.pasteCode.languages,
|
|
403
571
|
required: true
|
|
404
572
|
}),
|
|
405
|
-
new
|
|
573
|
+
new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__.UITextArea(jodit, {
|
|
406
574
|
label: 'Code view',
|
|
407
575
|
resizable: false,
|
|
408
576
|
name: 'code',
|
|
@@ -417,15 +585,15 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
417
585
|
{
|
|
418
586
|
key: "__createDialog",
|
|
419
587
|
value: function __createDialog(onSave, onCancel) {
|
|
420
|
-
var dialog = new
|
|
588
|
+
var dialog = new jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dialog({
|
|
421
589
|
language: this.j.o.language
|
|
422
590
|
});
|
|
423
591
|
dialog.setHeader('Insert/Edit Code Sample').setSize(this.j.o.pasteCode.dialog.width, this.j.o.pasteCode.dialog.height).setFooter([
|
|
424
|
-
(0,
|
|
592
|
+
(0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__.Button)(dialog, '', 'Cancel', 'default').onAction(function() {
|
|
425
593
|
dialog.close();
|
|
426
594
|
onCancel();
|
|
427
595
|
}),
|
|
428
|
-
(0,
|
|
596
|
+
(0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_18__.Button)(dialog, 'save', 'Save', 'primary').onAction(function() {
|
|
429
597
|
dialog.close();
|
|
430
598
|
onSave();
|
|
431
599
|
})
|
|
@@ -443,9 +611,9 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
443
611
|
key: "__imdOnChange",
|
|
444
612
|
value: function __imdOnChange() {
|
|
445
613
|
var _this = this;
|
|
446
|
-
(0,
|
|
447
|
-
if (!(0,
|
|
448
|
-
(0,
|
|
614
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.$$)('pre', this.j.editor).forEach(function(pre) {
|
|
615
|
+
if (!(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.attr)(pre, 'contenteditable')) {
|
|
616
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.attr)(pre, 'contenteditable', false);
|
|
449
617
|
_this.__highlightCode(pre).catch(function() {
|
|
450
618
|
return null;
|
|
451
619
|
});
|
|
@@ -469,7 +637,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
469
637
|
case 1:
|
|
470
638
|
highlight = _state.sent().highlight;
|
|
471
639
|
container = pre;
|
|
472
|
-
if (pre.firstElementChild === pre.lastElementChild &&
|
|
640
|
+
if (pre.firstElementChild === pre.lastElementChild && jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isTag(pre.firstElementChild, 'code')) {
|
|
473
641
|
container = pre.firstElementChild;
|
|
474
642
|
}
|
|
475
643
|
container.innerHTML = highlight(container.innerText, language);
|
|
@@ -484,7 +652,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
484
652
|
{
|
|
485
653
|
key: "onPreEdit",
|
|
486
654
|
value: function onPreEdit(e) {
|
|
487
|
-
var pre =
|
|
655
|
+
var pre = jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isNode(e) && jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.isTag(e, 'pre') ? e : jodit_esm_modules__WEBPACK_IMPORTED_MODULE_19__.Dom.closest(e.target, 'pre', this.j.editor);
|
|
488
656
|
if (pre) {
|
|
489
657
|
var language = this.__parseLanguage(pre);
|
|
490
658
|
this.__openCodeEditDialog(language, pre.innerText, pre);
|
|
@@ -494,22 +662,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
494
662
|
{
|
|
495
663
|
key: "__parseLanguage",
|
|
496
664
|
value: function __parseLanguage(pre) {
|
|
497
|
-
|
|
498
|
-
var getLang = function getLang(code) {
|
|
499
|
-
return code.classList.forEach(function(className) {
|
|
500
|
-
if (/language-/.test(className)) {
|
|
501
|
-
var lng = /language-(.*)/.exec(className);
|
|
502
|
-
if (lng && lng[1]) {
|
|
503
|
-
language = lng[1];
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
getLang(pre);
|
|
509
|
-
if (language == null && pre.firstElementChild === pre.lastElementChild && jodit_esm_modules__WEBPACK_IMPORTED_MODULE_17__.Dom.isTag(pre.firstElementChild, 'code')) {
|
|
510
|
-
getLang(pre.firstElementChild);
|
|
511
|
-
}
|
|
512
|
-
return this.jodit.o.pasteCode.canonicalLanguageCode(language || 'html');
|
|
665
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.parseLanguage)(this.jodit, pre);
|
|
513
666
|
}
|
|
514
667
|
},
|
|
515
668
|
{
|
|
@@ -517,7 +670,7 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
517
670
|
value: function onAfterGetValueFromEditor(data) {
|
|
518
671
|
var _this = this;
|
|
519
672
|
var strip = function strip(_, pre, _1, endPreStart, content, endPre) {
|
|
520
|
-
return "".concat(pre.trim()).concat(endPreStart).concat((0,
|
|
673
|
+
return "".concat(pre.trim()).concat(endPreStart).concat((0,jodit_esm_core_helpers_html_htmlspecialchars__WEBPACK_IMPORTED_MODULE_16__.htmlspecialchars)((0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_14__.stripTags)(content, _this.j.ed, new Set([
|
|
521
674
|
'br'
|
|
522
675
|
])))).concat(endPre);
|
|
523
676
|
};
|
|
@@ -530,31 +683,34 @@ var pasteCode = /*#__PURE__*/ function(Plugin) {
|
|
|
530
683
|
}
|
|
531
684
|
]);
|
|
532
685
|
return pasteCode;
|
|
533
|
-
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(
|
|
686
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_17__.Plugin));
|
|
534
687
|
/** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_4__._)(pasteCode, "requires", [
|
|
535
688
|
'license'
|
|
536
689
|
]);
|
|
537
690
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
538
|
-
|
|
691
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.autobind
|
|
539
692
|
], pasteCode.prototype, "__openCodeEditDialog", null);
|
|
540
693
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
541
|
-
(0,
|
|
694
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)('?:rehighlightPasteCode')
|
|
695
|
+
], pasteCode.prototype, "onRehighlightPasteCode", null);
|
|
696
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
697
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)([
|
|
542
698
|
'?:change',
|
|
543
699
|
'?:afterInit'
|
|
544
700
|
]),
|
|
545
|
-
(0,
|
|
701
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.debounce)()
|
|
546
702
|
], pasteCode.prototype, "__onChange", null);
|
|
547
703
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
548
|
-
(0,
|
|
704
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)([
|
|
549
705
|
'?:dblclick',
|
|
550
706
|
'?:editPreInPasteCode'
|
|
551
707
|
])
|
|
552
708
|
], pasteCode.prototype, "onPreEdit", null);
|
|
553
709
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
554
|
-
(0,
|
|
710
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)('?:afterGetValueFromEditor')
|
|
555
711
|
], pasteCode.prototype, "onAfterGetValueFromEditor", null);
|
|
556
712
|
pasteCode = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
557
|
-
|
|
713
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.component
|
|
558
714
|
], pasteCode);
|
|
559
715
|
function waitingPromise(async, promise) {
|
|
560
716
|
return async.promise(function(resolve, reject) {
|
|
@@ -563,7 +719,371 @@ function waitingPromise(async, promise) {
|
|
|
563
719
|
return null;
|
|
564
720
|
});
|
|
565
721
|
}
|
|
566
|
-
|
|
722
|
+
jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_20__.JoditPro.plugins.add('paste-code', pasteCode);
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
/***/ }),
|
|
726
|
+
|
|
727
|
+
/***/ 24397:
|
|
728
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
729
|
+
|
|
730
|
+
"use strict";
|
|
731
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
732
|
+
/* harmony export */ UICodeTuner: function() { return /* binding */ UICodeTuner; }
|
|
733
|
+
/* harmony export */ });
|
|
734
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
|
|
735
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
|
|
736
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
|
|
737
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
|
|
738
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54816);
|
|
739
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84669);
|
|
740
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18766);
|
|
741
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(94899);
|
|
742
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
743
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(35960);
|
|
744
|
+
/* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(65478);
|
|
745
|
+
/* harmony import */ var jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22732);
|
|
746
|
+
/* harmony import */ var jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(21537);
|
|
747
|
+
/* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(67510);
|
|
748
|
+
/* harmony import */ var jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(21491);
|
|
749
|
+
/*!
|
|
750
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
751
|
+
* See LICENSE.md in the project root for license information.
|
|
752
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
753
|
+
*/
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
var ANCHOR_WIDTH = 16;
|
|
770
|
+
var ANCHOR_GAP = 6;
|
|
771
|
+
var UICodeTuner = /*#__PURE__*/ function(UIElement) {
|
|
772
|
+
"use strict";
|
|
773
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(UICodeTuner, UIElement);
|
|
774
|
+
function UICodeTuner() {
|
|
775
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UICodeTuner);
|
|
776
|
+
var _this;
|
|
777
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UICodeTuner, arguments), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "toolbar", (0,jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_14__.makeCollection)(_this.j, _this)), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "popup", new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__.Popup(_this.j, false)), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "isShown", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__hideTimer", 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "currentBlock", void 0);
|
|
778
|
+
return _this;
|
|
779
|
+
}
|
|
780
|
+
(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UICodeTuner, [
|
|
781
|
+
{
|
|
782
|
+
key: "className",
|
|
783
|
+
value: function className() {
|
|
784
|
+
return 'UICodeTuner';
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
key: "render",
|
|
789
|
+
value: function render() {
|
|
790
|
+
return '<div>\n <div class="&__anchor" title="~Drag to move the code block~"></div>\n </div>';
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
key: "onEditorMouseMove",
|
|
795
|
+
value: /**
|
|
796
|
+
* Handler: hovering a code block shows the drag anchor next to it.
|
|
797
|
+
*/ function onEditorMouseMove(e) {
|
|
798
|
+
var block = jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.closest(e.target, 'pre', this.j.editor);
|
|
799
|
+
if (block) {
|
|
800
|
+
this.__cancelHide();
|
|
801
|
+
this.show(block);
|
|
802
|
+
}
|
|
803
|
+
// Hiding is driven by `__onPointerMove` (the block + gutter hot zone).
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
key: "onEditorClick",
|
|
808
|
+
value: /**
|
|
809
|
+
* Handler: clicking a code block opens its popup toolbar; clicking anywhere
|
|
810
|
+
* else in the editor closes the tuner.
|
|
811
|
+
*/ function onEditorClick(e) {
|
|
812
|
+
var block = jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.closest(e.target, 'pre', this.j.editor);
|
|
813
|
+
if (block) {
|
|
814
|
+
this.__cancelHide();
|
|
815
|
+
this.show(block);
|
|
816
|
+
this.openToolbar();
|
|
817
|
+
} else {
|
|
818
|
+
this.forceHide();
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
/**
|
|
824
|
+
* Shows the anchor for the given code block.
|
|
825
|
+
*/ key: "show",
|
|
826
|
+
value: function show(block) {
|
|
827
|
+
this.currentBlock = block;
|
|
828
|
+
if (!this.isShown) {
|
|
829
|
+
this.isShown = true;
|
|
830
|
+
if (this.container.parentNode == null) {
|
|
831
|
+
this.j.od.body.appendChild(this.container);
|
|
832
|
+
}
|
|
833
|
+
// Track the pointer globally so the anchor stays visible while the
|
|
834
|
+
// cursor travels across the gutter from the block to the grip, and
|
|
835
|
+
// hides only once it leaves the whole block + gutter region.
|
|
836
|
+
this.j.e.on(this.j.ow, 'mousemove', this.__onPointerMove);
|
|
837
|
+
// The anchor is `position: fixed`, so it must follow the block on
|
|
838
|
+
// page/editor scroll and window resize.
|
|
839
|
+
this.j.e.on(this.j.ow, 'scroll resize', this.__onReposition).on(this.j.editor, 'scroll', this.__onReposition);
|
|
840
|
+
}
|
|
841
|
+
this.calcPosition();
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
/**
|
|
846
|
+
* Soft hide — keeps the UI while the popup toolbar is open.
|
|
847
|
+
*/ key: "hide",
|
|
848
|
+
value: function hide() {
|
|
849
|
+
if (this.popup.isOpened) {
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
this.forceHide();
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
key: "onOutsideClick",
|
|
857
|
+
value: /**
|
|
858
|
+
* Handler: a click outside the editor closes the tuner — unless it landed on
|
|
859
|
+
* the anchor/grip itself (which lives in the document body, so Jodit reports
|
|
860
|
+
* it as an "outside" click).
|
|
861
|
+
*/ function onOutsideClick(e) {
|
|
862
|
+
if (e && jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isOrContains(this.container, e.target)) {
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
this.forceHide();
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
key: "forceHide",
|
|
870
|
+
value: /**
|
|
871
|
+
* Hard hide — closes the popup and removes the anchor.
|
|
872
|
+
*/ function forceHide() {
|
|
873
|
+
this.__cancelHide();
|
|
874
|
+
if (!this.isShown) {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
this.isShown = false;
|
|
878
|
+
this.j.e.off(this.j.ow, 'mousemove', this.__onPointerMove).off(this.j.ow, 'scroll resize', this.__onReposition).off(this.j.editor, 'scroll', this.__onReposition);
|
|
879
|
+
this.popup.close();
|
|
880
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.safeRemove(this.container);
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
key: "__onPointerMove",
|
|
885
|
+
value: /**
|
|
886
|
+
* Global pointer tracking: keep the tuner shown while the pointer is within
|
|
887
|
+
* the block + left gutter + grip region (one continuous hot zone, so there
|
|
888
|
+
* is no seam between the block and the anchor), and hide it shortly after
|
|
889
|
+
* the pointer leaves that region.
|
|
890
|
+
*/ function __onPointerMove(e) {
|
|
891
|
+
if (!this.isShown || this.popup.isOpened) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
if (this.__inActiveZone(e.clientX, e.clientY)) {
|
|
895
|
+
this.__cancelHide();
|
|
896
|
+
} else {
|
|
897
|
+
this.__scheduleHide();
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
key: "__inActiveZone",
|
|
903
|
+
value: function __inActiveZone(x, y) {
|
|
904
|
+
var b = (0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_12__.position)(this.currentBlock, this.j);
|
|
905
|
+
return x >= b.left - ANCHOR_WIDTH - ANCHOR_GAP - 6 && x <= b.left + b.width && y >= b.top - 6 && y <= b.top + b.height + 6;
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
key: "__scheduleHide",
|
|
910
|
+
value: function __scheduleHide() {
|
|
911
|
+
var _this = this;
|
|
912
|
+
// Idempotent: a continuous stream of mousemove events must not keep
|
|
913
|
+
// resetting the timer, otherwise the anchor would never hide while the
|
|
914
|
+
// pointer is moving over non-code areas.
|
|
915
|
+
if (this.__hideTimer) {
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
this.__hideTimer = this.j.async.setTimeout(function() {
|
|
919
|
+
_this.__hideTimer = 0;
|
|
920
|
+
_this.hide();
|
|
921
|
+
}, 150);
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
key: "__cancelHide",
|
|
926
|
+
value: function __cancelHide() {
|
|
927
|
+
if (this.__hideTimer) {
|
|
928
|
+
this.j.async.clearTimeout(this.__hideTimer);
|
|
929
|
+
this.__hideTimer = 0;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
key: "__onReposition",
|
|
935
|
+
value: /**
|
|
936
|
+
* Recalculates the anchor and popup position. Bound to everything that can
|
|
937
|
+
* move the code block: editor/page scroll, resize and content changes.
|
|
938
|
+
*/ function __onReposition() {
|
|
939
|
+
if (!this.isShown) {
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
// The block may have been removed/replaced by an edit.
|
|
943
|
+
if (!this.j.editor.contains(this.currentBlock)) {
|
|
944
|
+
this.forceHide();
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
this.calcPosition();
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
key: "onEditorChange",
|
|
952
|
+
value: function onEditorChange() {
|
|
953
|
+
this.__onReposition();
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
key: "calcPosition",
|
|
958
|
+
value: /**
|
|
959
|
+
* Places the anchor in the gutter to the left of the code block.
|
|
960
|
+
*/ function calcPosition() {
|
|
961
|
+
var box = (0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_12__.position)(this.currentBlock, this.j);
|
|
962
|
+
(0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_12__.css)(this.container, {
|
|
963
|
+
left: Math.round(box.left - ANCHOR_WIDTH - ANCHOR_GAP),
|
|
964
|
+
top: Math.round(box.top + 4)
|
|
965
|
+
});
|
|
966
|
+
if (this.popup.isOpened) {
|
|
967
|
+
this.popup.updatePosition();
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
key: "openToolbar",
|
|
973
|
+
value: /**
|
|
974
|
+
* Builds and shows the popup toolbar below the code block.
|
|
975
|
+
*/ function openToolbar() {
|
|
976
|
+
var _this = this;
|
|
977
|
+
this.toolbar.build([
|
|
978
|
+
this.__languageControl()
|
|
979
|
+
].concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_7__._)(this.j.o.pasteCode.popup)), this.currentBlock);
|
|
980
|
+
this.popup.setContent(this.toolbar.container);
|
|
981
|
+
if (this.popup.isOpened) {
|
|
982
|
+
this.popup.updatePosition();
|
|
983
|
+
} else {
|
|
984
|
+
this.popup.open(function() {
|
|
985
|
+
return (0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_12__.position)(_this.currentBlock, _this.j);
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
key: "__languageControl",
|
|
992
|
+
value: /**
|
|
993
|
+
* The language dropdown control. Its list is built from
|
|
994
|
+
* `pasteCode.languages` so it always reflects the editor configuration.
|
|
995
|
+
*/ function __languageControl() {
|
|
996
|
+
var _this = this;
|
|
997
|
+
var languages = {};
|
|
998
|
+
this.j.o.pasteCode.languages.forEach(function(option) {
|
|
999
|
+
languages[String(option.value)] = String(option.text);
|
|
1000
|
+
});
|
|
1001
|
+
return {
|
|
1002
|
+
name: 'language',
|
|
1003
|
+
list: languages,
|
|
1004
|
+
tooltip: 'Language',
|
|
1005
|
+
// Render the current language straight away so the button does not
|
|
1006
|
+
// flash from its name to the value and jitter the popup width.
|
|
1007
|
+
text: (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.languageTitle)(this.j, (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.parseLanguage)(this.j, this.currentBlock)),
|
|
1008
|
+
childTemplate: function childTemplate(_jodit, _key, value) {
|
|
1009
|
+
return _this.j.i18n(value);
|
|
1010
|
+
},
|
|
1011
|
+
update: function update(_jodit, button) {
|
|
1012
|
+
var pre = button.target;
|
|
1013
|
+
if (jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isTag(pre, 'pre')) {
|
|
1014
|
+
button.setState({
|
|
1015
|
+
text: (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.languageTitle)(_this.j, (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.parseLanguage)(_this.j, pre)),
|
|
1016
|
+
icon: {
|
|
1017
|
+
name: ''
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
childExec: function childExec(_jodit, target, param) {
|
|
1023
|
+
var control = param.control;
|
|
1024
|
+
var lang = String(control.args && control.args[0] || 'plaintext');
|
|
1025
|
+
if (jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_11__.Dom.isTag(target, 'pre')) {
|
|
1026
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_9__.setPreLanguage)(_this.j, target, lang);
|
|
1027
|
+
_this.j.e.fire('hideCodeTuner.pasteCode');
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
key: "onAnchorMouseDown",
|
|
1035
|
+
value: /**
|
|
1036
|
+
* Handler: start dragging the whole block by its anchor. The actual drag is
|
|
1037
|
+
* performed by the base `drag-and-drop-element` plugin.
|
|
1038
|
+
*/ function onAnchorMouseDown(e) {
|
|
1039
|
+
e.preventDefault();
|
|
1040
|
+
// Keep the grip visible while it is being grabbed — the base
|
|
1041
|
+
// drag-and-drop plugin takes over the visuals. The grip hides on its own
|
|
1042
|
+
// once the pointer leaves the hot zone (see `__onPointerMove`).
|
|
1043
|
+
this.popup.close();
|
|
1044
|
+
this.j.e.fire('startDragElement', this.currentBlock, e);
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
key: "destruct",
|
|
1049
|
+
value: function destruct() {
|
|
1050
|
+
this.forceHide();
|
|
1051
|
+
this.popup.destruct();
|
|
1052
|
+
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(UICodeTuner.prototype), "destruct", this).call(this);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
]);
|
|
1056
|
+
return UICodeTuner;
|
|
1057
|
+
}(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIElement);
|
|
1058
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1059
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)('j.editor:mousemove'),
|
|
1060
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.throttle)(50)
|
|
1061
|
+
], UICodeTuner.prototype, "onEditorMouseMove", null);
|
|
1062
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1063
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)('j.editor:click')
|
|
1064
|
+
], UICodeTuner.prototype, "onEditorClick", null);
|
|
1065
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1066
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)(':outsideClick')
|
|
1067
|
+
], UICodeTuner.prototype, "onOutsideClick", null);
|
|
1068
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1069
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)(':hideCodeTuner.pasteCode')
|
|
1070
|
+
], UICodeTuner.prototype, "forceHide", null);
|
|
1071
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1072
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
1073
|
+
], UICodeTuner.prototype, "__onPointerMove", null);
|
|
1074
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1075
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind
|
|
1076
|
+
], UICodeTuner.prototype, "__onReposition", null);
|
|
1077
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1078
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)(':change :resize :afterSetMode'),
|
|
1079
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.throttle)(10)
|
|
1080
|
+
], UICodeTuner.prototype, "onEditorChange", null);
|
|
1081
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1082
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.watch)('anchor:mousedown')
|
|
1083
|
+
], UICodeTuner.prototype, "onAnchorMouseDown", null);
|
|
1084
|
+
UICodeTuner = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1085
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.component
|
|
1086
|
+
], UICodeTuner);
|
|
567
1087
|
|
|
568
1088
|
|
|
569
1089
|
/***/ })
|