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