jodit-pro 4.17.7 → 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 +8 -8
- package/es2015/jodit.js +876 -157
- 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 +10 -10
- 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 +18 -18
- package/es2021/jodit.js +877 -158
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +17 -17
- 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 +18 -18
- package/es2021.en/jodit.js +877 -158
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +17 -17
- 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 +1388 -161
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2021.en/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
|
*
|
|
@@ -1743,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1743
1768
|
* ```
|
|
1744
1769
|
* @packageDocumentation
|
|
1745
1770
|
* @module constants
|
|
1746
|
-
*/ const APP_VERSION = "4.
|
|
1771
|
+
*/ const APP_VERSION = "4.18.0";
|
|
1747
1772
|
// prettier-ignore
|
|
1748
1773
|
const ES = "es2021";
|
|
1749
1774
|
const IS_ES_MODERN = true;
|
|
@@ -6310,6 +6335,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6310
6335
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.completeUrl; },
|
|
6311
6336
|
/* harmony export */ connection: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.connection; },
|
|
6312
6337
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
6338
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.createMediaWrapper; },
|
|
6313
6339
|
/* harmony export */ css: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css; },
|
|
6314
6340
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssInline; },
|
|
6315
6341
|
/* harmony export */ cssPath: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssPath; },
|
|
@@ -6320,13 +6346,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6320
6346
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.fastClone; },
|
|
6321
6347
|
/* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
|
|
6322
6348
|
/* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
|
|
6349
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
|
|
6323
6350
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
|
|
6324
6351
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6325
6352
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6326
6353
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6327
6354
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6355
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
|
|
6328
6356
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6329
6357
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6358
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getWrappedMedia; },
|
|
6330
6359
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
|
|
6331
6360
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.hAlignElement; },
|
|
6332
6361
|
/* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
|
|
@@ -6407,7 +6436,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6407
6436
|
/* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
|
|
6408
6437
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
|
|
6409
6438
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
|
|
6410
|
-
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; }
|
|
6439
|
+
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
|
|
6440
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
|
|
6411
6441
|
/* harmony export */ });
|
|
6412
6442
|
/* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
|
|
6413
6443
|
/* harmony import */ var _async_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91898);
|
|
@@ -7415,12 +7445,15 @@ function trimChars(value, chars) {
|
|
|
7415
7445
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7416
7446
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7417
7447
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7448
|
+
/* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
|
|
7418
7449
|
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7419
7450
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
7420
7451
|
/* harmony export */ });
|
|
7421
7452
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
7422
|
-
/* harmony import */ var
|
|
7423
|
-
/* harmony import */ var
|
|
7453
|
+
/* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
7454
|
+
/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
|
|
7455
|
+
/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
7456
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
7424
7457
|
/*!
|
|
7425
7458
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7426
7459
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7428,32 +7461,54 @@ function trimChars(value, chars) {
|
|
|
7428
7461
|
*/
|
|
7429
7462
|
|
|
7430
7463
|
|
|
7431
|
-
|
|
7464
|
+
|
|
7465
|
+
|
|
7466
|
+
// The sets of class names an alignment lists, the first being the one to write
|
|
7467
|
+
const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
|
|
7468
|
+
value !== null && value !== void 0 ? value : ''
|
|
7469
|
+
]).map((set)=>set.split(/\s+/).filter(Boolean)).filter((set)=>set.length);
|
|
7432
7470
|
/**
|
|
7433
|
-
*
|
|
7434
|
-
*
|
|
7471
|
+
* The class names to align `elm` with: `alignClasses` for its tag, or for the
|
|
7472
|
+
* media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
|
|
7473
|
+
* `jodit-media`), falling back to `imageAlignClasses` for an image
|
|
7474
|
+
*/ function getAlignClasses(jodit, elm) {
|
|
7475
|
+
var _a, _b;
|
|
7476
|
+
if (!elm) {
|
|
7477
|
+
return null;
|
|
7478
|
+
}
|
|
7479
|
+
const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
7480
|
+
'jodit',
|
|
7481
|
+
'jodit-media'
|
|
7482
|
+
])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
|
|
7483
|
+
const tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
|
|
7484
|
+
return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[tag]) !== null && _b !== void 0 ? _b : tag === 'img' ? jodit.o.imageAlignClasses : null;
|
|
7485
|
+
}
|
|
7486
|
+
/**
|
|
7487
|
+
* Align image, with `classes` (see `alignClasses`) instead of inline styles
|
|
7488
|
+
* when they are given
|
|
7435
7489
|
*/ function hAlignElement(image, align, classes) {
|
|
7490
|
+
var _a;
|
|
7436
7491
|
if (classes) {
|
|
7437
7492
|
hAlignElement(image, 'normal');
|
|
7438
|
-
Object.values(classes).forEach((value)=>image.classList.remove(...
|
|
7439
|
-
image.classList.add(...
|
|
7493
|
+
Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
|
|
7494
|
+
image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
|
|
7440
7495
|
[
|
|
7441
7496
|
'class',
|
|
7442
7497
|
'style'
|
|
7443
7498
|
].forEach((name)=>{
|
|
7444
7499
|
var _a;
|
|
7445
|
-
if (!((_a = (0,
|
|
7446
|
-
(0,
|
|
7500
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7501
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
|
|
7447
7502
|
}
|
|
7448
7503
|
});
|
|
7449
7504
|
return;
|
|
7450
7505
|
}
|
|
7451
7506
|
if (align && align !== 'normal') {
|
|
7452
7507
|
if (align !== 'center') {
|
|
7453
|
-
(0,
|
|
7454
|
-
(0,
|
|
7508
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
|
|
7509
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7455
7510
|
} else {
|
|
7456
|
-
(0,
|
|
7511
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
7457
7512
|
float: '',
|
|
7458
7513
|
display: 'block',
|
|
7459
7514
|
marginLeft: 'auto',
|
|
@@ -7461,13 +7516,13 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7461
7516
|
});
|
|
7462
7517
|
}
|
|
7463
7518
|
} else {
|
|
7464
|
-
if ((0,
|
|
7519
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
|
|
7465
7520
|
'right',
|
|
7466
7521
|
'left'
|
|
7467
|
-
].indexOf((0,
|
|
7468
|
-
(0,
|
|
7522
|
+
].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
|
|
7523
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
|
|
7469
7524
|
}
|
|
7470
|
-
;(0,
|
|
7525
|
+
;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
|
|
7471
7526
|
}
|
|
7472
7527
|
}
|
|
7473
7528
|
/**
|
|
@@ -7480,17 +7535,16 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7480
7535
|
'center',
|
|
7481
7536
|
'normal'
|
|
7482
7537
|
]){
|
|
7483
|
-
|
|
7484
|
-
if (names.length && names.every((name)=>elm.classList.contains(name))) {
|
|
7538
|
+
if (classSets(classes[align]).some((set)=>set.every((name)=>elm.classList.contains(name)))) {
|
|
7485
7539
|
return align;
|
|
7486
7540
|
}
|
|
7487
7541
|
}
|
|
7488
7542
|
}
|
|
7489
|
-
const float = (0,
|
|
7543
|
+
const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
|
|
7490
7544
|
if (float === 'left' || float === 'right') {
|
|
7491
7545
|
return float;
|
|
7492
7546
|
}
|
|
7493
|
-
if ((0,
|
|
7547
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
7494
7548
|
return 'center';
|
|
7495
7549
|
}
|
|
7496
7550
|
return 'normal';
|
|
@@ -7500,10 +7554,10 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
|
|
|
7500
7554
|
*/ function clearAlign(node) {
|
|
7501
7555
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node, (elm)=>{
|
|
7502
7556
|
if (_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm)) {
|
|
7503
|
-
if ((0,
|
|
7504
|
-
(0,
|
|
7505
|
-
if (!((0,
|
|
7506
|
-
(0,
|
|
7557
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
|
|
7558
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
|
|
7559
|
+
if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
|
|
7560
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
|
|
7507
7561
|
}
|
|
7508
7562
|
}
|
|
7509
7563
|
}
|
|
@@ -7534,7 +7588,7 @@ function alignElement(command, box) {
|
|
|
7534
7588
|
clearAlign(box);
|
|
7535
7589
|
const align = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
7536
7590
|
if (align) {
|
|
7537
|
-
(0,
|
|
7591
|
+
(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
|
|
7538
7592
|
}
|
|
7539
7593
|
}
|
|
7540
7594
|
}
|
|
@@ -8608,13 +8662,13 @@ const getClassName = (obj)=>{
|
|
|
8608
8662
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8609
8663
|
|
|
8610
8664
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8611
|
-
/* harmony export */ $$: function() { return /* reexport safe */
|
|
8665
|
+
/* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
|
|
8612
8666
|
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
|
|
8613
8667
|
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
|
|
8614
8668
|
/* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
|
|
8615
8669
|
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
|
|
8616
8670
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
|
|
8617
|
-
/* harmony export */ LimitedStack: function() { return /* reexport safe */
|
|
8671
|
+
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
|
|
8618
8672
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
|
|
8619
8673
|
/* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
|
|
8620
8674
|
/* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
|
|
@@ -8627,51 +8681,56 @@ const getClassName = (obj)=>{
|
|
|
8627
8681
|
/* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
|
|
8628
8682
|
/* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
|
|
8629
8683
|
/* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
|
|
8630
|
-
/* harmony export */ call: function() { return /* reexport safe */
|
|
8631
|
-
/* harmony export */ callPromise: function() { return /* reexport safe */
|
|
8632
|
-
/* harmony export */ callThis: function() { return /* reexport safe */
|
|
8684
|
+
/* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
|
|
8685
|
+
/* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
|
|
8686
|
+
/* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
|
|
8633
8687
|
/* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
|
|
8634
8688
|
/* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
|
|
8635
8689
|
/* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
|
|
8636
8690
|
/* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
|
|
8637
8691
|
/* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
|
|
8638
8692
|
/* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
|
|
8693
|
+
/* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
|
|
8639
8694
|
/* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
|
|
8640
8695
|
/* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
|
|
8641
|
-
/* harmony export */ cssPath: function() { return /* reexport safe */
|
|
8696
|
+
/* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
|
|
8642
8697
|
/* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
|
|
8643
8698
|
/* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
|
|
8644
8699
|
/* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
|
|
8645
8700
|
/* harmony export */ error: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.error; },
|
|
8646
8701
|
/* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
|
|
8647
8702
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8703
|
+
/* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
|
|
8648
8704
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8649
|
-
/* harmony export */ getDataTransfer: function() { return /* reexport safe */
|
|
8705
|
+
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
|
|
8650
8706
|
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
8651
|
-
/* harmony export */
|
|
8652
|
-
/* harmony export */
|
|
8707
|
+
/* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
|
|
8708
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
|
|
8709
|
+
/* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
|
|
8710
|
+
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
|
|
8653
8711
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
8654
8712
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
|
|
8655
|
-
/* harmony export */ inView: function() { return /* reexport safe */
|
|
8713
|
+
/* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
|
|
8656
8714
|
/* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
|
|
8657
8715
|
/* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
|
|
8658
8716
|
/* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
|
|
8659
|
-
/* harmony export */ keys: function() { return /* reexport safe */
|
|
8660
|
-
/* harmony export */ loadImage: function() { return /* reexport safe */
|
|
8717
|
+
/* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
|
|
8718
|
+
/* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
|
|
8661
8719
|
/* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
|
|
8662
8720
|
/* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
|
|
8663
8721
|
/* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
|
|
8664
8722
|
/* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
|
|
8665
|
-
/* harmony export */ markOwner: function() { return /* reexport safe */
|
|
8666
|
-
/* harmony export */ memorizeExec: function() { return /* reexport safe */
|
|
8723
|
+
/* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
|
|
8724
|
+
/* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
|
|
8667
8725
|
/* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
|
|
8668
|
-
/* harmony export */ parseQuery: function() { return /* reexport safe */
|
|
8669
|
-
/* harmony export */ previewBox: function() { return /* reexport safe */
|
|
8670
|
-
/* harmony export */ refs: function() { return /* reexport safe */
|
|
8671
|
-
/* harmony export */ reset: function() { return /* reexport safe */
|
|
8672
|
-
/* harmony export */ resolveElement: function() { return /* reexport safe */
|
|
8673
|
-
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */
|
|
8674
|
-
/* harmony export */ set: function() { return /* reexport safe */
|
|
8726
|
+
/* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
|
|
8727
|
+
/* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
|
|
8728
|
+
/* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
|
|
8729
|
+
/* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
|
|
8730
|
+
/* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
|
|
8731
|
+
/* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
|
|
8732
|
+
/* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
|
|
8733
|
+
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
|
|
8675
8734
|
/* harmony export */ });
|
|
8676
8735
|
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
8677
8736
|
/* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
|
|
@@ -8693,14 +8752,15 @@ const getClassName = (obj)=>{
|
|
|
8693
8752
|
/* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
|
|
8694
8753
|
/* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
|
|
8695
8754
|
/* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
|
|
8696
|
-
/* harmony import */ var
|
|
8697
|
-
/* harmony import */ var
|
|
8698
|
-
/* harmony import */ var
|
|
8699
|
-
/* harmony import */ var
|
|
8700
|
-
/* harmony import */ var
|
|
8701
|
-
/* harmony import */ var
|
|
8702
|
-
/* harmony import */ var
|
|
8703
|
-
/* harmony import */ var
|
|
8755
|
+
/* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
|
|
8756
|
+
/* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
|
|
8757
|
+
/* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
|
|
8758
|
+
/* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
|
|
8759
|
+
/* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
|
|
8760
|
+
/* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
|
|
8761
|
+
/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
|
|
8762
|
+
/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
|
|
8763
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
|
|
8704
8764
|
/*!
|
|
8705
8765
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8706
8766
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -8735,6 +8795,7 @@ const getClassName = (obj)=>{
|
|
|
8735
8795
|
|
|
8736
8796
|
|
|
8737
8797
|
|
|
8798
|
+
|
|
8738
8799
|
|
|
8739
8800
|
|
|
8740
8801
|
/***/ }),
|
|
@@ -8805,6 +8866,76 @@ const getClassName = (obj)=>{
|
|
|
8805
8866
|
/* harmony export */ ]);
|
|
8806
8867
|
|
|
8807
8868
|
|
|
8869
|
+
/***/ }),
|
|
8870
|
+
|
|
8871
|
+
/***/ 61477:
|
|
8872
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8873
|
+
|
|
8874
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8875
|
+
/* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
|
|
8876
|
+
/* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
|
|
8877
|
+
/* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
|
|
8878
|
+
/* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
|
|
8879
|
+
/* harmony export */ });
|
|
8880
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
8881
|
+
/*!
|
|
8882
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
8883
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8884
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
8885
|
+
*/
|
|
8886
|
+
const isWrapper = (node, wrapper)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
|
|
8887
|
+
/**
|
|
8888
|
+
* The media in `elm` when `elm` is a wrapper media keep in the content (see
|
|
8889
|
+
* `mediaWrappers`): an element of a type `elm` is the wrapper for
|
|
8890
|
+
*/ function getWrappedMedia(jodit, elm) {
|
|
8891
|
+
var _a;
|
|
8892
|
+
for (const [tag, wrapper] of Object.entries((_a = jodit.o.mediaWrappers) !== null && _a !== void 0 ? _a : {})){
|
|
8893
|
+
if (isWrapper(elm, wrapper)) {
|
|
8894
|
+
const media = elm.querySelector(tag);
|
|
8895
|
+
if (media) {
|
|
8896
|
+
return media;
|
|
8897
|
+
}
|
|
8898
|
+
}
|
|
8899
|
+
}
|
|
8900
|
+
return null;
|
|
8901
|
+
}
|
|
8902
|
+
/**
|
|
8903
|
+
* The wrapper media keep in the content (see `mediaWrappers`) that is or
|
|
8904
|
+
* holds `node`
|
|
8905
|
+
*/ function getMediaWrapper(jodit, node) {
|
|
8906
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getWrappedMedia(jodit, elm)), jodit.editor);
|
|
8907
|
+
}
|
|
8908
|
+
/**
|
|
8909
|
+
* An empty wrapper for media of type `tag` to keep in the content (see
|
|
8910
|
+
* `mediaWrappers`), or null when there is none for it
|
|
8911
|
+
*/ function createMediaWrapper(jodit, tag) {
|
|
8912
|
+
var _a;
|
|
8913
|
+
const wrapper = (_a = jodit.o.mediaWrappers) === null || _a === void 0 ? void 0 : _a[tag.toLowerCase()];
|
|
8914
|
+
if (!wrapper) {
|
|
8915
|
+
return null;
|
|
8916
|
+
}
|
|
8917
|
+
return jodit.createInside.element(wrapper.tag, {
|
|
8918
|
+
class: wrapper.className,
|
|
8919
|
+
contenteditable: false,
|
|
8920
|
+
draggable: true
|
|
8921
|
+
});
|
|
8922
|
+
}
|
|
8923
|
+
/**
|
|
8924
|
+
* Puts `element` in the wrapper for its type (see `mediaWrappers`), and
|
|
8925
|
+
* returns the wrapper, or `element` when there is none for it
|
|
8926
|
+
*/ function wrapMedia(jodit, element) {
|
|
8927
|
+
const wrapper = createMediaWrapper(jodit, element.nodeName);
|
|
8928
|
+
if (!wrapper) {
|
|
8929
|
+
return element;
|
|
8930
|
+
}
|
|
8931
|
+
if (element.parentNode) {
|
|
8932
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(element, wrapper);
|
|
8933
|
+
}
|
|
8934
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, element);
|
|
8935
|
+
return wrapper;
|
|
8936
|
+
}
|
|
8937
|
+
|
|
8938
|
+
|
|
8808
8939
|
/***/ }),
|
|
8809
8940
|
|
|
8810
8941
|
/***/ 82501:
|
|
@@ -10594,6 +10725,12 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10594
10725
|
|
|
10595
10726
|
|
|
10596
10727
|
|
|
10728
|
+
/**
|
|
10729
|
+
* A text node that is empty or holds only invisible caret placeholders.
|
|
10730
|
+
*/ function isBlankTextNode(node) {
|
|
10731
|
+
var _a;
|
|
10732
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').replace(_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '').length === 0;
|
|
10733
|
+
}
|
|
10597
10734
|
class Selection {
|
|
10598
10735
|
/**
|
|
10599
10736
|
* Short alias for this.jodit
|
|
@@ -10825,6 +10962,7 @@ class Selection {
|
|
|
10825
10962
|
/**
|
|
10826
10963
|
* Create marker element
|
|
10827
10964
|
*/ marker(atStart = false, range) {
|
|
10965
|
+
var _a;
|
|
10828
10966
|
let newRange = null;
|
|
10829
10967
|
if (range) {
|
|
10830
10968
|
newRange = range.cloneRange();
|
|
@@ -10841,10 +10979,21 @@ class Selection {
|
|
|
10841
10979
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(marker, this.j.createInside.text(_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE));
|
|
10842
10980
|
if (newRange) {
|
|
10843
10981
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, atStart ? newRange.startContainer : newRange.endContainer)) {
|
|
10844
|
-
|
|
10845
|
-
//
|
|
10846
|
-
//
|
|
10847
|
-
|
|
10982
|
+
const { startContainer: node, startOffset: offset } = newRange;
|
|
10983
|
+
// At either end of a text node the marker goes beside it. Splitting
|
|
10984
|
+
// the node there would leave the selection's boundary in an empty
|
|
10985
|
+
// text node, and WebKit neither repaints a selection that leaves one
|
|
10986
|
+
// nor moves a selection that follows one when it's removed.
|
|
10987
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && offset === 0) {
|
|
10988
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(node, marker);
|
|
10989
|
+
} else if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && offset === ((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
10990
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(node, marker);
|
|
10991
|
+
} else {
|
|
10992
|
+
// Here need do unsafe inserting
|
|
10993
|
+
// Deny Dom.safeInsertNode(newRange, marker);
|
|
10994
|
+
// Apply style -> Test Style module -> Base apply -> For selection <p><strong>|test|</strong></p> apply style {"element":"em","style":{"fontStyle":"italic"}}
|
|
10995
|
+
newRange.insertNode(marker);
|
|
10996
|
+
}
|
|
10848
10997
|
}
|
|
10849
10998
|
}
|
|
10850
10999
|
return marker;
|
|
@@ -11172,7 +11321,9 @@ class Selection {
|
|
|
11172
11321
|
}
|
|
11173
11322
|
].forEach((getChildNode)=>{
|
|
11174
11323
|
const childNode = getChildNode();
|
|
11175
|
-
|
|
11324
|
+
// Only a text node left with nothing in it by the split
|
|
11325
|
+
// goes; one holding a space is content (`<b>a</b> |`).
|
|
11326
|
+
if (childNode && isBlankTextNode(childNode)) {
|
|
11176
11327
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(childNode);
|
|
11177
11328
|
}
|
|
11178
11329
|
});
|
|
@@ -11262,9 +11413,9 @@ class Selection {
|
|
|
11262
11413
|
if (styles && typeof styles === 'object') {
|
|
11263
11414
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
|
|
11264
11415
|
}
|
|
11265
|
-
const { imageDefaultAlign
|
|
11416
|
+
const { imageDefaultAlign } = this.j.o;
|
|
11266
11417
|
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
11267
|
-
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign,
|
|
11418
|
+
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.getAlignClasses)(this.j, image));
|
|
11268
11419
|
}
|
|
11269
11420
|
const onload = ()=>{
|
|
11270
11421
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
@@ -28011,19 +28162,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
|
|
|
28011
28162
|
* Update history stack
|
|
28012
28163
|
*/ updateStack(replace = false) {
|
|
28013
28164
|
const newValue = this.snapshot.make();
|
|
28014
|
-
if (
|
|
28015
|
-
|
|
28016
|
-
|
|
28017
|
-
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28021
|
-
} else {
|
|
28022
|
-
this.__stack.push(newCommand);
|
|
28023
|
-
}
|
|
28165
|
+
if (_snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
|
|
28166
|
+
return;
|
|
28167
|
+
}
|
|
28168
|
+
// Only the selection moved, for example when the selection markers
|
|
28169
|
+
// went in before a switch to the source view. There is nothing to
|
|
28170
|
+
// undo, but the next change has to start from this selection.
|
|
28171
|
+
if (newValue.html === this.startValue.html) {
|
|
28024
28172
|
this.startValue = newValue;
|
|
28025
|
-
|
|
28173
|
+
return;
|
|
28026
28174
|
}
|
|
28175
|
+
const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
|
|
28176
|
+
if (replace) {
|
|
28177
|
+
const command = this.__stack.current();
|
|
28178
|
+
if (command && this.updateTick === command.tick) {
|
|
28179
|
+
this.__stack.replace(newCommand);
|
|
28180
|
+
}
|
|
28181
|
+
} else {
|
|
28182
|
+
this.__stack.push(newCommand);
|
|
28183
|
+
}
|
|
28184
|
+
this.startValue = newValue;
|
|
28185
|
+
this.fireChangeStack();
|
|
28027
28186
|
}
|
|
28028
28187
|
fireChangeStack() {
|
|
28029
28188
|
var _a;
|
|
@@ -30265,6 +30424,7 @@ const INPUT_TAGS = new Set([
|
|
|
30265
30424
|
'textarea',
|
|
30266
30425
|
'select'
|
|
30267
30426
|
]);
|
|
30427
|
+
const TYPE_AHEAD_TIMEOUT = 1000;
|
|
30268
30428
|
const FOCUSABLE_SELECTOR = [
|
|
30269
30429
|
'button:not([disabled])',
|
|
30270
30430
|
'a[href]',
|
|
@@ -30529,11 +30689,56 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30529
30689
|
items[(index + 1) % items.length].focus();
|
|
30530
30690
|
break;
|
|
30531
30691
|
default:
|
|
30532
|
-
|
|
30692
|
+
if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
|
|
30693
|
+
return;
|
|
30694
|
+
}
|
|
30533
30695
|
}
|
|
30534
30696
|
e.preventDefault();
|
|
30535
30697
|
e.stopPropagation();
|
|
30536
30698
|
}
|
|
30699
|
+
/**
|
|
30700
|
+
* The mouse opens a dropdown without taking the focus out of the editor.
|
|
30701
|
+
* While a dropdown list is open, typing there searches the list, as in an
|
|
30702
|
+
* open `<select>`, instead of writing into the content
|
|
30703
|
+
*/ __onEditorKeyDown(e) {
|
|
30704
|
+
if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
|
|
30705
|
+
return;
|
|
30706
|
+
}
|
|
30707
|
+
e.preventDefault();
|
|
30708
|
+
return false;
|
|
30709
|
+
}
|
|
30710
|
+
/**
|
|
30711
|
+
* Typing in a dropdown list focuses the next item whose label starts with
|
|
30712
|
+
* the typed text, whatever their case and accents, and repeating one letter
|
|
30713
|
+
* cycles through the items that start with it, like the WAI-ARIA menu
|
|
30714
|
+
* pattern's type-ahead. The typed text starts again after a pause, or once
|
|
30715
|
+
* the focus has moved on
|
|
30716
|
+
*/ __typeAhead(key, items, index) {
|
|
30717
|
+
var _a, _b;
|
|
30718
|
+
const now = Date.now();
|
|
30719
|
+
if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
|
|
30720
|
+
this.__typed = '';
|
|
30721
|
+
}
|
|
30722
|
+
if (key.length !== 1 || key === ' ' && !this.__typed) {
|
|
30723
|
+
return false;
|
|
30724
|
+
}
|
|
30725
|
+
this.__typedAt = now;
|
|
30726
|
+
this.__typed += key;
|
|
30727
|
+
this.__typedTo = items[index];
|
|
30728
|
+
const { compare } = new Intl.Collator(undefined, {
|
|
30729
|
+
usage: 'search',
|
|
30730
|
+
sensitivity: 'base'
|
|
30731
|
+
}), typed = this.__typed, cycle = Array.from(typed).every((char)=>compare(char, typed[0]) === 0), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
|
|
30732
|
+
for(let i = 0; i < items.length; i += 1){
|
|
30733
|
+
const item = items[(start + i) % items.length], label = (_b = (_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
30734
|
+
if (compare(label.slice(0, prefix.length), prefix) === 0) {
|
|
30735
|
+
item.focus();
|
|
30736
|
+
this.__typedTo = item;
|
|
30737
|
+
break;
|
|
30738
|
+
}
|
|
30739
|
+
}
|
|
30740
|
+
return true;
|
|
30741
|
+
}
|
|
30537
30742
|
/**
|
|
30538
30743
|
* Visible controls of the opened dropdown that can take the focus
|
|
30539
30744
|
*/ __popupFocusables() {
|
|
@@ -30546,12 +30751,16 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30546
30751
|
/**
|
|
30547
30752
|
* Create an open popup list
|
|
30548
30753
|
*/ __openControlList(control) {
|
|
30549
|
-
var _a;
|
|
30754
|
+
var _a, _b, _c, _d, _e;
|
|
30550
30755
|
const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
|
|
30551
30756
|
const list = control.list;
|
|
30552
30757
|
const menu = this.openPopup();
|
|
30553
|
-
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
30554
30758
|
menu.parentElement = this;
|
|
30759
|
+
const content = (_b = control.popup) === null || _b === void 0 ? void 0 : _b.call(control, this.j, (_e = (_d = (_c = this.toolbar) === null || _c === void 0 ? void 0 : _c.getTarget(this)) !== null && _d !== void 0 ? _d : this.target) !== null && _e !== void 0 ? _e : null, this.__closePopup, this);
|
|
30760
|
+
if (content) {
|
|
30761
|
+
return this.__openMenu(menu, content);
|
|
30762
|
+
}
|
|
30763
|
+
const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
|
|
30555
30764
|
toolbar.parentElement = menu;
|
|
30556
30765
|
toolbar.mode = 'vertical';
|
|
30557
30766
|
const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
|
|
@@ -30602,7 +30811,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30602
30811
|
return childControl;
|
|
30603
30812
|
};
|
|
30604
30813
|
toolbar.build((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(list) ? list.map(getButton) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map((key)=>getButton(key, list[key])), this.target);
|
|
30605
|
-
|
|
30814
|
+
this.__openMenu(menu, toolbar);
|
|
30815
|
+
}
|
|
30816
|
+
__openMenu(menu, content) {
|
|
30817
|
+
menu.setContent(content).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
30606
30818
|
this.state.activated = true;
|
|
30607
30819
|
}
|
|
30608
30820
|
onOutsideClick(e) {
|
|
@@ -30616,7 +30828,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30616
30828
|
openPopup() {
|
|
30617
30829
|
this.__closePopup();
|
|
30618
30830
|
this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
|
|
30619
|
-
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30831
|
+
this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
|
|
30620
30832
|
return this.openedPopup;
|
|
30621
30833
|
}
|
|
30622
30834
|
__closePopup() {
|
|
@@ -30631,7 +30843,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30631
30843
|
// popup while the outer `removeChild` is still running and Chrome
|
|
30632
30844
|
// throws NotFoundError. See #1458
|
|
30633
30845
|
this.openedPopup = null;
|
|
30634
|
-
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
|
|
30846
|
+
this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
|
|
30635
30847
|
// The keyboard brought the focus into the dropdown: give it back to
|
|
30636
30848
|
// the button, otherwise it would fall out to the document
|
|
30637
30849
|
const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
|
|
@@ -30696,6 +30908,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
30696
30908
|
currentValue: '',
|
|
30697
30909
|
hasTrigger: false
|
|
30698
30910
|
};
|
|
30911
|
+
this.__typed = '';
|
|
30912
|
+
this.__typedAt = 0;
|
|
30913
|
+
this.__typedTo = null;
|
|
30699
30914
|
this.openedPopup = null;
|
|
30700
30915
|
const button = this.getElm('button');
|
|
30701
30916
|
(0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_14__.assert)(button, 'Element button should exists');
|
|
@@ -30745,6 +30960,9 @@ __decorate([
|
|
|
30745
30960
|
__decorate([
|
|
30746
30961
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30747
30962
|
], ToolbarButton.prototype, "__onPopupKeyDown", null);
|
|
30963
|
+
__decorate([
|
|
30964
|
+
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30965
|
+
], ToolbarButton.prototype, "__onEditorKeyDown", null);
|
|
30748
30966
|
__decorate([
|
|
30749
30967
|
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
30750
30968
|
], ToolbarButton.prototype, "onOutsideClick", null);
|
|
@@ -37823,12 +38041,14 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
37823
38041
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
37824
38042
|
|
|
37825
38043
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
37826
|
-
/* harmony import */ var
|
|
37827
|
-
/* harmony import */ var
|
|
37828
|
-
/* harmony import */ var
|
|
37829
|
-
/* harmony import */ var
|
|
37830
|
-
/* harmony import */ var
|
|
37831
|
-
/* harmony import */ var
|
|
38044
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
|
|
38045
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
38046
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
38047
|
+
/* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12153);
|
|
38048
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
|
|
38049
|
+
/* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4104);
|
|
38050
|
+
/* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83709);
|
|
38051
|
+
/* harmony import */ var _font_picker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40222);
|
|
37832
38052
|
/*!
|
|
37833
38053
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37834
38054
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37840,11 +38060,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
|
|
|
37840
38060
|
|
|
37841
38061
|
|
|
37842
38062
|
|
|
38063
|
+
|
|
38064
|
+
|
|
37843
38065
|
/**
|
|
37844
38066
|
* Default font-size points
|
|
37845
|
-
*/
|
|
37846
|
-
|
|
37847
|
-
|
|
38067
|
+
*/ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.defaultFontSizePoints = 'px';
|
|
38068
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
|
|
38069
|
+
googleFonts: {
|
|
38070
|
+
url: ''
|
|
38071
|
+
}
|
|
38072
|
+
};
|
|
38073
|
+
_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"]);
|
|
38074
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
|
|
37848
38075
|
command: 'fontsize',
|
|
37849
38076
|
data: {
|
|
37850
38077
|
cssRule: 'font-size',
|
|
@@ -37890,7 +38117,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
37890
38117
|
}
|
|
37891
38118
|
const control = button.control;
|
|
37892
38119
|
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
37893
|
-
const value = (0,
|
|
38120
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
|
|
37894
38121
|
if (cssKey === 'font-size') {
|
|
37895
38122
|
const numValue = parseFloat(value.toString());
|
|
37896
38123
|
if (editor.o.defaultFontSizePoints === 'pt') {
|
|
@@ -37922,12 +38149,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
|
|
|
37922
38149
|
return keySet.has(normalize(value.toString()));
|
|
37923
38150
|
}
|
|
37924
38151
|
};
|
|
37925
|
-
|
|
37926
|
-
|
|
38152
|
+
const hadSelection = new WeakSet();
|
|
38153
|
+
_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = {
|
|
38154
|
+
..._config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize,
|
|
37927
38155
|
command: 'fontname',
|
|
37928
38156
|
textTemplate: (j, value)=>{
|
|
37929
38157
|
const [first] = value.split(',');
|
|
37930
|
-
return (0,
|
|
38158
|
+
return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimChars)(first, '"\'');
|
|
37931
38159
|
},
|
|
37932
38160
|
list: {
|
|
37933
38161
|
'': 'Default',
|
|
@@ -37949,6 +38177,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
37949
38177
|
} catch (_a) {}
|
|
37950
38178
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
37951
38179
|
},
|
|
38180
|
+
popup: (editor, current, close, button)=>editor.o.font.googleFonts.url ? new _font_picker_js__WEBPACK_IMPORTED_MODULE_8__.UIFontPicker(editor, button, close) : false,
|
|
37952
38181
|
data: {
|
|
37953
38182
|
cssRule: 'font-family',
|
|
37954
38183
|
normalize: (v)=>{
|
|
@@ -37957,19 +38186,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
37957
38186
|
},
|
|
37958
38187
|
// When no font is explicitly set, the computed font-family equals the
|
|
37959
38188
|
// editor's own default (e.g. `-apple-system, …`). Return '' so the
|
|
37960
|
-
// button shows the `Default`
|
|
37961
|
-
// See #1370
|
|
37962
|
-
value: (editor)=>{
|
|
37963
|
-
const current = editor.s.current();
|
|
37964
|
-
|
|
37965
|
-
|
|
37966
|
-
|
|
37967
|
-
|
|
37968
|
-
if (
|
|
38189
|
+
// button shows the list's `Default` entry, when it has one, instead of
|
|
38190
|
+
// that raw stack. See #1370
|
|
38191
|
+
value: (editor, button)=>{
|
|
38192
|
+
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);
|
|
38193
|
+
// Until there is a selection the button shows the editor's own font,
|
|
38194
|
+
// and afterwards the font of the last one
|
|
38195
|
+
if (box) {
|
|
38196
|
+
hadSelection.add(button);
|
|
38197
|
+
} else if (hadSelection.has(button)) {
|
|
37969
38198
|
return;
|
|
37970
38199
|
}
|
|
37971
|
-
const value = (0,
|
|
37972
|
-
if (value === (0,
|
|
38200
|
+
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, 'font-family').toString(), { list } = button.control;
|
|
38201
|
+
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 : {}))) {
|
|
37973
38202
|
return '';
|
|
37974
38203
|
}
|
|
37975
38204
|
return value;
|
|
@@ -37978,6 +38207,267 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
37978
38207
|
};
|
|
37979
38208
|
|
|
37980
38209
|
|
|
38210
|
+
/***/ }),
|
|
38211
|
+
|
|
38212
|
+
/***/ 40222:
|
|
38213
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
38214
|
+
|
|
38215
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38216
|
+
/* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
|
|
38217
|
+
/* harmony export */ });
|
|
38218
|
+
/* harmony import */ var _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87325);
|
|
38219
|
+
/* harmony import */ var _core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37133);
|
|
38220
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
38221
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
38222
|
+
/* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68345);
|
|
38223
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
38224
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
38225
|
+
/* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37790);
|
|
38226
|
+
/* harmony import */ var _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48538);
|
|
38227
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41870);
|
|
38228
|
+
/*!
|
|
38229
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38230
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
38231
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
38232
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
38233
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38234
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
38235
|
+
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;
|
|
38236
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
38237
|
+
};
|
|
38238
|
+
|
|
38239
|
+
|
|
38240
|
+
|
|
38241
|
+
|
|
38242
|
+
|
|
38243
|
+
|
|
38244
|
+
|
|
38245
|
+
|
|
38246
|
+
|
|
38247
|
+
|
|
38248
|
+
const HEADINGS = [
|
|
38249
|
+
'h1',
|
|
38250
|
+
'h2',
|
|
38251
|
+
'h3',
|
|
38252
|
+
'h4',
|
|
38253
|
+
'h5',
|
|
38254
|
+
'h6'
|
|
38255
|
+
];
|
|
38256
|
+
const GENERIC_FAMILIES = new Set([
|
|
38257
|
+
'serif',
|
|
38258
|
+
'sans-serif',
|
|
38259
|
+
'monospace',
|
|
38260
|
+
'cursive',
|
|
38261
|
+
'fantasy',
|
|
38262
|
+
'system-ui',
|
|
38263
|
+
'ui-serif',
|
|
38264
|
+
'ui-sans-serif',
|
|
38265
|
+
'ui-monospace',
|
|
38266
|
+
'ui-rounded'
|
|
38267
|
+
]);
|
|
38268
|
+
/**
|
|
38269
|
+
* A family that names a font, not a generic family or a vendor keyword such
|
|
38270
|
+
* as `-apple-system`
|
|
38271
|
+
*/ function isFontName(family) {
|
|
38272
|
+
return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
|
|
38273
|
+
}
|
|
38274
|
+
/**
|
|
38275
|
+
* The font family dropdown with Google Fonts. Under their own headings it
|
|
38276
|
+
* lists the fonts the editor's styles give text and headings, the fonts the
|
|
38277
|
+
* content uses, the control's list and the Google Fonts library
|
|
38278
|
+
*/ let UIFontPicker = class UIFontPicker extends _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__.UIElement {
|
|
38279
|
+
className() {
|
|
38280
|
+
return 'UIFontPicker';
|
|
38281
|
+
}
|
|
38282
|
+
__render() {
|
|
38283
|
+
var _a, _b;
|
|
38284
|
+
const { control } = this.__button, { list = {} } = control, listed = (0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.map((key)=>({
|
|
38285
|
+
value: key.toString(),
|
|
38286
|
+
title: key.toString()
|
|
38287
|
+
})) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__.keys)(list, false).map((key)=>({
|
|
38288
|
+
value: key,
|
|
38289
|
+
title: list[key].toString()
|
|
38290
|
+
})), google = Array.from(this.__googleFonts.fonts.values(), (font)=>({
|
|
38291
|
+
value: this.__googleFonts.value(font),
|
|
38292
|
+
title: font.family,
|
|
38293
|
+
font
|
|
38294
|
+
})), byFamily = new Map();
|
|
38295
|
+
[
|
|
38296
|
+
...google,
|
|
38297
|
+
...listed
|
|
38298
|
+
].forEach((entry)=>byFamily.set((0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value), entry));
|
|
38299
|
+
const theme = new Map(), used = new Map();
|
|
38300
|
+
// The theme's own fonts are listed too, so its body font can be chosen
|
|
38301
|
+
// to take a font off
|
|
38302
|
+
this.__themeFonts().forEach((fontFamily)=>{
|
|
38303
|
+
var _a;
|
|
38304
|
+
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) ? {
|
|
38305
|
+
value: fontFamily,
|
|
38306
|
+
title
|
|
38307
|
+
} : undefined;
|
|
38308
|
+
entry && !theme.has(family) && theme.set(family, entry);
|
|
38309
|
+
});
|
|
38310
|
+
this.__usedFonts().forEach((fontFamily)=>{
|
|
38311
|
+
const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), entry = byFamily.get(family);
|
|
38312
|
+
entry && !theme.has(family) && used.set(family, entry);
|
|
38313
|
+
});
|
|
38314
|
+
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 : '');
|
|
38315
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(this.container);
|
|
38316
|
+
this.__fonts.clear();
|
|
38317
|
+
defaultEntry && this.__append(current, [
|
|
38318
|
+
defaultEntry
|
|
38319
|
+
]);
|
|
38320
|
+
this.__append(current, [
|
|
38321
|
+
...theme.values()
|
|
38322
|
+
], 'Theme fonts');
|
|
38323
|
+
this.__append(current, [
|
|
38324
|
+
...used.values()
|
|
38325
|
+
], 'Used fonts');
|
|
38326
|
+
this.__append(current, listed.filter((entry)=>entry !== defaultEntry), 'System fonts');
|
|
38327
|
+
this.__append(current, google, 'Google Fonts');
|
|
38328
|
+
this.__observeGoogleFonts();
|
|
38329
|
+
}
|
|
38330
|
+
/**
|
|
38331
|
+
* The fonts the editor's styles give text and each heading
|
|
38332
|
+
*/ __themeFonts() {
|
|
38333
|
+
const { editor } = this.j, fonts = [
|
|
38334
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(editor, 'font-family').toString()
|
|
38335
|
+
];
|
|
38336
|
+
HEADINGS.forEach((tag)=>{
|
|
38337
|
+
const heading = this.j.createInside.element(tag, {
|
|
38338
|
+
style: 'display: none'
|
|
38339
|
+
});
|
|
38340
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(editor, heading);
|
|
38341
|
+
fonts.push((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(heading, 'font-family').toString());
|
|
38342
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(heading);
|
|
38343
|
+
});
|
|
38344
|
+
return fonts;
|
|
38345
|
+
}
|
|
38346
|
+
/**
|
|
38347
|
+
* The fonts the content sets
|
|
38348
|
+
*/ __usedFonts() {
|
|
38349
|
+
return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), (element)=>element.style.fontFamily);
|
|
38350
|
+
}
|
|
38351
|
+
__append(current, entries, heading) {
|
|
38352
|
+
if (!entries.length) {
|
|
38353
|
+
return;
|
|
38354
|
+
}
|
|
38355
|
+
const { control } = this.__button, group = this.j.c.div(this.getFullElName('group'));
|
|
38356
|
+
if (heading) {
|
|
38357
|
+
const title = this.j.c.div(this.getFullElName('heading'), {
|
|
38358
|
+
id: `${this.getFullElName('heading')}-${(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.uniqueUid)()}`
|
|
38359
|
+
});
|
|
38360
|
+
title.textContent = this.i18n(heading);
|
|
38361
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(group, {
|
|
38362
|
+
role: 'group',
|
|
38363
|
+
'aria-labelledby': title.id
|
|
38364
|
+
});
|
|
38365
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, title);
|
|
38366
|
+
}
|
|
38367
|
+
entries.forEach((entry)=>{
|
|
38368
|
+
var _a, _b;
|
|
38369
|
+
const item = this.j.c.element('button', {
|
|
38370
|
+
type: 'button',
|
|
38371
|
+
class: this.getFullElName('item'),
|
|
38372
|
+
'data-value': entry.value,
|
|
38373
|
+
'aria-pressed': (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value) === current
|
|
38374
|
+
});
|
|
38375
|
+
if (entry.font) {
|
|
38376
|
+
item.textContent = entry.title;
|
|
38377
|
+
this.__fonts.set(item, entry.font);
|
|
38378
|
+
} else {
|
|
38379
|
+
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;
|
|
38380
|
+
}
|
|
38381
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, item);
|
|
38382
|
+
});
|
|
38383
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, group);
|
|
38384
|
+
}
|
|
38385
|
+
/**
|
|
38386
|
+
* Shows the names of the Google Fonts in view, and those just below it,
|
|
38387
|
+
* in their own fonts. Setting every item's font up front would have the
|
|
38388
|
+
* browser look for each of the library's families among the installed
|
|
38389
|
+
* fonts the first time the list opens
|
|
38390
|
+
*/ __observeGoogleFonts() {
|
|
38391
|
+
this.j.async.requestAnimationFrame(()=>{
|
|
38392
|
+
var _a;
|
|
38393
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
38394
|
+
if (this.isDestructed || !this.__fonts.size) {
|
|
38395
|
+
return;
|
|
38396
|
+
}
|
|
38397
|
+
const observer = new IntersectionObserver((entries)=>{
|
|
38398
|
+
const fonts = [];
|
|
38399
|
+
entries.forEach(({ isIntersecting, target })=>{
|
|
38400
|
+
const font = this.__fonts.get(target);
|
|
38401
|
+
if (isIntersecting && font) {
|
|
38402
|
+
fonts.push(font);
|
|
38403
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(target, {
|
|
38404
|
+
fontFamily: this.__googleFonts.value(font)
|
|
38405
|
+
});
|
|
38406
|
+
observer.unobserve(target);
|
|
38407
|
+
}
|
|
38408
|
+
});
|
|
38409
|
+
this.__googleFonts.preview(fonts);
|
|
38410
|
+
}, {
|
|
38411
|
+
root: this.container.parentElement,
|
|
38412
|
+
rootMargin: '0px 0px 400px 0px'
|
|
38413
|
+
});
|
|
38414
|
+
this.__fonts.forEach((_, item)=>observer.observe(item));
|
|
38415
|
+
this.__observer = observer;
|
|
38416
|
+
});
|
|
38417
|
+
}
|
|
38418
|
+
/**
|
|
38419
|
+
* Keeps the editor's selection, as the toolbar buttons do
|
|
38420
|
+
*/ onMouseDown(e) {
|
|
38421
|
+
e.preventDefault();
|
|
38422
|
+
}
|
|
38423
|
+
onClick(e) {
|
|
38424
|
+
var _a;
|
|
38425
|
+
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);
|
|
38426
|
+
if (!item) {
|
|
38427
|
+
return;
|
|
38428
|
+
}
|
|
38429
|
+
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
|
|
38430
|
+
inherited = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(value) === (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(this.__blockFont());
|
|
38431
|
+
font && !inherited && this.__googleFonts.load(font);
|
|
38432
|
+
this.j.execCommand('fontname', false, inherited ? '' : value);
|
|
38433
|
+
this.__close();
|
|
38434
|
+
}
|
|
38435
|
+
/**
|
|
38436
|
+
* The font the selected text has without a font of its own: its block's
|
|
38437
|
+
*/ __blockFont() {
|
|
38438
|
+
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);
|
|
38439
|
+
return (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
|
|
38440
|
+
}
|
|
38441
|
+
destruct() {
|
|
38442
|
+
var _a;
|
|
38443
|
+
(_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
38444
|
+
super.destruct();
|
|
38445
|
+
}
|
|
38446
|
+
constructor(jodit, __button, __close){
|
|
38447
|
+
super(jodit);
|
|
38448
|
+
this.__button = __button;
|
|
38449
|
+
this.__close = __close;
|
|
38450
|
+
this.__fonts = new Map();
|
|
38451
|
+
this.__observer = null;
|
|
38452
|
+
this.__googleFonts = jodit.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.GoogleFonts);
|
|
38453
|
+
this.__render();
|
|
38454
|
+
if (!this.__googleFonts.fonts.size) {
|
|
38455
|
+
this.__googleFonts.ready.then(()=>!this.isDestructed && this.__render());
|
|
38456
|
+
}
|
|
38457
|
+
}
|
|
38458
|
+
};
|
|
38459
|
+
__decorate([
|
|
38460
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:mousedown')
|
|
38461
|
+
], UIFontPicker.prototype, "onMouseDown", null);
|
|
38462
|
+
__decorate([
|
|
38463
|
+
(0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:click')
|
|
38464
|
+
], UIFontPicker.prototype, "onClick", null);
|
|
38465
|
+
UIFontPicker = __decorate([
|
|
38466
|
+
_core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__.component
|
|
38467
|
+
], UIFontPicker);
|
|
38468
|
+
|
|
38469
|
+
|
|
38470
|
+
|
|
37981
38471
|
/***/ }),
|
|
37982
38472
|
|
|
37983
38473
|
/***/ 23399:
|
|
@@ -37987,6 +38477,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
37987
38477
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(580);
|
|
37988
38478
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
|
|
37989
38479
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28252);
|
|
38480
|
+
/* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41870);
|
|
37990
38481
|
/*!
|
|
37991
38482
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37992
38483
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37994,6 +38485,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
37994
38485
|
*/
|
|
37995
38486
|
|
|
37996
38487
|
|
|
38488
|
+
|
|
37997
38489
|
/**
|
|
37998
38490
|
* Process commands `fontsize` and `fontname`
|
|
37999
38491
|
*/ function font(editor) {
|
|
@@ -38004,6 +38496,18 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38004
38496
|
name: 'fontsize',
|
|
38005
38497
|
group: 'font'
|
|
38006
38498
|
});
|
|
38499
|
+
if (editor.o.font.googleFonts.url) {
|
|
38500
|
+
const googleFonts = editor.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(()=>googleFonts.loadUsed(), editor.defaultTimeout);
|
|
38501
|
+
googleFonts.ready.then(loadUsed);
|
|
38502
|
+
editor.e.on('afterInit afterSetMode change', loadUsed);
|
|
38503
|
+
}
|
|
38504
|
+
// An iframe's stylesheets can arrive after the toolbar first shows the
|
|
38505
|
+
// editor's font
|
|
38506
|
+
editor.e.on('afterInit', ()=>{
|
|
38507
|
+
editor.iframe && editor.e.on(editor.ed, 'load', ()=>editor.e.fire('updateToolbar'), {
|
|
38508
|
+
capture: true
|
|
38509
|
+
});
|
|
38510
|
+
});
|
|
38007
38511
|
const callback = (command, second, third)=>{
|
|
38008
38512
|
switch(command){
|
|
38009
38513
|
case 'fontsize':
|
|
@@ -38033,6 +38537,161 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = {
|
|
|
38033
38537
|
_core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
|
|
38034
38538
|
|
|
38035
38539
|
|
|
38540
|
+
/***/ }),
|
|
38541
|
+
|
|
38542
|
+
/***/ 41870:
|
|
38543
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
38544
|
+
|
|
38545
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38546
|
+
/* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
|
|
38547
|
+
/* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
|
|
38548
|
+
/* harmony export */ });
|
|
38549
|
+
/* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
|
|
38550
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
38551
|
+
/* harmony import */ var _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54079);
|
|
38552
|
+
/*!
|
|
38553
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38554
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
38555
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
38556
|
+
*/
|
|
38557
|
+
|
|
38558
|
+
|
|
38559
|
+
const CSS_URL = 'https://fonts.googleapis.com/css2';
|
|
38560
|
+
// `cursive` and `fantasy` stand in badly for a handwriting or display font
|
|
38561
|
+
const GENERIC_FAMILIES = {
|
|
38562
|
+
serif: 'serif',
|
|
38563
|
+
monospace: 'monospace'
|
|
38564
|
+
};
|
|
38565
|
+
const libraries = new Map();
|
|
38566
|
+
/**
|
|
38567
|
+
* The fonts of the library at `url`, fetched once for every editor on the page
|
|
38568
|
+
*/ function library(jodit, url) {
|
|
38569
|
+
let fonts = libraries.get(url);
|
|
38570
|
+
if (!fonts) {
|
|
38571
|
+
const ajax = new _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__.Ajax({
|
|
38572
|
+
url,
|
|
38573
|
+
method: 'GET'
|
|
38574
|
+
}, jodit.o.defaultAjaxOptions);
|
|
38575
|
+
fonts = ajax.send().then((response)=>response.json())// A font without a regular style can't be asked for by its name alone
|
|
38576
|
+
.then(({ items })=>items.filter((font)=>font.variants.includes('regular'))).catch(()=>{
|
|
38577
|
+
libraries.delete(url);
|
|
38578
|
+
return [];
|
|
38579
|
+
}).finally(()=>ajax.destruct());
|
|
38580
|
+
libraries.set(url, fonts);
|
|
38581
|
+
}
|
|
38582
|
+
return fonts;
|
|
38583
|
+
}
|
|
38584
|
+
/**
|
|
38585
|
+
* The first family of a `font-family` value, unquoted and in lower case for
|
|
38586
|
+
* comparing
|
|
38587
|
+
*/ function firstFamily(fontFamily) {
|
|
38588
|
+
return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
|
|
38589
|
+
}
|
|
38590
|
+
/**
|
|
38591
|
+
* Loads fonts from Google Fonts: the whole of each font the content uses into
|
|
38592
|
+
* the editor's document, and just the letters of its name for the font list
|
|
38593
|
+
*/ class GoogleFonts extends _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
|
|
38594
|
+
className() {
|
|
38595
|
+
return 'GoogleFonts';
|
|
38596
|
+
}
|
|
38597
|
+
/**
|
|
38598
|
+
* The library's font named first in a `font-family` value
|
|
38599
|
+
*/ find(fontFamily) {
|
|
38600
|
+
return this.fonts.get(firstFamily(fontFamily));
|
|
38601
|
+
}
|
|
38602
|
+
/**
|
|
38603
|
+
* The `font-family` value that applies a font
|
|
38604
|
+
*/ value(font) {
|
|
38605
|
+
var _a;
|
|
38606
|
+
return `'${font.family}', ${(_a = GENERIC_FAMILIES[font.category]) !== null && _a !== void 0 ? _a : 'sans-serif'}`;
|
|
38607
|
+
}
|
|
38608
|
+
/**
|
|
38609
|
+
* Loads the regular, italic, bold and bold italic styles that a font has
|
|
38610
|
+
* into the editor's document
|
|
38611
|
+
*/ load(font) {
|
|
38612
|
+
const loaded = this.__loadedInto(this.j.ed);
|
|
38613
|
+
if (loaded.has(font.family)) {
|
|
38614
|
+
return;
|
|
38615
|
+
}
|
|
38616
|
+
loaded.add(font.family);
|
|
38617
|
+
const styles = [
|
|
38618
|
+
[
|
|
38619
|
+
'regular',
|
|
38620
|
+
'0,400'
|
|
38621
|
+
],
|
|
38622
|
+
[
|
|
38623
|
+
'700',
|
|
38624
|
+
'0,700'
|
|
38625
|
+
],
|
|
38626
|
+
[
|
|
38627
|
+
'italic',
|
|
38628
|
+
'1,400'
|
|
38629
|
+
],
|
|
38630
|
+
[
|
|
38631
|
+
'700italic',
|
|
38632
|
+
'1,700'
|
|
38633
|
+
]
|
|
38634
|
+
].filter(([variant])=>font.variants.includes(variant)).map(([, style])=>style);
|
|
38635
|
+
this.__append(this.j.ed, `family=${this.__family(font)}:ital,wght@${styles.join(';')}`);
|
|
38636
|
+
}
|
|
38637
|
+
/**
|
|
38638
|
+
* Loads every font of the library that the content uses
|
|
38639
|
+
*/ loadUsed() {
|
|
38640
|
+
this.j.editor.querySelectorAll('[style*="font-family"]').forEach((element)=>{
|
|
38641
|
+
const font = this.find(element.style.fontFamily);
|
|
38642
|
+
font && this.load(font);
|
|
38643
|
+
});
|
|
38644
|
+
}
|
|
38645
|
+
/**
|
|
38646
|
+
* Loads into the page just the letters of each font's name, so the font
|
|
38647
|
+
* list can show the name in its font
|
|
38648
|
+
*/ preview(fonts) {
|
|
38649
|
+
const loaded = this.__loadedInto(this.j.od);
|
|
38650
|
+
fonts = fonts.filter((font)=>!this.__previewed.has(font.family) && !loaded.has(font.family));
|
|
38651
|
+
if (!fonts.length) {
|
|
38652
|
+
return;
|
|
38653
|
+
}
|
|
38654
|
+
fonts.forEach((font)=>this.__previewed.add(font.family));
|
|
38655
|
+
const families = fonts.map((font)=>`family=${this.__family(font)}`), letters = new Set(fonts.map((font)=>font.family).join(''));
|
|
38656
|
+
this.__append(this.j.od, `${families.join('&')}&text=${encodeURIComponent([
|
|
38657
|
+
...letters
|
|
38658
|
+
].join(''))}`);
|
|
38659
|
+
}
|
|
38660
|
+
__loadedInto(doc) {
|
|
38661
|
+
var _a;
|
|
38662
|
+
const loaded = (_a = this.__loaded.get(doc)) !== null && _a !== void 0 ? _a : new Set();
|
|
38663
|
+
this.__loaded.set(doc, loaded);
|
|
38664
|
+
return loaded;
|
|
38665
|
+
}
|
|
38666
|
+
__family(font) {
|
|
38667
|
+
return encodeURIComponent(font.family).replace(/%20/g, '+');
|
|
38668
|
+
}
|
|
38669
|
+
__append(doc, query) {
|
|
38670
|
+
const link = doc.createElement('link');
|
|
38671
|
+
link.rel = 'stylesheet';
|
|
38672
|
+
link.href = `${CSS_URL}?${query}&display=swap`;
|
|
38673
|
+
doc.head.appendChild(link);
|
|
38674
|
+
this.__links.push(link);
|
|
38675
|
+
}
|
|
38676
|
+
destruct() {
|
|
38677
|
+
this.__links.forEach((link)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(link));
|
|
38678
|
+
super.destruct();
|
|
38679
|
+
}
|
|
38680
|
+
constructor(jodit){
|
|
38681
|
+
super(jodit);
|
|
38682
|
+
/**
|
|
38683
|
+
* The library by lower-case family, empty until it arrives
|
|
38684
|
+
*/ this.fonts = new Map();
|
|
38685
|
+
this.__links = [];
|
|
38686
|
+
this.__loaded = new WeakMap();
|
|
38687
|
+
this.__previewed = new Set();
|
|
38688
|
+
this.ready = library(jodit, jodit.o.font.googleFonts.url).then((fonts)=>{
|
|
38689
|
+
fonts.forEach((font)=>this.fonts.set(font.family.toLowerCase(), font));
|
|
38690
|
+
});
|
|
38691
|
+
}
|
|
38692
|
+
}
|
|
38693
|
+
|
|
38694
|
+
|
|
38036
38695
|
/***/ }),
|
|
38037
38696
|
|
|
38038
38697
|
/***/ 4104:
|
|
@@ -39288,12 +39947,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
39288
39947
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39289
39948
|
/* harmony export */ readValuesFromImage: function() { return /* binding */ readValuesFromImage; }
|
|
39290
39949
|
/* harmony export */ });
|
|
39291
|
-
/* harmony import */ var
|
|
39292
|
-
/* harmony import */ var
|
|
39293
|
-
/* harmony import */ var
|
|
39294
|
-
/* harmony import */ var
|
|
39295
|
-
/* harmony import */ var
|
|
39296
|
-
/* harmony import */ var
|
|
39950
|
+
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
39951
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
|
|
39952
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
|
|
39953
|
+
/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
|
|
39954
|
+
/* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
|
|
39955
|
+
/* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
|
|
39956
|
+
/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
|
|
39297
39957
|
/*!
|
|
39298
39958
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
39299
39959
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -39304,32 +39964,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
39304
39964
|
|
|
39305
39965
|
|
|
39306
39966
|
|
|
39967
|
+
|
|
39307
39968
|
/**
|
|
39308
39969
|
* Read values from image and set it to state
|
|
39309
39970
|
* @private
|
|
39310
39971
|
*/ async function readValuesFromImage(j, state) {
|
|
39311
39972
|
const { sourceImage: image, values } = state;
|
|
39312
|
-
(0,
|
|
39973
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
|
|
39313
39974
|
// Border radius
|
|
39314
|
-
values.borderRadius = parseInt((0,
|
|
39975
|
+
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
39315
39976
|
// Id
|
|
39316
|
-
values.id = (0,
|
|
39977
|
+
values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id') || '';
|
|
39317
39978
|
// Title
|
|
39318
|
-
values.imageTitle = (0,
|
|
39979
|
+
values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title') || '';
|
|
39319
39980
|
// Alt
|
|
39320
|
-
values.imageAlt = (0,
|
|
39981
|
+
values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt') || '';
|
|
39321
39982
|
// Style
|
|
39322
|
-
values.style = (0,
|
|
39983
|
+
values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style') || '';
|
|
39323
39984
|
// Classes
|
|
39324
|
-
values.classes = ((0,
|
|
39985
|
+
values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
39325
39986
|
// Margins
|
|
39326
|
-
(0,
|
|
39987
|
+
(0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
|
|
39327
39988
|
// Link
|
|
39328
|
-
(0,
|
|
39989
|
+
(0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
|
|
39329
39990
|
// Src
|
|
39330
|
-
values.imageSrc = (0,
|
|
39991
|
+
values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
|
|
39331
39992
|
// Image size
|
|
39332
|
-
return (0,
|
|
39993
|
+
return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
|
|
39333
39994
|
}
|
|
39334
39995
|
|
|
39335
39996
|
|
|
@@ -40342,7 +41003,7 @@ UIImagePositionTab = __decorate([
|
|
|
40342
41003
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
40343
41004
|
}
|
|
40344
41005
|
if (opt.image.editAlign) {
|
|
40345
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align,
|
|
41006
|
+
(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));
|
|
40346
41007
|
}
|
|
40347
41008
|
}
|
|
40348
41009
|
|
|
@@ -41072,6 +41733,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
41072
41733
|
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
|
|
41073
41734
|
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
|
|
41074
41735
|
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
|
|
41736
|
+
/* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
|
|
41075
41737
|
/*!
|
|
41076
41738
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41077
41739
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -41080,9 +41742,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
41080
41742
|
|
|
41081
41743
|
|
|
41082
41744
|
|
|
41083
|
-
|
|
41084
|
-
// keep inline styles
|
|
41085
|
-
const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
41745
|
+
|
|
41086
41746
|
// A Normal image sits where the text of its line is aligned (#1531)
|
|
41087
41747
|
const lineAlign = (editor, elm)=>{
|
|
41088
41748
|
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;
|
|
@@ -41103,7 +41763,7 @@ const lineAlign = (editor, elm)=>{
|
|
|
41103
41763
|
return 'left';
|
|
41104
41764
|
}
|
|
41105
41765
|
};
|
|
41106
|
-
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm,
|
|
41766
|
+
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';
|
|
41107
41767
|
const align = {
|
|
41108
41768
|
name: 'left',
|
|
41109
41769
|
childTemplate: (_, __, value)=>value,
|
|
@@ -41124,23 +41784,25 @@ const align = {
|
|
|
41124
41784
|
return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
41125
41785
|
},
|
|
41126
41786
|
exec: (editor, elm, { control })=>{
|
|
41127
|
-
|
|
41787
|
+
// A media wrapper kept in the content (`mediaWrappers`) is aligned itself
|
|
41788
|
+
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([
|
|
41128
41789
|
'img',
|
|
41129
41790
|
'jodit',
|
|
41130
41791
|
'jodit-media'
|
|
41131
|
-
]))) {
|
|
41792
|
+
])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
|
|
41132
41793
|
return;
|
|
41133
41794
|
}
|
|
41134
41795
|
const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
|
|
41135
41796
|
if (!command) {
|
|
41136
41797
|
return false;
|
|
41137
41798
|
}
|
|
41138
|
-
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command,
|
|
41799
|
+
;(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));
|
|
41139
41800
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
41140
41801
|
'jodit',
|
|
41141
41802
|
'jodit-media'
|
|
41142
41803
|
])) && elm.firstElementChild) {
|
|
41143
|
-
|
|
41804
|
+
const media = elm.firstElementChild;
|
|
41805
|
+
(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));
|
|
41144
41806
|
}
|
|
41145
41807
|
editor.synchronizeValues();
|
|
41146
41808
|
editor.e.fire('recalcPositionPopup');
|
|
@@ -41343,9 +42005,11 @@ const align = {
|
|
|
41343
42005
|
return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_7__.makeCollection)(this.jodit, this.popup);
|
|
41344
42006
|
}
|
|
41345
42007
|
onClick(node) {
|
|
41346
|
-
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);
|
|
41347
|
-
|
|
41348
|
-
|
|
42008
|
+
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);
|
|
42009
|
+
// A media wrapper kept in the content gets the media popup
|
|
42010
|
+
const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
|
|
42011
|
+
if (target && type && this.canShowPopupForType(type)) {
|
|
42012
|
+
this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
|
|
41349
42013
|
return false;
|
|
41350
42014
|
}
|
|
41351
42015
|
}
|
|
@@ -41528,7 +42192,12 @@ const align = {
|
|
|
41528
42192
|
this.removeListenersForElements();
|
|
41529
42193
|
}
|
|
41530
42194
|
_eventsList() {
|
|
41531
|
-
|
|
42195
|
+
var _a;
|
|
42196
|
+
// Clicks on a media wrapper kept in the content (`mediaWrappers`)
|
|
42197
|
+
const wrapperTags = Object.values((_a = this.j.o.mediaWrappers) !== null && _a !== void 0 ? _a : {}).map(({ tag })=>tag.toLowerCase());
|
|
42198
|
+
const el = [
|
|
42199
|
+
...new Set(this.elmsList.concat(wrapperTags))
|
|
42200
|
+
];
|
|
41532
42201
|
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(' ');
|
|
41533
42202
|
}
|
|
41534
42203
|
addListenersForElements() {
|
|
@@ -42083,7 +42752,7 @@ class lineHeight extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plug
|
|
|
42083
42752
|
try {
|
|
42084
42753
|
if (s.isCollapsed()) {
|
|
42085
42754
|
const fake = c.fake();
|
|
42086
|
-
s.
|
|
42755
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(s.range, fake);
|
|
42087
42756
|
apply(fake);
|
|
42088
42757
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
42089
42758
|
} else {
|
|
@@ -42703,8 +43372,6 @@ const formTemplate = (editor)=>{
|
|
|
42703
43372
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
42704
43373
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
42705
43374
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
42706
|
-
*/ /**
|
|
42707
|
-
* @module plugins/media
|
|
42708
43375
|
*/
|
|
42709
43376
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaFakeTag = 'jodit-media';
|
|
42710
43377
|
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaInFakeBlock = true;
|
|
@@ -42712,6 +43379,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
42712
43379
|
'video',
|
|
42713
43380
|
'audio'
|
|
42714
43381
|
];
|
|
43382
|
+
_config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
42715
43383
|
|
|
42716
43384
|
|
|
42717
43385
|
/***/ }),
|
|
@@ -42740,11 +43408,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
42740
43408
|
* Process `video` and `audio`
|
|
42741
43409
|
*/ function media(editor) {
|
|
42742
43410
|
const keyFake = 'jodit_fake_wrapper';
|
|
42743
|
-
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock } = editor.options;
|
|
43411
|
+
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock, mediaWrappers } = editor.options;
|
|
42744
43412
|
const wrap = (element)=>{
|
|
43413
|
+
var _a;
|
|
42745
43414
|
if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
42746
43415
|
element = element.parentNode;
|
|
42747
|
-
} else {
|
|
43416
|
+
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
43417
|
+
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);
|
|
43418
|
+
} else if (mediaInFakeBlock) {
|
|
42748
43419
|
const wrapper = editor.createInside.element(mediaFakeTag, {
|
|
42749
43420
|
'data-jodit-temp': 1,
|
|
42750
43421
|
contenteditable: false,
|
|
@@ -42762,12 +43433,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
|
|
|
42762
43433
|
}
|
|
42763
43434
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
|
|
42764
43435
|
element = wrapper;
|
|
43436
|
+
} else {
|
|
43437
|
+
return;
|
|
42765
43438
|
}
|
|
42766
43439
|
editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
|
|
42767
43440
|
editor.s.setCursorAfter(element);
|
|
42768
43441
|
});
|
|
42769
43442
|
};
|
|
42770
|
-
if (mediaInFakeBlock) {
|
|
43443
|
+
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
42771
43444
|
editor.e.on('afterGetValueFromEditor', (data)=>{
|
|
42772
43445
|
const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
|
|
42773
43446
|
if (rxp.test(data.value)) {
|
|
@@ -44117,7 +44790,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
44117
44790
|
this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
|
|
44118
44791
|
}
|
|
44119
44792
|
editor.e.fire('placeholder', this.placeholderElm.innerHTML);
|
|
44120
|
-
editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder', this.toggle).on(window, 'load', this.toggle);
|
|
44793
|
+
editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder afterCommand.placeholder', this.toggle).on(window, 'load', this.toggle);
|
|
44121
44794
|
this.addNativeListeners();
|
|
44122
44795
|
this.toggle();
|
|
44123
44796
|
};
|
|
@@ -47268,18 +47941,26 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.source = {
|
|
|
47268
47941
|
/* harmony export */ AceEditor: function() { return /* binding */ AceEditor; }
|
|
47269
47942
|
/* harmony export */ });
|
|
47270
47943
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
47271
|
-
/* harmony import */ var
|
|
47272
|
-
/* harmony import */ var
|
|
47273
|
-
/* harmony import */ var
|
|
47944
|
+
/* harmony import */ var _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45219);
|
|
47945
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
47946
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
47947
|
+
/* harmony import */ var _sourceEditor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23370);
|
|
47274
47948
|
/*!
|
|
47275
47949
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
47276
47950
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
47277
47951
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
47278
|
-
*/
|
|
47952
|
+
*/ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
47953
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
47954
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
47955
|
+
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;
|
|
47956
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
47957
|
+
};
|
|
47958
|
+
|
|
47959
|
+
|
|
47279
47960
|
|
|
47280
47961
|
|
|
47281
47962
|
|
|
47282
|
-
class AceEditor extends
|
|
47963
|
+
class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_4__.SourceEditor {
|
|
47283
47964
|
aceExists() {
|
|
47284
47965
|
return this.j.ow.ace !== undefined;
|
|
47285
47966
|
}
|
|
@@ -47337,7 +48018,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47337
48018
|
return;
|
|
47338
48019
|
}
|
|
47339
48020
|
const fakeMirror = this.j.c.div('jodit-source__mirror-fake');
|
|
47340
|
-
|
|
48021
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, fakeMirror);
|
|
47341
48022
|
const ace = editor.ow.ace;
|
|
47342
48023
|
this.instance = ace.edit(fakeMirror);
|
|
47343
48024
|
if (editor.o.direction === 'rtl') {
|
|
@@ -47358,7 +48039,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47358
48039
|
this.instance.setOption('wrap', editor.o.sourceEditorNativeOptions.wrap);
|
|
47359
48040
|
this.instance.getSession().setUseWorker(false);
|
|
47360
48041
|
this.instance.$blockScrolling = Infinity;
|
|
47361
|
-
this.instance.on('change', this.
|
|
48042
|
+
this.instance.on('change', this.__onChange);
|
|
47362
48043
|
this.instance.on('focus', this.proxyOnFocus);
|
|
47363
48044
|
this.instance.on('mousedown', this.proxyOnMouseDown);
|
|
47364
48045
|
this.instance.on('blur', this.proxyOnBlur);
|
|
@@ -47393,7 +48074,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47393
48074
|
if (!this.aceExists()) {
|
|
47394
48075
|
if (!loading) {
|
|
47395
48076
|
loading = true;
|
|
47396
|
-
(0,
|
|
48077
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
|
|
47397
48078
|
}
|
|
47398
48079
|
return;
|
|
47399
48080
|
}
|
|
@@ -47406,7 +48087,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47406
48087
|
}
|
|
47407
48088
|
destruct() {
|
|
47408
48089
|
var _a, _b;
|
|
47409
|
-
this.instance.off('change', this.
|
|
48090
|
+
this.instance.off('change', this.__onChange);
|
|
47410
48091
|
this.instance.off('focus', this.proxyOnFocus);
|
|
47411
48092
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
47412
48093
|
this.instance.destroy();
|
|
@@ -47415,13 +48096,29 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47415
48096
|
setValue(value) {
|
|
47416
48097
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
47417
48098
|
const html = this.j.e.fire('beautifyHTML', value);
|
|
47418
|
-
if ((0,
|
|
48099
|
+
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
|
|
47419
48100
|
value = html;
|
|
47420
48101
|
}
|
|
47421
48102
|
}
|
|
47422
|
-
|
|
48103
|
+
// ACE reports its own `setValue` as two changes, the removal of the
|
|
48104
|
+
// old text and the insertion of the new one. Fed back into the
|
|
48105
|
+
// editor they became two history entries, `content -> ''` and
|
|
48106
|
+
// `'' -> content`, so the first undo after a switch to the source
|
|
48107
|
+
// view and back emptied the editor. The text came from the editor
|
|
48108
|
+
// in the first place, so there is nothing to send back.
|
|
48109
|
+
this.__settingValue = true;
|
|
48110
|
+
try {
|
|
48111
|
+
this.instance.setValue(value);
|
|
48112
|
+
} finally{
|
|
48113
|
+
this.__settingValue = false;
|
|
48114
|
+
}
|
|
47423
48115
|
this.instance.clearSelection();
|
|
47424
48116
|
}
|
|
48117
|
+
__onChange() {
|
|
48118
|
+
if (!this.__settingValue) {
|
|
48119
|
+
this.toWYSIWYG();
|
|
48120
|
+
}
|
|
48121
|
+
}
|
|
47425
48122
|
getValue() {
|
|
47426
48123
|
return this.instance.getValue();
|
|
47427
48124
|
}
|
|
@@ -47500,8 +48197,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
|
|
|
47500
48197
|
this.proxyOnMouseDown = (e)=>{
|
|
47501
48198
|
this.j.e.fire('mousedown', e);
|
|
47502
48199
|
};
|
|
48200
|
+
this.__settingValue = false;
|
|
47503
48201
|
}
|
|
47504
48202
|
}
|
|
48203
|
+
__decorate([
|
|
48204
|
+
_core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
48205
|
+
], AceEditor.prototype, "__onChange", null);
|
|
47505
48206
|
|
|
47506
48207
|
|
|
47507
48208
|
/***/ }),
|
|
@@ -50274,15 +50975,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
|
|
|
50274
50975
|
|
|
50275
50976
|
|
|
50276
50977
|
|
|
50978
|
+
// Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
|
|
50979
|
+
// with `mediaDefaultAlign`
|
|
50980
|
+
function prepareMedia(jodit, element) {
|
|
50981
|
+
const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
|
|
50982
|
+
const { mediaDefaultAlign } = jodit.o;
|
|
50983
|
+
if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
|
|
50984
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
|
|
50985
|
+
}
|
|
50986
|
+
return media;
|
|
50987
|
+
}
|
|
50277
50988
|
function insertVideos(data) {
|
|
50278
50989
|
var _a;
|
|
50279
50990
|
(_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
|
|
50280
|
-
this.s.insertNode(this.createInside.element('video', {
|
|
50991
|
+
this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
|
|
50281
50992
|
controls: '',
|
|
50282
50993
|
src: data.baseurl + file
|
|
50283
|
-
}));
|
|
50994
|
+
})));
|
|
50284
50995
|
});
|
|
50285
50996
|
}
|
|
50997
|
+
// Embed code that is one element is prepared as media; other code goes in as
|
|
50998
|
+
// it is
|
|
50999
|
+
function prepareEmbedCode(jodit, code) {
|
|
51000
|
+
const box = jodit.createInside.div();
|
|
51001
|
+
box.innerHTML = code.trim();
|
|
51002
|
+
const element = box.firstElementChild;
|
|
51003
|
+
return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
|
|
51004
|
+
}
|
|
50286
51005
|
_config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
|
|
50287
51006
|
parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
50288
51007
|
defaultWidth: 400,
|
|
@@ -50320,7 +51039,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
|
|
|
50320
51039
|
])
|
|
50321
51040
|
]), tabs = [], insertCode = (code)=>{
|
|
50322
51041
|
jodit.s.restore();
|
|
50323
|
-
jodit.s.insertHTML(code);
|
|
51042
|
+
jodit.s.insertHTML(prepareEmbedCode(jodit, code));
|
|
50324
51043
|
close();
|
|
50325
51044
|
};
|
|
50326
51045
|
jodit.s.save();
|