jodit-pro 4.15.18 → 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 +183 -53
- 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 +9 -9
- package/es2021/jodit.js +183 -53
- package/es2021/jodit.min.js +12 -12
- 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 +9 -9
- package/es2021.en/jodit.js +183 -53
- package/es2021.en/jodit.min.js +12 -12
- 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 +273 -55
- 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/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.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
|
*
|
|
@@ -1724,7 +1743,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1724
1743
|
* ```
|
|
1725
1744
|
* @packageDocumentation
|
|
1726
1745
|
* @module constants
|
|
1727
|
-
*/ const APP_VERSION = "4.15.
|
|
1746
|
+
*/ const APP_VERSION = "4.15.21";
|
|
1728
1747
|
// prettier-ignore
|
|
1729
1748
|
const ES = "es2021";
|
|
1730
1749
|
const IS_ES_MODERN = true;
|
|
@@ -6283,6 +6302,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6283
6302
|
/* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
|
|
6284
6303
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
|
|
6285
6304
|
/* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
|
|
6305
|
+
/* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
|
|
6286
6306
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
|
|
6287
6307
|
/* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
|
|
6288
6308
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
|
|
@@ -7373,6 +7393,7 @@ function trimChars(value, chars) {
|
|
|
7373
7393
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7374
7394
|
/* harmony export */ alignElement: function() { return /* binding */ alignElement; },
|
|
7375
7395
|
/* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
|
|
7396
|
+
/* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
|
|
7376
7397
|
/* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
|
|
7377
7398
|
/* harmony export */ });
|
|
7378
7399
|
/* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
@@ -7385,9 +7406,26 @@ function trimChars(value, chars) {
|
|
|
7385
7406
|
*/
|
|
7386
7407
|
|
|
7387
7408
|
|
|
7409
|
+
const classNames = (value)=>(value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
|
|
7388
7410
|
/**
|
|
7389
|
-
* Align image
|
|
7390
|
-
|
|
7411
|
+
* Align image, with `classes` (see `imageAlignClasses`) instead of inline
|
|
7412
|
+
* styles when they are given
|
|
7413
|
+
*/ function hAlignElement(image, align, classes) {
|
|
7414
|
+
if (classes) {
|
|
7415
|
+
hAlignElement(image, 'normal');
|
|
7416
|
+
Object.values(classes).forEach((value)=>image.classList.remove(...classNames(value)));
|
|
7417
|
+
image.classList.add(...classNames(classes[align || 'normal']));
|
|
7418
|
+
[
|
|
7419
|
+
'class',
|
|
7420
|
+
'style'
|
|
7421
|
+
].forEach((name)=>{
|
|
7422
|
+
var _a;
|
|
7423
|
+
if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
7424
|
+
(0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name, null);
|
|
7425
|
+
}
|
|
7426
|
+
});
|
|
7427
|
+
return;
|
|
7428
|
+
}
|
|
7391
7429
|
if (align && align !== 'normal') {
|
|
7392
7430
|
if (align !== 'center') {
|
|
7393
7431
|
(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', align);
|
|
@@ -7410,6 +7448,31 @@ function trimChars(value, chars) {
|
|
|
7410
7448
|
;(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
|
|
7411
7449
|
}
|
|
7412
7450
|
}
|
|
7451
|
+
/**
|
|
7452
|
+
* The alignment `hAlignElement` has set on an element
|
|
7453
|
+
*/ function getHAlign(elm, classes) {
|
|
7454
|
+
if (classes) {
|
|
7455
|
+
for (const align of [
|
|
7456
|
+
'left',
|
|
7457
|
+
'right',
|
|
7458
|
+
'center',
|
|
7459
|
+
'normal'
|
|
7460
|
+
]){
|
|
7461
|
+
const names = classNames(classes[align]);
|
|
7462
|
+
if (names.length && names.every((name)=>elm.classList.contains(name))) {
|
|
7463
|
+
return align;
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
}
|
|
7467
|
+
const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'float').toLowerCase();
|
|
7468
|
+
if (float === 'left' || float === 'right') {
|
|
7469
|
+
return float;
|
|
7470
|
+
}
|
|
7471
|
+
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') {
|
|
7472
|
+
return 'center';
|
|
7473
|
+
}
|
|
7474
|
+
return 'normal';
|
|
7475
|
+
}
|
|
7413
7476
|
/**
|
|
7414
7477
|
* Remove text-align style for all selected children
|
|
7415
7478
|
*/ function clearAlign(node) {
|
|
@@ -8562,6 +8625,7 @@ const getClassName = (obj)=>{
|
|
|
8562
8625
|
/* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
|
|
8563
8626
|
/* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
|
|
8564
8627
|
/* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
|
|
8628
|
+
/* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
|
|
8565
8629
|
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
|
|
8566
8630
|
/* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
|
|
8567
8631
|
/* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
|
|
@@ -10417,10 +10481,11 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10417
10481
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
10418
10482
|
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
10419
10483
|
/* harmony import */ var _helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27613);
|
|
10420
|
-
/* harmony import */ var
|
|
10421
|
-
/* harmony import */ var
|
|
10422
|
-
/* harmony import */ var
|
|
10423
|
-
/* harmony import */ var
|
|
10484
|
+
/* harmony import */ var _helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25726);
|
|
10485
|
+
/* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38837);
|
|
10486
|
+
/* harmony import */ var _helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43463);
|
|
10487
|
+
/* harmony import */ var _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25639);
|
|
10488
|
+
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45124);
|
|
10424
10489
|
/*!
|
|
10425
10490
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10426
10491
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10442,6 +10507,7 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
|
|
|
10442
10507
|
|
|
10443
10508
|
|
|
10444
10509
|
|
|
10510
|
+
|
|
10445
10511
|
class Selection {
|
|
10446
10512
|
/**
|
|
10447
10513
|
* Short alias for this.jodit
|
|
@@ -10879,7 +10945,7 @@ class Selection {
|
|
|
10879
10945
|
return node;
|
|
10880
10946
|
}
|
|
10881
10947
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node)) {
|
|
10882
|
-
const ret = (0,
|
|
10948
|
+
const ret = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.findCorrectCurrentNode)(node, range, rightMode, sel.isCollapsed, checkChild, child);
|
|
10883
10949
|
node = ret.node;
|
|
10884
10950
|
rightMode = ret.rightMode;
|
|
10885
10951
|
}
|
|
@@ -11023,6 +11089,10 @@ class Selection {
|
|
|
11023
11089
|
if (styles && typeof styles === 'object') {
|
|
11024
11090
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
|
|
11025
11091
|
}
|
|
11092
|
+
const { imageDefaultAlign, imageAlignClasses } = this.j.o;
|
|
11093
|
+
if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
|
|
11094
|
+
(0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
|
|
11095
|
+
}
|
|
11026
11096
|
const onload = ()=>{
|
|
11027
11097
|
if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
|
|
11028
11098
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
@@ -11147,7 +11217,7 @@ class Selection {
|
|
|
11147
11217
|
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));
|
|
11148
11218
|
// check right offset
|
|
11149
11219
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(container)) {
|
|
11150
|
-
if ((0,
|
|
11220
|
+
if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.cursorInTheEdgeOfString)(container, offset, start, end)) {
|
|
11151
11221
|
return false;
|
|
11152
11222
|
}
|
|
11153
11223
|
} else {
|
|
@@ -11539,8 +11609,8 @@ class Selection {
|
|
|
11539
11609
|
* }) // will remove `color:red` from `span`
|
|
11540
11610
|
* ```
|
|
11541
11611
|
*/ commitStyle(options) {
|
|
11542
|
-
;(0,
|
|
11543
|
-
const styleElm = new
|
|
11612
|
+
;(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');
|
|
11613
|
+
const styleElm = new _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__.CommitStyle(options);
|
|
11544
11614
|
styleElm.apply(this.j);
|
|
11545
11615
|
}
|
|
11546
11616
|
/**
|
|
@@ -11590,7 +11660,7 @@ class Selection {
|
|
|
11590
11660
|
}
|
|
11591
11661
|
const fragment = leftRange.extractContents();
|
|
11592
11662
|
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));
|
|
11593
|
-
(0,
|
|
11663
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__.assert)(currentBox.parentNode, 'Splitting fails');
|
|
11594
11664
|
try {
|
|
11595
11665
|
clearEmpties(fragment);
|
|
11596
11666
|
clearEmpties(currentBox);
|
|
@@ -11643,7 +11713,7 @@ class Selection {
|
|
|
11643
11713
|
const r = range.cloneRange();
|
|
11644
11714
|
r.collapse(start);
|
|
11645
11715
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeInsertNode(r, fake);
|
|
11646
|
-
(0,
|
|
11716
|
+
(0,_helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__.moveTheNodeAlongTheEdgeOutward)(fake, start, this.j.editor);
|
|
11647
11717
|
return fake;
|
|
11648
11718
|
};
|
|
11649
11719
|
const leftFake = moveMaxEdgeFake(true);
|
|
@@ -34334,7 +34404,10 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
|
|
|
34334
34404
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
34335
34405
|
return;
|
|
34336
34406
|
}
|
|
34337
|
-
|
|
34407
|
+
// Only a text block can be an empty caret container; a lone video,
|
|
34408
|
+
// iframe or icon has no children but is content in itself
|
|
34409
|
+
const lone = /^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(data.value.trim());
|
|
34410
|
+
if (lone && /^(p|div|h[1-6]|blockquote|pre)$/i.test(lone[1])) {
|
|
34338
34411
|
data.value = '';
|
|
34339
34412
|
}
|
|
34340
34413
|
}
|
|
@@ -35592,6 +35665,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('color', color);
|
|
|
35592
35665
|
|
|
35593
35666
|
|
|
35594
35667
|
_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('brush', _brush_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
|
35668
|
+
/**
|
|
35669
|
+
* Set a color style; an empty value removes it, and with it the `style`
|
|
35670
|
+
* attribute once nothing else is left in it
|
|
35671
|
+
*/ function setColorStyle(elm, key, value) {
|
|
35672
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(elm, key, value);
|
|
35673
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style')) {
|
|
35674
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
|
|
35675
|
+
}
|
|
35676
|
+
}
|
|
35595
35677
|
_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
|
|
35596
35678
|
isVisible: (editor)=>{
|
|
35597
35679
|
return !editor.o.disablePlugins.includes('color');
|
|
@@ -35607,7 +35689,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
|
|
|
35607
35689
|
}
|
|
35608
35690
|
const makeColorPicker = (key)=>(0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_4__.ColorPickerWidget)(editor, (value)=>{
|
|
35609
35691
|
selected.forEach((cell)=>{
|
|
35610
|
-
|
|
35692
|
+
setColorStyle(cell, key, value);
|
|
35611
35693
|
});
|
|
35612
35694
|
editor.lock();
|
|
35613
35695
|
editor.synchronizeValues();
|
|
@@ -35693,7 +35775,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35693
35775
|
if (!currentElement) {
|
|
35694
35776
|
editor.execCommand('background', false, value);
|
|
35695
35777
|
} else {
|
|
35696
|
-
(
|
|
35778
|
+
setColorStyle(currentElement, 'backgroundColor', value);
|
|
35697
35779
|
}
|
|
35698
35780
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
35699
35781
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'background');
|
|
@@ -35703,7 +35785,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35703
35785
|
if (!currentElement) {
|
|
35704
35786
|
editor.execCommand('forecolor', false, value);
|
|
35705
35787
|
} else {
|
|
35706
|
-
(
|
|
35788
|
+
setColorStyle(currentElement, 'color', value);
|
|
35707
35789
|
}
|
|
35708
35790
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
35709
35791
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'color');
|
|
@@ -35732,10 +35814,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35732
35814
|
if (current && current !== jodit.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isNode(current) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(current)) {
|
|
35733
35815
|
switch(mode){
|
|
35734
35816
|
case 'color':
|
|
35735
|
-
(
|
|
35817
|
+
setColorStyle(current, 'color', color);
|
|
35736
35818
|
break;
|
|
35737
35819
|
case 'background':
|
|
35738
|
-
(
|
|
35820
|
+
setColorStyle(current, 'backgroundColor', color);
|
|
35739
35821
|
break;
|
|
35740
35822
|
}
|
|
35741
35823
|
} else {
|
|
@@ -37388,14 +37470,28 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
|
|
|
37388
37470
|
*/ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
|
|
37389
37471
|
function focus(editor) {
|
|
37390
37472
|
if (editor.o.saveSelectionOnBlur) {
|
|
37473
|
+
// A click that brings focus back places the caret itself, and Chrome
|
|
37474
|
+
// has already placed it when focus fires, so restoring would move it
|
|
37475
|
+
// back to the old selection. The saved markers are dropped instead.
|
|
37476
|
+
let focusByPointer = false;
|
|
37391
37477
|
editor.e.on('blur', ()=>{
|
|
37478
|
+
// A press that never brought the focus back must not decide
|
|
37479
|
+
// what the next focus does
|
|
37480
|
+
focusByPointer = false;
|
|
37392
37481
|
if (editor.isEditorMode()) {
|
|
37393
37482
|
editor.s.save(true);
|
|
37394
37483
|
}
|
|
37484
|
+
}).on('mousedown touchstart', ()=>{
|
|
37485
|
+
focusByPointer = !editor.editorIsActive;
|
|
37395
37486
|
}).on('focus', ()=>{
|
|
37396
37487
|
if (editor.isEditorMode()) {
|
|
37397
|
-
|
|
37488
|
+
if (focusByPointer) {
|
|
37489
|
+
editor.s.removeMarkers();
|
|
37490
|
+
} else {
|
|
37491
|
+
editor.s.restore();
|
|
37492
|
+
}
|
|
37398
37493
|
}
|
|
37494
|
+
focusByPointer = false;
|
|
37399
37495
|
});
|
|
37400
37496
|
}
|
|
37401
37497
|
const focus = ()=>{
|
|
@@ -38422,11 +38518,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
38422
38518
|
/* unused harmony export imageProcessor */
|
|
38423
38519
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
38424
38520
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
38425
|
-
/* harmony import */ var
|
|
38426
|
-
/* harmony import */ var
|
|
38427
|
-
/* harmony import */ var
|
|
38428
|
-
/* harmony import */ var
|
|
38429
|
-
/* harmony import */ var
|
|
38521
|
+
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
38522
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
38523
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
38524
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
38525
|
+
/* harmony import */ var _modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(74569);
|
|
38526
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85745);
|
|
38430
38527
|
/*!
|
|
38431
38528
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38432
38529
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38444,11 +38541,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
|
|
|
38444
38541
|
|
|
38445
38542
|
|
|
38446
38543
|
|
|
38544
|
+
|
|
38447
38545
|
const JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
|
|
38448
38546
|
const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
38449
38547
|
/**
|
|
38450
38548
|
* Change editor's size after load all images
|
|
38451
|
-
*/ class imageProcessor extends
|
|
38549
|
+
*/ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
38452
38550
|
afterInit(jodit) {}
|
|
38453
38551
|
beforeDestruct(jodit) {
|
|
38454
38552
|
const buffer = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
|
|
@@ -38486,9 +38584,9 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
38486
38584
|
if (!editor.editor) {
|
|
38487
38585
|
return;
|
|
38488
38586
|
}
|
|
38489
|
-
;(0,
|
|
38490
|
-
if (!(0,
|
|
38491
|
-
(0,
|
|
38587
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('img', editor.editor).forEach((elm)=>{
|
|
38588
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
|
|
38589
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
38492
38590
|
if (!elm.complete) {
|
|
38493
38591
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
38494
38592
|
var _a;
|
|
@@ -38500,6 +38598,7 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
38500
38598
|
replaceDataURIToBlobUUID(editor, elm);
|
|
38501
38599
|
}
|
|
38502
38600
|
editor.e.on(elm, 'mousedown touchstart', ()=>{
|
|
38601
|
+
removeCaretText(elm);
|
|
38503
38602
|
editor.s.select(elm);
|
|
38504
38603
|
});
|
|
38505
38604
|
}
|
|
@@ -38520,6 +38619,24 @@ __decorate([
|
|
|
38520
38619
|
]),
|
|
38521
38620
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
38522
38621
|
], imageProcessor.prototype, "afterChange", null);
|
|
38622
|
+
/**
|
|
38623
|
+
* Remove the invisible-space text beside an image, which only held a caret.
|
|
38624
|
+
* Selecting the image replaces the caret, and with the text still after a
|
|
38625
|
+
* block image, Safari highlights the rest of the image's line. See #1512
|
|
38626
|
+
*/ function removeCaretText(elm) {
|
|
38627
|
+
var _a;
|
|
38628
|
+
for (const side of [
|
|
38629
|
+
'previousSibling',
|
|
38630
|
+
'nextSibling'
|
|
38631
|
+
]){
|
|
38632
|
+
let node = elm[side];
|
|
38633
|
+
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)(), ''))){
|
|
38634
|
+
const next = node[side];
|
|
38635
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(node);
|
|
38636
|
+
node = next;
|
|
38637
|
+
}
|
|
38638
|
+
}
|
|
38639
|
+
}
|
|
38523
38640
|
function replaceDataURIToBlobUUID(editor, elm) {
|
|
38524
38641
|
if (!editor.o.imageProcessor.replaceDataURIToBlobIdInView) {
|
|
38525
38642
|
return;
|
|
@@ -38530,7 +38647,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
38530
38647
|
const dataUri = elm.src;
|
|
38531
38648
|
let blob;
|
|
38532
38649
|
try {
|
|
38533
|
-
blob = (0,
|
|
38650
|
+
blob = (0,_modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__.dataURItoBlob)(dataUri);
|
|
38534
38651
|
} catch (_a) {
|
|
38535
38652
|
// A data URI the browser accepts but we cannot decode is not worth
|
|
38536
38653
|
// breaking the editor over — keep the image as it is
|
|
@@ -38543,7 +38660,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
|
|
|
38543
38660
|
list[elm.src] = dataUri;
|
|
38544
38661
|
editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
|
|
38545
38662
|
}
|
|
38546
|
-
|
|
38663
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageProcessor', imageProcessor);
|
|
38547
38664
|
|
|
38548
38665
|
|
|
38549
38666
|
/***/ }),
|
|
@@ -38842,7 +38959,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
38842
38959
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38843
38960
|
/* harmony export */ readAlign: function() { return /* binding */ readAlign; }
|
|
38844
38961
|
/* harmony export */ });
|
|
38845
|
-
/* harmony import */ var
|
|
38962
|
+
/* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
|
|
38846
38963
|
/*!
|
|
38847
38964
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
38848
38965
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -38850,20 +38967,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
38850
38967
|
*/
|
|
38851
38968
|
/**
|
|
38852
38969
|
* @private
|
|
38853
|
-
*/ function readAlign(image, values) {
|
|
38854
|
-
|
|
38855
|
-
|
|
38856
|
-
'left',
|
|
38857
|
-
'right'
|
|
38858
|
-
].indexOf((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float').toLowerCase()) !== -1) {
|
|
38859
|
-
values.align = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'float');
|
|
38860
|
-
} else {
|
|
38861
|
-
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') {
|
|
38862
|
-
values.align = 'center';
|
|
38863
|
-
} else {
|
|
38864
|
-
values.align = '';
|
|
38865
|
-
}
|
|
38866
|
-
}
|
|
38970
|
+
*/ function readAlign(image, values, classes) {
|
|
38971
|
+
const align = (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign)(image, classes);
|
|
38972
|
+
values.align = align === 'normal' ? '' : align;
|
|
38867
38973
|
}
|
|
38868
38974
|
|
|
38869
38975
|
|
|
@@ -38896,7 +39002,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
|
|
|
38896
39002
|
* @private
|
|
38897
39003
|
*/ async function readValuesFromImage(j, state) {
|
|
38898
39004
|
const { sourceImage: image, values } = state;
|
|
38899
|
-
(0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values);
|
|
39005
|
+
(0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values, j.o.imageAlignClasses);
|
|
38900
39006
|
// Border radius
|
|
38901
39007
|
values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.cssInline)(image, 'border-radius') || '0', 10) || 0;
|
|
38902
39008
|
// Id
|
|
@@ -39929,7 +40035,7 @@ UIImagePositionTab = __decorate([
|
|
|
39929
40035
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
39930
40036
|
}
|
|
39931
40037
|
if (opt.image.editAlign) {
|
|
39932
|
-
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
40038
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
|
|
39933
40039
|
}
|
|
39934
40040
|
}
|
|
39935
40041
|
|
|
@@ -39994,10 +40100,12 @@ UIImagePositionTab = __decorate([
|
|
|
39994
40100
|
marginBottom,
|
|
39995
40101
|
marginLeft
|
|
39996
40102
|
];
|
|
40103
|
+
// Compared with the inline value, which is what `readMargins` showed, so a
|
|
40104
|
+
// margin from a stylesheet is not overwritten when the field is unchanged
|
|
39997
40105
|
const applyMargin = (key, value)=>{
|
|
39998
|
-
const oldValue = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.
|
|
40106
|
+
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);
|
|
39999
40107
|
const v = (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)(value);
|
|
40000
|
-
if (oldValue
|
|
40108
|
+
if (oldValue !== v) {
|
|
40001
40109
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, key, v);
|
|
40002
40110
|
}
|
|
40003
40111
|
};
|
|
@@ -40665,6 +40773,10 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
|
|
|
40665
40773
|
|
|
40666
40774
|
|
|
40667
40775
|
|
|
40776
|
+
// Images align with `imageAlignClasses`; the wrappers of iframes and media
|
|
40777
|
+
// keep inline styles
|
|
40778
|
+
const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
|
|
40779
|
+
const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
|
|
40668
40780
|
const align = {
|
|
40669
40781
|
name: 'left',
|
|
40670
40782
|
childTemplate: (_, __, value)=>value,
|
|
@@ -40674,6 +40786,16 @@ const align = {
|
|
|
40674
40786
|
'Center',
|
|
40675
40787
|
'Normal'
|
|
40676
40788
|
],
|
|
40789
|
+
update: (editor, button)=>{
|
|
40790
|
+
const current = currentAlign(editor, button.target);
|
|
40791
|
+
button.state.icon.name = current === 'normal' ? 'left' : current;
|
|
40792
|
+
},
|
|
40793
|
+
isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
|
|
40794
|
+
isChildActive: (editor, button)=>{
|
|
40795
|
+
var _a;
|
|
40796
|
+
const [value] = (_a = button.control.args) !== null && _a !== void 0 ? _a : [];
|
|
40797
|
+
return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
|
|
40798
|
+
},
|
|
40677
40799
|
exec: (editor, elm, { control })=>{
|
|
40678
40800
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
40679
40801
|
'img',
|
|
@@ -40686,7 +40808,7 @@ const align = {
|
|
|
40686
40808
|
if (!command) {
|
|
40687
40809
|
return false;
|
|
40688
40810
|
}
|
|
40689
|
-
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command);
|
|
40811
|
+
;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, alignClasses(editor, elm));
|
|
40690
40812
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
|
|
40691
40813
|
'jodit',
|
|
40692
40814
|
'jodit-media'
|
|
@@ -40726,6 +40848,14 @@ const align = {
|
|
|
40726
40848
|
'Normal'
|
|
40727
40849
|
],
|
|
40728
40850
|
tooltip: 'Vertical align',
|
|
40851
|
+
// `vertical-align` only moves an image in the line, not a floated or block one
|
|
40852
|
+
isDisabled: (editor, button)=>{
|
|
40853
|
+
const image = button.target;
|
|
40854
|
+
return Boolean(image && ([
|
|
40855
|
+
'left',
|
|
40856
|
+
'right'
|
|
40857
|
+
].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'));
|
|
40858
|
+
},
|
|
40729
40859
|
exec: (editor, image, { control })=>{
|
|
40730
40860
|
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
|
|
40731
40861
|
return;
|
|
@@ -43660,7 +43790,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
|
|
|
43660
43790
|
this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
|
|
43661
43791
|
}
|
|
43662
43792
|
editor.e.fire('placeholder', this.placeholderElm.innerHTML);
|
|
43663
|
-
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', this.toggle).on(window, 'load', this.toggle);
|
|
43793
|
+
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);
|
|
43664
43794
|
this.addNativeListeners();
|
|
43665
43795
|
this.toggle();
|
|
43666
43796
|
};
|