jodit-pro 4.15.19 → 4.15.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +164 -46
- package/es2015/jodit.min.js +6 -6
- 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.js +4 -4
- package/es2018/jodit.min.js +6 -6
- 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 +1 -1
- package/es2021/jodit.fat.min.js +8 -8
- package/es2021/jodit.js +164 -46
- package/es2021/jodit.min.js +11 -11
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +8 -8
- package/es2021.en/jodit.js +164 -46
- package/es2021.en/jodit.min.js +11 -11
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +254 -48
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.15.
|
|
4
|
+
* Version: v4.15.21
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -725,6 +725,25 @@ let ConfigPrototype = {};
|
|
|
725
725
|
/**
|
|
726
726
|
* Default width (in pixels) applied to images inserted into the editor
|
|
727
727
|
*/ this.imageDefaultWidth = 300;
|
|
728
|
+
/**
|
|
729
|
+
* Alignment given to images inserted into the editor. `'normal'` leaves
|
|
730
|
+
* them unaligned
|
|
731
|
+
*/ this.imageDefaultAlign = 'normal';
|
|
732
|
+
/**
|
|
733
|
+
* Class names to align images with, instead of an inline `float` or
|
|
734
|
+
* `margin`. Aligning an image removes every class listed here and adds the
|
|
735
|
+
* chosen alignment's, which can be several separated by spaces.
|
|
736
|
+
*
|
|
737
|
+
* ```javascript
|
|
738
|
+
* Jodit.make('#editor', {
|
|
739
|
+
* imageAlignClasses: {
|
|
740
|
+
* left: 'align-left',
|
|
741
|
+
* right: 'align-right',
|
|
742
|
+
* center: 'align-center'
|
|
743
|
+
* }
|
|
744
|
+
* });
|
|
745
|
+
* ```
|
|
746
|
+
*/ this.imageAlignClasses = null;
|
|
728
747
|
/**
|
|
729
748
|
* Do not display these buttons that are on the list
|
|
730
749
|
*
|
|
@@ -1772,7 +1791,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1772
1791
|
* ```
|
|
1773
1792
|
* @packageDocumentation
|
|
1774
1793
|
* @module constants
|
|
1775
|
-
*/ const APP_VERSION = "4.15.
|
|
1794
|
+
*/ const APP_VERSION = "4.15.21";
|
|
1776
1795
|
// prettier-ignore
|
|
1777
1796
|
const ES = "es2015";
|
|
1778
1797
|
const IS_ES_MODERN = true;
|
|
@@ -6331,6 +6350,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6331
6350
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6332
6351
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6333
6352
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6353
|
+
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6334
6354
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6335
6355
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6336
6356
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
|
|
@@ -7421,6 +7441,7 @@ function trimChars(value, chars) {
|
|
|
7421
7441
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7422
7442
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7423
7443
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7444
|
+
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7424
7445
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
7425
7446
|
/* harmony export */ });
|
|
7426
7447
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
@@ -7433,9 +7454,26 @@ function trimChars(value, chars) {
|
|
|
7433
7454
|
*/
|
|
7434
7455
|
|
|
7435
7456
|
|
|
7457
|
+
const classNames = (value)=>(value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
|
|
7436
7458
|
/**
|
|
7437
|
-
* Align image
|
|
7438
|
-
|
|
7459
|
+
* Align image, with `classes` (see `imageAlignClasses`) instead of inline
|
|
7460
|
+
* styles when they are given
|
|
7461
|
+
*/ function hAlignElement(image, align, classes) {
|
|
7462
|
+
if (classes) {
|
|
7463
|
+
hAlignElement(image, 'normal');
|
|
7464
|
+
Object.values(classes).forEach((value)=>image.classList.remove(...classNames(value)));
|
|
7465
|
+
image.classList.add(...classNames(classes[align || 'normal']));
|
|
7466
|
+
[
|
|
7467
|
+
'class',
|
|
7468
|
+
'style'
|
|
7469
|
+
].forEach((name)=>{
|
|
7470
|
+
var _a;
|
|
7471
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7472
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name, null);
|
|
7473
|
+
}
|
|
7474
|
+
});
|
|
7475
|
+
return;
|
|
7476
|
+
}
|
|
7439
7477
|
if (align && align !== 'normal') {
|
|
7440
7478
|
if (align !== 'center') {
|
|
7441
7479
|
(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', align);
|
|
@@ -7458,6 +7496,31 @@ function trimChars(value, chars) {
|
|
|
7458
7496
|
;(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
|
|
7459
7497
|
}
|
|
7460
7498
|
}
|
|
7499
|
+
/**
|
|
7500
|
+
* The alignment `hAlignElement` has set on an element
|
|
7501
|
+
*/ function getHAlign(elm, classes) {
|
|
7502
|
+
if (classes) {
|
|
7503
|
+
for (const align of [
|
|
7504
|
+
'left',
|
|
7505
|
+
'right',
|
|
7506
|
+
'center',
|
|
7507
|
+
'normal'
|
|
7508
|
+
]){
|
|
7509
|
+
const names = classNames(classes[align]);
|
|
7510
|
+
if (names.length && names.every((name)=>elm.classList.contains(name))) {
|
|
7511
|
+
return align;
|
|
7512
|
+
}
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7515
|
+
const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'float').toLowerCase();
|
|
7516
|
+
if (float === 'left' || float === 'right') {
|
|
7517
|
+
return float;
|
|
7518
|
+
}
|
|
7519
|
+
if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-right') === 'auto') {
|
|
7520
|
+
return 'center';
|
|
7521
|
+
}
|
|
7522
|
+
return 'normal';
|
|
7523
|
+
}
|
|
7461
7524
|
/**
|
|
7462
7525
|
* Remove text-align style for all selected children
|
|
7463
7526
|
*/ function clearAlign(node) {
|
|
@@ -8610,6 +8673,7 @@ const getClassName = (obj)=>{
|
|
|
8610
8673
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8611
8674
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8612
8675
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
|
|
8676
|
+
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
8613
8677
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
|
|
8614
8678
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
|
|
8615
8679
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
@@ -10660,10 +10724,11 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10660
10724
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
10661
10725
|
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
10662
10726
|
/* harmony import */ var _helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27613);
|
|
10663
|
-
/* harmony import */ var
|
|
10664
|
-
/* harmony import */ var
|
|
10665
|
-
/* harmony import */ var
|
|
10666
|
-
/* harmony import */ var
|
|
10727
|
+
/* harmony import */ var _helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25726);
|
|
10728
|
+
/* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38837);
|
|
10729
|
+
/* harmony import */ var _helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43463);
|
|
10730
|
+
/* harmony import */ var _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25639);
|
|
10731
|
+
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45124);
|
|
10667
10732
|
/*!
|
|
10668
10733
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10669
10734
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10685,6 +10750,7 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10685
10750
|
|
|
10686
10751
|
|
|
10687
10752
|
|
|
10753
|
+
|
|
10688
10754
|
class Selection {
|
|
10689
10755
|
/**
|
|
10690
10756
|
* Short alias for this.jodit
|
|
@@ -11122,7 +11188,7 @@ class Selection {
|
|
|
11122
11188
|
return node;
|
|
11123
11189
|
}
|
|
11124
11190
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node)) {
|
|
11125
|
-
const ret = (0,
|
|
11191
|
+
const ret = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.findCorrectCurrentNode)(node, range, rightMode, sel.isCollapsed, checkChild, child);
|
|
11126
11192
|
node = ret.node;
|
|
11127
11193
|
rightMode = ret.rightMode;
|
|
11128
11194
|
}
|
|
@@ -11266,6 +11332,10 @@ class Selection {
|
|
|
11266
11332
|
if (styles && typeof styles === 'object') {
|
|
11267
11333
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
|
|
11268
11334
|
}
|
|
11335
|
+
const { imageDefaultAlign, imageAlignClasses } = this.j.o;
|
|
11336
|
+
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
11337
|
+
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
|
|
11338
|
+
}
|
|
11269
11339
|
const onload = ()=>{
|
|
11270
11340
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
11271
11341
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
@@ -11390,7 +11460,7 @@ class Selection {
|
|
|
11390
11460
|
const isSignificant = (elm)=>Boolean(elm && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'br') && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(elm) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTemporary(elm) && !(_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && this.j.e.fire('isInvisibleForCursor', elm) === true));
|
|
11391
11461
|
// check right offset
|
|
11392
11462
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(container)) {
|
|
11393
|
-
if ((0,
|
|
11463
|
+
if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.cursorInTheEdgeOfString)(container, offset, start, end)) {
|
|
11394
11464
|
return false;
|
|
11395
11465
|
}
|
|
11396
11466
|
} else {
|
|
@@ -11782,8 +11852,8 @@ class Selection {
|
|
|
11782
11852
|
* }) // will remove `color:red` from `span`
|
|
11783
11853
|
* ```
|
|
11784
11854
|
*/ commitStyle(options) {
|
|
11785
|
-
;(0,
|
|
11786
|
-
const styleElm = new
|
|
11855
|
+
;(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__.assert)((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.size)(options) > 0, 'Need to pass at least one option');
|
|
11856
|
+
const styleElm = new _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__.CommitStyle(options);
|
|
11787
11857
|
styleElm.apply(this.j);
|
|
11788
11858
|
}
|
|
11789
11859
|
/**
|
|
@@ -11833,7 +11903,7 @@ class Selection {
|
|
|
11833
11903
|
}
|
|
11834
11904
|
const fragment = leftRange.extractContents();
|
|
11835
11905
|
const clearEmpties = (node)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(node, (node)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(node) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(node));
|
|
11836
|
-
(0,
|
|
11906
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__.assert)(currentBox.parentNode, 'Splitting fails');
|
|
11837
11907
|
try {
|
|
11838
11908
|
clearEmpties(fragment);
|
|
11839
11909
|
clearEmpties(currentBox);
|
|
@@ -11886,7 +11956,7 @@ class Selection {
|
|
|
11886
11956
|
const r = range.cloneRange();
|
|
11887
11957
|
r.collapse(start);
|
|
11888
11958
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeInsertNode(r, fake);
|
|
11889
|
-
(0,
|
|
11959
|
+
(0,_helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__.moveTheNodeAlongTheEdgeOutward)(fake, start, this.j.editor);
|
|
11890
11960
|
return fake;
|
|
11891
11961
|
};
|
|
11892
11962
|
const leftFake = moveMaxEdgeFake(true);
|
|
@@ -38790,14 +38860,28 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
|
|
|
38790
38860
|
*/ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
|
|
38791
38861
|
function focus(editor) {
|
|
38792
38862
|
if (editor.o.saveSelectionOnBlur) {
|
|
38863
|
+
// A click that brings focus back places the caret itself, and Chrome
|
|
38864
|
+
// has already placed it when focus fires, so restoring would move it
|
|
38865
|
+
// back to the old selection. The saved markers are dropped instead.
|
|
38866
|
+
let focusByPointer = false;
|
|
38793
38867
|
editor.e.on('blur', ()=>{
|
|
38868
|
+
// A press that never brought the focus back must not decide
|
|
38869
|
+
// what the next focus does
|
|
38870
|
+
focusByPointer = false;
|
|
38794
38871
|
if (editor.isEditorMode()) {
|
|
38795
38872
|
editor.s.save(true);
|
|
38796
38873
|
}
|
|
38874
|
+
}).on('mousedown touchstart', ()=>{
|
|
38875
|
+
focusByPointer = !editor.editorIsActive;
|
|
38797
38876
|
}).on('focus', ()=>{
|
|
38798
38877
|
if (editor.isEditorMode()) {
|
|
38799
|
-
|
|
38878
|
+
if (focusByPointer) {
|
|
38879
|
+
editor.s.removeMarkers();
|
|
38880
|
+
} else {
|
|
38881
|
+
editor.s.restore();
|
|
38882
|
+
}
|
|
38800
38883
|
}
|
|
38884
|
+
focusByPointer = false;
|
|
38801
38885
|
});
|
|
38802
38886
|
}
|
|
38803
38887
|
const focus = ()=>{
|
|
@@ -39872,11 +39956,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
39872
39956
|
/* unused harmony export imageProcessor */
|
|
39873
39957
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
39874
39958
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
39875
|
-
/* harmony import */ var
|
|
39876
|
-
/* harmony import */ var
|
|
39877
|
-
/* harmony import */ var
|
|
39878
|
-
/* harmony import */ var
|
|
39879
|
-
/* harmony import */ var
|
|
39959
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
39960
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
39961
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
39962
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
39963
|
+
/* harmony import */ var _modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(74569);
|
|
39964
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85745);
|
|
39880
39965
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
39881
39966
|
try {
|
|
39882
39967
|
var info = gen[key](arg);
|
|
@@ -39920,11 +40005,12 @@ function _async_to_generator(fn) {
|
|
|
39920
40005
|
|
|
39921
40006
|
|
|
39922
40007
|
|
|
40008
|
+
|
|
39923
40009
|
const JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
39924
40010
|
const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
39925
40011
|
/**
|
|
39926
40012
|
* Change editor's size after load all images
|
|
39927
|
-
*/ class imageProcessor extends
|
|
40013
|
+
*/ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
39928
40014
|
afterInit(jodit) {}
|
|
39929
40015
|
beforeDestruct(jodit) {
|
|
39930
40016
|
const buffer = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
|
|
@@ -39963,9 +40049,9 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39963
40049
|
if (!editor.editor) {
|
|
39964
40050
|
return;
|
|
39965
40051
|
}
|
|
39966
|
-
;(0,
|
|
39967
|
-
if (!(0,
|
|
39968
|
-
(0,
|
|
40052
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('img', editor.editor).forEach((elm)=>{
|
|
40053
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
|
|
40054
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
39969
40055
|
if (!elm.complete) {
|
|
39970
40056
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
39971
40057
|
var _a;
|
|
@@ -39977,6 +40063,7 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
39977
40063
|
replaceDataURIToBlobUUID(editor, elm);
|
|
39978
40064
|
}
|
|
39979
40065
|
editor.e.on(elm, 'mousedown touchstart', ()=>{
|
|
40066
|
+
removeCaretText(elm);
|
|
39980
40067
|
editor.s.select(elm);
|
|
39981
40068
|
});
|
|
39982
40069
|
}
|
|
@@ -39998,6 +40085,24 @@ __decorate([
|
|
|
39998
40085
|
]),
|
|
39999
40086
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
40000
40087
|
], imageProcessor.prototype, "afterChange", null);
|
|
40088
|
+
/**
|
|
40089
|
+
* Remove the invisible-space text beside an image, which only held a caret.
|
|
40090
|
+
* Selecting the image replaces the caret, and with the text still after a
|
|
40091
|
+
* block image, Safari highlights the rest of the image's line. See #1512
|
|
40092
|
+
*/ function removeCaretText(elm) {
|
|
40093
|
+
var _a;
|
|
40094
|
+
for (const side of [
|
|
40095
|
+
'previousSibling',
|
|
40096
|
+
'nextSibling'
|
|
40097
|
+
]){
|
|
40098
|
+
let node = elm[side];
|
|
40099
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && !((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.replace((0,_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), ''))){
|
|
40100
|
+
const next = node[side];
|
|
40101
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(node);
|
|
40102
|
+
node = next;
|
|
40103
|
+
}
|
|
40104
|
+
}
|
|
40105
|
+
}
|
|
40001
40106
|
function replaceDataURIToBlobUUID(editor, elm) {
|
|
40002
40107
|
if (!editor.o.imageProcessor.replaceDataURIToBlobIdInView) {
|
|
40003
40108
|
return;
|
|
@@ -40008,7 +40113,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
40008
40113
|
const dataUri = elm.src;
|
|
40009
40114
|
let blob;
|
|
40010
40115
|
try {
|
|
40011
|
-
blob = (0,
|
|
40116
|
+
blob = (0,_modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__.dataURItoBlob)(dataUri);
|
|
40012
40117
|
} catch (_a) {
|
|
40013
40118
|
// A data URI the browser accepts but we cannot decode is not worth
|
|
40014
40119
|
// breaking the editor over — keep the image as it is
|
|
@@ -40021,7 +40126,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
40021
40126
|
list[elm.src] = dataUri;
|
|
40022
40127
|
editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
|
|
40023
40128
|
}
|
|
40024
|
-
|
|
40129
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageProcessor', imageProcessor);
|
|
40025
40130
|
|
|
40026
40131
|
|
|
40027
40132
|
/***/ }),
|
|
@@ -40348,7 +40453,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
40348
40453
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
40349
40454
|
/* harmony export */ readAlign: function() { return /* binding */ readAlign; }
|
|
40350
40455
|
/* harmony export */ });
|
|
40351
|
-
/* harmony import */ var
|
|
40456
|
+
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
40352
40457
|
/*!
|
|
40353
40458
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
40354
40459
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -40356,20 +40461,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
40356
40461
|
*/
|
|
40357
40462
|
/**
|
|
40358
40463
|
* @private
|
|
40359
|
-
*/ function readAlign(image, values) {
|
|
40360
|
-
|
|
40361
|
-
|
|
40362
|
-
'left',
|
|
40363
|
-
'right'
|
|
40364
|
-
].indexOf((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float').toLowerCase()) !== -1) {
|
|
40365
|
-
values.align = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'float');
|
|
40366
|
-
} else {
|
|
40367
|
-
if ((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'display') === 'block' && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-left') === 'auto' && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-right') === 'auto') {
|
|
40368
|
-
values.align = 'center';
|
|
40369
|
-
} else {
|
|
40370
|
-
values.align = '';
|
|
40371
|
-
}
|
|
40372
|
-
}
|
|
40464
|
+
*/ function readAlign(image, values, classes) {
|
|
40465
|
+
const align = (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign)(image, classes);
|
|
40466
|
+
values.align = align === 'normal' ? '' : align;
|
|
40373
40467
|
}
|
|
40374
40468
|
|
|
40375
40469
|
|
|
@@ -40429,7 +40523,7 @@ function _async_to_generator(fn) {
|
|
|
40429
40523
|
*/ function readValuesFromImage(j, state) {
|
|
40430
40524
|
return _async_to_generator(function*() {
|
|
40431
40525
|
const { sourceImage: image, values } = state;
|
|
40432
|
-
(0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values);
|
|
40526
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values, j.o.imageAlignClasses);
|
|
40433
40527
|
// Border radius
|
|
40434
40528
|
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
40435
40529
|
// Id
|
|
@@ -41545,7 +41639,7 @@ function _async_to_generator(fn) {
|
|
|
41545
41639
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
41546
41640
|
}
|
|
41547
41641
|
if (opt.image.editAlign) {
|
|
41548
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
41642
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
|
|
41549
41643
|
}
|
|
41550
41644
|
}
|
|
41551
41645
|
|
|
@@ -41610,10 +41704,12 @@ function _async_to_generator(fn) {
|
|
|
41610
41704
|
marginBottom,
|
|
41611
41705
|
marginLeft
|
|
41612
41706
|
];
|
|
41707
|
+
// Compared with the inline value, which is what `readMargins` showed, so a
|
|
41708
|
+
// margin from a stylesheet is not overwritten when the field is unchanged
|
|
41613
41709
|
const applyMargin = (key, value)=>{
|
|
41614
|
-
const oldValue = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.
|
|
41710
|
+
const oldValue = (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, key) || 0);
|
|
41615
41711
|
const v = (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)(value);
|
|
41616
|
-
if (oldValue
|
|
41712
|
+
if (oldValue !== v) {
|
|
41617
41713
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, key, v);
|
|
41618
41714
|
}
|
|
41619
41715
|
};
|
|
@@ -42307,6 +42403,10 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
42307
42403
|
|
|
42308
42404
|
|
|
42309
42405
|
|
|
42406
|
+
// Images align with `imageAlignClasses`; the wrappers of iframes and media
|
|
42407
|
+
// keep inline styles
|
|
42408
|
+
const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
42409
|
+
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
|
|
42310
42410
|
const align = {
|
|
42311
42411
|
name: 'left',
|
|
42312
42412
|
childTemplate: (_, __, value)=>value,
|
|
@@ -42316,6 +42416,16 @@ const align = {
|
|
|
42316
42416
|
'Center',
|
|
42317
42417
|
'Normal'
|
|
42318
42418
|
],
|
|
42419
|
+
update: (editor, button)=>{
|
|
42420
|
+
const current = currentAlign(editor, button.target);
|
|
42421
|
+
button.state.icon.name = current === 'normal' ? 'left' : current;
|
|
42422
|
+
},
|
|
42423
|
+
isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
|
|
42424
|
+
isChildActive: (editor, button)=>{
|
|
42425
|
+
var _a;
|
|
42426
|
+
const [value] = (_a = button.control.args) !== null && _a !== void 0 ? _a : [];
|
|
42427
|
+
return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
42428
|
+
},
|
|
42319
42429
|
exec: (editor, elm, { control })=>{
|
|
42320
42430
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
42321
42431
|
'img',
|
|
@@ -42328,7 +42438,7 @@ const align = {
|
|
|
42328
42438
|
if (!command) {
|
|
42329
42439
|
return false;
|
|
42330
42440
|
}
|
|
42331
|
-
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command);
|
|
42441
|
+
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, alignClasses(editor, elm));
|
|
42332
42442
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
42333
42443
|
'jodit',
|
|
42334
42444
|
'jodit-media'
|
|
@@ -42368,6 +42478,14 @@ const align = {
|
|
|
42368
42478
|
'Normal'
|
|
42369
42479
|
],
|
|
42370
42480
|
tooltip: 'Vertical align',
|
|
42481
|
+
// `vertical-align` only moves an image in the line, not a floated or block one
|
|
42482
|
+
isDisabled: (editor, button)=>{
|
|
42483
|
+
const image = button.target;
|
|
42484
|
+
return Boolean(image && ([
|
|
42485
|
+
'left',
|
|
42486
|
+
'right'
|
|
42487
|
+
].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
|
|
42488
|
+
},
|
|
42371
42489
|
exec: (editor, image, { control })=>{
|
|
42372
42490
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
|
|
42373
42491
|
return;
|