jodit-pro 4.1.14 → 4.1.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 +87 -31
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +1378 -546
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- 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 +6 -7
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.css +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/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/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.css +87 -31
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +1364 -546
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/autocomplete/autocomplete.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.css +1 -1
- package/es2018/plugins/backup/backup.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.css +1 -1
- package/es2018/plugins/button-generator/button-generator.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.css +1 -1
- package/es2018/plugins/color-picker/color-picker.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.css +1 -1
- package/es2018/plugins/emoji/emoji.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.css +6 -7
- package/es2018/plugins/finder/finder.js +1 -1
- package/es2018/plugins/finder/finder.min.css +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.css +1 -1
- package/es2018/plugins/google-maps/google-maps.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.css +1 -1
- package/es2018/plugins/keyboard/keyboard.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.css +1 -1
- package/es2018/plugins/paste-code/paste-code.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.css +1 -1
- package/es2018/plugins/todo-list/todo-list.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.css +1 -1
- package/es2018/plugins/translate/translate.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.css +1 -1
- package/es2018/plugins/tune-block/tune-block.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +87 -31
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +1361 -546
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- 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 +6 -7
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.css +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/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/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 +87 -31
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +1361 -546
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- 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 +6 -7
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.css +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/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/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 +131 -35
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1410 -482
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- 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 +6 -7
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.css +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/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/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/esm/plugins/finder/browser.d.ts +1 -1
- package/package.json +1 -1
- package/types/plugins/finder/browser.d.ts +1 -1
package/es2021/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.1.
|
|
4
|
+
* Version: v4.1.21
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -966,6 +966,28 @@ class Config {
|
|
|
966
966
|
: null);
|
|
967
967
|
/**
|
|
968
968
|
* Shadow root if Jodit was created in it
|
|
969
|
+
*
|
|
970
|
+
* ```html
|
|
971
|
+
* <div id="editor"></div>
|
|
972
|
+
* ```
|
|
973
|
+
*
|
|
974
|
+
* ```js
|
|
975
|
+
* const app = document.getElementById('editor');
|
|
976
|
+
* app.attachShadow({ mode: 'open' });
|
|
977
|
+
* const root = app.shadowRoot;
|
|
978
|
+
*
|
|
979
|
+
* root.innerHTML = `
|
|
980
|
+
* <link rel="stylesheet" href="./build/jodit.css"/>
|
|
981
|
+
* <h1>Jodit example in Shadow DOM</h1>
|
|
982
|
+
* <div id="edit"></div>
|
|
983
|
+
* `;
|
|
984
|
+
*
|
|
985
|
+
* const editor = Jodit.make(root.getElementById('edit'), {
|
|
986
|
+
* globalFullSize: false,
|
|
987
|
+
* shadowRoot: root
|
|
988
|
+
* });
|
|
989
|
+
* editor.value = '<p>start</p>';
|
|
990
|
+
* ```
|
|
969
991
|
*/
|
|
970
992
|
this.shadowRoot = null;
|
|
971
993
|
/**
|
|
@@ -1716,6 +1738,7 @@ Config.prototype.controls = {};
|
|
|
1716
1738
|
/* harmony export */ });
|
|
1717
1739
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
|
|
1718
1740
|
/* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98761);
|
|
1741
|
+
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54306);
|
|
1719
1742
|
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41959);
|
|
1720
1743
|
/* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(72558);
|
|
1721
1744
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(47903);
|
|
@@ -1724,7 +1747,7 @@ Config.prototype.controls = {};
|
|
|
1724
1747
|
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74197);
|
|
1725
1748
|
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
|
|
1726
1749
|
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
|
|
1727
|
-
/* harmony import */ var
|
|
1750
|
+
/* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(30126);
|
|
1728
1751
|
/*!
|
|
1729
1752
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1730
1753
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -1740,6 +1763,7 @@ Config.prototype.controls = {};
|
|
|
1740
1763
|
|
|
1741
1764
|
|
|
1742
1765
|
|
|
1766
|
+
|
|
1743
1767
|
class Async {
|
|
1744
1768
|
constructor() {
|
|
1745
1769
|
this.timers = new Map();
|
|
@@ -1859,6 +1883,11 @@ class Async {
|
|
|
1859
1883
|
? (...args) => {
|
|
1860
1884
|
const promise = this.promise(res => {
|
|
1861
1885
|
promises.push(res);
|
|
1886
|
+
}).catch((e) => {
|
|
1887
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__/* .isAbortError */ .z)(e)) {
|
|
1888
|
+
return null;
|
|
1889
|
+
}
|
|
1890
|
+
throw e;
|
|
1862
1891
|
});
|
|
1863
1892
|
onFire(...args);
|
|
1864
1893
|
return promise;
|
|
@@ -1930,7 +1959,7 @@ class Async {
|
|
|
1930
1959
|
promise(executor) {
|
|
1931
1960
|
let rejectCallback = () => { };
|
|
1932
1961
|
const promise = new Promise((resolve, reject) => {
|
|
1933
|
-
rejectCallback = () => reject((0,
|
|
1962
|
+
rejectCallback = () => reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .abort */ .h)('Abort async'));
|
|
1934
1963
|
this.promisesRejections.add(rejectCallback);
|
|
1935
1964
|
executor(resolve, reject);
|
|
1936
1965
|
});
|
|
@@ -2415,7 +2444,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2415
2444
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2416
2445
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2417
2446
|
*/
|
|
2418
|
-
const APP_VERSION = "4.1.
|
|
2447
|
+
const APP_VERSION = "4.1.21";
|
|
2419
2448
|
// prettier-ignore
|
|
2420
2449
|
const ES = "es2021";
|
|
2421
2450
|
const IS_ES_MODERN = true;
|
|
@@ -7424,8 +7453,8 @@ function position(elm, jodit, recurse = false) {
|
|
|
7424
7453
|
return {
|
|
7425
7454
|
left: Math.round(xPos),
|
|
7426
7455
|
top: Math.round(yPos),
|
|
7427
|
-
width: Math.round(elm.offsetWidth),
|
|
7428
|
-
height: Math.round(elm.offsetHeight)
|
|
7456
|
+
width: Math.round(elm.offsetWidth ?? rect.width),
|
|
7457
|
+
height: Math.round(elm.offsetHeight ?? rect.height)
|
|
7429
7458
|
};
|
|
7430
7459
|
}
|
|
7431
7460
|
|
|
@@ -9458,9 +9487,9 @@ const getXPathByElement = (element, root) => {
|
|
|
9458
9487
|
* Find all `ref` or `data-ref` elements inside HTMLElement
|
|
9459
9488
|
*/
|
|
9460
9489
|
const refs = (root) => {
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9490
|
+
if ('container' in root) {
|
|
9491
|
+
root = root.container;
|
|
9492
|
+
}
|
|
9464
9493
|
return $$('[ref],[data-ref]', root).reduce((def, child) => {
|
|
9465
9494
|
const key = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.attr)(child, '-ref');
|
|
9466
9495
|
if (key && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(key)) {
|
|
@@ -13983,7 +14012,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13983
14012
|
view.o.showTooltip &&
|
|
13984
14013
|
!view.o.useNativeTooltip) {
|
|
13985
14014
|
view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
|
|
13986
|
-
// TODO Move it inside __open method. Now it is here
|
|
14015
|
+
// TODO Move it inside __open method. Now it is here because testcase failed with capturing
|
|
13987
14016
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
13988
14017
|
view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
13989
14018
|
capture: true
|
|
@@ -13999,6 +14028,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
13999
14028
|
const view = this.j;
|
|
14000
14029
|
view.e
|
|
14001
14030
|
.on(view.ow, 'scroll.tooltip', this.__hide)
|
|
14031
|
+
.on(view.ow, 'joditCloseDialog', this.__hide)
|
|
14002
14032
|
.on(view.container, 'mouseleave.tooltip', this.__hide)
|
|
14003
14033
|
.on([
|
|
14004
14034
|
'escape.tooltip',
|
|
@@ -16008,7 +16038,7 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_7__/* .UI
|
|
|
16008
16038
|
}
|
|
16009
16039
|
let pe = this.parentElement;
|
|
16010
16040
|
while (pe) {
|
|
16011
|
-
if (checkView(j)) {
|
|
16041
|
+
if (checkView(pe.j)) {
|
|
16012
16042
|
return;
|
|
16013
16043
|
}
|
|
16014
16044
|
if (pe.container.style.zIndex) {
|
|
@@ -18588,6 +18618,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18588
18618
|
* Fired when dialog box is started moving
|
|
18589
18619
|
*/
|
|
18590
18620
|
this.e.fire(this, 'startMove');
|
|
18621
|
+
this.e.fire('closeAllPopups');
|
|
18591
18622
|
}
|
|
18592
18623
|
}
|
|
18593
18624
|
onMouseMove(e) {
|
|
@@ -19915,6 +19946,9 @@ let DataProvider = class DataProvider {
|
|
|
19915
19946
|
this.o.permissions.data.source = source;
|
|
19916
19947
|
if (this.o.permissions.url) {
|
|
19917
19948
|
return this.get('permissions').then(resp => {
|
|
19949
|
+
if (this.parent.isInDestruct) {
|
|
19950
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.abort)();
|
|
19951
|
+
}
|
|
19918
19952
|
let process = this.o.permissions.process;
|
|
19919
19953
|
if (!process) {
|
|
19920
19954
|
process = this.o.ajax.process;
|
|
@@ -20528,10 +20562,17 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
20528
20562
|
this.__updateToolbarButtons();
|
|
20529
20563
|
this._dialog.open(this.browser, header);
|
|
20530
20564
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
20531
|
-
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this)
|
|
20565
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this)
|
|
20566
|
+
.then(resolve, reject)
|
|
20567
|
+
.finally(() => {
|
|
20568
|
+
if (this.isInDestruct) {
|
|
20569
|
+
return;
|
|
20570
|
+
}
|
|
20571
|
+
this?.e?.fire('fileBrowserReady.filebrowser');
|
|
20572
|
+
});
|
|
20532
20573
|
})
|
|
20533
20574
|
.catch((e) => {
|
|
20534
|
-
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
20575
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
20535
20576
|
throw e;
|
|
20536
20577
|
}
|
|
20537
20578
|
});
|
|
@@ -22397,11 +22438,12 @@ const act = (el, className = 'jodti-image-editor_active') => el ? className : ''
|
|
|
22397
22438
|
const form = (editor, o) => {
|
|
22398
22439
|
const i = editor.i18n.bind(editor);
|
|
22399
22440
|
const switcher = (label, ref, active = true) => `<div class="jodit-form__group">
|
|
22400
|
-
<label
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22441
|
+
<label class="jodit-switcher-wrapper">
|
|
22442
|
+
<span class='jodit-switcher'>
|
|
22443
|
+
<input ${act(active, 'checked')} data-ref="${ref}" type="checkbox"/>
|
|
22444
|
+
<span class="jodit-switcher__slider"></span>
|
|
22445
|
+
</span>
|
|
22446
|
+
<span>${i(label)}</span>
|
|
22405
22447
|
</label>
|
|
22406
22448
|
</div>`;
|
|
22407
22449
|
return editor.create.fromHTML(`<form class="${jie} jodit-properties">
|
|
@@ -25465,11 +25507,13 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25465
25507
|
return;
|
|
25466
25508
|
}
|
|
25467
25509
|
buttonList.forEach(b => {
|
|
25510
|
+
b.state.variant = 'initial';
|
|
25468
25511
|
b.state.activated = false;
|
|
25469
25512
|
});
|
|
25470
25513
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('.jodit-tab', tabBox).forEach(a => {
|
|
25471
25514
|
a.classList.remove('jodit-tab_active');
|
|
25472
25515
|
});
|
|
25516
|
+
nameToTab[tab].button.state.variant = 'outline';
|
|
25473
25517
|
nameToTab[tab].button.state.activated = true;
|
|
25474
25518
|
nameToTab[tab].tab.classList.add('jodit-tab_active');
|
|
25475
25519
|
};
|
|
@@ -25498,7 +25542,7 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25498
25542
|
content.call(jodit);
|
|
25499
25543
|
}
|
|
25500
25544
|
if (state) {
|
|
25501
|
-
state.
|
|
25545
|
+
state.activeTab = name;
|
|
25502
25546
|
}
|
|
25503
25547
|
return false;
|
|
25504
25548
|
});
|
|
@@ -25514,20 +25558,20 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25514
25558
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('a', buttons).forEach(a => {
|
|
25515
25559
|
a.style.width = (100 / tabCount).toFixed(10) + '%';
|
|
25516
25560
|
});
|
|
25517
|
-
const tab = !state || !state.
|
|
25561
|
+
const tab = !state || !state.activeTab || !nameToTab[state.activeTab]
|
|
25518
25562
|
? firstTab
|
|
25519
|
-
: state.
|
|
25563
|
+
: state.activeTab;
|
|
25520
25564
|
setActive(tab);
|
|
25521
25565
|
if (state) {
|
|
25522
|
-
let
|
|
25523
|
-
Object.defineProperty(state, '
|
|
25566
|
+
let activeTab = state.activeTab;
|
|
25567
|
+
Object.defineProperty(state, 'activeTab', {
|
|
25524
25568
|
configurable: true,
|
|
25525
25569
|
enumerable: false,
|
|
25526
25570
|
get() {
|
|
25527
|
-
return
|
|
25571
|
+
return activeTab;
|
|
25528
25572
|
},
|
|
25529
25573
|
set(value) {
|
|
25530
|
-
|
|
25574
|
+
activeTab = value;
|
|
25531
25575
|
setActive(value);
|
|
25532
25576
|
}
|
|
25533
25577
|
});
|
|
@@ -25942,7 +25986,7 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/
|
|
|
25942
25986
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
25943
25987
|
}
|
|
25944
25988
|
/** @override */
|
|
25945
|
-
afterInit(
|
|
25989
|
+
afterInit() { }
|
|
25946
25990
|
onGenerateAiAssistantForm(prompt) {
|
|
25947
25991
|
this.__dialog.open(this.__container, 'AI Assistant');
|
|
25948
25992
|
this.__container.setPrompt(prompt);
|
|
@@ -31804,9 +31848,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31804
31848
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31805
31849
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31806
31850
|
*/
|
|
31807
|
-
/**
|
|
31808
|
-
* @module plugins/image-properties
|
|
31809
|
-
*/
|
|
31810
31851
|
|
|
31811
31852
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
31812
31853
|
dialogWidth: 600,
|
|
@@ -31836,18 +31877,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
31836
31877
|
|
|
31837
31878
|
"use strict";
|
|
31838
31879
|
/* unused harmony export imageProperties */
|
|
31839
|
-
/* harmony import */ var
|
|
31880
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(31635);
|
|
31840
31881
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
|
|
31841
|
-
/* harmony import */ var
|
|
31842
|
-
/* harmony import */ var
|
|
31843
|
-
/* harmony import */ var
|
|
31844
|
-
/* harmony import */ var
|
|
31845
|
-
/* harmony import */ var
|
|
31846
|
-
/* harmony import */ var
|
|
31847
|
-
/* harmony import */ var
|
|
31848
|
-
/* harmony import */ var
|
|
31849
|
-
/* harmony import */ var
|
|
31850
|
-
/* harmony import */ var
|
|
31882
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23545);
|
|
31883
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51431);
|
|
31884
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9596);
|
|
31885
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67141);
|
|
31886
|
+
/* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64962);
|
|
31887
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61115);
|
|
31888
|
+
/* harmony import */ var _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91675);
|
|
31889
|
+
/* harmony import */ var _utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77137);
|
|
31890
|
+
/* harmony import */ var _utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91852);
|
|
31891
|
+
/* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61566);
|
|
31892
|
+
/* harmony import */ var _writers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(48570);
|
|
31851
31893
|
/*!
|
|
31852
31894
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
31853
31895
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -31879,55 +31921,93 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
31879
31921
|
* });
|
|
31880
31922
|
* ```
|
|
31881
31923
|
*/
|
|
31882
|
-
const normalSizeToString = (value) => {
|
|
31883
|
-
value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(value);
|
|
31884
|
-
return /^[0-9]+$/.test(value) ? value + 'px' : value;
|
|
31885
|
-
};
|
|
31886
|
-
const normalSizeFromString = (value) => {
|
|
31887
|
-
return /^[-+]?[0-9.]+px$/.test(value.toString())
|
|
31888
|
-
? parseFloat(value.toString())
|
|
31889
|
-
: value;
|
|
31890
|
-
};
|
|
31891
31924
|
/**
|
|
31892
31925
|
* Show dialog with image's options
|
|
31893
31926
|
*/
|
|
31894
|
-
class imageProperties extends
|
|
31927
|
+
class imageProperties extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
31895
31928
|
constructor() {
|
|
31896
31929
|
super(...arguments);
|
|
31897
31930
|
this.state = {
|
|
31898
31931
|
image: new Image(),
|
|
31932
|
+
sourceImage: new Image(),
|
|
31899
31933
|
get ratio() {
|
|
31900
|
-
|
|
31934
|
+
const { naturalWidth, naturalHeight } = this.image;
|
|
31935
|
+
return naturalWidth / naturalHeight || 1;
|
|
31901
31936
|
},
|
|
31902
31937
|
sizeIsLocked: true,
|
|
31903
|
-
marginIsLocked: true
|
|
31938
|
+
marginIsLocked: true,
|
|
31939
|
+
values: {
|
|
31940
|
+
style: '',
|
|
31941
|
+
imageSrc: '',
|
|
31942
|
+
borderRadius: 0,
|
|
31943
|
+
imageTitle: '',
|
|
31944
|
+
imageAlt: '',
|
|
31945
|
+
imageLink: '',
|
|
31946
|
+
imageLinkOpenInNewTab: false,
|
|
31947
|
+
imageWidth: 0,
|
|
31948
|
+
imageHeight: 0,
|
|
31949
|
+
marginTop: 0,
|
|
31950
|
+
marginRight: 0,
|
|
31951
|
+
marginBottom: 0,
|
|
31952
|
+
marginLeft: 0,
|
|
31953
|
+
classes: '',
|
|
31954
|
+
id: '',
|
|
31955
|
+
align: ''
|
|
31956
|
+
}
|
|
31904
31957
|
};
|
|
31905
31958
|
this.activeTabState = {
|
|
31906
|
-
|
|
31959
|
+
activeTab: 'Image'
|
|
31907
31960
|
};
|
|
31908
31961
|
}
|
|
31909
|
-
|
|
31910
|
-
|
|
31911
|
-
|
|
31912
|
-
|
|
31913
|
-
const { marginRight, marginBottom, marginLeft, lockMargin } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
31914
|
-
[marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
31915
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'disabled', this.state.marginIsLocked || null);
|
|
31962
|
+
get form() {
|
|
31963
|
+
return new _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__/* .UIImagePropertiesForm */ .l(this.j, this.state, this.activeTabState, {
|
|
31964
|
+
openImageEditor: () => (0,_utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__/* .openImageEditorDialog */ .v)(this.j, this.state),
|
|
31965
|
+
openImagePopup: target => (0,_utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__/* .openImagePopup */ .q)(this.j, this.dialog, this.state, target)
|
|
31916
31966
|
});
|
|
31917
|
-
lockMargin.innerHTML = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Icon.get(this.state.marginIsLocked ? 'lock' : 'unlock');
|
|
31918
31967
|
}
|
|
31919
|
-
|
|
31920
|
-
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
const {
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
|
|
31930
|
-
|
|
31968
|
+
/**
|
|
31969
|
+
* Dialog for form
|
|
31970
|
+
*/
|
|
31971
|
+
get dialog() {
|
|
31972
|
+
const { j } = this;
|
|
31973
|
+
const dialog = j.dlg({
|
|
31974
|
+
minWidth: Math.min(400, screen.width),
|
|
31975
|
+
minHeight: 590,
|
|
31976
|
+
buttons: ['fullsize', 'dialog.close']
|
|
31977
|
+
});
|
|
31978
|
+
const buttons = this.__buttons;
|
|
31979
|
+
buttons.check.onAction(() => {
|
|
31980
|
+
(0,_writers__WEBPACK_IMPORTED_MODULE_11__/* .applyValuesToImage */ .j)(j, this.state, this.state.sourceImage);
|
|
31981
|
+
j.synchronizeValues();
|
|
31982
|
+
dialog.close();
|
|
31983
|
+
});
|
|
31984
|
+
buttons.remove.onAction(() => {
|
|
31985
|
+
j.s.removeNode(this.state.sourceImage);
|
|
31986
|
+
dialog.close();
|
|
31987
|
+
});
|
|
31988
|
+
buttons.cancel.onAction(() => {
|
|
31989
|
+
dialog.close();
|
|
31990
|
+
});
|
|
31991
|
+
dialog.setHeader(j.i18n('Image properties'));
|
|
31992
|
+
dialog.setContent(this.form);
|
|
31993
|
+
dialog.setFooter([[buttons.cancel, buttons.remove], buttons.check]);
|
|
31994
|
+
j.e.on(dialog, 'afterClose', () => {
|
|
31995
|
+
if (this.state.image.parentNode &&
|
|
31996
|
+
j.o.image.selectImageAfterClose) {
|
|
31997
|
+
j.s.select(this.state.sourceImage);
|
|
31998
|
+
}
|
|
31999
|
+
});
|
|
32000
|
+
dialog.setSize(j.o.image.dialogWidth);
|
|
32001
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markOwner)(j, dialog.container);
|
|
32002
|
+
return dialog;
|
|
32003
|
+
}
|
|
32004
|
+
get __buttons() {
|
|
32005
|
+
const { j } = this;
|
|
32006
|
+
return {
|
|
32007
|
+
check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'ok', 'Apply', 'primary'),
|
|
32008
|
+
remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'bin', 'Delete'),
|
|
32009
|
+
cancel: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'cancel', 'Cancel')
|
|
32010
|
+
};
|
|
31931
32011
|
}
|
|
31932
32012
|
/**
|
|
31933
32013
|
* Open dialog editing image properties
|
|
@@ -31944,358 +32024,28 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
31944
32024
|
* ```
|
|
31945
32025
|
*/
|
|
31946
32026
|
open() {
|
|
31947
|
-
this.
|
|
31948
|
-
this.
|
|
31949
|
-
this.j.e.fire('hidePopup');
|
|
31950
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.markOwner)(this.j, this.dialog.container);
|
|
31951
|
-
this.state.marginIsLocked = true;
|
|
31952
|
-
this.state.sizeIsLocked = true;
|
|
31953
|
-
this.onChangeMarginIsLocked();
|
|
31954
|
-
this.onChangeSizeIsLocked();
|
|
31955
|
-
this.updateValues();
|
|
32027
|
+
this.activeTabState.activeTab = 'Image';
|
|
32028
|
+
this.__lock();
|
|
31956
32029
|
this.dialog.open().setModal(true).setPosition();
|
|
31957
|
-
|
|
31958
|
-
|
|
31959
|
-
|
|
31960
|
-
|
|
31961
|
-
|
|
31962
|
-
makeForm() {
|
|
31963
|
-
if (this.dialog) {
|
|
31964
|
-
return;
|
|
31965
|
-
}
|
|
31966
|
-
this.dialog = this.j.dlg({
|
|
31967
|
-
minWidth: Math.min(400, screen.width),
|
|
31968
|
-
minHeight: 590,
|
|
31969
|
-
buttons: ['fullsize', 'dialog.close']
|
|
31970
|
-
});
|
|
31971
|
-
const editor = this.j, opt = editor.o, i18n = editor.i18n.bind(editor), buttons = {
|
|
31972
|
-
check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'ok', 'Apply', 'primary'),
|
|
31973
|
-
remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'bin', 'Delete')
|
|
31974
|
-
};
|
|
31975
|
-
editor.e.on(this.dialog, 'afterClose', () => {
|
|
31976
|
-
if (this.state.image.parentNode &&
|
|
31977
|
-
opt.image.selectImageAfterClose) {
|
|
31978
|
-
editor.s.select(this.state.image);
|
|
31979
|
-
}
|
|
31980
|
-
});
|
|
31981
|
-
buttons.remove.onAction(() => {
|
|
31982
|
-
editor.s.removeNode(this.state.image);
|
|
31983
|
-
this.dialog.close();
|
|
31984
|
-
});
|
|
31985
|
-
const { dialog } = this;
|
|
31986
|
-
dialog.setHeader(i18n('Image properties'));
|
|
31987
|
-
const mainForm = (0,_templates_form__WEBPACK_IMPORTED_MODULE_8__/* .form */ .Z)(editor);
|
|
31988
|
-
this.form = mainForm;
|
|
31989
|
-
dialog.setContent(mainForm);
|
|
31990
|
-
const { tabsBox } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
31991
|
-
if (tabsBox) {
|
|
31992
|
-
tabsBox.appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__/* .TabsWidget */ .Zg)(editor, [
|
|
31993
|
-
{ name: 'Image', content: (0,_templates_main_tab__WEBPACK_IMPORTED_MODULE_9__/* .mainTab */ .J)(editor) },
|
|
31994
|
-
{ name: 'Advanced', content: (0,_templates_position_tab__WEBPACK_IMPORTED_MODULE_10__/* .positionTab */ .b)(editor) }
|
|
31995
|
-
], this.activeTabState));
|
|
31996
|
-
}
|
|
31997
|
-
buttons.check.onAction(this.onApply);
|
|
31998
|
-
const { changeImage, editImage } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
31999
|
-
editor.e.on(changeImage, 'click', this.openImagePopup);
|
|
32000
|
-
if (opt.image.useImageEditor) {
|
|
32001
|
-
editor.e.on(editImage, 'click', this.openImageEditor);
|
|
32002
|
-
}
|
|
32003
|
-
const { lockSize, lockMargin, imageWidth, imageHeight } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(mainForm);
|
|
32004
|
-
if (lockSize) {
|
|
32005
|
-
editor.e.on(lockSize, 'click', () => {
|
|
32006
|
-
this.state.sizeIsLocked = !this.state.sizeIsLocked;
|
|
32007
|
-
});
|
|
32008
|
-
}
|
|
32009
|
-
editor.e.on(lockMargin, 'click', (e) => {
|
|
32010
|
-
this.state.marginIsLocked = !this.state.marginIsLocked;
|
|
32011
|
-
e.preventDefault();
|
|
32012
|
-
});
|
|
32013
|
-
const changeSizes = (event) => {
|
|
32014
|
-
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
|
|
32015
|
-
return;
|
|
32016
|
-
}
|
|
32017
|
-
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32018
|
-
if (event.target === imageWidth) {
|
|
32019
|
-
imageHeight.value = Math.round(w / this.state.ratio).toString();
|
|
32020
|
-
}
|
|
32021
|
-
else {
|
|
32022
|
-
imageWidth.value = Math.round(h * this.state.ratio).toString();
|
|
32023
|
-
}
|
|
32024
|
-
};
|
|
32025
|
-
editor.e.on([imageWidth, imageHeight], 'change keydown mousedown paste', (event) => {
|
|
32026
|
-
if (!this.state.sizeIsLocked) {
|
|
32027
|
-
return;
|
|
32028
|
-
}
|
|
32029
|
-
editor.async.setTimeout(changeSizes.bind(this, event), {
|
|
32030
|
-
timeout: editor.defaultTimeout,
|
|
32031
|
-
label: 'image-properties-changeSize'
|
|
32032
|
-
});
|
|
32033
|
-
});
|
|
32034
|
-
dialog.setFooter([buttons.remove, buttons.check]);
|
|
32035
|
-
dialog.setSize(this.j.o.image.dialogWidth);
|
|
32036
|
-
}
|
|
32037
|
-
/**
|
|
32038
|
-
* Set input values from image
|
|
32039
|
-
*/
|
|
32040
|
-
updateValues() {
|
|
32041
|
-
const opt = this.j.o;
|
|
32042
|
-
const { image } = this.state;
|
|
32043
|
-
const { marginTop, marginRight, marginBottom, marginLeft, lockMargin, imageSrc, id, classes, align, style, imageTitle, imageAlt, borderRadius, imageLink, imageWidth, imageHeight, imageLinkOpenInNewTab, imageViewSrc, lockSize } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
32044
|
-
const updateLock = () => {
|
|
32045
|
-
lockMargin.checked = this.state.marginIsLocked;
|
|
32046
|
-
lockSize.checked = this.state.sizeIsLocked;
|
|
32047
|
-
}, updateAlign = () => {
|
|
32048
|
-
if (image.style.cssFloat &&
|
|
32049
|
-
['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
|
|
32050
|
-
align.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float');
|
|
32051
|
-
}
|
|
32052
|
-
else {
|
|
32053
|
-
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'display') === 'block' &&
|
|
32054
|
-
image.style.marginLeft === 'auto' &&
|
|
32055
|
-
image.style.marginRight === 'auto') {
|
|
32056
|
-
align.value = 'center';
|
|
32057
|
-
}
|
|
32058
|
-
}
|
|
32059
|
-
}, updateBorderRadius = () => {
|
|
32060
|
-
borderRadius.value = (parseInt(image.style.borderRadius || '0', 10) || '0').toString();
|
|
32061
|
-
}, updateId = () => {
|
|
32062
|
-
id.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id') || '';
|
|
32063
|
-
}, updateStyle = () => {
|
|
32064
|
-
style.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style') || '';
|
|
32065
|
-
}, updateClasses = () => {
|
|
32066
|
-
classes.value = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
32067
|
-
}, updateMargins = () => {
|
|
32068
|
-
if (!opt.image.editMargins) {
|
|
32069
|
-
return;
|
|
32070
|
-
}
|
|
32071
|
-
let equal = true, wasEmptyField = false;
|
|
32072
|
-
[marginTop, marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
32073
|
-
const id = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'data-ref') || '';
|
|
32074
|
-
let value = image.style.getPropertyValue((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.kebabCase)(id));
|
|
32075
|
-
if (!value) {
|
|
32076
|
-
wasEmptyField = true;
|
|
32077
|
-
elm.value = '';
|
|
32078
|
-
return;
|
|
32079
|
-
}
|
|
32080
|
-
if (/^[0-9]+(px)?$/.test(value)) {
|
|
32081
|
-
value = parseInt(value, 10);
|
|
32082
|
-
}
|
|
32083
|
-
elm.value = value.toString() || '';
|
|
32084
|
-
if ((wasEmptyField && elm.value) ||
|
|
32085
|
-
(equal &&
|
|
32086
|
-
id !== 'marginTop' &&
|
|
32087
|
-
elm.value !== marginTop.value)) {
|
|
32088
|
-
equal = false;
|
|
32089
|
-
}
|
|
32090
|
-
});
|
|
32091
|
-
this.state.marginIsLocked = equal;
|
|
32092
|
-
}, updateSizes = () => {
|
|
32093
|
-
const width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ||
|
|
32094
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) ||
|
|
32095
|
-
false, height = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ||
|
|
32096
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) ||
|
|
32097
|
-
false;
|
|
32098
|
-
imageWidth.value =
|
|
32099
|
-
width !== false
|
|
32100
|
-
? normalSizeFromString(width).toString()
|
|
32101
|
-
: image.offsetWidth.toString();
|
|
32102
|
-
imageHeight.value =
|
|
32103
|
-
height !== false
|
|
32104
|
-
? normalSizeFromString(height).toString()
|
|
32105
|
-
: image.offsetHeight.toString();
|
|
32106
|
-
this.state.sizeIsLocked = (() => {
|
|
32107
|
-
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) ||
|
|
32108
|
-
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
|
|
32109
|
-
return false;
|
|
32110
|
-
}
|
|
32111
|
-
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32112
|
-
return Math.abs(w - h * this.state.ratio) < 1;
|
|
32113
|
-
})();
|
|
32114
|
-
}, updateText = () => {
|
|
32115
|
-
imageTitle.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title') || '';
|
|
32116
|
-
imageAlt.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt') || '';
|
|
32117
|
-
const a = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', this.j.editor);
|
|
32118
|
-
if (a) {
|
|
32119
|
-
imageLink.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'href') || '';
|
|
32120
|
-
imageLinkOpenInNewTab.checked =
|
|
32121
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'target') === '_blank';
|
|
32122
|
-
}
|
|
32123
|
-
else {
|
|
32124
|
-
imageLink.value = '';
|
|
32125
|
-
imageLinkOpenInNewTab.checked = false;
|
|
32126
|
-
}
|
|
32127
|
-
}, updateSrc = () => {
|
|
32128
|
-
imageSrc.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '';
|
|
32129
|
-
if (imageViewSrc) {
|
|
32130
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(imageViewSrc, 'src', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '');
|
|
32131
|
-
}
|
|
32132
|
-
};
|
|
32133
|
-
updateLock();
|
|
32134
|
-
updateSrc();
|
|
32135
|
-
updateText();
|
|
32136
|
-
updateSizes();
|
|
32137
|
-
updateMargins();
|
|
32138
|
-
updateClasses();
|
|
32139
|
-
updateId();
|
|
32140
|
-
updateBorderRadius();
|
|
32141
|
-
updateAlign();
|
|
32142
|
-
updateStyle();
|
|
32143
|
-
}
|
|
32144
|
-
/**
|
|
32145
|
-
* Apply form's values to image
|
|
32146
|
-
*/
|
|
32147
|
-
onApply() {
|
|
32148
|
-
const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
32149
|
-
const opt = this.j.o;
|
|
32150
|
-
const { image } = this.state;
|
|
32151
|
-
// styles
|
|
32152
|
-
if (opt.image.editStyle) {
|
|
32153
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style', style.value || null);
|
|
32154
|
-
}
|
|
32155
|
-
// Src
|
|
32156
|
-
if (imageSrc.value) {
|
|
32157
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src', imageSrc.value);
|
|
32158
|
-
}
|
|
32159
|
-
else {
|
|
32160
|
-
jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(image);
|
|
32161
|
-
this.dialog.close();
|
|
32162
|
-
return;
|
|
32163
|
-
}
|
|
32164
|
-
// Border radius
|
|
32165
|
-
if (borderRadius.value !== '0' && /^[0-9]+$/.test(borderRadius.value)) {
|
|
32166
|
-
image.style.borderRadius = borderRadius.value + 'px';
|
|
32167
|
-
}
|
|
32168
|
-
else {
|
|
32169
|
-
image.style.borderRadius = '';
|
|
32170
|
-
}
|
|
32171
|
-
// Title
|
|
32172
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title', imageTitle.value || null);
|
|
32173
|
-
// Alt
|
|
32174
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt', imageAlt.value || null);
|
|
32175
|
-
// Link
|
|
32176
|
-
let link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', this.j.editor);
|
|
32177
|
-
if (imageLink.value) {
|
|
32178
|
-
if (!link) {
|
|
32179
|
-
link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.wrap(image, 'a', this.j.createInside);
|
|
32180
|
-
}
|
|
32181
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', imageLink.value);
|
|
32182
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'target', imageLinkOpenInNewTab.checked ? '_blank' : null);
|
|
32183
|
-
}
|
|
32184
|
-
else {
|
|
32185
|
-
if (link && link.parentNode) {
|
|
32186
|
-
link.parentNode.replaceChild(image, link);
|
|
32187
|
-
}
|
|
32188
|
-
}
|
|
32189
|
-
// Size
|
|
32190
|
-
if (imageWidth.value !== image.offsetWidth.toString() ||
|
|
32191
|
-
imageHeight.value !== image.offsetHeight.toString()) {
|
|
32192
|
-
const updatedtWidth = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageWidth.value)
|
|
32193
|
-
? normalSizeToString(imageWidth.value)
|
|
32194
|
-
: null;
|
|
32195
|
-
const updatedHeight = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageHeight.value)
|
|
32196
|
-
? normalSizeToString(imageHeight.value)
|
|
32197
|
-
: null;
|
|
32198
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
|
|
32199
|
-
width: updatedtWidth,
|
|
32200
|
-
height: updatedHeight
|
|
32201
|
-
});
|
|
32202
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ? updatedtWidth : null);
|
|
32203
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ? updatedHeight : null);
|
|
32204
|
-
}
|
|
32205
|
-
const margins = [marginTop, marginRight, marginBottom, marginLeft];
|
|
32206
|
-
if (opt.image.editMargins) {
|
|
32207
|
-
if (!this.state.marginIsLocked) {
|
|
32208
|
-
margins.forEach((margin) => {
|
|
32209
|
-
const side = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(margin, 'data-ref') || '';
|
|
32210
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, side, normalSizeToString(margin.value));
|
|
32211
|
-
});
|
|
32212
|
-
}
|
|
32213
|
-
else {
|
|
32214
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'margin', normalSizeToString(marginTop.value));
|
|
32215
|
-
}
|
|
32216
|
-
}
|
|
32217
|
-
if (opt.image.editClass) {
|
|
32218
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class', classes.value || null);
|
|
32219
|
-
}
|
|
32220
|
-
if (opt.image.editId) {
|
|
32221
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id', id.value || null);
|
|
32222
|
-
}
|
|
32223
|
-
if (opt.image.editAlign) {
|
|
32224
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(image, align.value);
|
|
32225
|
-
}
|
|
32226
|
-
this.j.synchronizeValues();
|
|
32227
|
-
this.dialog.close();
|
|
32228
|
-
}
|
|
32229
|
-
/**
|
|
32230
|
-
* Open image editor dialog
|
|
32231
|
-
*/
|
|
32232
|
-
openImageEditor() {
|
|
32233
|
-
const url = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src') || '', a = this.j.c.element('a'), loadExternal = () => {
|
|
32234
|
-
if (a.host !== location.host) {
|
|
32235
|
-
this.j.confirm('You can only edit your own images. Download this image on the host?', yes => {
|
|
32236
|
-
if (yes && this.j.uploader) {
|
|
32237
|
-
this.j.uploader.uploadRemoteImage(a.href.toString(), resp => {
|
|
32238
|
-
this.j.alert('The image has been successfully uploaded to the host!', () => {
|
|
32239
|
-
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(resp.newfilename)) {
|
|
32240
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', resp.baseurl +
|
|
32241
|
-
resp.newfilename);
|
|
32242
|
-
this.updateValues();
|
|
32243
|
-
}
|
|
32244
|
-
});
|
|
32245
|
-
}, error => {
|
|
32246
|
-
this.j.alert('There was an error loading %s', error.message);
|
|
32247
|
-
});
|
|
32248
|
-
}
|
|
32249
|
-
});
|
|
32250
|
-
return;
|
|
32030
|
+
this.async
|
|
32031
|
+
.promise((resolve, reject) => (0,_readers__WEBPACK_IMPORTED_MODULE_10__/* .readValuesFromImage */ .U)(this.j, this.state).then(resolve, reject))
|
|
32032
|
+
.catch((e) => {
|
|
32033
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
|
|
32034
|
+
this.dialog.message.error(e.message);
|
|
32251
32035
|
}
|
|
32252
|
-
};
|
|
32253
|
-
a.href = url;
|
|
32254
|
-
this.j.filebrowser.dataProvider
|
|
32255
|
-
.getPathByUrl(a.href.toString())
|
|
32256
|
-
.then(resp => {
|
|
32257
|
-
jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_5__/* .openImageEditor */ .B.call(this.j.filebrowser, a.href, resp.name, resp.path, resp.source, () => {
|
|
32258
|
-
const timestamp = new Date().getTime();
|
|
32259
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', url +
|
|
32260
|
-
(url.indexOf('?') !== -1 ? '' : '?') +
|
|
32261
|
-
'&_tmp=' +
|
|
32262
|
-
timestamp.toString());
|
|
32263
|
-
this.updateValues();
|
|
32264
|
-
}, error => {
|
|
32265
|
-
this.j.alert(error.message);
|
|
32266
|
-
});
|
|
32267
32036
|
})
|
|
32268
|
-
.
|
|
32269
|
-
|
|
32270
|
-
});
|
|
32037
|
+
.finally(() => this.__unlock());
|
|
32038
|
+
return false;
|
|
32271
32039
|
}
|
|
32272
|
-
|
|
32273
|
-
|
|
32274
|
-
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32279
|
-
|
|
32280
|
-
|
|
32281
|
-
if (data.files && data.files.length) {
|
|
32282
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', data.baseurl + data.files[0]);
|
|
32283
|
-
}
|
|
32284
|
-
this.updateValues();
|
|
32285
|
-
popup.close();
|
|
32286
|
-
},
|
|
32287
|
-
filebrowser: (data) => {
|
|
32288
|
-
if (data &&
|
|
32289
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isArray)(data.files) &&
|
|
32290
|
-
data.files.length) {
|
|
32291
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', data.files[0]);
|
|
32292
|
-
popup.close();
|
|
32293
|
-
this.updateValues();
|
|
32294
|
-
}
|
|
32295
|
-
}
|
|
32296
|
-
}, this.state.image, popup.close))
|
|
32297
|
-
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.position)(changeImage));
|
|
32298
|
-
event.stopPropagation();
|
|
32040
|
+
__lock() {
|
|
32041
|
+
this.dialog.lock();
|
|
32042
|
+
this.form.setMod('lock', true);
|
|
32043
|
+
Object.values(this.__buttons).forEach(b => (b.state.disabled = true));
|
|
32044
|
+
}
|
|
32045
|
+
__unlock() {
|
|
32046
|
+
this.dialog.unlock();
|
|
32047
|
+
this.form.setMod('lock', false);
|
|
32048
|
+
Object.values(this.__buttons).forEach(b => (b.state.disabled = false));
|
|
32299
32049
|
}
|
|
32300
32050
|
/** @override **/
|
|
32301
32051
|
afterInit(editor) {
|
|
@@ -32306,7 +32056,7 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32306
32056
|
.off(editor.editor, '.imageproperties')
|
|
32307
32057
|
.on(editor.editor, 'dblclick.imageproperties', (e) => {
|
|
32308
32058
|
const image = e.target;
|
|
32309
|
-
if (!
|
|
32059
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(image, 'img')) {
|
|
32310
32060
|
return;
|
|
32311
32061
|
}
|
|
32312
32062
|
if (editor.o.image.openOnDblClick) {
|
|
@@ -32314,7 +32064,8 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32314
32064
|
false) {
|
|
32315
32065
|
return;
|
|
32316
32066
|
}
|
|
32317
|
-
self.state.
|
|
32067
|
+
self.state.sourceImage = image;
|
|
32068
|
+
self.state.image = image.cloneNode(true);
|
|
32318
32069
|
if (!editor.o.readonly) {
|
|
32319
32070
|
e.stopImmediatePropagation();
|
|
32320
32071
|
e.preventDefault();
|
|
@@ -32328,206 +32079,1252 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32328
32079
|
});
|
|
32329
32080
|
})
|
|
32330
32081
|
.on('openImageProperties.imageproperties', (image) => {
|
|
32331
|
-
|
|
32082
|
+
self.state.sourceImage = image;
|
|
32083
|
+
this.state.image = image.cloneNode(true);
|
|
32332
32084
|
this.open();
|
|
32333
32085
|
});
|
|
32334
32086
|
}
|
|
32087
|
+
async onStateValuesImageSrcChange() {
|
|
32088
|
+
const { image, values } = this.state;
|
|
32089
|
+
if (!image.src) {
|
|
32090
|
+
return;
|
|
32091
|
+
}
|
|
32092
|
+
try {
|
|
32093
|
+
this.__lock();
|
|
32094
|
+
await image.decode();
|
|
32095
|
+
if (this.state.sizeIsLocked && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isNumeric)(values.imageWidth)) {
|
|
32096
|
+
const w = parseFloat(values.imageWidth.toString());
|
|
32097
|
+
values.imageHeight = Math.round(w / this.state.ratio);
|
|
32098
|
+
}
|
|
32099
|
+
this.j.e.fire('updateImageProperties.imageproperties', image);
|
|
32100
|
+
}
|
|
32101
|
+
catch (e) {
|
|
32102
|
+
this.j.alert(e.message);
|
|
32103
|
+
}
|
|
32104
|
+
finally {
|
|
32105
|
+
this.__unlock();
|
|
32106
|
+
}
|
|
32107
|
+
}
|
|
32335
32108
|
/** @override */
|
|
32336
32109
|
beforeDestruct(editor) {
|
|
32337
|
-
this.
|
|
32110
|
+
Object.values((0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons') ?? {}).forEach(b => b.destruct());
|
|
32111
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')?.destruct();
|
|
32112
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')?.destruct();
|
|
32338
32113
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
32339
32114
|
}
|
|
32340
32115
|
}
|
|
32341
|
-
(0,
|
|
32342
|
-
|
|
32343
|
-
], imageProperties.prototype, "
|
|
32344
|
-
(0,
|
|
32345
|
-
|
|
32346
|
-
], imageProperties.prototype, "
|
|
32347
|
-
(0,
|
|
32348
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.
|
|
32349
|
-
], imageProperties.prototype, "
|
|
32350
|
-
(0,
|
|
32351
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.
|
|
32352
|
-
], imageProperties.prototype, "
|
|
32353
|
-
|
|
32354
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
32355
|
-
], imageProperties.prototype, "openImagePopup", null);
|
|
32356
|
-
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
|
|
32116
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32117
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32118
|
+
], imageProperties.prototype, "form", null);
|
|
32119
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32120
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32121
|
+
], imageProperties.prototype, "dialog", null);
|
|
32122
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32123
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32124
|
+
], imageProperties.prototype, "__buttons", null);
|
|
32125
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32126
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.image')
|
|
32127
|
+
], imageProperties.prototype, "onStateValuesImageSrcChange", null);
|
|
32128
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
|
|
32357
32129
|
|
|
32358
32130
|
|
|
32359
32131
|
/***/ }),
|
|
32360
32132
|
|
|
32361
|
-
/***/
|
|
32133
|
+
/***/ 81091:
|
|
32362
32134
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32363
32135
|
|
|
32364
32136
|
"use strict";
|
|
32365
32137
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32366
|
-
/* harmony export */
|
|
32138
|
+
/* harmony export */ g: function() { return /* binding */ readAlign; }
|
|
32367
32139
|
/* harmony export */ });
|
|
32368
|
-
/* harmony import */ var
|
|
32140
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4401);
|
|
32141
|
+
/*!
|
|
32142
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32143
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32144
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32145
|
+
*/
|
|
32146
|
+
|
|
32147
|
+
/** @private */
|
|
32148
|
+
function readAlign(image, values) {
|
|
32149
|
+
// Align
|
|
32150
|
+
if (image.style.cssFloat &&
|
|
32151
|
+
['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
|
|
32152
|
+
values.align = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'float');
|
|
32153
|
+
}
|
|
32154
|
+
else {
|
|
32155
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'display') === 'block' &&
|
|
32156
|
+
image.style.marginLeft === 'auto' &&
|
|
32157
|
+
image.style.marginRight === 'auto') {
|
|
32158
|
+
values.align = 'center';
|
|
32159
|
+
}
|
|
32160
|
+
else {
|
|
32161
|
+
values.align = '';
|
|
32162
|
+
}
|
|
32163
|
+
}
|
|
32164
|
+
}
|
|
32165
|
+
|
|
32166
|
+
|
|
32167
|
+
/***/ }),
|
|
32168
|
+
|
|
32169
|
+
/***/ 61566:
|
|
32170
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32171
|
+
|
|
32172
|
+
"use strict";
|
|
32173
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32174
|
+
/* harmony export */ U: function() { return /* binding */ readValuesFromImage; }
|
|
32175
|
+
/* harmony export */ });
|
|
32176
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
32177
|
+
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81091);
|
|
32178
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33756);
|
|
32179
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51462);
|
|
32180
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60225);
|
|
32181
|
+
/*!
|
|
32182
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32183
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32184
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32185
|
+
*/
|
|
32186
|
+
|
|
32187
|
+
|
|
32188
|
+
|
|
32189
|
+
|
|
32190
|
+
|
|
32191
|
+
/**
|
|
32192
|
+
* Read values from image and set it to state
|
|
32193
|
+
* @private
|
|
32194
|
+
*/
|
|
32195
|
+
async function readValuesFromImage(j, state) {
|
|
32196
|
+
const { sourceImage: image, values } = state;
|
|
32197
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_3__/* .readAlign */ .g)(image, values);
|
|
32198
|
+
// Border radius
|
|
32199
|
+
values.borderRadius = parseInt(image.style.borderRadius || '0', 10) || 0;
|
|
32200
|
+
// Id
|
|
32201
|
+
values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'id') || '';
|
|
32202
|
+
// Title
|
|
32203
|
+
values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'title') || '';
|
|
32204
|
+
// Alt
|
|
32205
|
+
values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'alt') || '';
|
|
32206
|
+
// Style
|
|
32207
|
+
values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'style') || '';
|
|
32208
|
+
// Classes
|
|
32209
|
+
values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
32210
|
+
// Margins
|
|
32211
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_4__/* .readMargins */ .E)(image, values, state);
|
|
32212
|
+
// Link
|
|
32213
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_1__/* .readLink */ .X)(state, j, values);
|
|
32214
|
+
// Src
|
|
32215
|
+
values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'src') || '';
|
|
32216
|
+
// Image size
|
|
32217
|
+
return (0,_size__WEBPACK_IMPORTED_MODULE_2__/* .readSizes */ .P)(image, values, state);
|
|
32218
|
+
}
|
|
32219
|
+
|
|
32220
|
+
|
|
32221
|
+
/***/ }),
|
|
32222
|
+
|
|
32223
|
+
/***/ 33756:
|
|
32224
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32225
|
+
|
|
32226
|
+
"use strict";
|
|
32227
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32228
|
+
/* harmony export */ X: function() { return /* binding */ readLink; }
|
|
32229
|
+
/* harmony export */ });
|
|
32230
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
32231
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
|
|
32369
32232
|
/*!
|
|
32370
32233
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32371
32234
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32372
32235
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32373
32236
|
*/
|
|
32374
32237
|
|
|
32375
|
-
|
|
32376
|
-
|
|
32377
|
-
|
|
32238
|
+
|
|
32239
|
+
/** @private */
|
|
32240
|
+
function readLink(state, j, values) {
|
|
32241
|
+
const a = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(state.sourceImage, 'a', j.editor);
|
|
32242
|
+
if (a) {
|
|
32243
|
+
values.imageLink = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'href') || '';
|
|
32244
|
+
values.imageLinkOpenInNewTab = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'target') === '_blank';
|
|
32245
|
+
}
|
|
32246
|
+
else {
|
|
32247
|
+
values.imageLink = '';
|
|
32248
|
+
values.imageLinkOpenInNewTab = false;
|
|
32249
|
+
}
|
|
32250
|
+
}
|
|
32251
|
+
|
|
32252
|
+
|
|
32253
|
+
/***/ }),
|
|
32254
|
+
|
|
32255
|
+
/***/ 51462:
|
|
32256
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32257
|
+
|
|
32258
|
+
"use strict";
|
|
32259
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32260
|
+
/* harmony export */ E: function() { return /* binding */ readMargins; }
|
|
32261
|
+
/* harmony export */ });
|
|
32262
|
+
/* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18014);
|
|
32263
|
+
/*!
|
|
32264
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32265
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32266
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32267
|
+
*/
|
|
32268
|
+
|
|
32269
|
+
/** @private */
|
|
32270
|
+
function readMargins(image, values, state) {
|
|
32271
|
+
// Margins
|
|
32272
|
+
let equal = true, wasEmptyField = false;
|
|
32273
|
+
['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(id => {
|
|
32274
|
+
let value = image.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__/* .kebabCase */ .k)(id));
|
|
32275
|
+
if (!value) {
|
|
32276
|
+
wasEmptyField = true;
|
|
32277
|
+
values[id] = 0;
|
|
32278
|
+
return;
|
|
32279
|
+
}
|
|
32280
|
+
if (/^[0-9]+(px)?$/.test(value)) {
|
|
32281
|
+
value = parseInt(value, 10);
|
|
32282
|
+
}
|
|
32283
|
+
values[id] = value;
|
|
32284
|
+
if ((wasEmptyField && values[id]) ||
|
|
32285
|
+
(equal && id !== 'marginTop' && values[id] !== values.marginTop)) {
|
|
32286
|
+
equal = false;
|
|
32287
|
+
}
|
|
32288
|
+
});
|
|
32289
|
+
state.marginIsLocked = equal;
|
|
32290
|
+
}
|
|
32291
|
+
|
|
32292
|
+
|
|
32293
|
+
/***/ }),
|
|
32294
|
+
|
|
32295
|
+
/***/ 60225:
|
|
32296
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32297
|
+
|
|
32298
|
+
"use strict";
|
|
32299
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32300
|
+
/* harmony export */ P: function() { return /* binding */ readSizes; }
|
|
32301
|
+
/* harmony export */ });
|
|
32302
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59372);
|
|
32303
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
32304
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4401);
|
|
32305
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
|
|
32306
|
+
/*!
|
|
32307
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32308
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32309
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32310
|
+
*/
|
|
32311
|
+
|
|
32312
|
+
|
|
32313
|
+
|
|
32314
|
+
|
|
32315
|
+
/** @private */
|
|
32316
|
+
async function readSizes(image, values, state) {
|
|
32317
|
+
await image.decode();
|
|
32318
|
+
const width = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, 'width', true) || false;
|
|
32319
|
+
const height = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height') || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, 'height', true) || false;
|
|
32320
|
+
values.imageWidth =
|
|
32321
|
+
width !== false
|
|
32322
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(width)
|
|
32323
|
+
: image.offsetWidth || image.naturalWidth;
|
|
32324
|
+
values.imageHeight =
|
|
32325
|
+
height !== false
|
|
32326
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(height)
|
|
32327
|
+
: image.offsetHeight || image.naturalHeight;
|
|
32328
|
+
const { imageWidth, imageHeight } = values;
|
|
32329
|
+
const w = parseFloat(imageWidth.toString());
|
|
32330
|
+
if (!(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(imageWidth) || !(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__/* .isNumeric */ .k)(imageHeight)) {
|
|
32331
|
+
state.sizeIsLocked = false;
|
|
32332
|
+
return;
|
|
32333
|
+
}
|
|
32334
|
+
if (height === false) {
|
|
32335
|
+
values.imageHeight = Math.round(w / state.ratio);
|
|
32336
|
+
state.sizeIsLocked = true;
|
|
32337
|
+
return;
|
|
32338
|
+
}
|
|
32339
|
+
const h = parseFloat(imageHeight.toString());
|
|
32340
|
+
state.sizeIsLocked = Math.abs(w - h * state.ratio) < 1;
|
|
32341
|
+
}
|
|
32342
|
+
|
|
32343
|
+
|
|
32344
|
+
/***/ }),
|
|
32345
|
+
|
|
32346
|
+
/***/ 91675:
|
|
32347
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32348
|
+
|
|
32349
|
+
"use strict";
|
|
32350
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32351
|
+
/* harmony export */ l: function() { return /* binding */ UIImagePropertiesForm; }
|
|
32352
|
+
/* harmony export */ });
|
|
32353
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
32354
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
|
|
32355
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12222);
|
|
32356
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9596);
|
|
32357
|
+
/* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1530);
|
|
32358
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80004);
|
|
32359
|
+
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21391);
|
|
32360
|
+
/* harmony import */ var _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26282);
|
|
32361
|
+
/* harmony import */ var _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26180);
|
|
32362
|
+
/*!
|
|
32363
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32364
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32365
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32366
|
+
*/
|
|
32367
|
+
|
|
32368
|
+
|
|
32369
|
+
|
|
32370
|
+
|
|
32371
|
+
|
|
32372
|
+
|
|
32373
|
+
|
|
32374
|
+
|
|
32375
|
+
|
|
32376
|
+
|
|
32377
|
+
/** @private */
|
|
32378
|
+
let UIImagePropertiesForm = class UIImagePropertiesForm extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__/* .UIGroup */ .U {
|
|
32379
|
+
className() {
|
|
32380
|
+
return 'UIImagePropertiesForm';
|
|
32381
|
+
}
|
|
32382
|
+
appendChildToContainer() { }
|
|
32383
|
+
getElm(elementName) {
|
|
32384
|
+
const selfElm = super.getElm(elementName);
|
|
32385
|
+
if (selfElm) {
|
|
32386
|
+
return selfElm;
|
|
32387
|
+
}
|
|
32388
|
+
for (const child of this.elements) {
|
|
32389
|
+
const elm = child.getElm(elementName);
|
|
32390
|
+
if (elm) {
|
|
32391
|
+
return elm;
|
|
32392
|
+
}
|
|
32393
|
+
}
|
|
32394
|
+
return null;
|
|
32395
|
+
}
|
|
32396
|
+
constructor(jodit, state, activeTabState, handlers) {
|
|
32397
|
+
super(jodit);
|
|
32398
|
+
this.state = state;
|
|
32399
|
+
this.handlers = handlers;
|
|
32400
|
+
this.__mainTab = new _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__/* .UIImageMainTab */ .k(this.jodit, this.state, this.handlers);
|
|
32401
|
+
this.__positionTab = new _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__/* .UIImagePositionTab */ ._(this.jodit, this.state, this.handlers);
|
|
32402
|
+
this.getElm('tabsBox').appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__/* .TabsWidget */ .Zg)(jodit, [
|
|
32403
|
+
{ name: 'Image', content: this.__mainTab },
|
|
32404
|
+
{ name: 'Advanced', content: this.__positionTab }
|
|
32405
|
+
], activeTabState));
|
|
32406
|
+
this.setMod('lock-size', this.state.sizeIsLocked);
|
|
32407
|
+
this.append(this.__mainTab).append(this.__positionTab);
|
|
32408
|
+
}
|
|
32409
|
+
render() {
|
|
32410
|
+
return `<form>
|
|
32378
32411
|
<div class="jodit-grid jodit-grid_xs-column">
|
|
32379
32412
|
<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
|
|
32380
|
-
<div class="
|
|
32381
|
-
<div
|
|
32382
|
-
<img
|
|
32413
|
+
<div class="&__view-box">
|
|
32414
|
+
<div class="&__imageView">
|
|
32415
|
+
<img class="&__imageViewSrc" src="" alt=""/>
|
|
32383
32416
|
</div>
|
|
32384
|
-
<div
|
|
32385
|
-
<input
|
|
32386
|
-
<a
|
|
32387
|
-
<input
|
|
32417
|
+
<div class="jodit-form__group &__imageSizes">
|
|
32418
|
+
<input type="text" class="jodit-input &__imageWidth"/>
|
|
32419
|
+
<a class="&__lockSize">${jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get('lock')}</a>
|
|
32420
|
+
<input type="text" class="&__imageHeight jodit-input"/>
|
|
32388
32421
|
</div>
|
|
32389
32422
|
</div>
|
|
32390
32423
|
</div>
|
|
32391
|
-
<div
|
|
32424
|
+
<div class="jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox"></div>
|
|
32392
32425
|
</div>
|
|
32393
|
-
</form
|
|
32394
|
-
}
|
|
32426
|
+
</form>`;
|
|
32427
|
+
}
|
|
32428
|
+
onChangeSizeIsLocked() {
|
|
32429
|
+
const lockSize = this.getElm('lockSize');
|
|
32430
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32431
|
+
lockSize.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get(this.state.sizeIsLocked ? 'lock' : 'unlock');
|
|
32432
|
+
this.setMod('lock-size', this.state.sizeIsLocked);
|
|
32433
|
+
this.j.e.fire(imageWidth, 'change');
|
|
32434
|
+
}
|
|
32435
|
+
onLockSizeClick() {
|
|
32436
|
+
this.state.sizeIsLocked = !this.state.sizeIsLocked;
|
|
32437
|
+
}
|
|
32438
|
+
onStateValuesSizeChange() {
|
|
32439
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32440
|
+
const imageHeight = this.getElm('imageHeight');
|
|
32441
|
+
if (imageWidth !== this.j.od.activeElement) {
|
|
32442
|
+
imageWidth.value = this.state.values.imageWidth.toString();
|
|
32443
|
+
}
|
|
32444
|
+
if (imageHeight !== this.j.od.activeElement) {
|
|
32445
|
+
imageHeight.value = this.state.values.imageHeight.toString();
|
|
32446
|
+
}
|
|
32447
|
+
}
|
|
32448
|
+
onImageWidthChange(e) {
|
|
32449
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32450
|
+
const imageHeight = this.getElm('imageHeight');
|
|
32451
|
+
if (!this.state.sizeIsLocked ||
|
|
32452
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageWidth.value) ||
|
|
32453
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageHeight.value)) {
|
|
32454
|
+
this.state.values.imageWidth = imageWidth.value;
|
|
32455
|
+
this.state.values.imageHeight = imageHeight.value;
|
|
32456
|
+
return;
|
|
32457
|
+
}
|
|
32458
|
+
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32459
|
+
if (e.target === imageWidth) {
|
|
32460
|
+
this.state.values.imageWidth = w;
|
|
32461
|
+
this.state.values.imageHeight = Math.round(w / this.state.ratio);
|
|
32462
|
+
}
|
|
32463
|
+
else {
|
|
32464
|
+
this.state.values.imageWidth = Math.round(h * this.state.ratio);
|
|
32465
|
+
this.state.values.imageHeight = h;
|
|
32466
|
+
}
|
|
32467
|
+
}
|
|
32468
|
+
onStateValuesImageSrcChange() {
|
|
32469
|
+
const { imageSrc } = this.state.values;
|
|
32470
|
+
if (!imageSrc) {
|
|
32471
|
+
return;
|
|
32472
|
+
}
|
|
32473
|
+
const imageViewSrc = this.getElm('imageViewSrc');
|
|
32474
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.attr)(imageViewSrc, 'src', imageSrc);
|
|
32475
|
+
const image = new Image();
|
|
32476
|
+
image.src = imageSrc;
|
|
32477
|
+
this.state.image = image;
|
|
32478
|
+
}
|
|
32479
|
+
hideFieldByOptions() {
|
|
32480
|
+
const opt = this.j.o.image;
|
|
32481
|
+
[
|
|
32482
|
+
['editSize', 'imageSizes'],
|
|
32483
|
+
['showPreview', 'imageView']
|
|
32484
|
+
].forEach(([optKey, elmKey]) => {
|
|
32485
|
+
const elm = this.getElm(elmKey);
|
|
32486
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
32487
|
+
});
|
|
32488
|
+
}
|
|
32489
|
+
};
|
|
32490
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32491
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32492
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.sizeIsLocked')
|
|
32493
|
+
], UIImagePropertiesForm.prototype, "onChangeSizeIsLocked", null);
|
|
32494
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32495
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('lockSize:click')
|
|
32496
|
+
], UIImagePropertiesForm.prototype, "onLockSizeClick", null);
|
|
32497
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32498
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32499
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)(['state.values.imageWidth', 'state.values.imageHeight'])
|
|
32500
|
+
], UIImagePropertiesForm.prototype, "onStateValuesSizeChange", null);
|
|
32501
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32502
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([
|
|
32503
|
+
'imageWidth:change',
|
|
32504
|
+
'imageHeight:change',
|
|
32505
|
+
'imageWidth:keydown',
|
|
32506
|
+
'imageHeight:keydown',
|
|
32507
|
+
'imageWidth:mousedown',
|
|
32508
|
+
'imageHeight:mousedown',
|
|
32509
|
+
'imageWidth:paste',
|
|
32510
|
+
'imageHeight:paste'
|
|
32511
|
+
]),
|
|
32512
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.debounce)()
|
|
32513
|
+
], UIImagePropertiesForm.prototype, "onImageWidthChange", null);
|
|
32514
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32515
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32516
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.values.imageSrc')
|
|
32517
|
+
], UIImagePropertiesForm.prototype, "onStateValuesImageSrcChange", null);
|
|
32518
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32519
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready')
|
|
32520
|
+
], UIImagePropertiesForm.prototype, "hideFieldByOptions", null);
|
|
32521
|
+
UIImagePropertiesForm = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32522
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__/* .component */ .s
|
|
32523
|
+
], UIImagePropertiesForm);
|
|
32524
|
+
|
|
32395
32525
|
|
|
32396
32526
|
|
|
32397
32527
|
/***/ }),
|
|
32398
32528
|
|
|
32399
|
-
/***/
|
|
32529
|
+
/***/ 26282:
|
|
32400
32530
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32401
32531
|
|
|
32402
32532
|
"use strict";
|
|
32403
32533
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32404
|
-
/* harmony export */
|
|
32534
|
+
/* harmony export */ k: function() { return /* binding */ UIImageMainTab; }
|
|
32405
32535
|
/* harmony export */ });
|
|
32406
|
-
/* harmony import */ var
|
|
32536
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
|
|
32537
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12222);
|
|
32538
|
+
/* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
|
|
32539
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
|
|
32540
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
|
|
32541
|
+
/* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1530);
|
|
32407
32542
|
/*!
|
|
32408
32543
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32409
32544
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32410
32545
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32411
32546
|
*/
|
|
32412
32547
|
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32548
|
+
|
|
32549
|
+
|
|
32550
|
+
|
|
32551
|
+
|
|
32552
|
+
|
|
32553
|
+
/** @private */
|
|
32554
|
+
let UIImageMainTab = class UIImageMainTab extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__/* .UIGroup */ .U {
|
|
32555
|
+
className() {
|
|
32556
|
+
return 'UIImageMainTab';
|
|
32557
|
+
}
|
|
32558
|
+
appendChildToContainer() {
|
|
32559
|
+
// Do nothing
|
|
32560
|
+
}
|
|
32561
|
+
constructor(view, state, handlers) {
|
|
32562
|
+
super(view);
|
|
32563
|
+
this.state = state;
|
|
32564
|
+
this.handlers = handlers;
|
|
32565
|
+
}
|
|
32566
|
+
render() {
|
|
32567
|
+
return `<div class="jodit-form__group &__editSrc">
|
|
32568
|
+
<label>~Src~</label>
|
|
32417
32569
|
<div class="jodit-input_group">
|
|
32418
|
-
<input
|
|
32419
|
-
<div
|
|
32420
|
-
|
|
32421
|
-
|
|
32422
|
-
>
|
|
32423
|
-
<a
|
|
32424
|
-
data-ref="changeImage"
|
|
32425
|
-
class="jodit-button"
|
|
32426
|
-
>${gi('image')}</a>
|
|
32427
|
-
<a
|
|
32428
|
-
data-ref="editImage"
|
|
32429
|
-
class="jodit-button"
|
|
32430
|
-
style="${hasEditor ? '' : 'display: none'}"
|
|
32431
|
-
>${gi('crop')}</a>
|
|
32570
|
+
<input class="jodit-input &__imageSrc" type="text"/>
|
|
32571
|
+
<div class="jodit-input_group-buttons &__fixImage">
|
|
32572
|
+
<a class="jodit-button &__changeImage">*image*</a>
|
|
32573
|
+
<a class="jodit-button &__editImage">*crop*</a>
|
|
32432
32574
|
</div>
|
|
32433
32575
|
</div>
|
|
32434
32576
|
</div>
|
|
32435
|
-
<div
|
|
32436
|
-
<label
|
|
32437
|
-
<input
|
|
32577
|
+
<div class="jodit-form__group &__editTitle">
|
|
32578
|
+
<label>~Title~</label>
|
|
32579
|
+
<input type="text" class="jodit-input &__imageTitle"/>
|
|
32438
32580
|
</div>
|
|
32439
|
-
<div
|
|
32440
|
-
<label
|
|
32441
|
-
<input
|
|
32581
|
+
<div class="jodit-form__group &__editAlt">
|
|
32582
|
+
<label>~Alternative~</label>
|
|
32583
|
+
<input type="text" class="jodit-input &__imageAlt"/>
|
|
32442
32584
|
</div>
|
|
32443
|
-
<div
|
|
32444
|
-
<label
|
|
32445
|
-
<input
|
|
32585
|
+
<div class="jodit-form__group &__editLink">
|
|
32586
|
+
<label>~Link~</label>
|
|
32587
|
+
<input type="text" class="jodit-input &__imageLink"/>
|
|
32446
32588
|
</div>
|
|
32447
|
-
<div
|
|
32589
|
+
<div class="jodit-form__group &__editLinkTarget">
|
|
32448
32590
|
<label class="jodit_vertical_middle">
|
|
32449
|
-
<input
|
|
32450
|
-
<span
|
|
32591
|
+
<input type="checkbox" class="jodit-checkbox &__imageLinkOpenInNewTab"/>
|
|
32592
|
+
<span>~Open link in new tab~</span>
|
|
32451
32593
|
</label>
|
|
32452
|
-
</div
|
|
32453
|
-
}
|
|
32594
|
+
</div>`;
|
|
32595
|
+
}
|
|
32596
|
+
async onStateImageSrcChange() {
|
|
32597
|
+
const imageSrc = this.getElm('imageSrc');
|
|
32598
|
+
imageSrc.value = this.state.values.imageSrc;
|
|
32599
|
+
}
|
|
32600
|
+
onImageSrcChange() {
|
|
32601
|
+
this.state.values.imageSrc = this.getElm('imageSrc').value;
|
|
32602
|
+
}
|
|
32603
|
+
/**
|
|
32604
|
+
* Open image editor
|
|
32605
|
+
*/
|
|
32606
|
+
onEditImageClick(e) {
|
|
32607
|
+
this.handlers.openImageEditor();
|
|
32608
|
+
e.stopPropagation();
|
|
32609
|
+
}
|
|
32610
|
+
/**
|
|
32611
|
+
* Open popup with filebrowser/uploader buttons for image
|
|
32612
|
+
*/
|
|
32613
|
+
onChangeImageClick(e) {
|
|
32614
|
+
this.handlers.openImagePopup(this.getElm('changeImage'));
|
|
32615
|
+
e.stopPropagation();
|
|
32616
|
+
}
|
|
32617
|
+
onStateTitleChange() {
|
|
32618
|
+
const title = this.getElm('imageTitle');
|
|
32619
|
+
title.value = this.state.values.imageTitle;
|
|
32620
|
+
}
|
|
32621
|
+
onTitleChange() {
|
|
32622
|
+
this.state.values.imageTitle = this.getElm('imageTitle').value;
|
|
32623
|
+
}
|
|
32624
|
+
onStateAltChange() {
|
|
32625
|
+
const alt = this.getElm('imageAlt');
|
|
32626
|
+
alt.value = this.state.values.imageAlt;
|
|
32627
|
+
}
|
|
32628
|
+
onAltChange() {
|
|
32629
|
+
this.state.values.imageAlt = this.getElm('imageAlt').value;
|
|
32630
|
+
}
|
|
32631
|
+
onStateImageLinkChange() {
|
|
32632
|
+
const imageLink = this.getElm('imageLink');
|
|
32633
|
+
imageLink.value = this.state.values.imageLink;
|
|
32634
|
+
}
|
|
32635
|
+
onImageLinkChange() {
|
|
32636
|
+
this.state.values.imageLink = this.getElm('imageLink').value;
|
|
32637
|
+
}
|
|
32638
|
+
onStateImageLinkOpenInNewTabChange() {
|
|
32639
|
+
const imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab');
|
|
32640
|
+
imageLinkOpenInNewTab.checked = this.state.values.imageLinkOpenInNewTab;
|
|
32641
|
+
}
|
|
32642
|
+
onImageLinkOpenInNewTabChange() {
|
|
32643
|
+
this.state.values.imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab').checked;
|
|
32644
|
+
}
|
|
32645
|
+
hideFieldByOptions() {
|
|
32646
|
+
const o = this.j.o;
|
|
32647
|
+
const opt = o.image;
|
|
32648
|
+
[
|
|
32649
|
+
['editSrc', 'editSrc'],
|
|
32650
|
+
['editTitle', 'editTitle'],
|
|
32651
|
+
['editAlt', 'editAlt'],
|
|
32652
|
+
['editLink', 'editLink'],
|
|
32653
|
+
['editLink', 'editLinkTarget'],
|
|
32654
|
+
['useImageEditor', 'editImage']
|
|
32655
|
+
].forEach(([optKey, elmKey]) => {
|
|
32656
|
+
const elm = this.getElm(elmKey);
|
|
32657
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
32658
|
+
});
|
|
32659
|
+
const changeImage = this.getElm('changeImage');
|
|
32660
|
+
const needShowChangeImage = Boolean(o.filebrowser.ajax.url || o.uploader.url);
|
|
32661
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(changeImage, 'display', needShowChangeImage ? null : 'none');
|
|
32662
|
+
const editImage = this.getElm('editImage');
|
|
32663
|
+
const needShowEditImage = Boolean(o.filebrowser.ajax.url) && opt.useImageEditor;
|
|
32664
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(editImage, 'display', needShowEditImage ? null : 'none');
|
|
32665
|
+
const fixImage = this.getElm('fixImage');
|
|
32666
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(fixImage, 'display', needShowChangeImage || needShowEditImage ? null : 'none');
|
|
32667
|
+
}
|
|
32668
|
+
};
|
|
32669
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32670
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageSrc')
|
|
32671
|
+
], UIImageMainTab.prototype, "onStateImageSrcChange", null);
|
|
32672
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32673
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageSrc:change')
|
|
32674
|
+
], UIImageMainTab.prototype, "onImageSrcChange", null);
|
|
32675
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32676
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('editImage:click')
|
|
32677
|
+
], UIImageMainTab.prototype, "onEditImageClick", null);
|
|
32678
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32679
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('changeImage:click')
|
|
32680
|
+
], UIImageMainTab.prototype, "onChangeImageClick", null);
|
|
32681
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32682
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageTitle')
|
|
32683
|
+
], UIImageMainTab.prototype, "onStateTitleChange", null);
|
|
32684
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32685
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageTitle:change')
|
|
32686
|
+
], UIImageMainTab.prototype, "onTitleChange", null);
|
|
32687
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32688
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageAlt')
|
|
32689
|
+
], UIImageMainTab.prototype, "onStateAltChange", null);
|
|
32690
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32691
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageAlt:change')
|
|
32692
|
+
], UIImageMainTab.prototype, "onAltChange", null);
|
|
32693
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32694
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLink')
|
|
32695
|
+
], UIImageMainTab.prototype, "onStateImageLinkChange", null);
|
|
32696
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32697
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLink:change')
|
|
32698
|
+
], UIImageMainTab.prototype, "onImageLinkChange", null);
|
|
32699
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32700
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLinkOpenInNewTab')
|
|
32701
|
+
], UIImageMainTab.prototype, "onStateImageLinkOpenInNewTabChange", null);
|
|
32702
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32703
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLinkOpenInNewTab:change')
|
|
32704
|
+
], UIImageMainTab.prototype, "onImageLinkOpenInNewTabChange", null);
|
|
32705
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32706
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
|
|
32707
|
+
], UIImageMainTab.prototype, "hideFieldByOptions", null);
|
|
32708
|
+
UIImageMainTab = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32709
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__/* .component */ .s
|
|
32710
|
+
], UIImageMainTab);
|
|
32711
|
+
|
|
32454
32712
|
|
|
32455
32713
|
|
|
32456
32714
|
/***/ }),
|
|
32457
32715
|
|
|
32458
|
-
/***/
|
|
32716
|
+
/***/ 26180:
|
|
32459
32717
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32460
32718
|
|
|
32461
32719
|
"use strict";
|
|
32462
32720
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32463
|
-
/* harmony export */
|
|
32721
|
+
/* harmony export */ _: function() { return /* binding */ UIImagePositionTab; }
|
|
32464
32722
|
/* harmony export */ });
|
|
32465
|
-
/* harmony import */ var
|
|
32723
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
32724
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12222);
|
|
32725
|
+
/* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
|
|
32726
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
|
|
32727
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
|
|
32728
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26986);
|
|
32729
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97099);
|
|
32730
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65685);
|
|
32731
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80004);
|
|
32732
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10926);
|
|
32466
32733
|
/*!
|
|
32467
32734
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32468
32735
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32469
32736
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32470
32737
|
*/
|
|
32471
32738
|
|
|
32472
|
-
|
|
32473
|
-
|
|
32474
|
-
|
|
32475
|
-
|
|
32476
|
-
|
|
32477
|
-
|
|
32478
|
-
|
|
32479
|
-
|
|
32480
|
-
|
|
32481
|
-
|
|
32482
|
-
|
|
32483
|
-
|
|
32484
|
-
|
|
32485
|
-
classInput.push('</select>');
|
|
32739
|
+
|
|
32740
|
+
|
|
32741
|
+
|
|
32742
|
+
|
|
32743
|
+
|
|
32744
|
+
|
|
32745
|
+
|
|
32746
|
+
|
|
32747
|
+
|
|
32748
|
+
/** @private */
|
|
32749
|
+
let UIImagePositionTab = class UIImagePositionTab extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__/* .UIElement */ .D {
|
|
32750
|
+
className() {
|
|
32751
|
+
return 'UIImagePositionTab';
|
|
32486
32752
|
}
|
|
32487
|
-
|
|
32488
|
-
|
|
32753
|
+
constructor(jodit, state, handlers) {
|
|
32754
|
+
super(jodit, {
|
|
32755
|
+
availableClasses: jodit.o.image.availableClasses
|
|
32756
|
+
});
|
|
32757
|
+
this.state = state;
|
|
32758
|
+
this.handlers = handlers;
|
|
32489
32759
|
}
|
|
32490
|
-
|
|
32491
|
-
|
|
32760
|
+
render({ availableClasses }) {
|
|
32761
|
+
return `<div class="jodit-form__group &__editMargins">
|
|
32762
|
+
<label>~Margins~</label>
|
|
32492
32763
|
<div class="jodit-grid jodit_vertical_middle">
|
|
32493
|
-
<input class="jodit_col-lg-1-5 jodit-input
|
|
32494
|
-
<a style="text-align: center;"
|
|
32495
|
-
<input disabled="
|
|
32496
|
-
<input disabled="
|
|
32497
|
-
<input disabled="
|
|
32764
|
+
<input class="jodit_col-lg-1-5 jodit-input &__marginTop" type="text" placeholder="~top~"/>
|
|
32765
|
+
<a style="text-align: center;" class="jodit-properties__lock jodit_col-lg-1-5 &__lockMargin">*lock*</a>
|
|
32766
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginRight" type="text" placeholder="~right~"/>
|
|
32767
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginBottom" type="text" placeholder="~bottom~"/>
|
|
32768
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginLeft" type="text" placeholder="~left~"/>
|
|
32498
32769
|
</div>
|
|
32499
32770
|
</div>
|
|
32500
|
-
<div
|
|
32501
|
-
|
|
32502
|
-
class="jodit-
|
|
32503
|
-
|
|
32504
|
-
|
|
32505
|
-
|
|
32506
|
-
<option value=""
|
|
32507
|
-
<option value="left">${i18n('Left')}</option>
|
|
32508
|
-
<option value="center">${i18n('Center')}</option>
|
|
32509
|
-
<option value="right">${i18n('Right')}</option>
|
|
32771
|
+
<div class="jodit-form__group &__editAlign">
|
|
32772
|
+
<label>~Align~</label>
|
|
32773
|
+
<select class="jodit-select &__align">
|
|
32774
|
+
<option value="">~--Not Set--~</option>
|
|
32775
|
+
<option value="left">~Left~</option>
|
|
32776
|
+
<option value="center">~Center~</option>
|
|
32777
|
+
<option value="right">~Right~</option>
|
|
32510
32778
|
</select>
|
|
32511
32779
|
</div>
|
|
32512
|
-
<div
|
|
32513
|
-
<label
|
|
32514
|
-
<input
|
|
32780
|
+
<div class="jodit-form__group &__editStyle">
|
|
32781
|
+
<label>~Styles~</label>
|
|
32782
|
+
<input type="text" class="jodit-input &__style"/>
|
|
32515
32783
|
</div>
|
|
32516
|
-
<div
|
|
32517
|
-
<label
|
|
32518
|
-
${
|
|
32784
|
+
<div class="jodit-form__group &__editClass">
|
|
32785
|
+
<label>~Classes~</label>
|
|
32786
|
+
${(() => {
|
|
32787
|
+
const classInput = [];
|
|
32788
|
+
if (availableClasses && availableClasses.length > 0) {
|
|
32789
|
+
classInput.push('<select class="jodit-input jodit-select &__classes">');
|
|
32790
|
+
availableClasses.forEach(item => {
|
|
32791
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .K)(item)) {
|
|
32792
|
+
classInput.push(`<option value="${item}">${item}</option>`);
|
|
32793
|
+
}
|
|
32794
|
+
else {
|
|
32795
|
+
classInput.push(`<option value="${item[0]}">${item[1]}</option>`);
|
|
32796
|
+
}
|
|
32797
|
+
});
|
|
32798
|
+
classInput.push('</select>');
|
|
32799
|
+
}
|
|
32800
|
+
else {
|
|
32801
|
+
classInput.push('<input type="text" class="jodit-input &__classes"/>');
|
|
32802
|
+
}
|
|
32803
|
+
return classInput.join('');
|
|
32804
|
+
})()}
|
|
32519
32805
|
</div>
|
|
32520
|
-
<div
|
|
32806
|
+
<div class="jodit-form__group &__editId">
|
|
32521
32807
|
<label>Id</label>
|
|
32522
|
-
<input
|
|
32808
|
+
<input type="text" class="jodit-input &__id"/>
|
|
32523
32809
|
</div>
|
|
32524
32810
|
<div
|
|
32525
|
-
|
|
32526
|
-
class="jodit-form__group"
|
|
32811
|
+
class="jodit-form__group &__editBorderRadius"
|
|
32527
32812
|
>
|
|
32528
|
-
<label
|
|
32529
|
-
|
|
32530
|
-
</div
|
|
32813
|
+
<label>~Border radius~</label>
|
|
32814
|
+
<input type="number" class="jodit-input &__borderRadius"/>
|
|
32815
|
+
</div>`;
|
|
32816
|
+
}
|
|
32817
|
+
onStateAlignChange() {
|
|
32818
|
+
const align = this.getElm('align');
|
|
32819
|
+
align.value = this.state.values.align;
|
|
32820
|
+
}
|
|
32821
|
+
onChangeAlign() {
|
|
32822
|
+
const align = this.getElm('align');
|
|
32823
|
+
this.state.values.align = align.value;
|
|
32824
|
+
}
|
|
32825
|
+
onStateValuesBorderRadiusChange() {
|
|
32826
|
+
const borderRadius = this.getElm('borderRadius');
|
|
32827
|
+
borderRadius.value = this.state.values.borderRadius.toString();
|
|
32828
|
+
}
|
|
32829
|
+
onChangeBorderRadius() {
|
|
32830
|
+
const borderRadius = this.getElm('borderRadius');
|
|
32831
|
+
this.state.values.borderRadius = parseFloat(borderRadius.value);
|
|
32832
|
+
}
|
|
32833
|
+
onStateValuesIdChange() {
|
|
32834
|
+
const id = this.getElm('id');
|
|
32835
|
+
id.value = this.state.values.id;
|
|
32836
|
+
}
|
|
32837
|
+
onChangeId() {
|
|
32838
|
+
const id = this.getElm('id');
|
|
32839
|
+
this.state.values.id = id.value;
|
|
32840
|
+
}
|
|
32841
|
+
onStateValuesStyleChange() {
|
|
32842
|
+
const style = this.getElm('style');
|
|
32843
|
+
style.value = this.state.values.style;
|
|
32844
|
+
}
|
|
32845
|
+
onChangeStyle() {
|
|
32846
|
+
const style = this.getElm('style');
|
|
32847
|
+
this.state.values.style = style.value;
|
|
32848
|
+
}
|
|
32849
|
+
onStateValuesClassesChange() {
|
|
32850
|
+
const classes = this.getElm('classes');
|
|
32851
|
+
classes.value = this.state.values.classes;
|
|
32852
|
+
}
|
|
32853
|
+
onChangClasses() {
|
|
32854
|
+
const classes = this.getElm('classes');
|
|
32855
|
+
this.state.values.classes = classes.value;
|
|
32856
|
+
}
|
|
32857
|
+
onLockMarginClick(e) {
|
|
32858
|
+
this.state.marginIsLocked = !this.state.marginIsLocked;
|
|
32859
|
+
e.preventDefault();
|
|
32860
|
+
}
|
|
32861
|
+
onChangeMarginIsLocked() {
|
|
32862
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32863
|
+
const marginRight = this.getElm('marginRight');
|
|
32864
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32865
|
+
const lockMargin = this.getElm('lockMargin');
|
|
32866
|
+
[marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
32867
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .C)(elm, 'disabled', this.state.marginIsLocked || null);
|
|
32868
|
+
});
|
|
32869
|
+
lockMargin.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.get(this.state.marginIsLocked ? 'lock' : 'unlock');
|
|
32870
|
+
if (this.state.marginIsLocked) {
|
|
32871
|
+
const marginTop = this.state.values.marginTop;
|
|
32872
|
+
this.state.values.marginRight = marginTop;
|
|
32873
|
+
this.state.values.marginBottom = marginTop;
|
|
32874
|
+
this.state.values.marginLeft = marginTop;
|
|
32875
|
+
}
|
|
32876
|
+
}
|
|
32877
|
+
onStateValuesMarginChange() {
|
|
32878
|
+
const marginTop = this.getElm('marginTop');
|
|
32879
|
+
const marginRight = this.getElm('marginRight');
|
|
32880
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32881
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32882
|
+
marginTop.value = this.state.values.marginTop.toString();
|
|
32883
|
+
marginRight.value = this.state.values.marginRight.toString();
|
|
32884
|
+
marginBottom.value = this.state.values.marginBottom.toString();
|
|
32885
|
+
marginLeft.value = this.state.values.marginLeft.toString();
|
|
32886
|
+
}
|
|
32887
|
+
onChangeMargin() {
|
|
32888
|
+
const marginTop = this.getElm('marginTop');
|
|
32889
|
+
const marginRight = this.getElm('marginRight');
|
|
32890
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32891
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32892
|
+
this.state.values.marginTop = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginTop.value);
|
|
32893
|
+
if (this.state.marginIsLocked) {
|
|
32894
|
+
this.state.values.marginRight = this.state.values.marginTop;
|
|
32895
|
+
this.state.values.marginBottom = this.state.values.marginTop;
|
|
32896
|
+
this.state.values.marginLeft = this.state.values.marginTop;
|
|
32897
|
+
}
|
|
32898
|
+
else {
|
|
32899
|
+
this.state.values.marginRight = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginRight.value);
|
|
32900
|
+
this.state.values.marginBottom = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginBottom.value);
|
|
32901
|
+
this.state.values.marginLeft = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginLeft.value);
|
|
32902
|
+
}
|
|
32903
|
+
}
|
|
32904
|
+
hideFieldByOptions() {
|
|
32905
|
+
const opt = this.j.o.image;
|
|
32906
|
+
[
|
|
32907
|
+
['editMargins', 'editMargins'],
|
|
32908
|
+
['editAlign', 'editAlign'],
|
|
32909
|
+
['editStyle', 'editStyle'],
|
|
32910
|
+
['editClass', 'editClass'],
|
|
32911
|
+
['editId', 'editId'],
|
|
32912
|
+
['editBorderRadius', 'editBorderRadius']
|
|
32913
|
+
].forEach(([optKey, elmKey]) => {
|
|
32914
|
+
const elm = this.getElm(elmKey);
|
|
32915
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
32916
|
+
});
|
|
32917
|
+
}
|
|
32918
|
+
};
|
|
32919
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32920
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32921
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.align')
|
|
32922
|
+
], UIImagePositionTab.prototype, "onStateAlignChange", null);
|
|
32923
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32924
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('align:change')
|
|
32925
|
+
], UIImagePositionTab.prototype, "onChangeAlign", null);
|
|
32926
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32927
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32928
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.borderRadius')
|
|
32929
|
+
], UIImagePositionTab.prototype, "onStateValuesBorderRadiusChange", null);
|
|
32930
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32931
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('borderRadius:change')
|
|
32932
|
+
], UIImagePositionTab.prototype, "onChangeBorderRadius", null);
|
|
32933
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32934
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32935
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.id')
|
|
32936
|
+
], UIImagePositionTab.prototype, "onStateValuesIdChange", null);
|
|
32937
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32938
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('id:change')
|
|
32939
|
+
], UIImagePositionTab.prototype, "onChangeId", null);
|
|
32940
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32941
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32942
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.style')
|
|
32943
|
+
], UIImagePositionTab.prototype, "onStateValuesStyleChange", null);
|
|
32944
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32945
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('style:change')
|
|
32946
|
+
], UIImagePositionTab.prototype, "onChangeStyle", null);
|
|
32947
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32948
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32949
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.classes')
|
|
32950
|
+
], UIImagePositionTab.prototype, "onStateValuesClassesChange", null);
|
|
32951
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32952
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('classes:change')
|
|
32953
|
+
], UIImagePositionTab.prototype, "onChangClasses", null);
|
|
32954
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32955
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('lockMargin:click')
|
|
32956
|
+
], UIImagePositionTab.prototype, "onLockMarginClick", null);
|
|
32957
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32958
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32959
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.marginIsLocked')
|
|
32960
|
+
], UIImagePositionTab.prototype, "onChangeMarginIsLocked", null);
|
|
32961
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32962
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
32963
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
|
|
32964
|
+
'state.values.marginTop',
|
|
32965
|
+
'state.values.marginRight',
|
|
32966
|
+
'state.values.marginBottom',
|
|
32967
|
+
'state.values.marginLeft'
|
|
32968
|
+
])
|
|
32969
|
+
], UIImagePositionTab.prototype, "onStateValuesMarginChange", null);
|
|
32970
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32971
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
|
|
32972
|
+
'marginTop:change',
|
|
32973
|
+
'marginRight:change',
|
|
32974
|
+
'marginBottom:change',
|
|
32975
|
+
'marginLeft:change'
|
|
32976
|
+
])
|
|
32977
|
+
], UIImagePositionTab.prototype, "onChangeMargin", null);
|
|
32978
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32979
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
|
|
32980
|
+
], UIImagePositionTab.prototype, "hideFieldByOptions", null);
|
|
32981
|
+
UIImagePositionTab = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
32982
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__/* .component */ .s
|
|
32983
|
+
], UIImagePositionTab);
|
|
32984
|
+
|
|
32985
|
+
|
|
32986
|
+
|
|
32987
|
+
/***/ }),
|
|
32988
|
+
|
|
32989
|
+
/***/ 77137:
|
|
32990
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32991
|
+
|
|
32992
|
+
"use strict";
|
|
32993
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32994
|
+
/* harmony export */ v: function() { return /* binding */ openImageEditorDialog; }
|
|
32995
|
+
/* harmony export */ });
|
|
32996
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26986);
|
|
32997
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
32998
|
+
/* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60485);
|
|
32999
|
+
/*!
|
|
33000
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33001
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33002
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33003
|
+
*/
|
|
33004
|
+
|
|
33005
|
+
|
|
33006
|
+
|
|
33007
|
+
/**
|
|
33008
|
+
* Open image editor dialog
|
|
33009
|
+
* @private
|
|
33010
|
+
*/
|
|
33011
|
+
function openImageEditorDialog(j, state) {
|
|
33012
|
+
const url = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(state.image, 'src') || '', a = j.c.element('a'), loadExternal = () => {
|
|
33013
|
+
if (a.host !== location.host) {
|
|
33014
|
+
j.confirm('You can only edit your own images. Download this image on the host?', yes => {
|
|
33015
|
+
if (yes && j.uploader) {
|
|
33016
|
+
j.uploader.uploadRemoteImage(a.href.toString(), resp => {
|
|
33017
|
+
j.alert('The image has been successfully uploaded to the host!', () => {
|
|
33018
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .K)(resp.newfilename)) {
|
|
33019
|
+
state.values.imageSrc =
|
|
33020
|
+
resp.baseurl +
|
|
33021
|
+
resp.newfilename;
|
|
33022
|
+
}
|
|
33023
|
+
});
|
|
33024
|
+
}, error => {
|
|
33025
|
+
j.alert('There was an error loading %s', error.message);
|
|
33026
|
+
});
|
|
33027
|
+
}
|
|
33028
|
+
});
|
|
33029
|
+
return;
|
|
33030
|
+
}
|
|
33031
|
+
};
|
|
33032
|
+
a.href = url;
|
|
33033
|
+
j.filebrowser.dataProvider
|
|
33034
|
+
.getPathByUrl(a.href.toString())
|
|
33035
|
+
.then(resp => {
|
|
33036
|
+
jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__/* .openImageEditor */ .B.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, () => {
|
|
33037
|
+
const timestamp = new Date().getTime();
|
|
33038
|
+
state.values.imageSrc =
|
|
33039
|
+
url +
|
|
33040
|
+
(url.indexOf('?') !== -1 ? '' : '?') +
|
|
33041
|
+
'&_tmp=' +
|
|
33042
|
+
timestamp.toString();
|
|
33043
|
+
}, error => {
|
|
33044
|
+
j.alert(error.message);
|
|
33045
|
+
});
|
|
33046
|
+
})
|
|
33047
|
+
.catch(error => {
|
|
33048
|
+
j.alert(error.message, loadExternal);
|
|
33049
|
+
});
|
|
33050
|
+
}
|
|
33051
|
+
|
|
33052
|
+
|
|
33053
|
+
/***/ }),
|
|
33054
|
+
|
|
33055
|
+
/***/ 91852:
|
|
33056
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33057
|
+
|
|
33058
|
+
"use strict";
|
|
33059
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33060
|
+
/* harmony export */ q: function() { return /* binding */ openImagePopup; }
|
|
33061
|
+
/* harmony export */ });
|
|
33062
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55010);
|
|
33063
|
+
/* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43977);
|
|
33064
|
+
/* harmony import */ var jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34138);
|
|
33065
|
+
/* harmony import */ var jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31784);
|
|
33066
|
+
/*!
|
|
33067
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33068
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33069
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33070
|
+
*/
|
|
33071
|
+
|
|
33072
|
+
|
|
33073
|
+
|
|
33074
|
+
|
|
33075
|
+
/** @private */
|
|
33076
|
+
function openImagePopup(j, dialog, state, button) {
|
|
33077
|
+
const popup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__/* .Popup */ .z(dialog);
|
|
33078
|
+
const closePopup = () => {
|
|
33079
|
+
popup.close();
|
|
33080
|
+
popup.destruct();
|
|
33081
|
+
};
|
|
33082
|
+
popup
|
|
33083
|
+
.setContent((0,jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__/* .FileSelectorWidget */ .k)(j, {
|
|
33084
|
+
upload: (data) => {
|
|
33085
|
+
if (data.files && data.files.length) {
|
|
33086
|
+
state.values.imageSrc =
|
|
33087
|
+
data.baseurl + data.files[0];
|
|
33088
|
+
}
|
|
33089
|
+
closePopup();
|
|
33090
|
+
},
|
|
33091
|
+
filebrowser: async (data) => {
|
|
33092
|
+
if (data && (0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__/* .isArray */ .c)(data.files) && data.files.length) {
|
|
33093
|
+
state.values.imageSrc = data.files[0];
|
|
33094
|
+
closePopup();
|
|
33095
|
+
}
|
|
33096
|
+
}
|
|
33097
|
+
}, state.image, closePopup))
|
|
33098
|
+
.open(() => (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_3__/* .position */ .G)(button));
|
|
33099
|
+
}
|
|
33100
|
+
|
|
33101
|
+
|
|
33102
|
+
/***/ }),
|
|
33103
|
+
|
|
33104
|
+
/***/ 10926:
|
|
33105
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33106
|
+
|
|
33107
|
+
"use strict";
|
|
33108
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33109
|
+
/* harmony export */ G: function() { return /* binding */ normalSizeFromString; },
|
|
33110
|
+
/* harmony export */ n: function() { return /* binding */ normalSizeToString; }
|
|
33111
|
+
/* harmony export */ });
|
|
33112
|
+
/* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72558);
|
|
33113
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22718);
|
|
33114
|
+
/*!
|
|
33115
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33116
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33117
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33118
|
+
*/
|
|
33119
|
+
|
|
33120
|
+
|
|
33121
|
+
/** @private */
|
|
33122
|
+
const normalSizeFromString = (value) => {
|
|
33123
|
+
return /^[-+]?[0-9.]+(px)?$/.test(value.toString())
|
|
33124
|
+
? parseFloat(value.toString())
|
|
33125
|
+
: value;
|
|
33126
|
+
};
|
|
33127
|
+
/** @private */
|
|
33128
|
+
const normalSizeToString = (value) => {
|
|
33129
|
+
if ((0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__/* .isNumber */ .E)(value)) {
|
|
33130
|
+
return value ? value + 'px' : value.toString();
|
|
33131
|
+
}
|
|
33132
|
+
value = (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(value);
|
|
33133
|
+
return /^[0-9]+$/.test(value) ? value + 'px' : value;
|
|
33134
|
+
};
|
|
33135
|
+
|
|
33136
|
+
|
|
33137
|
+
/***/ }),
|
|
33138
|
+
|
|
33139
|
+
/***/ 48570:
|
|
33140
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33141
|
+
|
|
33142
|
+
"use strict";
|
|
33143
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33144
|
+
/* harmony export */ j: function() { return /* binding */ applyValuesToImage; }
|
|
33145
|
+
/* harmony export */ });
|
|
33146
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
33147
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71122);
|
|
33148
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9144);
|
|
33149
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82714);
|
|
33150
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26277);
|
|
33151
|
+
/*!
|
|
33152
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33153
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33154
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33155
|
+
*/
|
|
33156
|
+
|
|
33157
|
+
|
|
33158
|
+
|
|
33159
|
+
|
|
33160
|
+
|
|
33161
|
+
/**
|
|
33162
|
+
* Apply form's values to image
|
|
33163
|
+
* @private
|
|
33164
|
+
*/
|
|
33165
|
+
function applyValuesToImage(j, state, image) {
|
|
33166
|
+
const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
|
|
33167
|
+
const opt = j.o;
|
|
33168
|
+
// styles
|
|
33169
|
+
if (opt.image.editStyle) {
|
|
33170
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style', style || null);
|
|
33171
|
+
}
|
|
33172
|
+
// Src
|
|
33173
|
+
if (imageSrc) {
|
|
33174
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
|
|
33175
|
+
}
|
|
33176
|
+
else {
|
|
33177
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(image);
|
|
33178
|
+
return;
|
|
33179
|
+
}
|
|
33180
|
+
// Border radius
|
|
33181
|
+
image.style.borderRadius = borderRadius ? borderRadius + 'px' : '';
|
|
33182
|
+
// Title
|
|
33183
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title', imageTitle || null);
|
|
33184
|
+
// Alt
|
|
33185
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
|
|
33186
|
+
// Link
|
|
33187
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_2__/* .applyLink */ .j)(j, image, imageLink, imageLinkOpenInNewTab);
|
|
33188
|
+
// Size
|
|
33189
|
+
(0,_size__WEBPACK_IMPORTED_MODULE_4__/* .applySize */ .q)(image, imageWidth, imageHeight, state.sizeIsLocked);
|
|
33190
|
+
// Margin
|
|
33191
|
+
if (j.o.image.editMargins) {
|
|
33192
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_3__/* .applyMargin */ .N)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
|
|
33193
|
+
}
|
|
33194
|
+
if (opt.image.editClass) {
|
|
33195
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
|
|
33196
|
+
}
|
|
33197
|
+
if (opt.image.editId) {
|
|
33198
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
33199
|
+
}
|
|
33200
|
+
if (opt.image.editAlign) {
|
|
33201
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
33202
|
+
}
|
|
33203
|
+
}
|
|
33204
|
+
|
|
33205
|
+
|
|
33206
|
+
/***/ }),
|
|
33207
|
+
|
|
33208
|
+
/***/ 9144:
|
|
33209
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33210
|
+
|
|
33211
|
+
"use strict";
|
|
33212
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33213
|
+
/* harmony export */ j: function() { return /* binding */ applyLink; }
|
|
33214
|
+
/* harmony export */ });
|
|
33215
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
33216
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
|
|
33217
|
+
/*!
|
|
33218
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33219
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33220
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33221
|
+
*/
|
|
33222
|
+
|
|
33223
|
+
|
|
33224
|
+
/** @private */
|
|
33225
|
+
function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
|
|
33226
|
+
// Link
|
|
33227
|
+
let link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(image, 'a', j.editor);
|
|
33228
|
+
if (imageLink) {
|
|
33229
|
+
if (!link) {
|
|
33230
|
+
link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(image, 'a', j.createInside);
|
|
33231
|
+
}
|
|
33232
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'href', imageLink);
|
|
33233
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
|
|
33234
|
+
}
|
|
33235
|
+
else {
|
|
33236
|
+
if (link && link.parentNode) {
|
|
33237
|
+
link.parentNode.replaceChild(image, link);
|
|
33238
|
+
}
|
|
33239
|
+
}
|
|
33240
|
+
}
|
|
33241
|
+
|
|
33242
|
+
|
|
33243
|
+
/***/ }),
|
|
33244
|
+
|
|
33245
|
+
/***/ 82714:
|
|
33246
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33247
|
+
|
|
33248
|
+
"use strict";
|
|
33249
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33250
|
+
/* harmony export */ N: function() { return /* binding */ applyMargin; }
|
|
33251
|
+
/* harmony export */ });
|
|
33252
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4401);
|
|
33253
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10926);
|
|
33254
|
+
/*!
|
|
33255
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33256
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33257
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33258
|
+
*/
|
|
33259
|
+
|
|
33260
|
+
|
|
33261
|
+
/** @private */
|
|
33262
|
+
function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image, marginIsLocked) {
|
|
33263
|
+
const margins = [marginTop, marginRight, marginBottom, marginLeft];
|
|
33264
|
+
const applyMargin = (key, value) => {
|
|
33265
|
+
const oldValue = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key);
|
|
33266
|
+
const v = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_0__/* .normalSizeToString */ .n)(value);
|
|
33267
|
+
if (oldValue.toString() !== v.toString()) {
|
|
33268
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key, v);
|
|
33269
|
+
}
|
|
33270
|
+
};
|
|
33271
|
+
if (!marginIsLocked) {
|
|
33272
|
+
const sides = [
|
|
33273
|
+
'margin-top',
|
|
33274
|
+
'margin-right',
|
|
33275
|
+
'margin-bottom',
|
|
33276
|
+
'margin-left'
|
|
33277
|
+
];
|
|
33278
|
+
margins.forEach((margin, index) => {
|
|
33279
|
+
const side = sides[index];
|
|
33280
|
+
applyMargin(side, margin);
|
|
33281
|
+
});
|
|
33282
|
+
}
|
|
33283
|
+
else {
|
|
33284
|
+
applyMargin('margin', marginTop);
|
|
33285
|
+
}
|
|
33286
|
+
}
|
|
33287
|
+
|
|
33288
|
+
|
|
33289
|
+
/***/ }),
|
|
33290
|
+
|
|
33291
|
+
/***/ 26277:
|
|
33292
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33293
|
+
|
|
33294
|
+
"use strict";
|
|
33295
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33296
|
+
/* harmony export */ q: function() { return /* binding */ applySize; }
|
|
33297
|
+
/* harmony export */ });
|
|
33298
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
33299
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4401);
|
|
33300
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
|
|
33301
|
+
/*!
|
|
33302
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33303
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33304
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33305
|
+
*/
|
|
33306
|
+
|
|
33307
|
+
|
|
33308
|
+
|
|
33309
|
+
/** @private */
|
|
33310
|
+
function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
33311
|
+
// Size
|
|
33312
|
+
if (imageWidth !== image.offsetWidth ||
|
|
33313
|
+
imageHeight !== image.offsetHeight) {
|
|
33314
|
+
const updatedWidth = imageWidth ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageWidth) : null;
|
|
33315
|
+
let updatedHeight = imageHeight
|
|
33316
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageHeight)
|
|
33317
|
+
: null;
|
|
33318
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, {
|
|
33319
|
+
width: updatedWidth,
|
|
33320
|
+
height: updatedWidth && sizeIsLocked ? null : updatedHeight
|
|
33321
|
+
});
|
|
33322
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width', (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') ? updatedWidth : null);
|
|
33323
|
+
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || sizeIsLocked) {
|
|
33324
|
+
updatedHeight = null;
|
|
33325
|
+
}
|
|
33326
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height', updatedHeight);
|
|
33327
|
+
}
|
|
32531
33328
|
}
|
|
32532
33329
|
|
|
32533
33330
|
|
|
@@ -38891,7 +39688,8 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('selec
|
|
|
38891
39688
|
*/
|
|
38892
39689
|
|
|
38893
39690
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.select = {
|
|
38894
|
-
normalizeSelectionBeforeCutAndCopy: false
|
|
39691
|
+
normalizeSelectionBeforeCutAndCopy: false,
|
|
39692
|
+
normalizeTripleClick: true
|
|
38895
39693
|
};
|
|
38896
39694
|
|
|
38897
39695
|
|
|
@@ -38967,7 +39765,7 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
38967
39765
|
}
|
|
38968
39766
|
}
|
|
38969
39767
|
/**
|
|
38970
|
-
* @event outsideClick(e) - when user clicked
|
|
39768
|
+
* @event outsideClick(e) - when user clicked on the outside of editor
|
|
38971
39769
|
*/
|
|
38972
39770
|
onOutsideClick(e) {
|
|
38973
39771
|
const node = e.target;
|
|
@@ -38979,7 +39777,7 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
38979
39777
|
this.j.e.fire('outsideClick', e);
|
|
38980
39778
|
}
|
|
38981
39779
|
}
|
|
38982
|
-
beforeCommandCut(
|
|
39780
|
+
beforeCommandCut() {
|
|
38983
39781
|
const { s } = this.j;
|
|
38984
39782
|
if (!s.isCollapsed()) {
|
|
38985
39783
|
const current = s.current();
|
|
@@ -38988,13 +39786,27 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
38988
39786
|
}
|
|
38989
39787
|
}
|
|
38990
39788
|
}
|
|
38991
|
-
|
|
39789
|
+
beforeCommandSelectAll() {
|
|
38992
39790
|
const { s } = this.j;
|
|
38993
39791
|
s.focus();
|
|
38994
39792
|
s.select(this.j.editor, true);
|
|
38995
39793
|
s.expandSelection();
|
|
38996
39794
|
return false;
|
|
38997
39795
|
}
|
|
39796
|
+
/**
|
|
39797
|
+
* Normalize selection after triple click
|
|
39798
|
+
*/
|
|
39799
|
+
onTripleClickNormalizeSelection(e) {
|
|
39800
|
+
if (e.detail !== 3 || !this.j.o.select.normalizeTripleClick) {
|
|
39801
|
+
return;
|
|
39802
|
+
}
|
|
39803
|
+
const { s } = this.j;
|
|
39804
|
+
const { startContainer, startOffset } = s.range;
|
|
39805
|
+
if (startOffset === 0 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(startContainer)) {
|
|
39806
|
+
s.select(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(startContainer, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock, this.j.editor) ||
|
|
39807
|
+
startContainer, true);
|
|
39808
|
+
}
|
|
39809
|
+
}
|
|
38998
39810
|
onCopyNormalizeSelectionBound(e) {
|
|
38999
39811
|
const { s, editor, o } = this.j;
|
|
39000
39812
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -39020,7 +39832,10 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
39020
39832
|
], select.prototype, "beforeCommandCut", null);
|
|
39021
39833
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39022
39834
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':beforeCommandSelectall'])
|
|
39023
|
-
], select.prototype, "
|
|
39835
|
+
], select.prototype, "beforeCommandSelectAll", null);
|
|
39836
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39837
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':click'])
|
|
39838
|
+
], select.prototype, "onTripleClickNormalizeSelection", null);
|
|
39024
39839
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39025
39840
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':copy', ':cut'])
|
|
39026
39841
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|