jodit-pro 4.17.8 → 4.18.1
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 +2 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +6 -6
- package/es2015/jodit.js +810 -130
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +10 -10
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +9 -9
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +9 -9
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +2 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +16 -16
- package/es2021/jodit.js +811 -131
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +16 -16
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +2 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +15 -15
- package/es2021.en/jodit.js +811 -131
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +15 -15
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +3 -3
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1319 -134
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.
|
|
4
|
+
* Version: v4.18.1
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -732,18 +732,43 @@ let ConfigPrototype = {};
|
|
|
732
732
|
/**
|
|
733
733
|
* Class names to align images with, instead of an inline `float` or
|
|
734
734
|
* `margin`. Aligning an image removes every class listed here and adds the
|
|
735
|
-
* chosen alignment's, which can be several separated by spaces.
|
|
735
|
+
* chosen alignment's, which can be several separated by spaces. An
|
|
736
|
+
* alignment can also list several such sets, to recognise each of them;
|
|
737
|
+
* aligning writes the first. `alignClasses.img` takes its place when set.
|
|
736
738
|
*
|
|
737
739
|
* ```javascript
|
|
738
740
|
* Jodit.make('#editor', {
|
|
739
741
|
* imageAlignClasses: {
|
|
740
742
|
* left: 'align-left',
|
|
741
743
|
* right: 'align-right',
|
|
742
|
-
* center: 'align-center'
|
|
744
|
+
* center: ['align-center', 'centered']
|
|
743
745
|
* }
|
|
744
746
|
* });
|
|
745
747
|
* ```
|
|
746
748
|
*/ this.imageAlignClasses = null;
|
|
749
|
+
/**
|
|
750
|
+
* Class names to align elements with, by tag name, as `imageAlignClasses`
|
|
751
|
+
* does for images: `img`, and `video`, `audio` and `iframe` in the media
|
|
752
|
+
* popup. A media wrapper (see `mediaWrappers`), and Jodit's own `jodit` and
|
|
753
|
+
* `jodit-media` wrappers, are aligned with the classes for the media in
|
|
754
|
+
* them.
|
|
755
|
+
*
|
|
756
|
+
* ```javascript
|
|
757
|
+
* const media = {
|
|
758
|
+
* left: 'media-left',
|
|
759
|
+
* right: 'media-right',
|
|
760
|
+
* center: 'media-center'
|
|
761
|
+
* };
|
|
762
|
+
*
|
|
763
|
+
* Jodit.make('#editor', {
|
|
764
|
+
* alignClasses: { video: media, iframe: media }
|
|
765
|
+
* });
|
|
766
|
+
* ```
|
|
767
|
+
*/ this.alignClasses = {};
|
|
768
|
+
/**
|
|
769
|
+
* Alignment given to the media the video popup inserts. `'normal'` leaves
|
|
770
|
+
* them unaligned
|
|
771
|
+
*/ this.mediaDefaultAlign = 'normal';
|
|
747
772
|
/**
|
|
748
773
|
* Do not display these buttons that are on the list
|
|
749
774
|
*
|
|
@@ -1791,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1791
1816
|
* ```
|
|
1792
1817
|
* @packageDocumentation
|
|
1793
1818
|
* @module constants
|
|
1794
|
-
*/ const APP_VERSION = "4.
|
|
1819
|
+
*/ const APP_VERSION = "4.18.1";
|
|
1795
1820
|
// prettier-ignore
|
|
1796
1821
|
const ES = "es2015";
|
|
1797
1822
|
const IS_ES_MODERN = true;
|
|
@@ -6358,6 +6383,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6358
6383
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.completeUrl; },
|
|
6359
6384
|
/* harmony export */ connection: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.connection; },
|
|
6360
6385
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
6386
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.createMediaWrapper; },
|
|
6361
6387
|
/* harmony export */ css: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css; },
|
|
6362
6388
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssInline; },
|
|
6363
6389
|
/* harmony export */ cssPath: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssPath; },
|
|
@@ -6368,13 +6394,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6368
6394
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.fastClone; },
|
|
6369
6395
|
/* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
|
|
6370
6396
|
/* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
|
|
6397
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
|
|
6371
6398
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
|
|
6372
6399
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6373
6400
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6374
6401
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6375
6402
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6403
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
|
|
6376
6404
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6377
6405
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6406
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getWrappedMedia; },
|
|
6378
6407
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
|
|
6379
6408
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.hAlignElement; },
|
|
6380
6409
|
/* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
|
|
@@ -6455,7 +6484,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6455
6484
|
/* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
|
|
6456
6485
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
|
|
6457
6486
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
|
|
6458
|
-
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; }
|
|
6487
|
+
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
|
|
6488
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
|
|
6459
6489
|
/* harmony export */ });
|
|
6460
6490
|
/* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
|
|
6461
6491
|
/* harmony import */ var _async_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91898);
|
|
@@ -7463,12 +7493,15 @@ function trimChars(value, chars) {
|
|
|
7463
7493
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7464
7494
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7465
7495
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7496
|
+
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
7466
7497
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7467
7498
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
7468
7499
|
/* harmony export */ });
|
|
7469
7500
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
7470
|
-
/* harmony import */ var
|
|
7471
|
-
/* harmony import */ var
|
|
7501
|
+
/* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
7502
|
+
/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
7503
|
+
/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
7504
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
7472
7505
|
/*!
|
|
7473
7506
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7474
7507
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7476,32 +7509,54 @@ function trimChars(value, chars) {
|
|
|
7476
7509
|
*/
|
|
7477
7510
|
|
|
7478
7511
|
|
|
7479
|
-
|
|
7512
|
+
|
|
7513
|
+
|
|
7514
|
+
// The sets of class names an alignment lists, the first being the one to write
|
|
7515
|
+
const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
|
|
7516
|
+
value !== null && value !== void 0 ? value : ''
|
|
7517
|
+
]).map((set)=>set.split(/\s+/).filter(Boolean)).filter((set)=>set.length);
|
|
7518
|
+
/**
|
|
7519
|
+
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
7520
|
+
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
7521
|
+
* `jodit-media`), falling back to `imageAlignClasses` for an image
|
|
7522
|
+
*/ function getAlignClasses(jodit, elm) {
|
|
7523
|
+
var _a, _b;
|
|
7524
|
+
if (!elm) {
|
|
7525
|
+
return null;
|
|
7526
|
+
}
|
|
7527
|
+
const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
7528
|
+
'jodit',
|
|
7529
|
+
'jodit-media'
|
|
7530
|
+
])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
|
|
7531
|
+
const tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
|
|
7532
|
+
return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[tag]) !== null && _b !== void 0 ? _b : tag === 'img' ? jodit.o.imageAlignClasses : null;
|
|
7533
|
+
}
|
|
7480
7534
|
/**
|
|
7481
|
-
* Align image, with `classes` (see `
|
|
7482
|
-
*
|
|
7535
|
+
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
7536
|
+
* when they are given
|
|
7483
7537
|
*/ function hAlignElement(image, align, classes) {
|
|
7538
|
+
var _a;
|
|
7484
7539
|
if (classes) {
|
|
7485
7540
|
hAlignElement(image, 'normal');
|
|
7486
|
-
Object.values(classes).forEach((value)=>image.classList.remove(...
|
|
7487
|
-
image.classList.add(...
|
|
7541
|
+
Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
|
|
7542
|
+
image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
|
|
7488
7543
|
[
|
|
7489
7544
|
'class',
|
|
7490
7545
|
'style'
|
|
7491
7546
|
].forEach((name)=>{
|
|
7492
7547
|
var _a;
|
|
7493
|
-
if (!((_a = (0,
|
|
7494
|
-
(0,
|
|
7548
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7549
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
|
|
7495
7550
|
}
|
|
7496
7551
|
});
|
|
7497
7552
|
return;
|
|
7498
7553
|
}
|
|
7499
7554
|
if (align && align !== 'normal') {
|
|
7500
7555
|
if (align !== 'center') {
|
|
7501
|
-
(0,
|
|
7502
|
-
(0,
|
|
7556
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
|
|
7557
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7503
7558
|
} else {
|
|
7504
|
-
(0,
|
|
7559
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
7505
7560
|
float: '',
|
|
7506
7561
|
display: 'block',
|
|
7507
7562
|
marginLeft: 'auto',
|
|
@@ -7509,13 +7564,13 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7509
7564
|
});
|
|
7510
7565
|
}
|
|
7511
7566
|
} else {
|
|
7512
|
-
if ((0,
|
|
7567
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
|
|
7513
7568
|
'right',
|
|
7514
7569
|
'left'
|
|
7515
|
-
].indexOf((0,
|
|
7516
|
-
(0,
|
|
7570
|
+
].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
7571
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
|
|
7517
7572
|
}
|
|
7518
|
-
;(0,
|
|
7573
|
+
;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7519
7574
|
}
|
|
7520
7575
|
}
|
|
7521
7576
|
/**
|
|
@@ -7528,17 +7583,16 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7528
7583
|
'center',
|
|
7529
7584
|
'normal'
|
|
7530
7585
|
]){
|
|
7531
|
-
|
|
7532
|
-
if (names.length && names.every((name)=>elm.classList.contains(name))) {
|
|
7586
|
+
if (classSets(classes[align]).some((set)=>set.every((name)=>elm.classList.contains(name)))) {
|
|
7533
7587
|
return align;
|
|
7534
7588
|
}
|
|
7535
7589
|
}
|
|
7536
7590
|
}
|
|
7537
|
-
const float = (0,
|
|
7591
|
+
const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
|
|
7538
7592
|
if (float === 'left' || float === 'right') {
|
|
7539
7593
|
return float;
|
|
7540
7594
|
}
|
|
7541
|
-
if ((0,
|
|
7595
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
7542
7596
|
return 'center';
|
|
7543
7597
|
}
|
|
7544
7598
|
return 'normal';
|
|
@@ -7548,10 +7602,10 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7548
7602
|
*/ function clearAlign(node) {
|
|
7549
7603
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node, (elm)=>{
|
|
7550
7604
|
if (_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm)) {
|
|
7551
|
-
if ((0,
|
|
7552
|
-
(0,
|
|
7553
|
-
if (!((0,
|
|
7554
|
-
(0,
|
|
7605
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
|
|
7606
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
|
|
7607
|
+
if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
|
|
7608
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
|
|
7555
7609
|
}
|
|
7556
7610
|
}
|
|
7557
7611
|
}
|
|
@@ -7582,7 +7636,7 @@ function alignElement(command, box) {
|
|
|
7582
7636
|
clearAlign(box);
|
|
7583
7637
|
const align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
7584
7638
|
if (align) {
|
|
7585
|
-
(0,
|
|
7639
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
|
|
7586
7640
|
}
|
|
7587
7641
|
}
|
|
7588
7642
|
}
|
|
@@ -8656,13 +8710,13 @@ const getClassName = (obj)=>{
|
|
|
8656
8710
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8657
8711
|
|
|
8658
8712
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8659
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
8713
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
|
|
8660
8714
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
8661
8715
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
8662
8716
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
8663
8717
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
8664
8718
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
8665
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
8719
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
|
|
8666
8720
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
8667
8721
|
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
|
|
8668
8722
|
/* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
@@ -8675,51 +8729,56 @@ const getClassName = (obj)=>{
|
|
|
8675
8729
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
8676
8730
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
8677
8731
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
8678
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
8679
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
8680
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
8732
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
|
|
8733
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
|
|
8734
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
|
|
8681
8735
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
8682
8736
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
8683
8737
|
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
|
|
8684
8738
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
8685
8739
|
/* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
8686
8740
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
8741
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
|
|
8687
8742
|
/* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
8688
8743
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
8689
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
8744
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
|
|
8690
8745
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
8691
8746
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
8692
8747
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
8693
8748
|
/* harmony export */ error: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.error; },
|
|
8694
8749
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
8695
8750
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8751
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
8696
8752
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8697
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
8753
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
|
|
8698
8754
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
8699
|
-
/* harmony export */
|
|
8700
|
-
/* harmony export */
|
|
8755
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
|
|
8756
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
|
|
8757
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
|
|
8758
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
|
|
8701
8759
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
8702
8760
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
8703
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
8761
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
|
|
8704
8762
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
8705
8763
|
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
|
|
8706
8764
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
8707
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
8708
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
8765
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
|
|
8766
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
|
|
8709
8767
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
8710
8768
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
8711
8769
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
8712
8770
|
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
|
|
8713
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
8714
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
8771
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
|
|
8772
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
|
|
8715
8773
|
/* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
8716
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
8717
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
8718
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
8719
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
8720
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
8721
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
8722
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
8774
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
|
|
8775
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
|
|
8776
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
|
|
8777
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
|
|
8778
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
|
|
8779
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
|
|
8780
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
|
|
8781
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
|
|
8723
8782
|
/* harmony export */ });
|
|
8724
8783
|
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
8725
8784
|
/* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
|
|
@@ -8741,14 +8800,15 @@ const getClassName = (obj)=>{
|
|
|
8741
8800
|
/* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
|
|
8742
8801
|
/* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
|
|
8743
8802
|
/* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
|
|
8744
|
-
/* harmony import */ var
|
|
8745
|
-
/* harmony import */ var
|
|
8746
|
-
/* harmony import */ var
|
|
8747
|
-
/* harmony import */ var
|
|
8748
|
-
/* harmony import */ var
|
|
8749
|
-
/* harmony import */ var
|
|
8750
|
-
/* harmony import */ var
|
|
8751
|
-
/* harmony import */ var
|
|
8803
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
|
|
8804
|
+
/* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
|
|
8805
|
+
/* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
|
|
8806
|
+
/* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
|
|
8807
|
+
/* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
|
|
8808
|
+
/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
|
|
8809
|
+
/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
|
|
8810
|
+
/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
|
|
8811
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
|
|
8752
8812
|
/*!
|
|
8753
8813
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8754
8814
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8783,6 +8843,7 @@ const getClassName = (obj)=>{
|
|
|
8783
8843
|
|
|
8784
8844
|
|
|
8785
8845
|
|
|
8846
|
+
|
|
8786
8847
|
|
|
8787
8848
|
|
|
8788
8849
|
/***/ }),
|
|
@@ -8853,6 +8914,76 @@ const getClassName = (obj)=>{
|
|
|
8853
8914
|
/* harmony export */ ]);
|
|
8854
8915
|
|
|
8855
8916
|
|
|
8917
|
+
/***/ }),
|
|
8918
|
+
|
|
8919
|
+
/***/ 61477:
|
|
8920
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8921
|
+
|
|
8922
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8923
|
+
/* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
|
|
8924
|
+
/* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
|
|
8925
|
+
/* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
|
|
8926
|
+
/* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
|
|
8927
|
+
/* harmony export */ });
|
|
8928
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
8929
|
+
/*!
|
|
8930
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8931
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8932
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
8933
|
+
*/
|
|
8934
|
+
const isWrapper = (node, wrapper)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
|
|
8935
|
+
/**
|
|
8936
|
+
* The media in `elm` when `elm` is a wrapper media keep in the content (see
|
|
8937
|
+
* `mediaWrappers`): an element of a type `elm` is the wrapper for
|
|
8938
|
+
*/ function getWrappedMedia(jodit, elm) {
|
|
8939
|
+
var _a;
|
|
8940
|
+
for (const [tag, wrapper] of Object.entries((_a = jodit.o.mediaWrappers) !== null && _a !== void 0 ? _a : {})){
|
|
8941
|
+
if (isWrapper(elm, wrapper)) {
|
|
8942
|
+
const media = elm.querySelector(tag);
|
|
8943
|
+
if (media) {
|
|
8944
|
+
return media;
|
|
8945
|
+
}
|
|
8946
|
+
}
|
|
8947
|
+
}
|
|
8948
|
+
return null;
|
|
8949
|
+
}
|
|
8950
|
+
/**
|
|
8951
|
+
* The wrapper media keep in the content (see `mediaWrappers`) that is or
|
|
8952
|
+
* holds `node`
|
|
8953
|
+
*/ function getMediaWrapper(jodit, node) {
|
|
8954
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getWrappedMedia(jodit, elm)), jodit.editor);
|
|
8955
|
+
}
|
|
8956
|
+
/**
|
|
8957
|
+
* An empty wrapper for media of type `tag` to keep in the content (see
|
|
8958
|
+
* `mediaWrappers`), or null when there is none for it
|
|
8959
|
+
*/ function createMediaWrapper(jodit, tag) {
|
|
8960
|
+
var _a;
|
|
8961
|
+
const wrapper = (_a = jodit.o.mediaWrappers) === null || _a === void 0 ? void 0 : _a[tag.toLowerCase()];
|
|
8962
|
+
if (!wrapper) {
|
|
8963
|
+
return null;
|
|
8964
|
+
}
|
|
8965
|
+
return jodit.createInside.element(wrapper.tag, {
|
|
8966
|
+
class: wrapper.className,
|
|
8967
|
+
contenteditable: false,
|
|
8968
|
+
draggable: true
|
|
8969
|
+
});
|
|
8970
|
+
}
|
|
8971
|
+
/**
|
|
8972
|
+
* Puts `element` in the wrapper for its type (see `mediaWrappers`), and
|
|
8973
|
+
* returns the wrapper, or `element` when there is none for it
|
|
8974
|
+
*/ function wrapMedia(jodit, element) {
|
|
8975
|
+
const wrapper = createMediaWrapper(jodit, element.nodeName);
|
|
8976
|
+
if (!wrapper) {
|
|
8977
|
+
return element;
|
|
8978
|
+
}
|
|
8979
|
+
if (element.parentNode) {
|
|
8980
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(element, wrapper);
|
|
8981
|
+
}
|
|
8982
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, element);
|
|
8983
|
+
return wrapper;
|
|
8984
|
+
}
|
|
8985
|
+
|
|
8986
|
+
|
|
8856
8987
|
/***/ }),
|
|
8857
8988
|
|
|
8858
8989
|
/***/ 82501:
|
|
@@ -11525,9 +11656,9 @@ class Selection {
|
|
|
11525
11656
|
if (styles && typeof styles === 'object') {
|
|
11526
11657
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
|
|
11527
11658
|
}
|
|
11528
|
-
const { imageDefaultAlign
|
|
11659
|
+
const { imageDefaultAlign } = this.j.o;
|
|
11529
11660
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
11530
|
-
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign,
|
|
11661
|
+
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.getAlignClasses)(this.j, image));
|
|
11531
11662
|
}
|
|
11532
11663
|
const onload = ()=>{
|
|
11533
11664
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -31253,6 +31384,7 @@ const INPUT_TAGS = new Set([
|
|
|
31253
31384
|
'textarea',
|
|
31254
31385
|
'select'
|
|
31255
31386
|
]);
|
|
31387
|
+
const TYPE_AHEAD_TIMEOUT = 1000;
|
|
31256
31388
|
const FOCUSABLE_SELECTOR = [
|
|
31257
31389
|
'button:not([disabled])',
|
|
31258
31390
|
'a[href]',
|
|
@@ -31517,11 +31649,56 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31517
31649
|
items[(index + 1) % items.length].focus();
|
|
31518
31650
|
break;
|
|
31519
31651
|
default:
|
|
31520
|
-
|
|
31652
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
31653
|
+
return;
|
|
31654
|
+
}
|
|
31521
31655
|
}
|
|
31522
31656
|
e.preventDefault();
|
|
31523
31657
|
e.stopPropagation();
|
|
31524
31658
|
}
|
|
31659
|
+
/**
|
|
31660
|
+
* The mouse opens a dropdown without taking the focus out of the editor.
|
|
31661
|
+
* While a dropdown list is open, typing there searches the list, as in an
|
|
31662
|
+
* open `<select>`, instead of writing into the content
|
|
31663
|
+
*/ __onEditorKeyDown(e) {
|
|
31664
|
+
if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
|
|
31665
|
+
return;
|
|
31666
|
+
}
|
|
31667
|
+
e.preventDefault();
|
|
31668
|
+
return false;
|
|
31669
|
+
}
|
|
31670
|
+
/**
|
|
31671
|
+
* Typing in a dropdown list focuses the next item whose label starts with
|
|
31672
|
+
* the typed text, whatever their case and accents, and repeating one letter
|
|
31673
|
+
* cycles through the items that start with it, like the WAI-ARIA menu
|
|
31674
|
+
* pattern's type-ahead. The typed text starts again after a pause, or once
|
|
31675
|
+
* the focus has moved on
|
|
31676
|
+
*/ __typeAhead(key, items, index) {
|
|
31677
|
+
var _a, _b;
|
|
31678
|
+
const now = Date.now();
|
|
31679
|
+
if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
|
|
31680
|
+
this.__typed = '';
|
|
31681
|
+
}
|
|
31682
|
+
if (key.length !== 1 || key === ' ' && !this.__typed) {
|
|
31683
|
+
return false;
|
|
31684
|
+
}
|
|
31685
|
+
this.__typedAt = now;
|
|
31686
|
+
this.__typed += key;
|
|
31687
|
+
this.__typedTo = items[index];
|
|
31688
|
+
const { compare } = new Intl.Collator(undefined, {
|
|
31689
|
+
usage: 'search',
|
|
31690
|
+
sensitivity: 'base'
|
|
31691
|
+
}), typed = this.__typed, cycle = Array.from(typed).every((char)=>compare(char, typed[0]) === 0), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
|
|
31692
|
+
for(let i = 0; i < items.length; i += 1){
|
|
31693
|
+
const item = items[(start + i) % items.length], label = (_b = (_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
31694
|
+
if (compare(label.slice(0, prefix.length), prefix) === 0) {
|
|
31695
|
+
item.focus();
|
|
31696
|
+
this.__typedTo = item;
|
|
31697
|
+
break;
|
|
31698
|
+
}
|
|
31699
|
+
}
|
|
31700
|
+
return true;
|
|
31701
|
+
}
|
|
31525
31702
|
/**
|
|
31526
31703
|
* Visible controls of the opened dropdown that can take the focus
|
|
31527
31704
|
*/ __popupFocusables() {
|
|
@@ -31534,12 +31711,16 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31534
31711
|
/**
|
|
31535
31712
|
* Create an open popup list
|
|
31536
31713
|
*/ __openControlList(control) {
|
|
31537
|
-
var _a;
|
|
31714
|
+
var _a, _b, _c, _d, _e;
|
|
31538
31715
|
const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
|
|
31539
31716
|
const list = control.list;
|
|
31540
31717
|
const menu = this.openPopup();
|
|
31541
|
-
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
31542
31718
|
menu.parentElement = this;
|
|
31719
|
+
const content = (_b = control.popup) === null || _b === void 0 ? void 0 : _b.call(control, this.j, (_e = (_d = (_c = this.toolbar) === null || _c === void 0 ? void 0 : _c.getTarget(this)) !== null && _d !== void 0 ? _d : this.target) !== null && _e !== void 0 ? _e : null, this.__closePopup, this);
|
|
31720
|
+
if (content) {
|
|
31721
|
+
return this.__openMenu(menu, content);
|
|
31722
|
+
}
|
|
31723
|
+
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
31543
31724
|
toolbar.parentElement = menu;
|
|
31544
31725
|
toolbar.mode = 'vertical';
|
|
31545
31726
|
const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
|
|
@@ -31586,7 +31767,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31586
31767
|
return childControl;
|
|
31587
31768
|
};
|
|
31588
31769
|
toolbar.build((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(list) ? list.map(getButton) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map((key)=>getButton(key, list[key])), this.target);
|
|
31589
|
-
|
|
31770
|
+
this.__openMenu(menu, toolbar);
|
|
31771
|
+
}
|
|
31772
|
+
__openMenu(menu, content) {
|
|
31773
|
+
menu.setContent(content).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
31590
31774
|
this.state.activated = true;
|
|
31591
31775
|
}
|
|
31592
31776
|
onOutsideClick(e) {
|
|
@@ -31600,7 +31784,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31600
31784
|
openPopup() {
|
|
31601
31785
|
this.__closePopup();
|
|
31602
31786
|
this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
|
|
31603
|
-
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
31787
|
+
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
31604
31788
|
return this.openedPopup;
|
|
31605
31789
|
}
|
|
31606
31790
|
__closePopup() {
|
|
@@ -31615,7 +31799,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31615
31799
|
// popup while the outer `removeChild` is still running and Chrome
|
|
31616
31800
|
// throws NotFoundError. See #1458
|
|
31617
31801
|
this.openedPopup = null;
|
|
31618
|
-
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
|
|
31802
|
+
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
31619
31803
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
31620
31804
|
// the button, otherwise it would fall out to the document
|
|
31621
31805
|
const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -31679,6 +31863,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
31679
31863
|
currentValue: '',
|
|
31680
31864
|
hasTrigger: false
|
|
31681
31865
|
});
|
|
31866
|
+
this.__typed = '';
|
|
31867
|
+
this.__typedAt = 0;
|
|
31868
|
+
this.__typedTo = null;
|
|
31682
31869
|
this.openedPopup = null;
|
|
31683
31870
|
const button = this.getElm('button');
|
|
31684
31871
|
(0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_14__.assert)(button, 'Element button should exists');
|
|
@@ -31728,6 +31915,9 @@ __decorate([
|
|
|
31728
31915
|
__decorate([
|
|
31729
31916
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
31730
31917
|
], ToolbarButton.prototype, "__onPopupKeyDown", null);
|
|
31918
|
+
__decorate([
|
|
31919
|
+
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
31920
|
+
], ToolbarButton.prototype, "__onEditorKeyDown", null);
|
|
31731
31921
|
__decorate([
|
|
31732
31922
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
31733
31923
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -38374,7 +38564,12 @@ const brBoxes = new Set([
|
|
|
38374
38564
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(br, false)) {
|
|
38375
38565
|
return;
|
|
38376
38566
|
}
|
|
38377
|
-
|
|
38567
|
+
// After a block is inserted the caret is already at the end of its
|
|
38568
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
38569
|
+
// below the block (#1315)
|
|
38570
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
38571
|
+
jodit.s.setCursorBefore(br);
|
|
38572
|
+
}
|
|
38378
38573
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(br);
|
|
38379
38574
|
}
|
|
38380
38575
|
}
|
|
@@ -38408,13 +38603,22 @@ const brBoxes = new Set([
|
|
|
38408
38603
|
let current = (_b = (_a = jodit.s.current()) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null;
|
|
38409
38604
|
while(current && current !== jodit.editor){
|
|
38410
38605
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(current)) {
|
|
38411
|
-
|
|
38606
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
38607
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
38608
|
+
const isEmptyLine = !parent && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, jodit.o.enter) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(current);
|
|
38609
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] && !isEmptyLine) {
|
|
38412
38610
|
break;
|
|
38413
38611
|
}
|
|
38414
38612
|
parent = current;
|
|
38415
38613
|
}
|
|
38416
38614
|
current = current.parentElement;
|
|
38417
38615
|
}
|
|
38616
|
+
// A list that is all of the inserted content adds its items to the
|
|
38617
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
38618
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(current) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(node) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(node.parentNode) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(node, false)) {
|
|
38619
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(node);
|
|
38620
|
+
parent = current;
|
|
38621
|
+
}
|
|
38418
38622
|
if (parent) {
|
|
38419
38623
|
jodit.s.setCursorAfter(parent);
|
|
38420
38624
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
|
|
@@ -38465,10 +38669,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
38465
38669
|
audio: 1,
|
|
38466
38670
|
body: 1,
|
|
38467
38671
|
caption: 1,
|
|
38672
|
+
dd: 1,
|
|
38468
38673
|
details: 1,
|
|
38469
38674
|
dir: 1,
|
|
38470
38675
|
div: 1,
|
|
38471
38676
|
dl: 1,
|
|
38677
|
+
dt: 1,
|
|
38472
38678
|
fieldset: 1,
|
|
38473
38679
|
figcaption: 1,
|
|
38474
38680
|
figure: 1,
|
|
@@ -38476,6 +38682,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
38476
38682
|
form: 1,
|
|
38477
38683
|
header: 1,
|
|
38478
38684
|
hgroup: 1,
|
|
38685
|
+
li: 1,
|
|
38479
38686
|
main: 1,
|
|
38480
38687
|
menu: 1,
|
|
38481
38688
|
nav: 1,
|
|
@@ -39241,12 +39448,14 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
39241
39448
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
39242
39449
|
|
|
39243
39450
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
39244
|
-
/* harmony import */ var
|
|
39245
|
-
/* harmony import */ var
|
|
39246
|
-
/* harmony import */ var
|
|
39247
|
-
/* harmony import */ var
|
|
39248
|
-
/* harmony import */ var
|
|
39249
|
-
/* harmony import */ var
|
|
39451
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
39452
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
39453
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
39454
|
+
/* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12153);
|
|
39455
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
|
|
39456
|
+
/* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4104);
|
|
39457
|
+
/* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83709);
|
|
39458
|
+
/* harmony import */ var _font_picker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40222);
|
|
39250
39459
|
function _define_property(obj, key, value) {
|
|
39251
39460
|
if (key in obj) {
|
|
39252
39461
|
Object.defineProperty(obj, key, {
|
|
@@ -39307,11 +39516,18 @@ function _object_spread_props(target, source) {
|
|
|
39307
39516
|
|
|
39308
39517
|
|
|
39309
39518
|
|
|
39519
|
+
|
|
39520
|
+
|
|
39310
39521
|
/**
|
|
39311
39522
|
* Default font-size points
|
|
39312
|
-
*/
|
|
39313
|
-
|
|
39314
|
-
|
|
39523
|
+
*/ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.defaultFontSizePoints = 'px';
|
|
39524
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
|
|
39525
|
+
googleFonts: {
|
|
39526
|
+
url: ''
|
|
39527
|
+
}
|
|
39528
|
+
};
|
|
39529
|
+
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__["default"]);
|
|
39530
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
|
|
39315
39531
|
command: 'fontsize',
|
|
39316
39532
|
data: {
|
|
39317
39533
|
cssRule: 'font-size',
|
|
@@ -39357,7 +39573,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
39357
39573
|
}
|
|
39358
39574
|
const control = button.control;
|
|
39359
39575
|
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
39360
|
-
const value = (0,
|
|
39576
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
|
|
39361
39577
|
if (cssKey === 'font-size') {
|
|
39362
39578
|
const numValue = parseFloat(value.toString());
|
|
39363
39579
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -39389,11 +39605,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
39389
39605
|
return keySet.has(normalize(value.toString()));
|
|
39390
39606
|
}
|
|
39391
39607
|
};
|
|
39392
|
-
|
|
39608
|
+
const hadSelection = new WeakSet();
|
|
39609
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = _object_spread_props(_object_spread({}, _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize), {
|
|
39393
39610
|
command: 'fontname',
|
|
39394
39611
|
textTemplate: (j, value)=>{
|
|
39395
39612
|
const [first] = value.split(',');
|
|
39396
|
-
return (0,
|
|
39613
|
+
return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimChars)(first, '"\'');
|
|
39397
39614
|
},
|
|
39398
39615
|
list: {
|
|
39399
39616
|
'': 'Default',
|
|
@@ -39415,6 +39632,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39415
39632
|
} catch (_a) {}
|
|
39416
39633
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
39417
39634
|
},
|
|
39635
|
+
popup: (editor, current, close, button)=>editor.o.font.googleFonts.url ? new _font_picker_js__WEBPACK_IMPORTED_MODULE_8__.UIFontPicker(editor, button, close) : false,
|
|
39418
39636
|
data: {
|
|
39419
39637
|
cssRule: 'font-family',
|
|
39420
39638
|
normalize: (v)=>{
|
|
@@ -39423,19 +39641,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39423
39641
|
},
|
|
39424
39642
|
// When no font is explicitly set, the computed font-family equals the
|
|
39425
39643
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
39426
|
-
// button shows the `Default`
|
|
39427
|
-
// See #1370
|
|
39428
|
-
value: (editor)=>{
|
|
39429
|
-
const current = editor.s.current();
|
|
39430
|
-
|
|
39431
|
-
|
|
39432
|
-
|
|
39433
|
-
|
|
39434
|
-
if (
|
|
39644
|
+
// button shows the list's `Default` entry, when it has one, instead of
|
|
39645
|
+
// that raw stack. See #1370
|
|
39646
|
+
value: (editor, button)=>{
|
|
39647
|
+
const current = editor.s.current(), box = current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
|
|
39648
|
+
// Until there is a selection the button shows the editor's own font,
|
|
39649
|
+
// and afterwards the font of the last one
|
|
39650
|
+
if (box) {
|
|
39651
|
+
hadSelection.add(button);
|
|
39652
|
+
} else if (hadSelection.has(button)) {
|
|
39435
39653
|
return;
|
|
39436
39654
|
}
|
|
39437
|
-
const value = (0,
|
|
39438
|
-
if (value === (0,
|
|
39655
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, 'font-family').toString(), { list } = button.control;
|
|
39656
|
+
if (value === (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(editor.editor, 'font-family').toString() && ((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(list) ? list.includes('') : '' in (list !== null && list !== void 0 ? list : {}))) {
|
|
39439
39657
|
return '';
|
|
39440
39658
|
}
|
|
39441
39659
|
return value;
|
|
@@ -39444,6 +39662,267 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39444
39662
|
});
|
|
39445
39663
|
|
|
39446
39664
|
|
|
39665
|
+
/***/ }),
|
|
39666
|
+
|
|
39667
|
+
/***/ 40222:
|
|
39668
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39669
|
+
|
|
39670
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39671
|
+
/* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
|
|
39672
|
+
/* harmony export */ });
|
|
39673
|
+
/* harmony import */ var _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87325);
|
|
39674
|
+
/* harmony import */ var _core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37133);
|
|
39675
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
39676
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
39677
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68345);
|
|
39678
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
39679
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
39680
|
+
/* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37790);
|
|
39681
|
+
/* harmony import */ var _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48538);
|
|
39682
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41870);
|
|
39683
|
+
/*!
|
|
39684
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39685
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
39686
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
39687
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
39688
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
39689
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39690
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
39691
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
39692
|
+
};
|
|
39693
|
+
|
|
39694
|
+
|
|
39695
|
+
|
|
39696
|
+
|
|
39697
|
+
|
|
39698
|
+
|
|
39699
|
+
|
|
39700
|
+
|
|
39701
|
+
|
|
39702
|
+
|
|
39703
|
+
const HEADINGS = [
|
|
39704
|
+
'h1',
|
|
39705
|
+
'h2',
|
|
39706
|
+
'h3',
|
|
39707
|
+
'h4',
|
|
39708
|
+
'h5',
|
|
39709
|
+
'h6'
|
|
39710
|
+
];
|
|
39711
|
+
const GENERIC_FAMILIES = new Set([
|
|
39712
|
+
'serif',
|
|
39713
|
+
'sans-serif',
|
|
39714
|
+
'monospace',
|
|
39715
|
+
'cursive',
|
|
39716
|
+
'fantasy',
|
|
39717
|
+
'system-ui',
|
|
39718
|
+
'ui-serif',
|
|
39719
|
+
'ui-sans-serif',
|
|
39720
|
+
'ui-monospace',
|
|
39721
|
+
'ui-rounded'
|
|
39722
|
+
]);
|
|
39723
|
+
/**
|
|
39724
|
+
* A family that names a font, not a generic family or a vendor keyword such
|
|
39725
|
+
* as `-apple-system`
|
|
39726
|
+
*/ function isFontName(family) {
|
|
39727
|
+
return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
|
|
39728
|
+
}
|
|
39729
|
+
/**
|
|
39730
|
+
* The font family dropdown with Google Fonts. Under their own headings it
|
|
39731
|
+
* lists the fonts the editor's styles give text and headings, the fonts the
|
|
39732
|
+
* content uses, the control's list and the Google Fonts library
|
|
39733
|
+
*/ let UIFontPicker = class UIFontPicker extends _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__.UIElement {
|
|
39734
|
+
className() {
|
|
39735
|
+
return 'UIFontPicker';
|
|
39736
|
+
}
|
|
39737
|
+
__render() {
|
|
39738
|
+
var _a, _b;
|
|
39739
|
+
const { control } = this.__button, { list = {} } = control, listed = (0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.map((key)=>({
|
|
39740
|
+
value: key.toString(),
|
|
39741
|
+
title: key.toString()
|
|
39742
|
+
})) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__.keys)(list, false).map((key)=>({
|
|
39743
|
+
value: key,
|
|
39744
|
+
title: list[key].toString()
|
|
39745
|
+
})), google = Array.from(this.__googleFonts.fonts.values(), (font)=>({
|
|
39746
|
+
value: this.__googleFonts.value(font),
|
|
39747
|
+
title: font.family,
|
|
39748
|
+
font
|
|
39749
|
+
})), byFamily = new Map();
|
|
39750
|
+
[
|
|
39751
|
+
...google,
|
|
39752
|
+
...listed
|
|
39753
|
+
].forEach((entry)=>byFamily.set((0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value), entry));
|
|
39754
|
+
const theme = new Map(), used = new Map();
|
|
39755
|
+
// The theme's own fonts are listed too, so its body font can be chosen
|
|
39756
|
+
// to take a font off
|
|
39757
|
+
this.__themeFonts().forEach((fontFamily)=>{
|
|
39758
|
+
var _a;
|
|
39759
|
+
const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), title = fontFamily.split(',')[0].replace(/["']/g, '').trim(), entry = (_a = byFamily.get(family)) !== null && _a !== void 0 ? _a : isFontName(family) ? {
|
|
39760
|
+
value: fontFamily,
|
|
39761
|
+
title
|
|
39762
|
+
} : undefined;
|
|
39763
|
+
entry && !theme.has(family) && theme.set(family, entry);
|
|
39764
|
+
});
|
|
39765
|
+
this.__usedFonts().forEach((fontFamily)=>{
|
|
39766
|
+
const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), entry = byFamily.get(family);
|
|
39767
|
+
entry && !theme.has(family) && used.set(family, entry);
|
|
39768
|
+
});
|
|
39769
|
+
const defaultEntry = listed.find((entry)=>entry.value === ''), current = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)((_b = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, this.j, this.__button)) !== null && _b !== void 0 ? _b : '');
|
|
39770
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(this.container);
|
|
39771
|
+
this.__fonts.clear();
|
|
39772
|
+
defaultEntry && this.__append(current, [
|
|
39773
|
+
defaultEntry
|
|
39774
|
+
]);
|
|
39775
|
+
this.__append(current, [
|
|
39776
|
+
...theme.values()
|
|
39777
|
+
], 'Theme fonts');
|
|
39778
|
+
this.__append(current, [
|
|
39779
|
+
...used.values()
|
|
39780
|
+
], 'Used fonts');
|
|
39781
|
+
this.__append(current, listed.filter((entry)=>entry !== defaultEntry), 'System fonts');
|
|
39782
|
+
this.__append(current, google, 'Google Fonts');
|
|
39783
|
+
this.__observeGoogleFonts();
|
|
39784
|
+
}
|
|
39785
|
+
/**
|
|
39786
|
+
* The fonts the editor's styles give text and each heading
|
|
39787
|
+
*/ __themeFonts() {
|
|
39788
|
+
const { editor } = this.j, fonts = [
|
|
39789
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(editor, 'font-family').toString()
|
|
39790
|
+
];
|
|
39791
|
+
HEADINGS.forEach((tag)=>{
|
|
39792
|
+
const heading = this.j.createInside.element(tag, {
|
|
39793
|
+
style: 'display: none'
|
|
39794
|
+
});
|
|
39795
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(editor, heading);
|
|
39796
|
+
fonts.push((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(heading, 'font-family').toString());
|
|
39797
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(heading);
|
|
39798
|
+
});
|
|
39799
|
+
return fonts;
|
|
39800
|
+
}
|
|
39801
|
+
/**
|
|
39802
|
+
* The fonts the content sets
|
|
39803
|
+
*/ __usedFonts() {
|
|
39804
|
+
return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), (element)=>element.style.fontFamily);
|
|
39805
|
+
}
|
|
39806
|
+
__append(current, entries, heading) {
|
|
39807
|
+
if (!entries.length) {
|
|
39808
|
+
return;
|
|
39809
|
+
}
|
|
39810
|
+
const { control } = this.__button, group = this.j.c.div(this.getFullElName('group'));
|
|
39811
|
+
if (heading) {
|
|
39812
|
+
const title = this.j.c.div(this.getFullElName('heading'), {
|
|
39813
|
+
id: `${this.getFullElName('heading')}-${(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.uniqueUid)()}`
|
|
39814
|
+
});
|
|
39815
|
+
title.textContent = this.i18n(heading);
|
|
39816
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(group, {
|
|
39817
|
+
role: 'group',
|
|
39818
|
+
'aria-labelledby': title.id
|
|
39819
|
+
});
|
|
39820
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, title);
|
|
39821
|
+
}
|
|
39822
|
+
entries.forEach((entry)=>{
|
|
39823
|
+
var _a, _b;
|
|
39824
|
+
const item = this.j.c.element('button', {
|
|
39825
|
+
type: 'button',
|
|
39826
|
+
class: this.getFullElName('item'),
|
|
39827
|
+
'data-value': entry.value,
|
|
39828
|
+
'aria-pressed': (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value) === current
|
|
39829
|
+
});
|
|
39830
|
+
if (entry.font) {
|
|
39831
|
+
item.textContent = entry.title;
|
|
39832
|
+
this.__fonts.set(item, entry.font);
|
|
39833
|
+
} else {
|
|
39834
|
+
item.innerHTML = (_b = (_a = control.childTemplate) === null || _a === void 0 ? void 0 : _a.call(control, this.j, entry.value, entry.title, this.__button)) !== null && _b !== void 0 ? _b : entry.title;
|
|
39835
|
+
}
|
|
39836
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, item);
|
|
39837
|
+
});
|
|
39838
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, group);
|
|
39839
|
+
}
|
|
39840
|
+
/**
|
|
39841
|
+
* Shows the names of the Google Fonts in view, and those just below it,
|
|
39842
|
+
* in their own fonts. Setting every item's font up front would have the
|
|
39843
|
+
* browser look for each of the library's families among the installed
|
|
39844
|
+
* fonts the first time the list opens
|
|
39845
|
+
*/ __observeGoogleFonts() {
|
|
39846
|
+
this.j.async.requestAnimationFrame(()=>{
|
|
39847
|
+
var _a;
|
|
39848
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
39849
|
+
if (this.isDestructed || !this.__fonts.size) {
|
|
39850
|
+
return;
|
|
39851
|
+
}
|
|
39852
|
+
const observer = new IntersectionObserver((entries)=>{
|
|
39853
|
+
const fonts = [];
|
|
39854
|
+
entries.forEach(({ isIntersecting, target })=>{
|
|
39855
|
+
const font = this.__fonts.get(target);
|
|
39856
|
+
if (isIntersecting && font) {
|
|
39857
|
+
fonts.push(font);
|
|
39858
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(target, {
|
|
39859
|
+
fontFamily: this.__googleFonts.value(font)
|
|
39860
|
+
});
|
|
39861
|
+
observer.unobserve(target);
|
|
39862
|
+
}
|
|
39863
|
+
});
|
|
39864
|
+
this.__googleFonts.preview(fonts);
|
|
39865
|
+
}, {
|
|
39866
|
+
root: this.container.parentElement,
|
|
39867
|
+
rootMargin: '0px 0px 400px 0px'
|
|
39868
|
+
});
|
|
39869
|
+
this.__fonts.forEach((_, item)=>observer.observe(item));
|
|
39870
|
+
this.__observer = observer;
|
|
39871
|
+
});
|
|
39872
|
+
}
|
|
39873
|
+
/**
|
|
39874
|
+
* Keeps the editor's selection, as the toolbar buttons do
|
|
39875
|
+
*/ onMouseDown(e) {
|
|
39876
|
+
e.preventDefault();
|
|
39877
|
+
}
|
|
39878
|
+
onClick(e) {
|
|
39879
|
+
var _a;
|
|
39880
|
+
const item = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(e.target, (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(node) && node.hasAttribute('data-value'), this.container);
|
|
39881
|
+
if (!item) {
|
|
39882
|
+
return;
|
|
39883
|
+
}
|
|
39884
|
+
const value = (_a = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(item, 'data-value')) !== null && _a !== void 0 ? _a : '', font = this.__googleFonts.find(value), // The font the text has anyway is taken off rather than written
|
|
39885
|
+
inherited = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(value) === (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(this.__blockFont());
|
|
39886
|
+
font && !inherited && this.__googleFonts.load(font);
|
|
39887
|
+
this.j.execCommand('fontname', false, inherited ? '' : value);
|
|
39888
|
+
this.__close();
|
|
39889
|
+
}
|
|
39890
|
+
/**
|
|
39891
|
+
* The font the selected text has without a font of its own: its block's
|
|
39892
|
+
*/ __blockFont() {
|
|
39893
|
+
const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.j.s.current(), _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, this.j.editor);
|
|
39894
|
+
return (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
|
|
39895
|
+
}
|
|
39896
|
+
destruct() {
|
|
39897
|
+
var _a;
|
|
39898
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
39899
|
+
super.destruct();
|
|
39900
|
+
}
|
|
39901
|
+
constructor(jodit, __button, __close){
|
|
39902
|
+
super(jodit);
|
|
39903
|
+
this.__button = __button;
|
|
39904
|
+
this.__close = __close;
|
|
39905
|
+
this.__fonts = new Map();
|
|
39906
|
+
this.__observer = null;
|
|
39907
|
+
this.__googleFonts = jodit.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.GoogleFonts);
|
|
39908
|
+
this.__render();
|
|
39909
|
+
if (!this.__googleFonts.fonts.size) {
|
|
39910
|
+
this.__googleFonts.ready.then(()=>!this.isDestructed && this.__render());
|
|
39911
|
+
}
|
|
39912
|
+
}
|
|
39913
|
+
};
|
|
39914
|
+
__decorate([
|
|
39915
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:mousedown')
|
|
39916
|
+
], UIFontPicker.prototype, "onMouseDown", null);
|
|
39917
|
+
__decorate([
|
|
39918
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:click')
|
|
39919
|
+
], UIFontPicker.prototype, "onClick", null);
|
|
39920
|
+
UIFontPicker = __decorate([
|
|
39921
|
+
_core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
39922
|
+
], UIFontPicker);
|
|
39923
|
+
|
|
39924
|
+
|
|
39925
|
+
|
|
39447
39926
|
/***/ }),
|
|
39448
39927
|
|
|
39449
39928
|
/***/ 23399:
|
|
@@ -39453,6 +39932,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39453
39932
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(580);
|
|
39454
39933
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
|
|
39455
39934
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28252);
|
|
39935
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41870);
|
|
39456
39936
|
/*!
|
|
39457
39937
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39458
39938
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39460,6 +39940,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39460
39940
|
*/
|
|
39461
39941
|
|
|
39462
39942
|
|
|
39943
|
+
|
|
39463
39944
|
/**
|
|
39464
39945
|
* Process commands `fontsize` and `fontname`
|
|
39465
39946
|
*/ function font(editor) {
|
|
@@ -39470,6 +39951,18 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39470
39951
|
name: 'fontsize',
|
|
39471
39952
|
group: 'font'
|
|
39472
39953
|
});
|
|
39954
|
+
if (editor.o.font.googleFonts.url) {
|
|
39955
|
+
const googleFonts = editor.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(()=>googleFonts.loadUsed(), editor.defaultTimeout);
|
|
39956
|
+
googleFonts.ready.then(loadUsed);
|
|
39957
|
+
editor.e.on('afterInit afterSetMode change', loadUsed);
|
|
39958
|
+
}
|
|
39959
|
+
// An iframe's stylesheets can arrive after the toolbar first shows the
|
|
39960
|
+
// editor's font
|
|
39961
|
+
editor.e.on('afterInit', ()=>{
|
|
39962
|
+
editor.iframe && editor.e.on(editor.ed, 'load', ()=>editor.e.fire('updateToolbar'), {
|
|
39963
|
+
capture: true
|
|
39964
|
+
});
|
|
39965
|
+
});
|
|
39473
39966
|
const callback = (command, second, third)=>{
|
|
39474
39967
|
switch(command){
|
|
39475
39968
|
case 'fontsize':
|
|
@@ -39499,6 +39992,161 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
|
|
|
39499
39992
|
_core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
39500
39993
|
|
|
39501
39994
|
|
|
39995
|
+
/***/ }),
|
|
39996
|
+
|
|
39997
|
+
/***/ 41870:
|
|
39998
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39999
|
+
|
|
40000
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
40001
|
+
/* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
|
|
40002
|
+
/* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
|
|
40003
|
+
/* harmony export */ });
|
|
40004
|
+
/* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
|
|
40005
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
40006
|
+
/* harmony import */ var _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54079);
|
|
40007
|
+
/*!
|
|
40008
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
40009
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
40010
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
40011
|
+
*/
|
|
40012
|
+
|
|
40013
|
+
|
|
40014
|
+
const CSS_URL = 'https://fonts.googleapis.com/css2';
|
|
40015
|
+
// `cursive` and `fantasy` stand in badly for a handwriting or display font
|
|
40016
|
+
const GENERIC_FAMILIES = {
|
|
40017
|
+
serif: 'serif',
|
|
40018
|
+
monospace: 'monospace'
|
|
40019
|
+
};
|
|
40020
|
+
const libraries = new Map();
|
|
40021
|
+
/**
|
|
40022
|
+
* The fonts of the library at `url`, fetched once for every editor on the page
|
|
40023
|
+
*/ function library(jodit, url) {
|
|
40024
|
+
let fonts = libraries.get(url);
|
|
40025
|
+
if (!fonts) {
|
|
40026
|
+
const ajax = new _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__.Ajax({
|
|
40027
|
+
url,
|
|
40028
|
+
method: 'GET'
|
|
40029
|
+
}, jodit.o.defaultAjaxOptions);
|
|
40030
|
+
fonts = ajax.send().then((response)=>response.json())// A font without a regular style can't be asked for by its name alone
|
|
40031
|
+
.then(({ items })=>items.filter((font)=>font.variants.includes('regular'))).catch(()=>{
|
|
40032
|
+
libraries.delete(url);
|
|
40033
|
+
return [];
|
|
40034
|
+
}).finally(()=>ajax.destruct());
|
|
40035
|
+
libraries.set(url, fonts);
|
|
40036
|
+
}
|
|
40037
|
+
return fonts;
|
|
40038
|
+
}
|
|
40039
|
+
/**
|
|
40040
|
+
* The first family of a `font-family` value, unquoted and in lower case for
|
|
40041
|
+
* comparing
|
|
40042
|
+
*/ function firstFamily(fontFamily) {
|
|
40043
|
+
return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
|
|
40044
|
+
}
|
|
40045
|
+
/**
|
|
40046
|
+
* Loads fonts from Google Fonts: the whole of each font the content uses into
|
|
40047
|
+
* the editor's document, and just the letters of its name for the font list
|
|
40048
|
+
*/ class GoogleFonts extends _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
|
|
40049
|
+
className() {
|
|
40050
|
+
return 'GoogleFonts';
|
|
40051
|
+
}
|
|
40052
|
+
/**
|
|
40053
|
+
* The library's font named first in a `font-family` value
|
|
40054
|
+
*/ find(fontFamily) {
|
|
40055
|
+
return this.fonts.get(firstFamily(fontFamily));
|
|
40056
|
+
}
|
|
40057
|
+
/**
|
|
40058
|
+
* The `font-family` value that applies a font
|
|
40059
|
+
*/ value(font) {
|
|
40060
|
+
var _a;
|
|
40061
|
+
return `'${font.family}', ${(_a = GENERIC_FAMILIES[font.category]) !== null && _a !== void 0 ? _a : 'sans-serif'}`;
|
|
40062
|
+
}
|
|
40063
|
+
/**
|
|
40064
|
+
* Loads the regular, italic, bold and bold italic styles that a font has
|
|
40065
|
+
* into the editor's document
|
|
40066
|
+
*/ load(font) {
|
|
40067
|
+
const loaded = this.__loadedInto(this.j.ed);
|
|
40068
|
+
if (loaded.has(font.family)) {
|
|
40069
|
+
return;
|
|
40070
|
+
}
|
|
40071
|
+
loaded.add(font.family);
|
|
40072
|
+
const styles = [
|
|
40073
|
+
[
|
|
40074
|
+
'regular',
|
|
40075
|
+
'0,400'
|
|
40076
|
+
],
|
|
40077
|
+
[
|
|
40078
|
+
'700',
|
|
40079
|
+
'0,700'
|
|
40080
|
+
],
|
|
40081
|
+
[
|
|
40082
|
+
'italic',
|
|
40083
|
+
'1,400'
|
|
40084
|
+
],
|
|
40085
|
+
[
|
|
40086
|
+
'700italic',
|
|
40087
|
+
'1,700'
|
|
40088
|
+
]
|
|
40089
|
+
].filter(([variant])=>font.variants.includes(variant)).map(([, style])=>style);
|
|
40090
|
+
this.__append(this.j.ed, `family=${this.__family(font)}:ital,wght@${styles.join(';')}`);
|
|
40091
|
+
}
|
|
40092
|
+
/**
|
|
40093
|
+
* Loads every font of the library that the content uses
|
|
40094
|
+
*/ loadUsed() {
|
|
40095
|
+
this.j.editor.querySelectorAll('[style*="font-family"]').forEach((element)=>{
|
|
40096
|
+
const font = this.find(element.style.fontFamily);
|
|
40097
|
+
font && this.load(font);
|
|
40098
|
+
});
|
|
40099
|
+
}
|
|
40100
|
+
/**
|
|
40101
|
+
* Loads into the page just the letters of each font's name, so the font
|
|
40102
|
+
* list can show the name in its font
|
|
40103
|
+
*/ preview(fonts) {
|
|
40104
|
+
const loaded = this.__loadedInto(this.j.od);
|
|
40105
|
+
fonts = fonts.filter((font)=>!this.__previewed.has(font.family) && !loaded.has(font.family));
|
|
40106
|
+
if (!fonts.length) {
|
|
40107
|
+
return;
|
|
40108
|
+
}
|
|
40109
|
+
fonts.forEach((font)=>this.__previewed.add(font.family));
|
|
40110
|
+
const families = fonts.map((font)=>`family=${this.__family(font)}`), letters = new Set(fonts.map((font)=>font.family).join(''));
|
|
40111
|
+
this.__append(this.j.od, `${families.join('&')}&text=${encodeURIComponent([
|
|
40112
|
+
...letters
|
|
40113
|
+
].join(''))}`);
|
|
40114
|
+
}
|
|
40115
|
+
__loadedInto(doc) {
|
|
40116
|
+
var _a;
|
|
40117
|
+
const loaded = (_a = this.__loaded.get(doc)) !== null && _a !== void 0 ? _a : new Set();
|
|
40118
|
+
this.__loaded.set(doc, loaded);
|
|
40119
|
+
return loaded;
|
|
40120
|
+
}
|
|
40121
|
+
__family(font) {
|
|
40122
|
+
return encodeURIComponent(font.family).replace(/%20/g, '+');
|
|
40123
|
+
}
|
|
40124
|
+
__append(doc, query) {
|
|
40125
|
+
const link = doc.createElement('link');
|
|
40126
|
+
link.rel = 'stylesheet';
|
|
40127
|
+
link.href = `${CSS_URL}?${query}&display=swap`;
|
|
40128
|
+
doc.head.appendChild(link);
|
|
40129
|
+
this.__links.push(link);
|
|
40130
|
+
}
|
|
40131
|
+
destruct() {
|
|
40132
|
+
this.__links.forEach((link)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(link));
|
|
40133
|
+
super.destruct();
|
|
40134
|
+
}
|
|
40135
|
+
constructor(jodit){
|
|
40136
|
+
super(jodit);
|
|
40137
|
+
/**
|
|
40138
|
+
* The library by lower-case family, empty until it arrives
|
|
40139
|
+
*/ this.fonts = new Map();
|
|
40140
|
+
this.__links = [];
|
|
40141
|
+
this.__loaded = new WeakMap();
|
|
40142
|
+
this.__previewed = new Set();
|
|
40143
|
+
this.ready = library(jodit, jodit.o.font.googleFonts.url).then((fonts)=>{
|
|
40144
|
+
fonts.forEach((font)=>this.fonts.set(font.family.toLowerCase(), font));
|
|
40145
|
+
});
|
|
40146
|
+
}
|
|
40147
|
+
}
|
|
40148
|
+
|
|
40149
|
+
|
|
39502
40150
|
/***/ }),
|
|
39503
40151
|
|
|
39504
40152
|
/***/ 4104:
|
|
@@ -40810,12 +41458,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
40810
41458
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
40811
41459
|
/* harmony export */ readValuesFromImage: function() { return /* binding */ readValuesFromImage; }
|
|
40812
41460
|
/* harmony export */ });
|
|
40813
|
-
/* harmony import */ var
|
|
40814
|
-
/* harmony import */ var
|
|
40815
|
-
/* harmony import */ var
|
|
40816
|
-
/* harmony import */ var
|
|
40817
|
-
/* harmony import */ var
|
|
40818
|
-
/* harmony import */ var
|
|
41461
|
+
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
41462
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
41463
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
41464
|
+
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
|
|
41465
|
+
/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
|
|
41466
|
+
/* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
|
|
41467
|
+
/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
|
|
40819
41468
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
40820
41469
|
try {
|
|
40821
41470
|
var info = gen[key](arg);
|
|
@@ -40852,33 +41501,34 @@ function _async_to_generator(fn) {
|
|
|
40852
41501
|
|
|
40853
41502
|
|
|
40854
41503
|
|
|
41504
|
+
|
|
40855
41505
|
/**
|
|
40856
41506
|
* Read values from image and set it to state
|
|
40857
41507
|
* @private
|
|
40858
41508
|
*/ function readValuesFromImage(j, state) {
|
|
40859
41509
|
return _async_to_generator(function*() {
|
|
40860
41510
|
const { sourceImage: image, values } = state;
|
|
40861
|
-
(0,
|
|
41511
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
|
|
40862
41512
|
// Border radius
|
|
40863
|
-
values.borderRadius = parseInt((0,
|
|
41513
|
+
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
40864
41514
|
// Id
|
|
40865
|
-
values.id = (0,
|
|
41515
|
+
values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id') || '';
|
|
40866
41516
|
// Title
|
|
40867
|
-
values.imageTitle = (0,
|
|
41517
|
+
values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title') || '';
|
|
40868
41518
|
// Alt
|
|
40869
|
-
values.imageAlt = (0,
|
|
41519
|
+
values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt') || '';
|
|
40870
41520
|
// Style
|
|
40871
|
-
values.style = (0,
|
|
41521
|
+
values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style') || '';
|
|
40872
41522
|
// Classes
|
|
40873
|
-
values.classes = ((0,
|
|
41523
|
+
values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
40874
41524
|
// Margins
|
|
40875
|
-
(0,
|
|
41525
|
+
(0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
|
|
40876
41526
|
// Link
|
|
40877
|
-
(0,
|
|
41527
|
+
(0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
|
|
40878
41528
|
// Src
|
|
40879
|
-
values.imageSrc = (0,
|
|
41529
|
+
values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
|
|
40880
41530
|
// Image size
|
|
40881
|
-
return (0,
|
|
41531
|
+
return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
|
|
40882
41532
|
})();
|
|
40883
41533
|
}
|
|
40884
41534
|
|
|
@@ -41974,7 +42624,7 @@ function _async_to_generator(fn) {
|
|
|
41974
42624
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41975
42625
|
}
|
|
41976
42626
|
if (opt.image.editAlign) {
|
|
41977
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align,
|
|
42627
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
|
|
41978
42628
|
}
|
|
41979
42629
|
}
|
|
41980
42630
|
|
|
@@ -42730,6 +43380,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
42730
43380
|
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
|
|
42731
43381
|
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
|
|
42732
43382
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
43383
|
+
/* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
42733
43384
|
/*!
|
|
42734
43385
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42735
43386
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -42738,9 +43389,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
42738
43389
|
|
|
42739
43390
|
|
|
42740
43391
|
|
|
42741
|
-
|
|
42742
|
-
// keep inline styles
|
|
42743
|
-
const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
43392
|
+
|
|
42744
43393
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
42745
43394
|
const lineAlign = (editor, elm)=>{
|
|
42746
43395
|
const block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
|
|
@@ -42761,7 +43410,7 @@ const lineAlign = (editor, elm)=>{
|
|
|
42761
43410
|
return 'left';
|
|
42762
43411
|
}
|
|
42763
43412
|
};
|
|
42764
|
-
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm,
|
|
43413
|
+
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm)) : 'normal';
|
|
42765
43414
|
const align = {
|
|
42766
43415
|
name: 'left',
|
|
42767
43416
|
childTemplate: (_, __, value)=>value,
|
|
@@ -42782,23 +43431,25 @@ const align = {
|
|
|
42782
43431
|
return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
42783
43432
|
},
|
|
42784
43433
|
exec: (editor, elm, { control })=>{
|
|
42785
|
-
|
|
43434
|
+
// A media wrapper kept in the content (`mediaWrappers`) is aligned itself
|
|
43435
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
42786
43436
|
'img',
|
|
42787
43437
|
'jodit',
|
|
42788
43438
|
'jodit-media'
|
|
42789
|
-
]))) {
|
|
43439
|
+
])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
|
|
42790
43440
|
return;
|
|
42791
43441
|
}
|
|
42792
43442
|
const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
42793
43443
|
if (!command) {
|
|
42794
43444
|
return false;
|
|
42795
43445
|
}
|
|
42796
|
-
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command,
|
|
43446
|
+
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm));
|
|
42797
43447
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
42798
43448
|
'jodit',
|
|
42799
43449
|
'jodit-media'
|
|
42800
43450
|
])) && elm.firstElementChild) {
|
|
42801
|
-
|
|
43451
|
+
const media = elm.firstElementChild;
|
|
43452
|
+
(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(media, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, media));
|
|
42802
43453
|
}
|
|
42803
43454
|
editor.synchronizeValues();
|
|
42804
43455
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -43001,9 +43652,11 @@ const align = {
|
|
|
43001
43652
|
return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_7__.makeCollection)(this.jodit, this.popup);
|
|
43002
43653
|
}
|
|
43003
43654
|
onClick(node) {
|
|
43004
|
-
const elements = this.elmsList, target = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
|
|
43005
|
-
|
|
43006
|
-
|
|
43655
|
+
const elements = this.elmsList, mediaWrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
|
|
43656
|
+
// A media wrapper kept in the content gets the media popup
|
|
43657
|
+
const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
|
|
43658
|
+
if (target && type && this.canShowPopupForType(type)) {
|
|
43659
|
+
this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
|
|
43007
43660
|
return false;
|
|
43008
43661
|
}
|
|
43009
43662
|
}
|
|
@@ -43186,7 +43839,12 @@ const align = {
|
|
|
43186
43839
|
this.removeListenersForElements();
|
|
43187
43840
|
}
|
|
43188
43841
|
_eventsList() {
|
|
43189
|
-
|
|
43842
|
+
var _a;
|
|
43843
|
+
// Clicks on a media wrapper kept in the content (`mediaWrappers`)
|
|
43844
|
+
const wrapperTags = Object.values((_a = this.j.o.mediaWrappers) !== null && _a !== void 0 ? _a : {}).map(({ tag })=>tag.toLowerCase());
|
|
43845
|
+
const el = [
|
|
43846
|
+
...new Set(this.elmsList.concat(wrapperTags))
|
|
43847
|
+
];
|
|
43190
43848
|
return el.map((e)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`click_${e}`)).concat(el.map((e)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`touchstart_${e}`))).join(' ');
|
|
43191
43849
|
}
|
|
43192
43850
|
addListenersForElements() {
|
|
@@ -44750,8 +45408,6 @@ const formTemplate = (editor)=>{
|
|
|
44750
45408
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44751
45409
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
44752
45410
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
44753
|
-
*/ /**
|
|
44754
|
-
* @module plugins/media
|
|
44755
45411
|
*/
|
|
44756
45412
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaFakeTag = 'jodit-media';
|
|
44757
45413
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaInFakeBlock = true;
|
|
@@ -44759,6 +45415,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44759
45415
|
'video',
|
|
44760
45416
|
'audio'
|
|
44761
45417
|
];
|
|
45418
|
+
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
44762
45419
|
|
|
44763
45420
|
|
|
44764
45421
|
/***/ }),
|
|
@@ -44787,11 +45444,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44787
45444
|
* Process `video` and `audio`
|
|
44788
45445
|
*/ function media(editor) {
|
|
44789
45446
|
const keyFake = 'jodit_fake_wrapper';
|
|
44790
|
-
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock } = editor.options;
|
|
45447
|
+
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock, mediaWrappers } = editor.options;
|
|
44791
45448
|
const wrap = (element)=>{
|
|
45449
|
+
var _a;
|
|
44792
45450
|
if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
44793
45451
|
element = element.parentNode;
|
|
44794
|
-
} else {
|
|
45452
|
+
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
45453
|
+
element = (_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(editor, element)) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.wrapMedia)(editor, element);
|
|
45454
|
+
} else if (mediaInFakeBlock) {
|
|
44795
45455
|
const wrapper = editor.createInside.element(mediaFakeTag, {
|
|
44796
45456
|
'data-jodit-temp': 1,
|
|
44797
45457
|
contenteditable: false,
|
|
@@ -44809,12 +45469,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
44809
45469
|
}
|
|
44810
45470
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
|
|
44811
45471
|
element = wrapper;
|
|
45472
|
+
} else {
|
|
45473
|
+
return;
|
|
44812
45474
|
}
|
|
44813
45475
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
|
|
44814
45476
|
editor.s.setCursorAfter(element);
|
|
44815
45477
|
});
|
|
44816
45478
|
};
|
|
44817
|
-
if (mediaInFakeBlock) {
|
|
45479
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
44818
45480
|
editor.e.on('afterGetValueFromEditor', (data)=>{
|
|
44819
45481
|
const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
|
|
44820
45482
|
if (rxp.test(data.value)) {
|
|
@@ -53748,15 +54410,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
|
|
|
53748
54410
|
|
|
53749
54411
|
|
|
53750
54412
|
|
|
54413
|
+
// Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
|
|
54414
|
+
// with `mediaDefaultAlign`
|
|
54415
|
+
function prepareMedia(jodit, element) {
|
|
54416
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
|
|
54417
|
+
const { mediaDefaultAlign } = jodit.o;
|
|
54418
|
+
if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
|
|
54419
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
|
|
54420
|
+
}
|
|
54421
|
+
return media;
|
|
54422
|
+
}
|
|
53751
54423
|
function insertVideos(data) {
|
|
53752
54424
|
var _a;
|
|
53753
54425
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
53754
|
-
this.s.insertNode(this.createInside.element('video', {
|
|
54426
|
+
this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
|
|
53755
54427
|
controls: '',
|
|
53756
54428
|
src: data.baseurl + file
|
|
53757
|
-
}));
|
|
54429
|
+
})));
|
|
53758
54430
|
});
|
|
53759
54431
|
}
|
|
54432
|
+
// Embed code that is one element is prepared as media; other code goes in as
|
|
54433
|
+
// it is
|
|
54434
|
+
function prepareEmbedCode(jodit, code) {
|
|
54435
|
+
const box = jodit.createInside.div();
|
|
54436
|
+
box.innerHTML = code.trim();
|
|
54437
|
+
const element = box.firstElementChild;
|
|
54438
|
+
return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
|
|
54439
|
+
}
|
|
53760
54440
|
_config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
53761
54441
|
parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
53762
54442
|
defaultWidth: 400,
|
|
@@ -53794,7 +54474,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
53794
54474
|
])
|
|
53795
54475
|
]), tabs = [], insertCode = (code)=>{
|
|
53796
54476
|
jodit.s.restore();
|
|
53797
|
-
jodit.s.insertHTML(code);
|
|
54477
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
53798
54478
|
close();
|
|
53799
54479
|
};
|
|
53800
54480
|
jodit.s.save();
|