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/es2021/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.
|
|
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
|
*
|
|
@@ -1743,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1743
1768
|
* ```
|
|
1744
1769
|
* @packageDocumentation
|
|
1745
1770
|
* @module constants
|
|
1746
|
-
*/ const APP_VERSION = "4.
|
|
1771
|
+
*/ const APP_VERSION = "4.18.1";
|
|
1747
1772
|
// prettier-ignore
|
|
1748
1773
|
const ES = "es2021";
|
|
1749
1774
|
const IS_ES_MODERN = true;
|
|
@@ -6310,6 +6335,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6310
6335
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.completeUrl; },
|
|
6311
6336
|
/* harmony export */ connection: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.connection; },
|
|
6312
6337
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
6338
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.createMediaWrapper; },
|
|
6313
6339
|
/* harmony export */ css: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css; },
|
|
6314
6340
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssInline; },
|
|
6315
6341
|
/* harmony export */ cssPath: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssPath; },
|
|
@@ -6320,13 +6346,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6320
6346
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.fastClone; },
|
|
6321
6347
|
/* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
|
|
6322
6348
|
/* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
|
|
6349
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
|
|
6323
6350
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
|
|
6324
6351
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6325
6352
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6326
6353
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6327
6354
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6355
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
|
|
6328
6356
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6329
6357
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6358
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getWrappedMedia; },
|
|
6330
6359
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
|
|
6331
6360
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.hAlignElement; },
|
|
6332
6361
|
/* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
|
|
@@ -6407,7 +6436,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6407
6436
|
/* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
|
|
6408
6437
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
|
|
6409
6438
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
|
|
6410
|
-
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; }
|
|
6439
|
+
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
|
|
6440
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
|
|
6411
6441
|
/* harmony export */ });
|
|
6412
6442
|
/* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
|
|
6413
6443
|
/* harmony import */ var _async_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91898);
|
|
@@ -7415,12 +7445,15 @@ function trimChars(value, chars) {
|
|
|
7415
7445
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7416
7446
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7417
7447
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7448
|
+
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
7418
7449
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7419
7450
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
7420
7451
|
/* harmony export */ });
|
|
7421
7452
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
7422
|
-
/* harmony import */ var
|
|
7423
|
-
/* harmony import */ var
|
|
7453
|
+
/* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
7454
|
+
/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
7455
|
+
/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
7456
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
7424
7457
|
/*!
|
|
7425
7458
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7426
7459
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7428,32 +7461,54 @@ function trimChars(value, chars) {
|
|
|
7428
7461
|
*/
|
|
7429
7462
|
|
|
7430
7463
|
|
|
7431
|
-
|
|
7464
|
+
|
|
7465
|
+
|
|
7466
|
+
// The sets of class names an alignment lists, the first being the one to write
|
|
7467
|
+
const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
|
|
7468
|
+
value !== null && value !== void 0 ? value : ''
|
|
7469
|
+
]).map((set)=>set.split(/\s+/).filter(Boolean)).filter((set)=>set.length);
|
|
7470
|
+
/**
|
|
7471
|
+
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
7472
|
+
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
7473
|
+
* `jodit-media`), falling back to `imageAlignClasses` for an image
|
|
7474
|
+
*/ function getAlignClasses(jodit, elm) {
|
|
7475
|
+
var _a, _b;
|
|
7476
|
+
if (!elm) {
|
|
7477
|
+
return null;
|
|
7478
|
+
}
|
|
7479
|
+
const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
7480
|
+
'jodit',
|
|
7481
|
+
'jodit-media'
|
|
7482
|
+
])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
|
|
7483
|
+
const tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
|
|
7484
|
+
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;
|
|
7485
|
+
}
|
|
7432
7486
|
/**
|
|
7433
|
-
* Align image, with `classes` (see `
|
|
7434
|
-
*
|
|
7487
|
+
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
7488
|
+
* when they are given
|
|
7435
7489
|
*/ function hAlignElement(image, align, classes) {
|
|
7490
|
+
var _a;
|
|
7436
7491
|
if (classes) {
|
|
7437
7492
|
hAlignElement(image, 'normal');
|
|
7438
|
-
Object.values(classes).forEach((value)=>image.classList.remove(...
|
|
7439
|
-
image.classList.add(...
|
|
7493
|
+
Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
|
|
7494
|
+
image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
|
|
7440
7495
|
[
|
|
7441
7496
|
'class',
|
|
7442
7497
|
'style'
|
|
7443
7498
|
].forEach((name)=>{
|
|
7444
7499
|
var _a;
|
|
7445
|
-
if (!((_a = (0,
|
|
7446
|
-
(0,
|
|
7500
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7501
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
|
|
7447
7502
|
}
|
|
7448
7503
|
});
|
|
7449
7504
|
return;
|
|
7450
7505
|
}
|
|
7451
7506
|
if (align && align !== 'normal') {
|
|
7452
7507
|
if (align !== 'center') {
|
|
7453
|
-
(0,
|
|
7454
|
-
(0,
|
|
7508
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
|
|
7509
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7455
7510
|
} else {
|
|
7456
|
-
(0,
|
|
7511
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
7457
7512
|
float: '',
|
|
7458
7513
|
display: 'block',
|
|
7459
7514
|
marginLeft: 'auto',
|
|
@@ -7461,13 +7516,13 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7461
7516
|
});
|
|
7462
7517
|
}
|
|
7463
7518
|
} else {
|
|
7464
|
-
if ((0,
|
|
7519
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
|
|
7465
7520
|
'right',
|
|
7466
7521
|
'left'
|
|
7467
|
-
].indexOf((0,
|
|
7468
|
-
(0,
|
|
7522
|
+
].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
7523
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
|
|
7469
7524
|
}
|
|
7470
|
-
;(0,
|
|
7525
|
+
;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7471
7526
|
}
|
|
7472
7527
|
}
|
|
7473
7528
|
/**
|
|
@@ -7480,17 +7535,16 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7480
7535
|
'center',
|
|
7481
7536
|
'normal'
|
|
7482
7537
|
]){
|
|
7483
|
-
|
|
7484
|
-
if (names.length && names.every((name)=>elm.classList.contains(name))) {
|
|
7538
|
+
if (classSets(classes[align]).some((set)=>set.every((name)=>elm.classList.contains(name)))) {
|
|
7485
7539
|
return align;
|
|
7486
7540
|
}
|
|
7487
7541
|
}
|
|
7488
7542
|
}
|
|
7489
|
-
const float = (0,
|
|
7543
|
+
const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
|
|
7490
7544
|
if (float === 'left' || float === 'right') {
|
|
7491
7545
|
return float;
|
|
7492
7546
|
}
|
|
7493
|
-
if ((0,
|
|
7547
|
+
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') {
|
|
7494
7548
|
return 'center';
|
|
7495
7549
|
}
|
|
7496
7550
|
return 'normal';
|
|
@@ -7500,10 +7554,10 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7500
7554
|
*/ function clearAlign(node) {
|
|
7501
7555
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node, (elm)=>{
|
|
7502
7556
|
if (_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm)) {
|
|
7503
|
-
if ((0,
|
|
7504
|
-
(0,
|
|
7505
|
-
if (!((0,
|
|
7506
|
-
(0,
|
|
7557
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
|
|
7558
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
|
|
7559
|
+
if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
|
|
7560
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
|
|
7507
7561
|
}
|
|
7508
7562
|
}
|
|
7509
7563
|
}
|
|
@@ -7534,7 +7588,7 @@ function alignElement(command, box) {
|
|
|
7534
7588
|
clearAlign(box);
|
|
7535
7589
|
const align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
7536
7590
|
if (align) {
|
|
7537
|
-
(0,
|
|
7591
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
|
|
7538
7592
|
}
|
|
7539
7593
|
}
|
|
7540
7594
|
}
|
|
@@ -8608,13 +8662,13 @@ const getClassName = (obj)=>{
|
|
|
8608
8662
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8609
8663
|
|
|
8610
8664
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8611
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
8665
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
|
|
8612
8666
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
8613
8667
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
8614
8668
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
8615
8669
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
8616
8670
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
8617
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
8671
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
|
|
8618
8672
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
8619
8673
|
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
|
|
8620
8674
|
/* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
@@ -8627,51 +8681,56 @@ const getClassName = (obj)=>{
|
|
|
8627
8681
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
8628
8682
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
8629
8683
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
8630
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
8631
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
8632
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
8684
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
|
|
8685
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
|
|
8686
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
|
|
8633
8687
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
8634
8688
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
8635
8689
|
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
|
|
8636
8690
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
8637
8691
|
/* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
8638
8692
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
8693
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
|
|
8639
8694
|
/* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
8640
8695
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
8641
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
8696
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
|
|
8642
8697
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
8643
8698
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
8644
8699
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
8645
8700
|
/* harmony export */ error: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.error; },
|
|
8646
8701
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
8647
8702
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8703
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
8648
8704
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8649
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
8705
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
|
|
8650
8706
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
8651
|
-
/* harmony export */
|
|
8652
|
-
/* harmony export */
|
|
8707
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
|
|
8708
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
|
|
8709
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
|
|
8710
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
|
|
8653
8711
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
8654
8712
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
8655
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
8713
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
|
|
8656
8714
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
8657
8715
|
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
|
|
8658
8716
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
8659
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
8660
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
8717
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
|
|
8718
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
|
|
8661
8719
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
8662
8720
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
8663
8721
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
8664
8722
|
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
|
|
8665
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
8666
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
8723
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
|
|
8724
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
|
|
8667
8725
|
/* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
8668
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
8669
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
8670
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
8671
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
8672
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
8673
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
8674
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
8726
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
|
|
8727
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
|
|
8728
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
|
|
8729
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
|
|
8730
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
|
|
8731
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
|
|
8732
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
|
|
8733
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
|
|
8675
8734
|
/* harmony export */ });
|
|
8676
8735
|
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
8677
8736
|
/* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
|
|
@@ -8693,14 +8752,15 @@ const getClassName = (obj)=>{
|
|
|
8693
8752
|
/* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
|
|
8694
8753
|
/* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
|
|
8695
8754
|
/* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
|
|
8696
|
-
/* harmony import */ var
|
|
8697
|
-
/* harmony import */ var
|
|
8698
|
-
/* harmony import */ var
|
|
8699
|
-
/* harmony import */ var
|
|
8700
|
-
/* harmony import */ var
|
|
8701
|
-
/* harmony import */ var
|
|
8702
|
-
/* harmony import */ var
|
|
8703
|
-
/* harmony import */ var
|
|
8755
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
|
|
8756
|
+
/* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
|
|
8757
|
+
/* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
|
|
8758
|
+
/* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
|
|
8759
|
+
/* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
|
|
8760
|
+
/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
|
|
8761
|
+
/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
|
|
8762
|
+
/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
|
|
8763
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
|
|
8704
8764
|
/*!
|
|
8705
8765
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8706
8766
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8735,6 +8795,7 @@ const getClassName = (obj)=>{
|
|
|
8735
8795
|
|
|
8736
8796
|
|
|
8737
8797
|
|
|
8798
|
+
|
|
8738
8799
|
|
|
8739
8800
|
|
|
8740
8801
|
/***/ }),
|
|
@@ -8805,6 +8866,76 @@ const getClassName = (obj)=>{
|
|
|
8805
8866
|
/* harmony export */ ]);
|
|
8806
8867
|
|
|
8807
8868
|
|
|
8869
|
+
/***/ }),
|
|
8870
|
+
|
|
8871
|
+
/***/ 61477:
|
|
8872
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8873
|
+
|
|
8874
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8875
|
+
/* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
|
|
8876
|
+
/* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
|
|
8877
|
+
/* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
|
|
8878
|
+
/* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
|
|
8879
|
+
/* harmony export */ });
|
|
8880
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
8881
|
+
/*!
|
|
8882
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8883
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8884
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
8885
|
+
*/
|
|
8886
|
+
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);
|
|
8887
|
+
/**
|
|
8888
|
+
* The media in `elm` when `elm` is a wrapper media keep in the content (see
|
|
8889
|
+
* `mediaWrappers`): an element of a type `elm` is the wrapper for
|
|
8890
|
+
*/ function getWrappedMedia(jodit, elm) {
|
|
8891
|
+
var _a;
|
|
8892
|
+
for (const [tag, wrapper] of Object.entries((_a = jodit.o.mediaWrappers) !== null && _a !== void 0 ? _a : {})){
|
|
8893
|
+
if (isWrapper(elm, wrapper)) {
|
|
8894
|
+
const media = elm.querySelector(tag);
|
|
8895
|
+
if (media) {
|
|
8896
|
+
return media;
|
|
8897
|
+
}
|
|
8898
|
+
}
|
|
8899
|
+
}
|
|
8900
|
+
return null;
|
|
8901
|
+
}
|
|
8902
|
+
/**
|
|
8903
|
+
* The wrapper media keep in the content (see `mediaWrappers`) that is or
|
|
8904
|
+
* holds `node`
|
|
8905
|
+
*/ function getMediaWrapper(jodit, node) {
|
|
8906
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getWrappedMedia(jodit, elm)), jodit.editor);
|
|
8907
|
+
}
|
|
8908
|
+
/**
|
|
8909
|
+
* An empty wrapper for media of type `tag` to keep in the content (see
|
|
8910
|
+
* `mediaWrappers`), or null when there is none for it
|
|
8911
|
+
*/ function createMediaWrapper(jodit, tag) {
|
|
8912
|
+
var _a;
|
|
8913
|
+
const wrapper = (_a = jodit.o.mediaWrappers) === null || _a === void 0 ? void 0 : _a[tag.toLowerCase()];
|
|
8914
|
+
if (!wrapper) {
|
|
8915
|
+
return null;
|
|
8916
|
+
}
|
|
8917
|
+
return jodit.createInside.element(wrapper.tag, {
|
|
8918
|
+
class: wrapper.className,
|
|
8919
|
+
contenteditable: false,
|
|
8920
|
+
draggable: true
|
|
8921
|
+
});
|
|
8922
|
+
}
|
|
8923
|
+
/**
|
|
8924
|
+
* Puts `element` in the wrapper for its type (see `mediaWrappers`), and
|
|
8925
|
+
* returns the wrapper, or `element` when there is none for it
|
|
8926
|
+
*/ function wrapMedia(jodit, element) {
|
|
8927
|
+
const wrapper = createMediaWrapper(jodit, element.nodeName);
|
|
8928
|
+
if (!wrapper) {
|
|
8929
|
+
return element;
|
|
8930
|
+
}
|
|
8931
|
+
if (element.parentNode) {
|
|
8932
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(element, wrapper);
|
|
8933
|
+
}
|
|
8934
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, element);
|
|
8935
|
+
return wrapper;
|
|
8936
|
+
}
|
|
8937
|
+
|
|
8938
|
+
|
|
8808
8939
|
/***/ }),
|
|
8809
8940
|
|
|
8810
8941
|
/***/ 82501:
|
|
@@ -11282,9 +11413,9 @@ class Selection {
|
|
|
11282
11413
|
if (styles && typeof styles === 'object') {
|
|
11283
11414
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
|
|
11284
11415
|
}
|
|
11285
|
-
const { imageDefaultAlign
|
|
11416
|
+
const { imageDefaultAlign } = this.j.o;
|
|
11286
11417
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
11287
|
-
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign,
|
|
11418
|
+
(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));
|
|
11288
11419
|
}
|
|
11289
11420
|
const onload = ()=>{
|
|
11290
11421
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -30293,6 +30424,7 @@ const INPUT_TAGS = new Set([
|
|
|
30293
30424
|
'textarea',
|
|
30294
30425
|
'select'
|
|
30295
30426
|
]);
|
|
30427
|
+
const TYPE_AHEAD_TIMEOUT = 1000;
|
|
30296
30428
|
const FOCUSABLE_SELECTOR = [
|
|
30297
30429
|
'button:not([disabled])',
|
|
30298
30430
|
'a[href]',
|
|
@@ -30557,11 +30689,56 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30557
30689
|
items[(index + 1) % items.length].focus();
|
|
30558
30690
|
break;
|
|
30559
30691
|
default:
|
|
30560
|
-
|
|
30692
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
30693
|
+
return;
|
|
30694
|
+
}
|
|
30561
30695
|
}
|
|
30562
30696
|
e.preventDefault();
|
|
30563
30697
|
e.stopPropagation();
|
|
30564
30698
|
}
|
|
30699
|
+
/**
|
|
30700
|
+
* The mouse opens a dropdown without taking the focus out of the editor.
|
|
30701
|
+
* While a dropdown list is open, typing there searches the list, as in an
|
|
30702
|
+
* open `<select>`, instead of writing into the content
|
|
30703
|
+
*/ __onEditorKeyDown(e) {
|
|
30704
|
+
if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
|
|
30705
|
+
return;
|
|
30706
|
+
}
|
|
30707
|
+
e.preventDefault();
|
|
30708
|
+
return false;
|
|
30709
|
+
}
|
|
30710
|
+
/**
|
|
30711
|
+
* Typing in a dropdown list focuses the next item whose label starts with
|
|
30712
|
+
* the typed text, whatever their case and accents, and repeating one letter
|
|
30713
|
+
* cycles through the items that start with it, like the WAI-ARIA menu
|
|
30714
|
+
* pattern's type-ahead. The typed text starts again after a pause, or once
|
|
30715
|
+
* the focus has moved on
|
|
30716
|
+
*/ __typeAhead(key, items, index) {
|
|
30717
|
+
var _a, _b;
|
|
30718
|
+
const now = Date.now();
|
|
30719
|
+
if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
|
|
30720
|
+
this.__typed = '';
|
|
30721
|
+
}
|
|
30722
|
+
if (key.length !== 1 || key === ' ' && !this.__typed) {
|
|
30723
|
+
return false;
|
|
30724
|
+
}
|
|
30725
|
+
this.__typedAt = now;
|
|
30726
|
+
this.__typed += key;
|
|
30727
|
+
this.__typedTo = items[index];
|
|
30728
|
+
const { compare } = new Intl.Collator(undefined, {
|
|
30729
|
+
usage: 'search',
|
|
30730
|
+
sensitivity: 'base'
|
|
30731
|
+
}), 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);
|
|
30732
|
+
for(let i = 0; i < items.length; i += 1){
|
|
30733
|
+
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 : '';
|
|
30734
|
+
if (compare(label.slice(0, prefix.length), prefix) === 0) {
|
|
30735
|
+
item.focus();
|
|
30736
|
+
this.__typedTo = item;
|
|
30737
|
+
break;
|
|
30738
|
+
}
|
|
30739
|
+
}
|
|
30740
|
+
return true;
|
|
30741
|
+
}
|
|
30565
30742
|
/**
|
|
30566
30743
|
* Visible controls of the opened dropdown that can take the focus
|
|
30567
30744
|
*/ __popupFocusables() {
|
|
@@ -30574,12 +30751,16 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30574
30751
|
/**
|
|
30575
30752
|
* Create an open popup list
|
|
30576
30753
|
*/ __openControlList(control) {
|
|
30577
|
-
var _a;
|
|
30754
|
+
var _a, _b, _c, _d, _e;
|
|
30578
30755
|
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);
|
|
30579
30756
|
const list = control.list;
|
|
30580
30757
|
const menu = this.openPopup();
|
|
30581
|
-
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
30582
30758
|
menu.parentElement = this;
|
|
30759
|
+
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);
|
|
30760
|
+
if (content) {
|
|
30761
|
+
return this.__openMenu(menu, content);
|
|
30762
|
+
}
|
|
30763
|
+
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
30583
30764
|
toolbar.parentElement = menu;
|
|
30584
30765
|
toolbar.mode = 'vertical';
|
|
30585
30766
|
const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
|
|
@@ -30630,7 +30811,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30630
30811
|
return childControl;
|
|
30631
30812
|
};
|
|
30632
30813
|
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);
|
|
30633
|
-
|
|
30814
|
+
this.__openMenu(menu, toolbar);
|
|
30815
|
+
}
|
|
30816
|
+
__openMenu(menu, content) {
|
|
30817
|
+
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);
|
|
30634
30818
|
this.state.activated = true;
|
|
30635
30819
|
}
|
|
30636
30820
|
onOutsideClick(e) {
|
|
@@ -30644,7 +30828,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30644
30828
|
openPopup() {
|
|
30645
30829
|
this.__closePopup();
|
|
30646
30830
|
this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
|
|
30647
|
-
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30831
|
+
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);
|
|
30648
30832
|
return this.openedPopup;
|
|
30649
30833
|
}
|
|
30650
30834
|
__closePopup() {
|
|
@@ -30659,7 +30843,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30659
30843
|
// popup while the outer `removeChild` is still running and Chrome
|
|
30660
30844
|
// throws NotFoundError. See #1458
|
|
30661
30845
|
this.openedPopup = null;
|
|
30662
|
-
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
|
|
30846
|
+
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
30663
30847
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
30664
30848
|
// the button, otherwise it would fall out to the document
|
|
30665
30849
|
const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -30724,6 +30908,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30724
30908
|
currentValue: '',
|
|
30725
30909
|
hasTrigger: false
|
|
30726
30910
|
};
|
|
30911
|
+
this.__typed = '';
|
|
30912
|
+
this.__typedAt = 0;
|
|
30913
|
+
this.__typedTo = null;
|
|
30727
30914
|
this.openedPopup = null;
|
|
30728
30915
|
const button = this.getElm('button');
|
|
30729
30916
|
(0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_14__.assert)(button, 'Element button should exists');
|
|
@@ -30773,6 +30960,9 @@ __decorate([
|
|
|
30773
30960
|
__decorate([
|
|
30774
30961
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30775
30962
|
], ToolbarButton.prototype, "__onPopupKeyDown", null);
|
|
30963
|
+
__decorate([
|
|
30964
|
+
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30965
|
+
], ToolbarButton.prototype, "__onEditorKeyDown", null);
|
|
30776
30966
|
__decorate([
|
|
30777
30967
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30778
30968
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -37369,7 +37559,12 @@ const brBoxes = new Set([
|
|
|
37369
37559
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(br, false)) {
|
|
37370
37560
|
return;
|
|
37371
37561
|
}
|
|
37372
|
-
|
|
37562
|
+
// After a block is inserted the caret is already at the end of its
|
|
37563
|
+
// text; moving it before the `<br>` would put it on a line of its own
|
|
37564
|
+
// below the block (#1315)
|
|
37565
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(node, jodit.s.range.startContainer)) {
|
|
37566
|
+
jodit.s.setCursorBefore(br);
|
|
37567
|
+
}
|
|
37373
37568
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(br);
|
|
37374
37569
|
}
|
|
37375
37570
|
}
|
|
@@ -37403,13 +37598,22 @@ const brBoxes = new Set([
|
|
|
37403
37598
|
let current = (_b = (_a = jodit.s.current()) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null;
|
|
37404
37599
|
while(current && current !== jodit.editor){
|
|
37405
37600
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(current)) {
|
|
37406
|
-
|
|
37601
|
+
// In DIV mode the caret's own empty block is a line, like
|
|
37602
|
+
// `<p><br></p>`, not a container to insert into (#1315)
|
|
37603
|
+
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);
|
|
37604
|
+
if (jodit.o.dtd.blockLimits[current.nodeName.toLowerCase()] && !isEmptyLine) {
|
|
37407
37605
|
break;
|
|
37408
37606
|
}
|
|
37409
37607
|
parent = current;
|
|
37410
37608
|
}
|
|
37411
37609
|
current = current.parentElement;
|
|
37412
37610
|
}
|
|
37611
|
+
// A list that is all of the inserted content adds its items to the
|
|
37612
|
+
// list of the item it goes into, as the browsers' own paste does
|
|
37613
|
+
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)) {
|
|
37614
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(node);
|
|
37615
|
+
parent = current;
|
|
37616
|
+
}
|
|
37413
37617
|
if (parent) {
|
|
37414
37618
|
jodit.s.setCursorAfter(parent);
|
|
37415
37619
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
|
|
@@ -37460,10 +37664,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
37460
37664
|
audio: 1,
|
|
37461
37665
|
body: 1,
|
|
37462
37666
|
caption: 1,
|
|
37667
|
+
dd: 1,
|
|
37463
37668
|
details: 1,
|
|
37464
37669
|
dir: 1,
|
|
37465
37670
|
div: 1,
|
|
37466
37671
|
dl: 1,
|
|
37672
|
+
dt: 1,
|
|
37467
37673
|
fieldset: 1,
|
|
37468
37674
|
figcaption: 1,
|
|
37469
37675
|
figure: 1,
|
|
@@ -37471,6 +37677,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.dtd = {
|
|
|
37471
37677
|
form: 1,
|
|
37472
37678
|
header: 1,
|
|
37473
37679
|
hgroup: 1,
|
|
37680
|
+
li: 1,
|
|
37474
37681
|
main: 1,
|
|
37475
37682
|
menu: 1,
|
|
37476
37683
|
nav: 1,
|
|
@@ -38236,12 +38443,14 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38236
38443
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
38237
38444
|
|
|
38238
38445
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
38239
|
-
/* harmony import */ var
|
|
38240
|
-
/* harmony import */ var
|
|
38241
|
-
/* harmony import */ var
|
|
38242
|
-
/* harmony import */ var
|
|
38243
|
-
/* harmony import */ var
|
|
38244
|
-
/* harmony import */ var
|
|
38446
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
38447
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
38448
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
38449
|
+
/* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12153);
|
|
38450
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
|
|
38451
|
+
/* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4104);
|
|
38452
|
+
/* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83709);
|
|
38453
|
+
/* harmony import */ var _font_picker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40222);
|
|
38245
38454
|
/*!
|
|
38246
38455
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38247
38456
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38253,11 +38462,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
38253
38462
|
|
|
38254
38463
|
|
|
38255
38464
|
|
|
38465
|
+
|
|
38466
|
+
|
|
38256
38467
|
/**
|
|
38257
38468
|
* Default font-size points
|
|
38258
|
-
*/
|
|
38259
|
-
|
|
38260
|
-
|
|
38469
|
+
*/ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.defaultFontSizePoints = 'px';
|
|
38470
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
|
|
38471
|
+
googleFonts: {
|
|
38472
|
+
url: ''
|
|
38473
|
+
}
|
|
38474
|
+
};
|
|
38475
|
+
_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"]);
|
|
38476
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
|
|
38261
38477
|
command: 'fontsize',
|
|
38262
38478
|
data: {
|
|
38263
38479
|
cssRule: 'font-size',
|
|
@@ -38303,7 +38519,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
38303
38519
|
}
|
|
38304
38520
|
const control = button.control;
|
|
38305
38521
|
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
38306
|
-
const value = (0,
|
|
38522
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
|
|
38307
38523
|
if (cssKey === 'font-size') {
|
|
38308
38524
|
const numValue = parseFloat(value.toString());
|
|
38309
38525
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -38335,12 +38551,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
38335
38551
|
return keySet.has(normalize(value.toString()));
|
|
38336
38552
|
}
|
|
38337
38553
|
};
|
|
38338
|
-
|
|
38339
|
-
|
|
38554
|
+
const hadSelection = new WeakSet();
|
|
38555
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = {
|
|
38556
|
+
..._config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize,
|
|
38340
38557
|
command: 'fontname',
|
|
38341
38558
|
textTemplate: (j, value)=>{
|
|
38342
38559
|
const [first] = value.split(',');
|
|
38343
|
-
return (0,
|
|
38560
|
+
return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimChars)(first, '"\'');
|
|
38344
38561
|
},
|
|
38345
38562
|
list: {
|
|
38346
38563
|
'': 'Default',
|
|
@@ -38362,6 +38579,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38362
38579
|
} catch (_a) {}
|
|
38363
38580
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
38364
38581
|
},
|
|
38582
|
+
popup: (editor, current, close, button)=>editor.o.font.googleFonts.url ? new _font_picker_js__WEBPACK_IMPORTED_MODULE_8__.UIFontPicker(editor, button, close) : false,
|
|
38365
38583
|
data: {
|
|
38366
38584
|
cssRule: 'font-family',
|
|
38367
38585
|
normalize: (v)=>{
|
|
@@ -38370,19 +38588,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38370
38588
|
},
|
|
38371
38589
|
// When no font is explicitly set, the computed font-family equals the
|
|
38372
38590
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
38373
|
-
// button shows the `Default`
|
|
38374
|
-
// See #1370
|
|
38375
|
-
value: (editor)=>{
|
|
38376
|
-
const current = editor.s.current();
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
if (
|
|
38591
|
+
// button shows the list's `Default` entry, when it has one, instead of
|
|
38592
|
+
// that raw stack. See #1370
|
|
38593
|
+
value: (editor, button)=>{
|
|
38594
|
+
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);
|
|
38595
|
+
// Until there is a selection the button shows the editor's own font,
|
|
38596
|
+
// and afterwards the font of the last one
|
|
38597
|
+
if (box) {
|
|
38598
|
+
hadSelection.add(button);
|
|
38599
|
+
} else if (hadSelection.has(button)) {
|
|
38382
38600
|
return;
|
|
38383
38601
|
}
|
|
38384
|
-
const value = (0,
|
|
38385
|
-
if (value === (0,
|
|
38602
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, 'font-family').toString(), { list } = button.control;
|
|
38603
|
+
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 : {}))) {
|
|
38386
38604
|
return '';
|
|
38387
38605
|
}
|
|
38388
38606
|
return value;
|
|
@@ -38391,6 +38609,267 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38391
38609
|
};
|
|
38392
38610
|
|
|
38393
38611
|
|
|
38612
|
+
/***/ }),
|
|
38613
|
+
|
|
38614
|
+
/***/ 40222:
|
|
38615
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
38616
|
+
|
|
38617
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38618
|
+
/* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
|
|
38619
|
+
/* harmony export */ });
|
|
38620
|
+
/* harmony import */ var _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87325);
|
|
38621
|
+
/* harmony import */ var _core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37133);
|
|
38622
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
38623
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
38624
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68345);
|
|
38625
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
38626
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
38627
|
+
/* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37790);
|
|
38628
|
+
/* harmony import */ var _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48538);
|
|
38629
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41870);
|
|
38630
|
+
/*!
|
|
38631
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38632
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
38633
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
38634
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
38635
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38636
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
38637
|
+
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;
|
|
38638
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
38639
|
+
};
|
|
38640
|
+
|
|
38641
|
+
|
|
38642
|
+
|
|
38643
|
+
|
|
38644
|
+
|
|
38645
|
+
|
|
38646
|
+
|
|
38647
|
+
|
|
38648
|
+
|
|
38649
|
+
|
|
38650
|
+
const HEADINGS = [
|
|
38651
|
+
'h1',
|
|
38652
|
+
'h2',
|
|
38653
|
+
'h3',
|
|
38654
|
+
'h4',
|
|
38655
|
+
'h5',
|
|
38656
|
+
'h6'
|
|
38657
|
+
];
|
|
38658
|
+
const GENERIC_FAMILIES = new Set([
|
|
38659
|
+
'serif',
|
|
38660
|
+
'sans-serif',
|
|
38661
|
+
'monospace',
|
|
38662
|
+
'cursive',
|
|
38663
|
+
'fantasy',
|
|
38664
|
+
'system-ui',
|
|
38665
|
+
'ui-serif',
|
|
38666
|
+
'ui-sans-serif',
|
|
38667
|
+
'ui-monospace',
|
|
38668
|
+
'ui-rounded'
|
|
38669
|
+
]);
|
|
38670
|
+
/**
|
|
38671
|
+
* A family that names a font, not a generic family or a vendor keyword such
|
|
38672
|
+
* as `-apple-system`
|
|
38673
|
+
*/ function isFontName(family) {
|
|
38674
|
+
return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
|
|
38675
|
+
}
|
|
38676
|
+
/**
|
|
38677
|
+
* The font family dropdown with Google Fonts. Under their own headings it
|
|
38678
|
+
* lists the fonts the editor's styles give text and headings, the fonts the
|
|
38679
|
+
* content uses, the control's list and the Google Fonts library
|
|
38680
|
+
*/ let UIFontPicker = class UIFontPicker extends _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__.UIElement {
|
|
38681
|
+
className() {
|
|
38682
|
+
return 'UIFontPicker';
|
|
38683
|
+
}
|
|
38684
|
+
__render() {
|
|
38685
|
+
var _a, _b;
|
|
38686
|
+
const { control } = this.__button, { list = {} } = control, listed = (0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.map((key)=>({
|
|
38687
|
+
value: key.toString(),
|
|
38688
|
+
title: key.toString()
|
|
38689
|
+
})) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__.keys)(list, false).map((key)=>({
|
|
38690
|
+
value: key,
|
|
38691
|
+
title: list[key].toString()
|
|
38692
|
+
})), google = Array.from(this.__googleFonts.fonts.values(), (font)=>({
|
|
38693
|
+
value: this.__googleFonts.value(font),
|
|
38694
|
+
title: font.family,
|
|
38695
|
+
font
|
|
38696
|
+
})), byFamily = new Map();
|
|
38697
|
+
[
|
|
38698
|
+
...google,
|
|
38699
|
+
...listed
|
|
38700
|
+
].forEach((entry)=>byFamily.set((0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value), entry));
|
|
38701
|
+
const theme = new Map(), used = new Map();
|
|
38702
|
+
// The theme's own fonts are listed too, so its body font can be chosen
|
|
38703
|
+
// to take a font off
|
|
38704
|
+
this.__themeFonts().forEach((fontFamily)=>{
|
|
38705
|
+
var _a;
|
|
38706
|
+
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) ? {
|
|
38707
|
+
value: fontFamily,
|
|
38708
|
+
title
|
|
38709
|
+
} : undefined;
|
|
38710
|
+
entry && !theme.has(family) && theme.set(family, entry);
|
|
38711
|
+
});
|
|
38712
|
+
this.__usedFonts().forEach((fontFamily)=>{
|
|
38713
|
+
const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), entry = byFamily.get(family);
|
|
38714
|
+
entry && !theme.has(family) && used.set(family, entry);
|
|
38715
|
+
});
|
|
38716
|
+
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 : '');
|
|
38717
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(this.container);
|
|
38718
|
+
this.__fonts.clear();
|
|
38719
|
+
defaultEntry && this.__append(current, [
|
|
38720
|
+
defaultEntry
|
|
38721
|
+
]);
|
|
38722
|
+
this.__append(current, [
|
|
38723
|
+
...theme.values()
|
|
38724
|
+
], 'Theme fonts');
|
|
38725
|
+
this.__append(current, [
|
|
38726
|
+
...used.values()
|
|
38727
|
+
], 'Used fonts');
|
|
38728
|
+
this.__append(current, listed.filter((entry)=>entry !== defaultEntry), 'System fonts');
|
|
38729
|
+
this.__append(current, google, 'Google Fonts');
|
|
38730
|
+
this.__observeGoogleFonts();
|
|
38731
|
+
}
|
|
38732
|
+
/**
|
|
38733
|
+
* The fonts the editor's styles give text and each heading
|
|
38734
|
+
*/ __themeFonts() {
|
|
38735
|
+
const { editor } = this.j, fonts = [
|
|
38736
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(editor, 'font-family').toString()
|
|
38737
|
+
];
|
|
38738
|
+
HEADINGS.forEach((tag)=>{
|
|
38739
|
+
const heading = this.j.createInside.element(tag, {
|
|
38740
|
+
style: 'display: none'
|
|
38741
|
+
});
|
|
38742
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(editor, heading);
|
|
38743
|
+
fonts.push((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(heading, 'font-family').toString());
|
|
38744
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(heading);
|
|
38745
|
+
});
|
|
38746
|
+
return fonts;
|
|
38747
|
+
}
|
|
38748
|
+
/**
|
|
38749
|
+
* The fonts the content sets
|
|
38750
|
+
*/ __usedFonts() {
|
|
38751
|
+
return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), (element)=>element.style.fontFamily);
|
|
38752
|
+
}
|
|
38753
|
+
__append(current, entries, heading) {
|
|
38754
|
+
if (!entries.length) {
|
|
38755
|
+
return;
|
|
38756
|
+
}
|
|
38757
|
+
const { control } = this.__button, group = this.j.c.div(this.getFullElName('group'));
|
|
38758
|
+
if (heading) {
|
|
38759
|
+
const title = this.j.c.div(this.getFullElName('heading'), {
|
|
38760
|
+
id: `${this.getFullElName('heading')}-${(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.uniqueUid)()}`
|
|
38761
|
+
});
|
|
38762
|
+
title.textContent = this.i18n(heading);
|
|
38763
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(group, {
|
|
38764
|
+
role: 'group',
|
|
38765
|
+
'aria-labelledby': title.id
|
|
38766
|
+
});
|
|
38767
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, title);
|
|
38768
|
+
}
|
|
38769
|
+
entries.forEach((entry)=>{
|
|
38770
|
+
var _a, _b;
|
|
38771
|
+
const item = this.j.c.element('button', {
|
|
38772
|
+
type: 'button',
|
|
38773
|
+
class: this.getFullElName('item'),
|
|
38774
|
+
'data-value': entry.value,
|
|
38775
|
+
'aria-pressed': (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value) === current
|
|
38776
|
+
});
|
|
38777
|
+
if (entry.font) {
|
|
38778
|
+
item.textContent = entry.title;
|
|
38779
|
+
this.__fonts.set(item, entry.font);
|
|
38780
|
+
} else {
|
|
38781
|
+
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;
|
|
38782
|
+
}
|
|
38783
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, item);
|
|
38784
|
+
});
|
|
38785
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, group);
|
|
38786
|
+
}
|
|
38787
|
+
/**
|
|
38788
|
+
* Shows the names of the Google Fonts in view, and those just below it,
|
|
38789
|
+
* in their own fonts. Setting every item's font up front would have the
|
|
38790
|
+
* browser look for each of the library's families among the installed
|
|
38791
|
+
* fonts the first time the list opens
|
|
38792
|
+
*/ __observeGoogleFonts() {
|
|
38793
|
+
this.j.async.requestAnimationFrame(()=>{
|
|
38794
|
+
var _a;
|
|
38795
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
38796
|
+
if (this.isDestructed || !this.__fonts.size) {
|
|
38797
|
+
return;
|
|
38798
|
+
}
|
|
38799
|
+
const observer = new IntersectionObserver((entries)=>{
|
|
38800
|
+
const fonts = [];
|
|
38801
|
+
entries.forEach(({ isIntersecting, target })=>{
|
|
38802
|
+
const font = this.__fonts.get(target);
|
|
38803
|
+
if (isIntersecting && font) {
|
|
38804
|
+
fonts.push(font);
|
|
38805
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(target, {
|
|
38806
|
+
fontFamily: this.__googleFonts.value(font)
|
|
38807
|
+
});
|
|
38808
|
+
observer.unobserve(target);
|
|
38809
|
+
}
|
|
38810
|
+
});
|
|
38811
|
+
this.__googleFonts.preview(fonts);
|
|
38812
|
+
}, {
|
|
38813
|
+
root: this.container.parentElement,
|
|
38814
|
+
rootMargin: '0px 0px 400px 0px'
|
|
38815
|
+
});
|
|
38816
|
+
this.__fonts.forEach((_, item)=>observer.observe(item));
|
|
38817
|
+
this.__observer = observer;
|
|
38818
|
+
});
|
|
38819
|
+
}
|
|
38820
|
+
/**
|
|
38821
|
+
* Keeps the editor's selection, as the toolbar buttons do
|
|
38822
|
+
*/ onMouseDown(e) {
|
|
38823
|
+
e.preventDefault();
|
|
38824
|
+
}
|
|
38825
|
+
onClick(e) {
|
|
38826
|
+
var _a;
|
|
38827
|
+
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);
|
|
38828
|
+
if (!item) {
|
|
38829
|
+
return;
|
|
38830
|
+
}
|
|
38831
|
+
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
|
|
38832
|
+
inherited = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(value) === (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(this.__blockFont());
|
|
38833
|
+
font && !inherited && this.__googleFonts.load(font);
|
|
38834
|
+
this.j.execCommand('fontname', false, inherited ? '' : value);
|
|
38835
|
+
this.__close();
|
|
38836
|
+
}
|
|
38837
|
+
/**
|
|
38838
|
+
* The font the selected text has without a font of its own: its block's
|
|
38839
|
+
*/ __blockFont() {
|
|
38840
|
+
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);
|
|
38841
|
+
return (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
|
|
38842
|
+
}
|
|
38843
|
+
destruct() {
|
|
38844
|
+
var _a;
|
|
38845
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
38846
|
+
super.destruct();
|
|
38847
|
+
}
|
|
38848
|
+
constructor(jodit, __button, __close){
|
|
38849
|
+
super(jodit);
|
|
38850
|
+
this.__button = __button;
|
|
38851
|
+
this.__close = __close;
|
|
38852
|
+
this.__fonts = new Map();
|
|
38853
|
+
this.__observer = null;
|
|
38854
|
+
this.__googleFonts = jodit.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.GoogleFonts);
|
|
38855
|
+
this.__render();
|
|
38856
|
+
if (!this.__googleFonts.fonts.size) {
|
|
38857
|
+
this.__googleFonts.ready.then(()=>!this.isDestructed && this.__render());
|
|
38858
|
+
}
|
|
38859
|
+
}
|
|
38860
|
+
};
|
|
38861
|
+
__decorate([
|
|
38862
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:mousedown')
|
|
38863
|
+
], UIFontPicker.prototype, "onMouseDown", null);
|
|
38864
|
+
__decorate([
|
|
38865
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:click')
|
|
38866
|
+
], UIFontPicker.prototype, "onClick", null);
|
|
38867
|
+
UIFontPicker = __decorate([
|
|
38868
|
+
_core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
38869
|
+
], UIFontPicker);
|
|
38870
|
+
|
|
38871
|
+
|
|
38872
|
+
|
|
38394
38873
|
/***/ }),
|
|
38395
38874
|
|
|
38396
38875
|
/***/ 23399:
|
|
@@ -38400,6 +38879,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38400
38879
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(580);
|
|
38401
38880
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
|
|
38402
38881
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28252);
|
|
38882
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41870);
|
|
38403
38883
|
/*!
|
|
38404
38884
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38405
38885
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38407,6 +38887,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38407
38887
|
*/
|
|
38408
38888
|
|
|
38409
38889
|
|
|
38890
|
+
|
|
38410
38891
|
/**
|
|
38411
38892
|
* Process commands `fontsize` and `fontname`
|
|
38412
38893
|
*/ function font(editor) {
|
|
@@ -38417,6 +38898,18 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38417
38898
|
name: 'fontsize',
|
|
38418
38899
|
group: 'font'
|
|
38419
38900
|
});
|
|
38901
|
+
if (editor.o.font.googleFonts.url) {
|
|
38902
|
+
const googleFonts = editor.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(()=>googleFonts.loadUsed(), editor.defaultTimeout);
|
|
38903
|
+
googleFonts.ready.then(loadUsed);
|
|
38904
|
+
editor.e.on('afterInit afterSetMode change', loadUsed);
|
|
38905
|
+
}
|
|
38906
|
+
// An iframe's stylesheets can arrive after the toolbar first shows the
|
|
38907
|
+
// editor's font
|
|
38908
|
+
editor.e.on('afterInit', ()=>{
|
|
38909
|
+
editor.iframe && editor.e.on(editor.ed, 'load', ()=>editor.e.fire('updateToolbar'), {
|
|
38910
|
+
capture: true
|
|
38911
|
+
});
|
|
38912
|
+
});
|
|
38420
38913
|
const callback = (command, second, third)=>{
|
|
38421
38914
|
switch(command){
|
|
38422
38915
|
case 'fontsize':
|
|
@@ -38446,6 +38939,161 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38446
38939
|
_core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
38447
38940
|
|
|
38448
38941
|
|
|
38942
|
+
/***/ }),
|
|
38943
|
+
|
|
38944
|
+
/***/ 41870:
|
|
38945
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
38946
|
+
|
|
38947
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38948
|
+
/* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
|
|
38949
|
+
/* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
|
|
38950
|
+
/* harmony export */ });
|
|
38951
|
+
/* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
|
|
38952
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
38953
|
+
/* harmony import */ var _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54079);
|
|
38954
|
+
/*!
|
|
38955
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38956
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
38957
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
38958
|
+
*/
|
|
38959
|
+
|
|
38960
|
+
|
|
38961
|
+
const CSS_URL = 'https://fonts.googleapis.com/css2';
|
|
38962
|
+
// `cursive` and `fantasy` stand in badly for a handwriting or display font
|
|
38963
|
+
const GENERIC_FAMILIES = {
|
|
38964
|
+
serif: 'serif',
|
|
38965
|
+
monospace: 'monospace'
|
|
38966
|
+
};
|
|
38967
|
+
const libraries = new Map();
|
|
38968
|
+
/**
|
|
38969
|
+
* The fonts of the library at `url`, fetched once for every editor on the page
|
|
38970
|
+
*/ function library(jodit, url) {
|
|
38971
|
+
let fonts = libraries.get(url);
|
|
38972
|
+
if (!fonts) {
|
|
38973
|
+
const ajax = new _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__.Ajax({
|
|
38974
|
+
url,
|
|
38975
|
+
method: 'GET'
|
|
38976
|
+
}, jodit.o.defaultAjaxOptions);
|
|
38977
|
+
fonts = ajax.send().then((response)=>response.json())// A font without a regular style can't be asked for by its name alone
|
|
38978
|
+
.then(({ items })=>items.filter((font)=>font.variants.includes('regular'))).catch(()=>{
|
|
38979
|
+
libraries.delete(url);
|
|
38980
|
+
return [];
|
|
38981
|
+
}).finally(()=>ajax.destruct());
|
|
38982
|
+
libraries.set(url, fonts);
|
|
38983
|
+
}
|
|
38984
|
+
return fonts;
|
|
38985
|
+
}
|
|
38986
|
+
/**
|
|
38987
|
+
* The first family of a `font-family` value, unquoted and in lower case for
|
|
38988
|
+
* comparing
|
|
38989
|
+
*/ function firstFamily(fontFamily) {
|
|
38990
|
+
return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
|
|
38991
|
+
}
|
|
38992
|
+
/**
|
|
38993
|
+
* Loads fonts from Google Fonts: the whole of each font the content uses into
|
|
38994
|
+
* the editor's document, and just the letters of its name for the font list
|
|
38995
|
+
*/ class GoogleFonts extends _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
|
|
38996
|
+
className() {
|
|
38997
|
+
return 'GoogleFonts';
|
|
38998
|
+
}
|
|
38999
|
+
/**
|
|
39000
|
+
* The library's font named first in a `font-family` value
|
|
39001
|
+
*/ find(fontFamily) {
|
|
39002
|
+
return this.fonts.get(firstFamily(fontFamily));
|
|
39003
|
+
}
|
|
39004
|
+
/**
|
|
39005
|
+
* The `font-family` value that applies a font
|
|
39006
|
+
*/ value(font) {
|
|
39007
|
+
var _a;
|
|
39008
|
+
return `'${font.family}', ${(_a = GENERIC_FAMILIES[font.category]) !== null && _a !== void 0 ? _a : 'sans-serif'}`;
|
|
39009
|
+
}
|
|
39010
|
+
/**
|
|
39011
|
+
* Loads the regular, italic, bold and bold italic styles that a font has
|
|
39012
|
+
* into the editor's document
|
|
39013
|
+
*/ load(font) {
|
|
39014
|
+
const loaded = this.__loadedInto(this.j.ed);
|
|
39015
|
+
if (loaded.has(font.family)) {
|
|
39016
|
+
return;
|
|
39017
|
+
}
|
|
39018
|
+
loaded.add(font.family);
|
|
39019
|
+
const styles = [
|
|
39020
|
+
[
|
|
39021
|
+
'regular',
|
|
39022
|
+
'0,400'
|
|
39023
|
+
],
|
|
39024
|
+
[
|
|
39025
|
+
'700',
|
|
39026
|
+
'0,700'
|
|
39027
|
+
],
|
|
39028
|
+
[
|
|
39029
|
+
'italic',
|
|
39030
|
+
'1,400'
|
|
39031
|
+
],
|
|
39032
|
+
[
|
|
39033
|
+
'700italic',
|
|
39034
|
+
'1,700'
|
|
39035
|
+
]
|
|
39036
|
+
].filter(([variant])=>font.variants.includes(variant)).map(([, style])=>style);
|
|
39037
|
+
this.__append(this.j.ed, `family=${this.__family(font)}:ital,wght@${styles.join(';')}`);
|
|
39038
|
+
}
|
|
39039
|
+
/**
|
|
39040
|
+
* Loads every font of the library that the content uses
|
|
39041
|
+
*/ loadUsed() {
|
|
39042
|
+
this.j.editor.querySelectorAll('[style*="font-family"]').forEach((element)=>{
|
|
39043
|
+
const font = this.find(element.style.fontFamily);
|
|
39044
|
+
font && this.load(font);
|
|
39045
|
+
});
|
|
39046
|
+
}
|
|
39047
|
+
/**
|
|
39048
|
+
* Loads into the page just the letters of each font's name, so the font
|
|
39049
|
+
* list can show the name in its font
|
|
39050
|
+
*/ preview(fonts) {
|
|
39051
|
+
const loaded = this.__loadedInto(this.j.od);
|
|
39052
|
+
fonts = fonts.filter((font)=>!this.__previewed.has(font.family) && !loaded.has(font.family));
|
|
39053
|
+
if (!fonts.length) {
|
|
39054
|
+
return;
|
|
39055
|
+
}
|
|
39056
|
+
fonts.forEach((font)=>this.__previewed.add(font.family));
|
|
39057
|
+
const families = fonts.map((font)=>`family=${this.__family(font)}`), letters = new Set(fonts.map((font)=>font.family).join(''));
|
|
39058
|
+
this.__append(this.j.od, `${families.join('&')}&text=${encodeURIComponent([
|
|
39059
|
+
...letters
|
|
39060
|
+
].join(''))}`);
|
|
39061
|
+
}
|
|
39062
|
+
__loadedInto(doc) {
|
|
39063
|
+
var _a;
|
|
39064
|
+
const loaded = (_a = this.__loaded.get(doc)) !== null && _a !== void 0 ? _a : new Set();
|
|
39065
|
+
this.__loaded.set(doc, loaded);
|
|
39066
|
+
return loaded;
|
|
39067
|
+
}
|
|
39068
|
+
__family(font) {
|
|
39069
|
+
return encodeURIComponent(font.family).replace(/%20/g, '+');
|
|
39070
|
+
}
|
|
39071
|
+
__append(doc, query) {
|
|
39072
|
+
const link = doc.createElement('link');
|
|
39073
|
+
link.rel = 'stylesheet';
|
|
39074
|
+
link.href = `${CSS_URL}?${query}&display=swap`;
|
|
39075
|
+
doc.head.appendChild(link);
|
|
39076
|
+
this.__links.push(link);
|
|
39077
|
+
}
|
|
39078
|
+
destruct() {
|
|
39079
|
+
this.__links.forEach((link)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(link));
|
|
39080
|
+
super.destruct();
|
|
39081
|
+
}
|
|
39082
|
+
constructor(jodit){
|
|
39083
|
+
super(jodit);
|
|
39084
|
+
/**
|
|
39085
|
+
* The library by lower-case family, empty until it arrives
|
|
39086
|
+
*/ this.fonts = new Map();
|
|
39087
|
+
this.__links = [];
|
|
39088
|
+
this.__loaded = new WeakMap();
|
|
39089
|
+
this.__previewed = new Set();
|
|
39090
|
+
this.ready = library(jodit, jodit.o.font.googleFonts.url).then((fonts)=>{
|
|
39091
|
+
fonts.forEach((font)=>this.fonts.set(font.family.toLowerCase(), font));
|
|
39092
|
+
});
|
|
39093
|
+
}
|
|
39094
|
+
}
|
|
39095
|
+
|
|
39096
|
+
|
|
38449
39097
|
/***/ }),
|
|
38450
39098
|
|
|
38451
39099
|
/***/ 4104:
|
|
@@ -39701,12 +40349,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
39701
40349
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39702
40350
|
/* harmony export */ readValuesFromImage: function() { return /* binding */ readValuesFromImage; }
|
|
39703
40351
|
/* harmony export */ });
|
|
39704
|
-
/* harmony import */ var
|
|
39705
|
-
/* harmony import */ var
|
|
39706
|
-
/* harmony import */ var
|
|
39707
|
-
/* harmony import */ var
|
|
39708
|
-
/* harmony import */ var
|
|
39709
|
-
/* harmony import */ var
|
|
40352
|
+
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
40353
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
40354
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
40355
|
+
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
|
|
40356
|
+
/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
|
|
40357
|
+
/* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
|
|
40358
|
+
/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
|
|
39710
40359
|
/*!
|
|
39711
40360
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39712
40361
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39717,32 +40366,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
39717
40366
|
|
|
39718
40367
|
|
|
39719
40368
|
|
|
40369
|
+
|
|
39720
40370
|
/**
|
|
39721
40371
|
* Read values from image and set it to state
|
|
39722
40372
|
* @private
|
|
39723
40373
|
*/ async function readValuesFromImage(j, state) {
|
|
39724
40374
|
const { sourceImage: image, values } = state;
|
|
39725
|
-
(0,
|
|
40375
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
|
|
39726
40376
|
// Border radius
|
|
39727
|
-
values.borderRadius = parseInt((0,
|
|
40377
|
+
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
39728
40378
|
// Id
|
|
39729
|
-
values.id = (0,
|
|
40379
|
+
values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id') || '';
|
|
39730
40380
|
// Title
|
|
39731
|
-
values.imageTitle = (0,
|
|
40381
|
+
values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title') || '';
|
|
39732
40382
|
// Alt
|
|
39733
|
-
values.imageAlt = (0,
|
|
40383
|
+
values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt') || '';
|
|
39734
40384
|
// Style
|
|
39735
|
-
values.style = (0,
|
|
40385
|
+
values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style') || '';
|
|
39736
40386
|
// Classes
|
|
39737
|
-
values.classes = ((0,
|
|
40387
|
+
values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
39738
40388
|
// Margins
|
|
39739
|
-
(0,
|
|
40389
|
+
(0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
|
|
39740
40390
|
// Link
|
|
39741
|
-
(0,
|
|
40391
|
+
(0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
|
|
39742
40392
|
// Src
|
|
39743
|
-
values.imageSrc = (0,
|
|
40393
|
+
values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
|
|
39744
40394
|
// Image size
|
|
39745
|
-
return (0,
|
|
40395
|
+
return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
|
|
39746
40396
|
}
|
|
39747
40397
|
|
|
39748
40398
|
|
|
@@ -40755,7 +41405,7 @@ UIImagePositionTab = __decorate([
|
|
|
40755
41405
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
40756
41406
|
}
|
|
40757
41407
|
if (opt.image.editAlign) {
|
|
40758
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align,
|
|
41408
|
+
(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));
|
|
40759
41409
|
}
|
|
40760
41410
|
}
|
|
40761
41411
|
|
|
@@ -41485,6 +42135,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
41485
42135
|
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
|
|
41486
42136
|
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
|
|
41487
42137
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
42138
|
+
/* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
41488
42139
|
/*!
|
|
41489
42140
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41490
42141
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -41493,9 +42144,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
41493
42144
|
|
|
41494
42145
|
|
|
41495
42146
|
|
|
41496
|
-
|
|
41497
|
-
// keep inline styles
|
|
41498
|
-
const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42147
|
+
|
|
41499
42148
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
41500
42149
|
const lineAlign = (editor, elm)=>{
|
|
41501
42150
|
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;
|
|
@@ -41516,7 +42165,7 @@ const lineAlign = (editor, elm)=>{
|
|
|
41516
42165
|
return 'left';
|
|
41517
42166
|
}
|
|
41518
42167
|
};
|
|
41519
|
-
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm,
|
|
42168
|
+
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';
|
|
41520
42169
|
const align = {
|
|
41521
42170
|
name: 'left',
|
|
41522
42171
|
childTemplate: (_, __, value)=>value,
|
|
@@ -41537,23 +42186,25 @@ const align = {
|
|
|
41537
42186
|
return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
41538
42187
|
},
|
|
41539
42188
|
exec: (editor, elm, { control })=>{
|
|
41540
|
-
|
|
42189
|
+
// A media wrapper kept in the content (`mediaWrappers`) is aligned itself
|
|
42190
|
+
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([
|
|
41541
42191
|
'img',
|
|
41542
42192
|
'jodit',
|
|
41543
42193
|
'jodit-media'
|
|
41544
|
-
]))) {
|
|
42194
|
+
])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
|
|
41545
42195
|
return;
|
|
41546
42196
|
}
|
|
41547
42197
|
const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
41548
42198
|
if (!command) {
|
|
41549
42199
|
return false;
|
|
41550
42200
|
}
|
|
41551
|
-
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command,
|
|
42201
|
+
;(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));
|
|
41552
42202
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
41553
42203
|
'jodit',
|
|
41554
42204
|
'jodit-media'
|
|
41555
42205
|
])) && elm.firstElementChild) {
|
|
41556
|
-
|
|
42206
|
+
const media = elm.firstElementChild;
|
|
42207
|
+
(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));
|
|
41557
42208
|
}
|
|
41558
42209
|
editor.synchronizeValues();
|
|
41559
42210
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -41756,9 +42407,11 @@ const align = {
|
|
|
41756
42407
|
return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_7__.makeCollection)(this.jodit, this.popup);
|
|
41757
42408
|
}
|
|
41758
42409
|
onClick(node) {
|
|
41759
|
-
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);
|
|
41760
|
-
|
|
41761
|
-
|
|
42410
|
+
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);
|
|
42411
|
+
// A media wrapper kept in the content gets the media popup
|
|
42412
|
+
const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
|
|
42413
|
+
if (target && type && this.canShowPopupForType(type)) {
|
|
42414
|
+
this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
|
|
41762
42415
|
return false;
|
|
41763
42416
|
}
|
|
41764
42417
|
}
|
|
@@ -41941,7 +42594,12 @@ const align = {
|
|
|
41941
42594
|
this.removeListenersForElements();
|
|
41942
42595
|
}
|
|
41943
42596
|
_eventsList() {
|
|
41944
|
-
|
|
42597
|
+
var _a;
|
|
42598
|
+
// Clicks on a media wrapper kept in the content (`mediaWrappers`)
|
|
42599
|
+
const wrapperTags = Object.values((_a = this.j.o.mediaWrappers) !== null && _a !== void 0 ? _a : {}).map(({ tag })=>tag.toLowerCase());
|
|
42600
|
+
const el = [
|
|
42601
|
+
...new Set(this.elmsList.concat(wrapperTags))
|
|
42602
|
+
];
|
|
41945
42603
|
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(' ');
|
|
41946
42604
|
}
|
|
41947
42605
|
addListenersForElements() {
|
|
@@ -43505,8 +44163,6 @@ const formTemplate = (editor)=>{
|
|
|
43505
44163
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43506
44164
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
43507
44165
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
43508
|
-
*/ /**
|
|
43509
|
-
* @module plugins/media
|
|
43510
44166
|
*/
|
|
43511
44167
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaFakeTag = 'jodit-media';
|
|
43512
44168
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaInFakeBlock = true;
|
|
@@ -43514,6 +44170,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
43514
44170
|
'video',
|
|
43515
44171
|
'audio'
|
|
43516
44172
|
];
|
|
44173
|
+
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
43517
44174
|
|
|
43518
44175
|
|
|
43519
44176
|
/***/ }),
|
|
@@ -43542,11 +44199,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
43542
44199
|
* Process `video` and `audio`
|
|
43543
44200
|
*/ function media(editor) {
|
|
43544
44201
|
const keyFake = 'jodit_fake_wrapper';
|
|
43545
|
-
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock } = editor.options;
|
|
44202
|
+
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock, mediaWrappers } = editor.options;
|
|
43546
44203
|
const wrap = (element)=>{
|
|
44204
|
+
var _a;
|
|
43547
44205
|
if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
43548
44206
|
element = element.parentNode;
|
|
43549
|
-
} else {
|
|
44207
|
+
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
44208
|
+
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);
|
|
44209
|
+
} else if (mediaInFakeBlock) {
|
|
43550
44210
|
const wrapper = editor.createInside.element(mediaFakeTag, {
|
|
43551
44211
|
'data-jodit-temp': 1,
|
|
43552
44212
|
contenteditable: false,
|
|
@@ -43564,12 +44224,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
43564
44224
|
}
|
|
43565
44225
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
|
|
43566
44226
|
element = wrapper;
|
|
44227
|
+
} else {
|
|
44228
|
+
return;
|
|
43567
44229
|
}
|
|
43568
44230
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
|
|
43569
44231
|
editor.s.setCursorAfter(element);
|
|
43570
44232
|
});
|
|
43571
44233
|
};
|
|
43572
|
-
if (mediaInFakeBlock) {
|
|
44234
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
43573
44235
|
editor.e.on('afterGetValueFromEditor', (data)=>{
|
|
43574
44236
|
const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
|
|
43575
44237
|
if (rxp.test(data.value)) {
|
|
@@ -52408,15 +53070,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
|
|
|
52408
53070
|
|
|
52409
53071
|
|
|
52410
53072
|
|
|
53073
|
+
// Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
|
|
53074
|
+
// with `mediaDefaultAlign`
|
|
53075
|
+
function prepareMedia(jodit, element) {
|
|
53076
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
|
|
53077
|
+
const { mediaDefaultAlign } = jodit.o;
|
|
53078
|
+
if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
|
|
53079
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
|
|
53080
|
+
}
|
|
53081
|
+
return media;
|
|
53082
|
+
}
|
|
52411
53083
|
function insertVideos(data) {
|
|
52412
53084
|
var _a;
|
|
52413
53085
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
52414
|
-
this.s.insertNode(this.createInside.element('video', {
|
|
53086
|
+
this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
|
|
52415
53087
|
controls: '',
|
|
52416
53088
|
src: data.baseurl + file
|
|
52417
|
-
}));
|
|
53089
|
+
})));
|
|
52418
53090
|
});
|
|
52419
53091
|
}
|
|
53092
|
+
// Embed code that is one element is prepared as media; other code goes in as
|
|
53093
|
+
// it is
|
|
53094
|
+
function prepareEmbedCode(jodit, code) {
|
|
53095
|
+
const box = jodit.createInside.div();
|
|
53096
|
+
box.innerHTML = code.trim();
|
|
53097
|
+
const element = box.firstElementChild;
|
|
53098
|
+
return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
|
|
53099
|
+
}
|
|
52420
53100
|
_config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
52421
53101
|
parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
52422
53102
|
defaultWidth: 400,
|
|
@@ -52454,7 +53134,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
52454
53134
|
])
|
|
52455
53135
|
]), tabs = [], insertCode = (code)=>{
|
|
52456
53136
|
jodit.s.restore();
|
|
52457
|
-
jodit.s.insertHTML(code);
|
|
53137
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
52458
53138
|
close();
|
|
52459
53139
|
};
|
|
52460
53140
|
jodit.s.save();
|