jodit-pro 4.1.13 → 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/es2018/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
|
var _a, _b, _c, _d, _e;
|
|
@@ -1858,6 +1882,11 @@ class Async {
|
|
|
1858
1882
|
? (...args) => {
|
|
1859
1883
|
const promise = this.promise(res => {
|
|
1860
1884
|
promises.push(res);
|
|
1885
|
+
}).catch((e) => {
|
|
1886
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__/* .isAbortError */ .z)(e)) {
|
|
1887
|
+
return null;
|
|
1888
|
+
}
|
|
1889
|
+
throw e;
|
|
1861
1890
|
});
|
|
1862
1891
|
onFire(...args);
|
|
1863
1892
|
return promise;
|
|
@@ -1929,7 +1958,7 @@ class Async {
|
|
|
1929
1958
|
promise(executor) {
|
|
1930
1959
|
let rejectCallback = () => { };
|
|
1931
1960
|
const promise = new Promise((resolve, reject) => {
|
|
1932
|
-
rejectCallback = () => reject((0,
|
|
1961
|
+
rejectCallback = () => reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .abort */ .h)('Abort async'));
|
|
1933
1962
|
this.promisesRejections.add(rejectCallback);
|
|
1934
1963
|
executor(resolve, reject);
|
|
1935
1964
|
});
|
|
@@ -2414,7 +2443,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2414
2443
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2415
2444
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2416
2445
|
*/
|
|
2417
|
-
const APP_VERSION = "4.1.
|
|
2446
|
+
const APP_VERSION = "4.1.21";
|
|
2418
2447
|
// prettier-ignore
|
|
2419
2448
|
const ES = "es2018";
|
|
2420
2449
|
const IS_ES_MODERN = true;
|
|
@@ -7427,6 +7456,7 @@ const offset = (elm, jodit, doc, recurse = false) => {
|
|
|
7427
7456
|
* Calculate screen element position
|
|
7428
7457
|
*/
|
|
7429
7458
|
function position(elm, jodit, recurse = false) {
|
|
7459
|
+
var _a, _b;
|
|
7430
7460
|
const rect = elm.getBoundingClientRect();
|
|
7431
7461
|
let xPos = rect.left, yPos = rect.top;
|
|
7432
7462
|
if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y)(jodit) &&
|
|
@@ -7440,8 +7470,8 @@ function position(elm, jodit, recurse = false) {
|
|
|
7440
7470
|
return {
|
|
7441
7471
|
left: Math.round(xPos),
|
|
7442
7472
|
top: Math.round(yPos),
|
|
7443
|
-
width: Math.round(elm.offsetWidth),
|
|
7444
|
-
height: Math.round(elm.offsetHeight)
|
|
7473
|
+
width: Math.round((_a = elm.offsetWidth) !== null && _a !== void 0 ? _a : rect.width),
|
|
7474
|
+
height: Math.round((_b = elm.offsetHeight) !== null && _b !== void 0 ? _b : rect.height)
|
|
7445
7475
|
};
|
|
7446
7476
|
}
|
|
7447
7477
|
|
|
@@ -9477,9 +9507,9 @@ const getXPathByElement = (element, root) => {
|
|
|
9477
9507
|
* Find all `ref` or `data-ref` elements inside HTMLElement
|
|
9478
9508
|
*/
|
|
9479
9509
|
const refs = (root) => {
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9510
|
+
if ('container' in root) {
|
|
9511
|
+
root = root.container;
|
|
9512
|
+
}
|
|
9483
9513
|
return $$('[ref],[data-ref]', root).reduce((def, child) => {
|
|
9484
9514
|
const key = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.attr)(child, '-ref');
|
|
9485
9515
|
if (key && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(key)) {
|
|
@@ -14023,7 +14053,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
14023
14053
|
view.o.showTooltip &&
|
|
14024
14054
|
!view.o.useNativeTooltip) {
|
|
14025
14055
|
view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
|
|
14026
|
-
// TODO Move it inside __open method. Now it is here
|
|
14056
|
+
// TODO Move it inside __open method. Now it is here because testcase failed with capturing
|
|
14027
14057
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
|
|
14028
14058
|
view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
14029
14059
|
capture: true
|
|
@@ -14039,6 +14069,7 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
|
|
|
14039
14069
|
const view = this.j;
|
|
14040
14070
|
view.e
|
|
14041
14071
|
.on(view.ow, 'scroll.tooltip', this.__hide)
|
|
14072
|
+
.on(view.ow, 'joditCloseDialog', this.__hide)
|
|
14042
14073
|
.on(view.container, 'mouseleave.tooltip', this.__hide)
|
|
14043
14074
|
.on([
|
|
14044
14075
|
'escape.tooltip',
|
|
@@ -16056,7 +16087,7 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_7__/* .UI
|
|
|
16056
16087
|
}
|
|
16057
16088
|
let pe = this.parentElement;
|
|
16058
16089
|
while (pe) {
|
|
16059
|
-
if (checkView(j)) {
|
|
16090
|
+
if (checkView(pe.j)) {
|
|
16060
16091
|
return;
|
|
16061
16092
|
}
|
|
16062
16093
|
if (pe.container.style.zIndex) {
|
|
@@ -18640,6 +18671,7 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18640
18671
|
* Fired when dialog box is started moving
|
|
18641
18672
|
*/
|
|
18642
18673
|
this.e.fire(this, 'startMove');
|
|
18674
|
+
this.e.fire('closeAllPopups');
|
|
18643
18675
|
}
|
|
18644
18676
|
}
|
|
18645
18677
|
onMouseMove(e) {
|
|
@@ -19968,6 +20000,9 @@ let DataProvider = class DataProvider {
|
|
|
19968
20000
|
this.o.permissions.data.source = source;
|
|
19969
20001
|
if (this.o.permissions.url) {
|
|
19970
20002
|
return this.get('permissions').then(resp => {
|
|
20003
|
+
if (this.parent.isInDestruct) {
|
|
20004
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.abort)();
|
|
20005
|
+
}
|
|
19971
20006
|
let process = this.o.permissions.process;
|
|
19972
20007
|
if (!process) {
|
|
19973
20008
|
process = this.o.ajax.process;
|
|
@@ -20586,10 +20621,18 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
20586
20621
|
this.__updateToolbarButtons();
|
|
20587
20622
|
this._dialog.open(this.browser, header);
|
|
20588
20623
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
20589
|
-
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this)
|
|
20624
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this)
|
|
20625
|
+
.then(resolve, reject)
|
|
20626
|
+
.finally(() => {
|
|
20627
|
+
var _a;
|
|
20628
|
+
if (this.isInDestruct) {
|
|
20629
|
+
return;
|
|
20630
|
+
}
|
|
20631
|
+
(_a = this === null || this === void 0 ? void 0 : this.e) === null || _a === void 0 ? void 0 : _a.fire('fileBrowserReady.filebrowser');
|
|
20632
|
+
});
|
|
20590
20633
|
})
|
|
20591
20634
|
.catch((e) => {
|
|
20592
|
-
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
20635
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
20593
20636
|
throw e;
|
|
20594
20637
|
}
|
|
20595
20638
|
});
|
|
@@ -22459,11 +22502,12 @@ const act = (el, className = 'jodti-image-editor_active') => el ? className : ''
|
|
|
22459
22502
|
const form = (editor, o) => {
|
|
22460
22503
|
const i = editor.i18n.bind(editor);
|
|
22461
22504
|
const switcher = (label, ref, active = true) => `<div class="jodit-form__group">
|
|
22462
|
-
<label
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22505
|
+
<label class="jodit-switcher-wrapper">
|
|
22506
|
+
<span class='jodit-switcher'>
|
|
22507
|
+
<input ${act(active, 'checked')} data-ref="${ref}" type="checkbox"/>
|
|
22508
|
+
<span class="jodit-switcher__slider"></span>
|
|
22509
|
+
</span>
|
|
22510
|
+
<span>${i(label)}</span>
|
|
22467
22511
|
</label>
|
|
22468
22512
|
</div>`;
|
|
22469
22513
|
return editor.create.fromHTML(`<form class="${jie} jodit-properties">
|
|
@@ -25544,11 +25588,13 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25544
25588
|
return;
|
|
25545
25589
|
}
|
|
25546
25590
|
buttonList.forEach(b => {
|
|
25591
|
+
b.state.variant = 'initial';
|
|
25547
25592
|
b.state.activated = false;
|
|
25548
25593
|
});
|
|
25549
25594
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('.jodit-tab', tabBox).forEach(a => {
|
|
25550
25595
|
a.classList.remove('jodit-tab_active');
|
|
25551
25596
|
});
|
|
25597
|
+
nameToTab[tab].button.state.variant = 'outline';
|
|
25552
25598
|
nameToTab[tab].button.state.activated = true;
|
|
25553
25599
|
nameToTab[tab].tab.classList.add('jodit-tab_active');
|
|
25554
25600
|
};
|
|
@@ -25577,7 +25623,7 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25577
25623
|
content.call(jodit);
|
|
25578
25624
|
}
|
|
25579
25625
|
if (state) {
|
|
25580
|
-
state.
|
|
25626
|
+
state.activeTab = name;
|
|
25581
25627
|
}
|
|
25582
25628
|
return false;
|
|
25583
25629
|
});
|
|
@@ -25593,20 +25639,20 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
25593
25639
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('a', buttons).forEach(a => {
|
|
25594
25640
|
a.style.width = (100 / tabCount).toFixed(10) + '%';
|
|
25595
25641
|
});
|
|
25596
|
-
const tab = !state || !state.
|
|
25642
|
+
const tab = !state || !state.activeTab || !nameToTab[state.activeTab]
|
|
25597
25643
|
? firstTab
|
|
25598
|
-
: state.
|
|
25644
|
+
: state.activeTab;
|
|
25599
25645
|
setActive(tab);
|
|
25600
25646
|
if (state) {
|
|
25601
|
-
let
|
|
25602
|
-
Object.defineProperty(state, '
|
|
25647
|
+
let activeTab = state.activeTab;
|
|
25648
|
+
Object.defineProperty(state, 'activeTab', {
|
|
25603
25649
|
configurable: true,
|
|
25604
25650
|
enumerable: false,
|
|
25605
25651
|
get() {
|
|
25606
|
-
return
|
|
25652
|
+
return activeTab;
|
|
25607
25653
|
},
|
|
25608
25654
|
set(value) {
|
|
25609
|
-
|
|
25655
|
+
activeTab = value;
|
|
25610
25656
|
setActive(value);
|
|
25611
25657
|
}
|
|
25612
25658
|
});
|
|
@@ -26021,7 +26067,7 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/
|
|
|
26021
26067
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
26022
26068
|
}
|
|
26023
26069
|
/** @override */
|
|
26024
|
-
afterInit(
|
|
26070
|
+
afterInit() { }
|
|
26025
26071
|
onGenerateAiAssistantForm(prompt) {
|
|
26026
26072
|
this.__dialog.open(this.__container, 'AI Assistant');
|
|
26027
26073
|
this.__container.setPrompt(prompt);
|
|
@@ -31902,9 +31948,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31902
31948
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31903
31949
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31904
31950
|
*/
|
|
31905
|
-
/**
|
|
31906
|
-
* @module plugins/image-properties
|
|
31907
|
-
*/
|
|
31908
31951
|
|
|
31909
31952
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
31910
31953
|
dialogWidth: 600,
|
|
@@ -31934,18 +31977,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
31934
31977
|
|
|
31935
31978
|
"use strict";
|
|
31936
31979
|
/* unused harmony export imageProperties */
|
|
31937
|
-
/* harmony import */ var
|
|
31980
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(31635);
|
|
31938
31981
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
|
|
31939
|
-
/* harmony import */ var
|
|
31940
|
-
/* harmony import */ var
|
|
31941
|
-
/* harmony import */ var
|
|
31942
|
-
/* harmony import */ var
|
|
31943
|
-
/* harmony import */ var
|
|
31944
|
-
/* harmony import */ var
|
|
31945
|
-
/* harmony import */ var
|
|
31946
|
-
/* harmony import */ var
|
|
31947
|
-
/* harmony import */ var
|
|
31948
|
-
/* harmony import */ var
|
|
31982
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23545);
|
|
31983
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51431);
|
|
31984
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9596);
|
|
31985
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67141);
|
|
31986
|
+
/* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64962);
|
|
31987
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61115);
|
|
31988
|
+
/* harmony import */ var _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91675);
|
|
31989
|
+
/* harmony import */ var _utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77137);
|
|
31990
|
+
/* harmony import */ var _utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91852);
|
|
31991
|
+
/* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61566);
|
|
31992
|
+
/* harmony import */ var _writers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(48570);
|
|
31949
31993
|
/*!
|
|
31950
31994
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
31951
31995
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -31977,55 +32021,93 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
31977
32021
|
* });
|
|
31978
32022
|
* ```
|
|
31979
32023
|
*/
|
|
31980
|
-
const normalSizeToString = (value) => {
|
|
31981
|
-
value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(value);
|
|
31982
|
-
return /^[0-9]+$/.test(value) ? value + 'px' : value;
|
|
31983
|
-
};
|
|
31984
|
-
const normalSizeFromString = (value) => {
|
|
31985
|
-
return /^[-+]?[0-9.]+px$/.test(value.toString())
|
|
31986
|
-
? parseFloat(value.toString())
|
|
31987
|
-
: value;
|
|
31988
|
-
};
|
|
31989
32024
|
/**
|
|
31990
32025
|
* Show dialog with image's options
|
|
31991
32026
|
*/
|
|
31992
|
-
class imageProperties extends
|
|
32027
|
+
class imageProperties extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
31993
32028
|
constructor() {
|
|
31994
32029
|
super(...arguments);
|
|
31995
32030
|
this.state = {
|
|
31996
32031
|
image: new Image(),
|
|
32032
|
+
sourceImage: new Image(),
|
|
31997
32033
|
get ratio() {
|
|
31998
|
-
|
|
32034
|
+
const { naturalWidth, naturalHeight } = this.image;
|
|
32035
|
+
return naturalWidth / naturalHeight || 1;
|
|
31999
32036
|
},
|
|
32000
32037
|
sizeIsLocked: true,
|
|
32001
|
-
marginIsLocked: true
|
|
32038
|
+
marginIsLocked: true,
|
|
32039
|
+
values: {
|
|
32040
|
+
style: '',
|
|
32041
|
+
imageSrc: '',
|
|
32042
|
+
borderRadius: 0,
|
|
32043
|
+
imageTitle: '',
|
|
32044
|
+
imageAlt: '',
|
|
32045
|
+
imageLink: '',
|
|
32046
|
+
imageLinkOpenInNewTab: false,
|
|
32047
|
+
imageWidth: 0,
|
|
32048
|
+
imageHeight: 0,
|
|
32049
|
+
marginTop: 0,
|
|
32050
|
+
marginRight: 0,
|
|
32051
|
+
marginBottom: 0,
|
|
32052
|
+
marginLeft: 0,
|
|
32053
|
+
classes: '',
|
|
32054
|
+
id: '',
|
|
32055
|
+
align: ''
|
|
32056
|
+
}
|
|
32002
32057
|
};
|
|
32003
32058
|
this.activeTabState = {
|
|
32004
|
-
|
|
32059
|
+
activeTab: 'Image'
|
|
32005
32060
|
};
|
|
32006
32061
|
}
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
const { marginRight, marginBottom, marginLeft, lockMargin } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
32012
|
-
[marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
32013
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'disabled', this.state.marginIsLocked || null);
|
|
32062
|
+
get form() {
|
|
32063
|
+
return new _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__/* .UIImagePropertiesForm */ .l(this.j, this.state, this.activeTabState, {
|
|
32064
|
+
openImageEditor: () => (0,_utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__/* .openImageEditorDialog */ .v)(this.j, this.state),
|
|
32065
|
+
openImagePopup: target => (0,_utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__/* .openImagePopup */ .q)(this.j, this.dialog, this.state, target)
|
|
32014
32066
|
});
|
|
32015
|
-
lockMargin.innerHTML = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Icon.get(this.state.marginIsLocked ? 'lock' : 'unlock');
|
|
32016
32067
|
}
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32021
|
-
const {
|
|
32022
|
-
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32068
|
+
/**
|
|
32069
|
+
* Dialog for form
|
|
32070
|
+
*/
|
|
32071
|
+
get dialog() {
|
|
32072
|
+
const { j } = this;
|
|
32073
|
+
const dialog = j.dlg({
|
|
32074
|
+
minWidth: Math.min(400, screen.width),
|
|
32075
|
+
minHeight: 590,
|
|
32076
|
+
buttons: ['fullsize', 'dialog.close']
|
|
32077
|
+
});
|
|
32078
|
+
const buttons = this.__buttons;
|
|
32079
|
+
buttons.check.onAction(() => {
|
|
32080
|
+
(0,_writers__WEBPACK_IMPORTED_MODULE_11__/* .applyValuesToImage */ .j)(j, this.state, this.state.sourceImage);
|
|
32081
|
+
j.synchronizeValues();
|
|
32082
|
+
dialog.close();
|
|
32083
|
+
});
|
|
32084
|
+
buttons.remove.onAction(() => {
|
|
32085
|
+
j.s.removeNode(this.state.sourceImage);
|
|
32086
|
+
dialog.close();
|
|
32087
|
+
});
|
|
32088
|
+
buttons.cancel.onAction(() => {
|
|
32089
|
+
dialog.close();
|
|
32090
|
+
});
|
|
32091
|
+
dialog.setHeader(j.i18n('Image properties'));
|
|
32092
|
+
dialog.setContent(this.form);
|
|
32093
|
+
dialog.setFooter([[buttons.cancel, buttons.remove], buttons.check]);
|
|
32094
|
+
j.e.on(dialog, 'afterClose', () => {
|
|
32095
|
+
if (this.state.image.parentNode &&
|
|
32096
|
+
j.o.image.selectImageAfterClose) {
|
|
32097
|
+
j.s.select(this.state.sourceImage);
|
|
32098
|
+
}
|
|
32099
|
+
});
|
|
32100
|
+
dialog.setSize(j.o.image.dialogWidth);
|
|
32101
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markOwner)(j, dialog.container);
|
|
32102
|
+
return dialog;
|
|
32103
|
+
}
|
|
32104
|
+
get __buttons() {
|
|
32105
|
+
const { j } = this;
|
|
32106
|
+
return {
|
|
32107
|
+
check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'ok', 'Apply', 'primary'),
|
|
32108
|
+
remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'bin', 'Delete'),
|
|
32109
|
+
cancel: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'cancel', 'Cancel')
|
|
32110
|
+
};
|
|
32029
32111
|
}
|
|
32030
32112
|
/**
|
|
32031
32113
|
* Open dialog editing image properties
|
|
@@ -32042,358 +32124,28 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32042
32124
|
* ```
|
|
32043
32125
|
*/
|
|
32044
32126
|
open() {
|
|
32045
|
-
this.
|
|
32046
|
-
this.
|
|
32047
|
-
this.j.e.fire('hidePopup');
|
|
32048
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.markOwner)(this.j, this.dialog.container);
|
|
32049
|
-
this.state.marginIsLocked = true;
|
|
32050
|
-
this.state.sizeIsLocked = true;
|
|
32051
|
-
this.onChangeMarginIsLocked();
|
|
32052
|
-
this.onChangeSizeIsLocked();
|
|
32053
|
-
this.updateValues();
|
|
32127
|
+
this.activeTabState.activeTab = 'Image';
|
|
32128
|
+
this.__lock();
|
|
32054
32129
|
this.dialog.open().setModal(true).setPosition();
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
makeForm() {
|
|
32061
|
-
if (this.dialog) {
|
|
32062
|
-
return;
|
|
32063
|
-
}
|
|
32064
|
-
this.dialog = this.j.dlg({
|
|
32065
|
-
minWidth: Math.min(400, screen.width),
|
|
32066
|
-
minHeight: 590,
|
|
32067
|
-
buttons: ['fullsize', 'dialog.close']
|
|
32068
|
-
});
|
|
32069
|
-
const editor = this.j, opt = editor.o, i18n = editor.i18n.bind(editor), buttons = {
|
|
32070
|
-
check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'ok', 'Apply', 'primary'),
|
|
32071
|
-
remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'bin', 'Delete')
|
|
32072
|
-
};
|
|
32073
|
-
editor.e.on(this.dialog, 'afterClose', () => {
|
|
32074
|
-
if (this.state.image.parentNode &&
|
|
32075
|
-
opt.image.selectImageAfterClose) {
|
|
32076
|
-
editor.s.select(this.state.image);
|
|
32077
|
-
}
|
|
32078
|
-
});
|
|
32079
|
-
buttons.remove.onAction(() => {
|
|
32080
|
-
editor.s.removeNode(this.state.image);
|
|
32081
|
-
this.dialog.close();
|
|
32082
|
-
});
|
|
32083
|
-
const { dialog } = this;
|
|
32084
|
-
dialog.setHeader(i18n('Image properties'));
|
|
32085
|
-
const mainForm = (0,_templates_form__WEBPACK_IMPORTED_MODULE_8__/* .form */ .Z)(editor);
|
|
32086
|
-
this.form = mainForm;
|
|
32087
|
-
dialog.setContent(mainForm);
|
|
32088
|
-
const { tabsBox } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
32089
|
-
if (tabsBox) {
|
|
32090
|
-
tabsBox.appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__/* .TabsWidget */ .Zg)(editor, [
|
|
32091
|
-
{ name: 'Image', content: (0,_templates_main_tab__WEBPACK_IMPORTED_MODULE_9__/* .mainTab */ .J)(editor) },
|
|
32092
|
-
{ name: 'Advanced', content: (0,_templates_position_tab__WEBPACK_IMPORTED_MODULE_10__/* .positionTab */ .b)(editor) }
|
|
32093
|
-
], this.activeTabState));
|
|
32094
|
-
}
|
|
32095
|
-
buttons.check.onAction(this.onApply);
|
|
32096
|
-
const { changeImage, editImage } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form);
|
|
32097
|
-
editor.e.on(changeImage, 'click', this.openImagePopup);
|
|
32098
|
-
if (opt.image.useImageEditor) {
|
|
32099
|
-
editor.e.on(editImage, 'click', this.openImageEditor);
|
|
32100
|
-
}
|
|
32101
|
-
const { lockSize, lockMargin, imageWidth, imageHeight } = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(mainForm);
|
|
32102
|
-
if (lockSize) {
|
|
32103
|
-
editor.e.on(lockSize, 'click', () => {
|
|
32104
|
-
this.state.sizeIsLocked = !this.state.sizeIsLocked;
|
|
32105
|
-
});
|
|
32106
|
-
}
|
|
32107
|
-
editor.e.on(lockMargin, 'click', (e) => {
|
|
32108
|
-
this.state.marginIsLocked = !this.state.marginIsLocked;
|
|
32109
|
-
e.preventDefault();
|
|
32110
|
-
});
|
|
32111
|
-
const changeSizes = (event) => {
|
|
32112
|
-
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
|
|
32113
|
-
return;
|
|
32114
|
-
}
|
|
32115
|
-
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32116
|
-
if (event.target === imageWidth) {
|
|
32117
|
-
imageHeight.value = Math.round(w / this.state.ratio).toString();
|
|
32118
|
-
}
|
|
32119
|
-
else {
|
|
32120
|
-
imageWidth.value = Math.round(h * this.state.ratio).toString();
|
|
32121
|
-
}
|
|
32122
|
-
};
|
|
32123
|
-
editor.e.on([imageWidth, imageHeight], 'change keydown mousedown paste', (event) => {
|
|
32124
|
-
if (!this.state.sizeIsLocked) {
|
|
32125
|
-
return;
|
|
32126
|
-
}
|
|
32127
|
-
editor.async.setTimeout(changeSizes.bind(this, event), {
|
|
32128
|
-
timeout: editor.defaultTimeout,
|
|
32129
|
-
label: 'image-properties-changeSize'
|
|
32130
|
-
});
|
|
32131
|
-
});
|
|
32132
|
-
dialog.setFooter([buttons.remove, buttons.check]);
|
|
32133
|
-
dialog.setSize(this.j.o.image.dialogWidth);
|
|
32134
|
-
}
|
|
32135
|
-
/**
|
|
32136
|
-
* Set input values from image
|
|
32137
|
-
*/
|
|
32138
|
-
updateValues() {
|
|
32139
|
-
const opt = this.j.o;
|
|
32140
|
-
const { image } = this.state;
|
|
32141
|
-
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);
|
|
32142
|
-
const updateLock = () => {
|
|
32143
|
-
lockMargin.checked = this.state.marginIsLocked;
|
|
32144
|
-
lockSize.checked = this.state.sizeIsLocked;
|
|
32145
|
-
}, updateAlign = () => {
|
|
32146
|
-
if (image.style.cssFloat &&
|
|
32147
|
-
['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
|
|
32148
|
-
align.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float');
|
|
32149
|
-
}
|
|
32150
|
-
else {
|
|
32151
|
-
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'display') === 'block' &&
|
|
32152
|
-
image.style.marginLeft === 'auto' &&
|
|
32153
|
-
image.style.marginRight === 'auto') {
|
|
32154
|
-
align.value = 'center';
|
|
32155
|
-
}
|
|
32156
|
-
}
|
|
32157
|
-
}, updateBorderRadius = () => {
|
|
32158
|
-
borderRadius.value = (parseInt(image.style.borderRadius || '0', 10) || '0').toString();
|
|
32159
|
-
}, updateId = () => {
|
|
32160
|
-
id.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id') || '';
|
|
32161
|
-
}, updateStyle = () => {
|
|
32162
|
-
style.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style') || '';
|
|
32163
|
-
}, updateClasses = () => {
|
|
32164
|
-
classes.value = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
32165
|
-
}, updateMargins = () => {
|
|
32166
|
-
if (!opt.image.editMargins) {
|
|
32167
|
-
return;
|
|
32168
|
-
}
|
|
32169
|
-
let equal = true, wasEmptyField = false;
|
|
32170
|
-
[marginTop, marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
32171
|
-
const id = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'data-ref') || '';
|
|
32172
|
-
let value = image.style.getPropertyValue((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.kebabCase)(id));
|
|
32173
|
-
if (!value) {
|
|
32174
|
-
wasEmptyField = true;
|
|
32175
|
-
elm.value = '';
|
|
32176
|
-
return;
|
|
32177
|
-
}
|
|
32178
|
-
if (/^[0-9]+(px)?$/.test(value)) {
|
|
32179
|
-
value = parseInt(value, 10);
|
|
32180
|
-
}
|
|
32181
|
-
elm.value = value.toString() || '';
|
|
32182
|
-
if ((wasEmptyField && elm.value) ||
|
|
32183
|
-
(equal &&
|
|
32184
|
-
id !== 'marginTop' &&
|
|
32185
|
-
elm.value !== marginTop.value)) {
|
|
32186
|
-
equal = false;
|
|
32187
|
-
}
|
|
32188
|
-
});
|
|
32189
|
-
this.state.marginIsLocked = equal;
|
|
32190
|
-
}, updateSizes = () => {
|
|
32191
|
-
const width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ||
|
|
32192
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) ||
|
|
32193
|
-
false, height = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ||
|
|
32194
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) ||
|
|
32195
|
-
false;
|
|
32196
|
-
imageWidth.value =
|
|
32197
|
-
width !== false
|
|
32198
|
-
? normalSizeFromString(width).toString()
|
|
32199
|
-
: image.offsetWidth.toString();
|
|
32200
|
-
imageHeight.value =
|
|
32201
|
-
height !== false
|
|
32202
|
-
? normalSizeFromString(height).toString()
|
|
32203
|
-
: image.offsetHeight.toString();
|
|
32204
|
-
this.state.sizeIsLocked = (() => {
|
|
32205
|
-
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) ||
|
|
32206
|
-
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
|
|
32207
|
-
return false;
|
|
32208
|
-
}
|
|
32209
|
-
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32210
|
-
return Math.abs(w - h * this.state.ratio) < 1;
|
|
32211
|
-
})();
|
|
32212
|
-
}, updateText = () => {
|
|
32213
|
-
imageTitle.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title') || '';
|
|
32214
|
-
imageAlt.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt') || '';
|
|
32215
|
-
const a = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', this.j.editor);
|
|
32216
|
-
if (a) {
|
|
32217
|
-
imageLink.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'href') || '';
|
|
32218
|
-
imageLinkOpenInNewTab.checked =
|
|
32219
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'target') === '_blank';
|
|
32220
|
-
}
|
|
32221
|
-
else {
|
|
32222
|
-
imageLink.value = '';
|
|
32223
|
-
imageLinkOpenInNewTab.checked = false;
|
|
32224
|
-
}
|
|
32225
|
-
}, updateSrc = () => {
|
|
32226
|
-
imageSrc.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '';
|
|
32227
|
-
if (imageViewSrc) {
|
|
32228
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(imageViewSrc, 'src', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '');
|
|
32229
|
-
}
|
|
32230
|
-
};
|
|
32231
|
-
updateLock();
|
|
32232
|
-
updateSrc();
|
|
32233
|
-
updateText();
|
|
32234
|
-
updateSizes();
|
|
32235
|
-
updateMargins();
|
|
32236
|
-
updateClasses();
|
|
32237
|
-
updateId();
|
|
32238
|
-
updateBorderRadius();
|
|
32239
|
-
updateAlign();
|
|
32240
|
-
updateStyle();
|
|
32241
|
-
}
|
|
32242
|
-
/**
|
|
32243
|
-
* Apply form's values to image
|
|
32244
|
-
*/
|
|
32245
|
-
onApply() {
|
|
32246
|
-
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);
|
|
32247
|
-
const opt = this.j.o;
|
|
32248
|
-
const { image } = this.state;
|
|
32249
|
-
// styles
|
|
32250
|
-
if (opt.image.editStyle) {
|
|
32251
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style', style.value || null);
|
|
32252
|
-
}
|
|
32253
|
-
// Src
|
|
32254
|
-
if (imageSrc.value) {
|
|
32255
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src', imageSrc.value);
|
|
32256
|
-
}
|
|
32257
|
-
else {
|
|
32258
|
-
jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(image);
|
|
32259
|
-
this.dialog.close();
|
|
32260
|
-
return;
|
|
32261
|
-
}
|
|
32262
|
-
// Border radius
|
|
32263
|
-
if (borderRadius.value !== '0' && /^[0-9]+$/.test(borderRadius.value)) {
|
|
32264
|
-
image.style.borderRadius = borderRadius.value + 'px';
|
|
32265
|
-
}
|
|
32266
|
-
else {
|
|
32267
|
-
image.style.borderRadius = '';
|
|
32268
|
-
}
|
|
32269
|
-
// Title
|
|
32270
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title', imageTitle.value || null);
|
|
32271
|
-
// Alt
|
|
32272
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt', imageAlt.value || null);
|
|
32273
|
-
// Link
|
|
32274
|
-
let link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', this.j.editor);
|
|
32275
|
-
if (imageLink.value) {
|
|
32276
|
-
if (!link) {
|
|
32277
|
-
link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.wrap(image, 'a', this.j.createInside);
|
|
32278
|
-
}
|
|
32279
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', imageLink.value);
|
|
32280
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'target', imageLinkOpenInNewTab.checked ? '_blank' : null);
|
|
32281
|
-
}
|
|
32282
|
-
else {
|
|
32283
|
-
if (link && link.parentNode) {
|
|
32284
|
-
link.parentNode.replaceChild(image, link);
|
|
32285
|
-
}
|
|
32286
|
-
}
|
|
32287
|
-
// Size
|
|
32288
|
-
if (imageWidth.value !== image.offsetWidth.toString() ||
|
|
32289
|
-
imageHeight.value !== image.offsetHeight.toString()) {
|
|
32290
|
-
const updatedtWidth = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageWidth.value)
|
|
32291
|
-
? normalSizeToString(imageWidth.value)
|
|
32292
|
-
: null;
|
|
32293
|
-
const updatedHeight = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageHeight.value)
|
|
32294
|
-
? normalSizeToString(imageHeight.value)
|
|
32295
|
-
: null;
|
|
32296
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
|
|
32297
|
-
width: updatedtWidth,
|
|
32298
|
-
height: updatedHeight
|
|
32299
|
-
});
|
|
32300
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ? updatedtWidth : null);
|
|
32301
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ? updatedHeight : null);
|
|
32302
|
-
}
|
|
32303
|
-
const margins = [marginTop, marginRight, marginBottom, marginLeft];
|
|
32304
|
-
if (opt.image.editMargins) {
|
|
32305
|
-
if (!this.state.marginIsLocked) {
|
|
32306
|
-
margins.forEach((margin) => {
|
|
32307
|
-
const side = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(margin, 'data-ref') || '';
|
|
32308
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, side, normalSizeToString(margin.value));
|
|
32309
|
-
});
|
|
32310
|
-
}
|
|
32311
|
-
else {
|
|
32312
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'margin', normalSizeToString(marginTop.value));
|
|
32313
|
-
}
|
|
32314
|
-
}
|
|
32315
|
-
if (opt.image.editClass) {
|
|
32316
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class', classes.value || null);
|
|
32317
|
-
}
|
|
32318
|
-
if (opt.image.editId) {
|
|
32319
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id', id.value || null);
|
|
32320
|
-
}
|
|
32321
|
-
if (opt.image.editAlign) {
|
|
32322
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(image, align.value);
|
|
32323
|
-
}
|
|
32324
|
-
this.j.synchronizeValues();
|
|
32325
|
-
this.dialog.close();
|
|
32326
|
-
}
|
|
32327
|
-
/**
|
|
32328
|
-
* Open image editor dialog
|
|
32329
|
-
*/
|
|
32330
|
-
openImageEditor() {
|
|
32331
|
-
const url = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src') || '', a = this.j.c.element('a'), loadExternal = () => {
|
|
32332
|
-
if (a.host !== location.host) {
|
|
32333
|
-
this.j.confirm('You can only edit your own images. Download this image on the host?', yes => {
|
|
32334
|
-
if (yes && this.j.uploader) {
|
|
32335
|
-
this.j.uploader.uploadRemoteImage(a.href.toString(), resp => {
|
|
32336
|
-
this.j.alert('The image has been successfully uploaded to the host!', () => {
|
|
32337
|
-
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(resp.newfilename)) {
|
|
32338
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', resp.baseurl +
|
|
32339
|
-
resp.newfilename);
|
|
32340
|
-
this.updateValues();
|
|
32341
|
-
}
|
|
32342
|
-
});
|
|
32343
|
-
}, error => {
|
|
32344
|
-
this.j.alert('There was an error loading %s', error.message);
|
|
32345
|
-
});
|
|
32346
|
-
}
|
|
32347
|
-
});
|
|
32348
|
-
return;
|
|
32130
|
+
this.async
|
|
32131
|
+
.promise((resolve, reject) => (0,_readers__WEBPACK_IMPORTED_MODULE_10__/* .readValuesFromImage */ .U)(this.j, this.state).then(resolve, reject))
|
|
32132
|
+
.catch((e) => {
|
|
32133
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
|
|
32134
|
+
this.dialog.message.error(e.message);
|
|
32349
32135
|
}
|
|
32350
|
-
};
|
|
32351
|
-
a.href = url;
|
|
32352
|
-
this.j.filebrowser.dataProvider
|
|
32353
|
-
.getPathByUrl(a.href.toString())
|
|
32354
|
-
.then(resp => {
|
|
32355
|
-
jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_5__/* .openImageEditor */ .B.call(this.j.filebrowser, a.href, resp.name, resp.path, resp.source, () => {
|
|
32356
|
-
const timestamp = new Date().getTime();
|
|
32357
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', url +
|
|
32358
|
-
(url.indexOf('?') !== -1 ? '' : '?') +
|
|
32359
|
-
'&_tmp=' +
|
|
32360
|
-
timestamp.toString());
|
|
32361
|
-
this.updateValues();
|
|
32362
|
-
}, error => {
|
|
32363
|
-
this.j.alert(error.message);
|
|
32364
|
-
});
|
|
32365
32136
|
})
|
|
32366
|
-
.
|
|
32367
|
-
|
|
32368
|
-
});
|
|
32137
|
+
.finally(() => this.__unlock());
|
|
32138
|
+
return false;
|
|
32369
32139
|
}
|
|
32370
|
-
|
|
32371
|
-
|
|
32372
|
-
|
|
32373
|
-
|
|
32374
|
-
|
|
32375
|
-
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
if (data.files && data.files.length) {
|
|
32380
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', data.baseurl + data.files[0]);
|
|
32381
|
-
}
|
|
32382
|
-
this.updateValues();
|
|
32383
|
-
popup.close();
|
|
32384
|
-
},
|
|
32385
|
-
filebrowser: (data) => {
|
|
32386
|
-
if (data &&
|
|
32387
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isArray)(data.files) &&
|
|
32388
|
-
data.files.length) {
|
|
32389
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src', data.files[0]);
|
|
32390
|
-
popup.close();
|
|
32391
|
-
this.updateValues();
|
|
32392
|
-
}
|
|
32393
|
-
}
|
|
32394
|
-
}, this.state.image, popup.close))
|
|
32395
|
-
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.position)(changeImage));
|
|
32396
|
-
event.stopPropagation();
|
|
32140
|
+
__lock() {
|
|
32141
|
+
this.dialog.lock();
|
|
32142
|
+
this.form.setMod('lock', true);
|
|
32143
|
+
Object.values(this.__buttons).forEach(b => (b.state.disabled = true));
|
|
32144
|
+
}
|
|
32145
|
+
__unlock() {
|
|
32146
|
+
this.dialog.unlock();
|
|
32147
|
+
this.form.setMod('lock', false);
|
|
32148
|
+
Object.values(this.__buttons).forEach(b => (b.state.disabled = false));
|
|
32397
32149
|
}
|
|
32398
32150
|
/** @override **/
|
|
32399
32151
|
afterInit(editor) {
|
|
@@ -32404,7 +32156,7 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32404
32156
|
.off(editor.editor, '.imageproperties')
|
|
32405
32157
|
.on(editor.editor, 'dblclick.imageproperties', (e) => {
|
|
32406
32158
|
const image = e.target;
|
|
32407
|
-
if (!
|
|
32159
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(image, 'img')) {
|
|
32408
32160
|
return;
|
|
32409
32161
|
}
|
|
32410
32162
|
if (editor.o.image.openOnDblClick) {
|
|
@@ -32412,7 +32164,8 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32412
32164
|
false) {
|
|
32413
32165
|
return;
|
|
32414
32166
|
}
|
|
32415
|
-
self.state.
|
|
32167
|
+
self.state.sourceImage = image;
|
|
32168
|
+
self.state.image = image.cloneNode(true);
|
|
32416
32169
|
if (!editor.o.readonly) {
|
|
32417
32170
|
e.stopImmediatePropagation();
|
|
32418
32171
|
e.preventDefault();
|
|
@@ -32426,206 +32179,1253 @@ class imageProperties extends jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin
|
|
|
32426
32179
|
});
|
|
32427
32180
|
})
|
|
32428
32181
|
.on('openImageProperties.imageproperties', (image) => {
|
|
32429
|
-
|
|
32182
|
+
self.state.sourceImage = image;
|
|
32183
|
+
this.state.image = image.cloneNode(true);
|
|
32430
32184
|
this.open();
|
|
32431
32185
|
});
|
|
32432
32186
|
}
|
|
32187
|
+
async onStateValuesImageSrcChange() {
|
|
32188
|
+
const { image, values } = this.state;
|
|
32189
|
+
if (!image.src) {
|
|
32190
|
+
return;
|
|
32191
|
+
}
|
|
32192
|
+
try {
|
|
32193
|
+
this.__lock();
|
|
32194
|
+
await image.decode();
|
|
32195
|
+
if (this.state.sizeIsLocked && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isNumeric)(values.imageWidth)) {
|
|
32196
|
+
const w = parseFloat(values.imageWidth.toString());
|
|
32197
|
+
values.imageHeight = Math.round(w / this.state.ratio);
|
|
32198
|
+
}
|
|
32199
|
+
this.j.e.fire('updateImageProperties.imageproperties', image);
|
|
32200
|
+
}
|
|
32201
|
+
catch (e) {
|
|
32202
|
+
this.j.alert(e.message);
|
|
32203
|
+
}
|
|
32204
|
+
finally {
|
|
32205
|
+
this.__unlock();
|
|
32206
|
+
}
|
|
32207
|
+
}
|
|
32433
32208
|
/** @override */
|
|
32434
32209
|
beforeDestruct(editor) {
|
|
32435
|
-
|
|
32210
|
+
var _a, _b, _c;
|
|
32211
|
+
Object.values((_a = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach(b => b.destruct());
|
|
32212
|
+
(_b = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
32213
|
+
(_c = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
|
|
32436
32214
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
32437
32215
|
}
|
|
32438
32216
|
}
|
|
32439
|
-
(0,
|
|
32440
|
-
|
|
32441
|
-
], imageProperties.prototype, "
|
|
32442
|
-
(0,
|
|
32443
|
-
|
|
32444
|
-
], imageProperties.prototype, "
|
|
32445
|
-
(0,
|
|
32446
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.
|
|
32447
|
-
], imageProperties.prototype, "
|
|
32448
|
-
(0,
|
|
32449
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.
|
|
32450
|
-
], imageProperties.prototype, "
|
|
32451
|
-
|
|
32452
|
-
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
32453
|
-
], imageProperties.prototype, "openImagePopup", null);
|
|
32454
|
-
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
|
|
32217
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32218
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32219
|
+
], imageProperties.prototype, "form", null);
|
|
32220
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32221
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32222
|
+
], imageProperties.prototype, "dialog", null);
|
|
32223
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32224
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
|
|
32225
|
+
], imageProperties.prototype, "__buttons", null);
|
|
32226
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
|
|
32227
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.image')
|
|
32228
|
+
], imageProperties.prototype, "onStateValuesImageSrcChange", null);
|
|
32229
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
|
|
32455
32230
|
|
|
32456
32231
|
|
|
32457
32232
|
/***/ }),
|
|
32458
32233
|
|
|
32459
|
-
/***/
|
|
32234
|
+
/***/ 81091:
|
|
32460
32235
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32461
32236
|
|
|
32462
32237
|
"use strict";
|
|
32463
32238
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32464
|
-
/* harmony export */
|
|
32239
|
+
/* harmony export */ g: function() { return /* binding */ readAlign; }
|
|
32465
32240
|
/* harmony export */ });
|
|
32466
|
-
/* harmony import */ var
|
|
32241
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4401);
|
|
32242
|
+
/*!
|
|
32243
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32244
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32245
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32246
|
+
*/
|
|
32247
|
+
|
|
32248
|
+
/** @private */
|
|
32249
|
+
function readAlign(image, values) {
|
|
32250
|
+
// Align
|
|
32251
|
+
if (image.style.cssFloat &&
|
|
32252
|
+
['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
|
|
32253
|
+
values.align = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'float');
|
|
32254
|
+
}
|
|
32255
|
+
else {
|
|
32256
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'display') === 'block' &&
|
|
32257
|
+
image.style.marginLeft === 'auto' &&
|
|
32258
|
+
image.style.marginRight === 'auto') {
|
|
32259
|
+
values.align = 'center';
|
|
32260
|
+
}
|
|
32261
|
+
else {
|
|
32262
|
+
values.align = '';
|
|
32263
|
+
}
|
|
32264
|
+
}
|
|
32265
|
+
}
|
|
32266
|
+
|
|
32267
|
+
|
|
32268
|
+
/***/ }),
|
|
32269
|
+
|
|
32270
|
+
/***/ 61566:
|
|
32271
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32272
|
+
|
|
32273
|
+
"use strict";
|
|
32274
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32275
|
+
/* harmony export */ U: function() { return /* binding */ readValuesFromImage; }
|
|
32276
|
+
/* harmony export */ });
|
|
32277
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
32278
|
+
/* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81091);
|
|
32279
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33756);
|
|
32280
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51462);
|
|
32281
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60225);
|
|
32282
|
+
/*!
|
|
32283
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32284
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32285
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32286
|
+
*/
|
|
32287
|
+
|
|
32288
|
+
|
|
32289
|
+
|
|
32290
|
+
|
|
32291
|
+
|
|
32292
|
+
/**
|
|
32293
|
+
* Read values from image and set it to state
|
|
32294
|
+
* @private
|
|
32295
|
+
*/
|
|
32296
|
+
async function readValuesFromImage(j, state) {
|
|
32297
|
+
const { sourceImage: image, values } = state;
|
|
32298
|
+
(0,_align__WEBPACK_IMPORTED_MODULE_3__/* .readAlign */ .g)(image, values);
|
|
32299
|
+
// Border radius
|
|
32300
|
+
values.borderRadius = parseInt(image.style.borderRadius || '0', 10) || 0;
|
|
32301
|
+
// Id
|
|
32302
|
+
values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'id') || '';
|
|
32303
|
+
// Title
|
|
32304
|
+
values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'title') || '';
|
|
32305
|
+
// Alt
|
|
32306
|
+
values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'alt') || '';
|
|
32307
|
+
// Style
|
|
32308
|
+
values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'style') || '';
|
|
32309
|
+
// Classes
|
|
32310
|
+
values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
|
|
32311
|
+
// Margins
|
|
32312
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_4__/* .readMargins */ .E)(image, values, state);
|
|
32313
|
+
// Link
|
|
32314
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_1__/* .readLink */ .X)(state, j, values);
|
|
32315
|
+
// Src
|
|
32316
|
+
values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'src') || '';
|
|
32317
|
+
// Image size
|
|
32318
|
+
return (0,_size__WEBPACK_IMPORTED_MODULE_2__/* .readSizes */ .P)(image, values, state);
|
|
32319
|
+
}
|
|
32320
|
+
|
|
32321
|
+
|
|
32322
|
+
/***/ }),
|
|
32323
|
+
|
|
32324
|
+
/***/ 33756:
|
|
32325
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32326
|
+
|
|
32327
|
+
"use strict";
|
|
32328
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32329
|
+
/* harmony export */ X: function() { return /* binding */ readLink; }
|
|
32330
|
+
/* harmony export */ });
|
|
32331
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
32332
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
|
|
32333
|
+
/*!
|
|
32334
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32335
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32336
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32337
|
+
*/
|
|
32338
|
+
|
|
32339
|
+
|
|
32340
|
+
/** @private */
|
|
32341
|
+
function readLink(state, j, values) {
|
|
32342
|
+
const a = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(state.sourceImage, 'a', j.editor);
|
|
32343
|
+
if (a) {
|
|
32344
|
+
values.imageLink = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'href') || '';
|
|
32345
|
+
values.imageLinkOpenInNewTab = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'target') === '_blank';
|
|
32346
|
+
}
|
|
32347
|
+
else {
|
|
32348
|
+
values.imageLink = '';
|
|
32349
|
+
values.imageLinkOpenInNewTab = false;
|
|
32350
|
+
}
|
|
32351
|
+
}
|
|
32352
|
+
|
|
32353
|
+
|
|
32354
|
+
/***/ }),
|
|
32355
|
+
|
|
32356
|
+
/***/ 51462:
|
|
32357
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32358
|
+
|
|
32359
|
+
"use strict";
|
|
32360
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32361
|
+
/* harmony export */ E: function() { return /* binding */ readMargins; }
|
|
32362
|
+
/* harmony export */ });
|
|
32363
|
+
/* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18014);
|
|
32467
32364
|
/*!
|
|
32468
32365
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32469
32366
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32470
32367
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32471
32368
|
*/
|
|
32472
32369
|
|
|
32473
|
-
|
|
32474
|
-
|
|
32475
|
-
|
|
32370
|
+
/** @private */
|
|
32371
|
+
function readMargins(image, values, state) {
|
|
32372
|
+
// Margins
|
|
32373
|
+
let equal = true, wasEmptyField = false;
|
|
32374
|
+
['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(id => {
|
|
32375
|
+
let value = image.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__/* .kebabCase */ .k)(id));
|
|
32376
|
+
if (!value) {
|
|
32377
|
+
wasEmptyField = true;
|
|
32378
|
+
values[id] = 0;
|
|
32379
|
+
return;
|
|
32380
|
+
}
|
|
32381
|
+
if (/^[0-9]+(px)?$/.test(value)) {
|
|
32382
|
+
value = parseInt(value, 10);
|
|
32383
|
+
}
|
|
32384
|
+
values[id] = value;
|
|
32385
|
+
if ((wasEmptyField && values[id]) ||
|
|
32386
|
+
(equal && id !== 'marginTop' && values[id] !== values.marginTop)) {
|
|
32387
|
+
equal = false;
|
|
32388
|
+
}
|
|
32389
|
+
});
|
|
32390
|
+
state.marginIsLocked = equal;
|
|
32391
|
+
}
|
|
32392
|
+
|
|
32393
|
+
|
|
32394
|
+
/***/ }),
|
|
32395
|
+
|
|
32396
|
+
/***/ 60225:
|
|
32397
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32398
|
+
|
|
32399
|
+
"use strict";
|
|
32400
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32401
|
+
/* harmony export */ P: function() { return /* binding */ readSizes; }
|
|
32402
|
+
/* harmony export */ });
|
|
32403
|
+
/* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59372);
|
|
32404
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
32405
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4401);
|
|
32406
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
|
|
32407
|
+
/*!
|
|
32408
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32409
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32410
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32411
|
+
*/
|
|
32412
|
+
|
|
32413
|
+
|
|
32414
|
+
|
|
32415
|
+
|
|
32416
|
+
/** @private */
|
|
32417
|
+
async function readSizes(image, values, state) {
|
|
32418
|
+
await image.decode();
|
|
32419
|
+
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;
|
|
32420
|
+
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;
|
|
32421
|
+
values.imageWidth =
|
|
32422
|
+
width !== false
|
|
32423
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(width)
|
|
32424
|
+
: image.offsetWidth || image.naturalWidth;
|
|
32425
|
+
values.imageHeight =
|
|
32426
|
+
height !== false
|
|
32427
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(height)
|
|
32428
|
+
: image.offsetHeight || image.naturalHeight;
|
|
32429
|
+
const { imageWidth, imageHeight } = values;
|
|
32430
|
+
const w = parseFloat(imageWidth.toString());
|
|
32431
|
+
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)) {
|
|
32432
|
+
state.sizeIsLocked = false;
|
|
32433
|
+
return;
|
|
32434
|
+
}
|
|
32435
|
+
if (height === false) {
|
|
32436
|
+
values.imageHeight = Math.round(w / state.ratio);
|
|
32437
|
+
state.sizeIsLocked = true;
|
|
32438
|
+
return;
|
|
32439
|
+
}
|
|
32440
|
+
const h = parseFloat(imageHeight.toString());
|
|
32441
|
+
state.sizeIsLocked = Math.abs(w - h * state.ratio) < 1;
|
|
32442
|
+
}
|
|
32443
|
+
|
|
32444
|
+
|
|
32445
|
+
/***/ }),
|
|
32446
|
+
|
|
32447
|
+
/***/ 91675:
|
|
32448
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32449
|
+
|
|
32450
|
+
"use strict";
|
|
32451
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32452
|
+
/* harmony export */ l: function() { return /* binding */ UIImagePropertiesForm; }
|
|
32453
|
+
/* harmony export */ });
|
|
32454
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
32455
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
|
|
32456
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12222);
|
|
32457
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9596);
|
|
32458
|
+
/* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1530);
|
|
32459
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80004);
|
|
32460
|
+
/* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21391);
|
|
32461
|
+
/* harmony import */ var _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26282);
|
|
32462
|
+
/* harmony import */ var _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26180);
|
|
32463
|
+
/*!
|
|
32464
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32465
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32466
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32467
|
+
*/
|
|
32468
|
+
|
|
32469
|
+
|
|
32470
|
+
|
|
32471
|
+
|
|
32472
|
+
|
|
32473
|
+
|
|
32474
|
+
|
|
32475
|
+
|
|
32476
|
+
|
|
32477
|
+
|
|
32478
|
+
/** @private */
|
|
32479
|
+
let UIImagePropertiesForm = class UIImagePropertiesForm extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__/* .UIGroup */ .U {
|
|
32480
|
+
className() {
|
|
32481
|
+
return 'UIImagePropertiesForm';
|
|
32482
|
+
}
|
|
32483
|
+
appendChildToContainer() { }
|
|
32484
|
+
getElm(elementName) {
|
|
32485
|
+
const selfElm = super.getElm(elementName);
|
|
32486
|
+
if (selfElm) {
|
|
32487
|
+
return selfElm;
|
|
32488
|
+
}
|
|
32489
|
+
for (const child of this.elements) {
|
|
32490
|
+
const elm = child.getElm(elementName);
|
|
32491
|
+
if (elm) {
|
|
32492
|
+
return elm;
|
|
32493
|
+
}
|
|
32494
|
+
}
|
|
32495
|
+
return null;
|
|
32496
|
+
}
|
|
32497
|
+
constructor(jodit, state, activeTabState, handlers) {
|
|
32498
|
+
super(jodit);
|
|
32499
|
+
this.state = state;
|
|
32500
|
+
this.handlers = handlers;
|
|
32501
|
+
this.__mainTab = new _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__/* .UIImageMainTab */ .k(this.jodit, this.state, this.handlers);
|
|
32502
|
+
this.__positionTab = new _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__/* .UIImagePositionTab */ ._(this.jodit, this.state, this.handlers);
|
|
32503
|
+
this.getElm('tabsBox').appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__/* .TabsWidget */ .Zg)(jodit, [
|
|
32504
|
+
{ name: 'Image', content: this.__mainTab },
|
|
32505
|
+
{ name: 'Advanced', content: this.__positionTab }
|
|
32506
|
+
], activeTabState));
|
|
32507
|
+
this.setMod('lock-size', this.state.sizeIsLocked);
|
|
32508
|
+
this.append(this.__mainTab).append(this.__positionTab);
|
|
32509
|
+
}
|
|
32510
|
+
render() {
|
|
32511
|
+
return `<form>
|
|
32476
32512
|
<div class="jodit-grid jodit-grid_xs-column">
|
|
32477
32513
|
<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
|
|
32478
|
-
<div class="
|
|
32479
|
-
<div
|
|
32480
|
-
<img
|
|
32514
|
+
<div class="&__view-box">
|
|
32515
|
+
<div class="&__imageView">
|
|
32516
|
+
<img class="&__imageViewSrc" src="" alt=""/>
|
|
32481
32517
|
</div>
|
|
32482
|
-
<div
|
|
32483
|
-
<input
|
|
32484
|
-
<a
|
|
32485
|
-
<input
|
|
32518
|
+
<div class="jodit-form__group &__imageSizes">
|
|
32519
|
+
<input type="text" class="jodit-input &__imageWidth"/>
|
|
32520
|
+
<a class="&__lockSize">${jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get('lock')}</a>
|
|
32521
|
+
<input type="text" class="&__imageHeight jodit-input"/>
|
|
32486
32522
|
</div>
|
|
32487
32523
|
</div>
|
|
32488
32524
|
</div>
|
|
32489
|
-
<div
|
|
32525
|
+
<div class="jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox"></div>
|
|
32490
32526
|
</div>
|
|
32491
|
-
</form
|
|
32492
|
-
}
|
|
32527
|
+
</form>`;
|
|
32528
|
+
}
|
|
32529
|
+
onChangeSizeIsLocked() {
|
|
32530
|
+
const lockSize = this.getElm('lockSize');
|
|
32531
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32532
|
+
lockSize.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get(this.state.sizeIsLocked ? 'lock' : 'unlock');
|
|
32533
|
+
this.setMod('lock-size', this.state.sizeIsLocked);
|
|
32534
|
+
this.j.e.fire(imageWidth, 'change');
|
|
32535
|
+
}
|
|
32536
|
+
onLockSizeClick() {
|
|
32537
|
+
this.state.sizeIsLocked = !this.state.sizeIsLocked;
|
|
32538
|
+
}
|
|
32539
|
+
onStateValuesSizeChange() {
|
|
32540
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32541
|
+
const imageHeight = this.getElm('imageHeight');
|
|
32542
|
+
if (imageWidth !== this.j.od.activeElement) {
|
|
32543
|
+
imageWidth.value = this.state.values.imageWidth.toString();
|
|
32544
|
+
}
|
|
32545
|
+
if (imageHeight !== this.j.od.activeElement) {
|
|
32546
|
+
imageHeight.value = this.state.values.imageHeight.toString();
|
|
32547
|
+
}
|
|
32548
|
+
}
|
|
32549
|
+
onImageWidthChange(e) {
|
|
32550
|
+
const imageWidth = this.getElm('imageWidth');
|
|
32551
|
+
const imageHeight = this.getElm('imageHeight');
|
|
32552
|
+
if (!this.state.sizeIsLocked ||
|
|
32553
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageWidth.value) ||
|
|
32554
|
+
!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageHeight.value)) {
|
|
32555
|
+
this.state.values.imageWidth = imageWidth.value;
|
|
32556
|
+
this.state.values.imageHeight = imageHeight.value;
|
|
32557
|
+
return;
|
|
32558
|
+
}
|
|
32559
|
+
const w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
|
|
32560
|
+
if (e.target === imageWidth) {
|
|
32561
|
+
this.state.values.imageWidth = w;
|
|
32562
|
+
this.state.values.imageHeight = Math.round(w / this.state.ratio);
|
|
32563
|
+
}
|
|
32564
|
+
else {
|
|
32565
|
+
this.state.values.imageWidth = Math.round(h * this.state.ratio);
|
|
32566
|
+
this.state.values.imageHeight = h;
|
|
32567
|
+
}
|
|
32568
|
+
}
|
|
32569
|
+
onStateValuesImageSrcChange() {
|
|
32570
|
+
const { imageSrc } = this.state.values;
|
|
32571
|
+
if (!imageSrc) {
|
|
32572
|
+
return;
|
|
32573
|
+
}
|
|
32574
|
+
const imageViewSrc = this.getElm('imageViewSrc');
|
|
32575
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.attr)(imageViewSrc, 'src', imageSrc);
|
|
32576
|
+
const image = new Image();
|
|
32577
|
+
image.src = imageSrc;
|
|
32578
|
+
this.state.image = image;
|
|
32579
|
+
}
|
|
32580
|
+
hideFieldByOptions() {
|
|
32581
|
+
const opt = this.j.o.image;
|
|
32582
|
+
[
|
|
32583
|
+
['editSize', 'imageSizes'],
|
|
32584
|
+
['showPreview', 'imageView']
|
|
32585
|
+
].forEach(([optKey, elmKey]) => {
|
|
32586
|
+
const elm = this.getElm(elmKey);
|
|
32587
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
32588
|
+
});
|
|
32589
|
+
}
|
|
32590
|
+
};
|
|
32591
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32592
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32593
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.sizeIsLocked')
|
|
32594
|
+
], UIImagePropertiesForm.prototype, "onChangeSizeIsLocked", null);
|
|
32595
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32596
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('lockSize:click')
|
|
32597
|
+
], UIImagePropertiesForm.prototype, "onLockSizeClick", null);
|
|
32598
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32599
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32600
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)(['state.values.imageWidth', 'state.values.imageHeight'])
|
|
32601
|
+
], UIImagePropertiesForm.prototype, "onStateValuesSizeChange", null);
|
|
32602
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32603
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([
|
|
32604
|
+
'imageWidth:change',
|
|
32605
|
+
'imageHeight:change',
|
|
32606
|
+
'imageWidth:keydown',
|
|
32607
|
+
'imageHeight:keydown',
|
|
32608
|
+
'imageWidth:mousedown',
|
|
32609
|
+
'imageHeight:mousedown',
|
|
32610
|
+
'imageWidth:paste',
|
|
32611
|
+
'imageHeight:paste'
|
|
32612
|
+
]),
|
|
32613
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.debounce)()
|
|
32614
|
+
], UIImagePropertiesForm.prototype, "onImageWidthChange", null);
|
|
32615
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32616
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
|
|
32617
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.values.imageSrc')
|
|
32618
|
+
], UIImagePropertiesForm.prototype, "onStateValuesImageSrcChange", null);
|
|
32619
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32620
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready')
|
|
32621
|
+
], UIImagePropertiesForm.prototype, "hideFieldByOptions", null);
|
|
32622
|
+
UIImagePropertiesForm = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
32623
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__/* .component */ .s
|
|
32624
|
+
], UIImagePropertiesForm);
|
|
32625
|
+
|
|
32493
32626
|
|
|
32494
32627
|
|
|
32495
32628
|
/***/ }),
|
|
32496
32629
|
|
|
32497
|
-
/***/
|
|
32630
|
+
/***/ 26282:
|
|
32498
32631
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32499
32632
|
|
|
32500
32633
|
"use strict";
|
|
32501
32634
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32502
|
-
/* harmony export */
|
|
32635
|
+
/* harmony export */ k: function() { return /* binding */ UIImageMainTab; }
|
|
32503
32636
|
/* harmony export */ });
|
|
32504
|
-
/* harmony import */ var
|
|
32637
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
|
|
32638
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12222);
|
|
32639
|
+
/* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
|
|
32640
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
|
|
32641
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
|
|
32642
|
+
/* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1530);
|
|
32505
32643
|
/*!
|
|
32506
32644
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32507
32645
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32508
32646
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32509
32647
|
*/
|
|
32510
32648
|
|
|
32511
|
-
|
|
32512
|
-
|
|
32513
|
-
|
|
32514
|
-
|
|
32649
|
+
|
|
32650
|
+
|
|
32651
|
+
|
|
32652
|
+
|
|
32653
|
+
|
|
32654
|
+
/** @private */
|
|
32655
|
+
let UIImageMainTab = class UIImageMainTab extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__/* .UIGroup */ .U {
|
|
32656
|
+
className() {
|
|
32657
|
+
return 'UIImageMainTab';
|
|
32658
|
+
}
|
|
32659
|
+
appendChildToContainer() {
|
|
32660
|
+
// Do nothing
|
|
32661
|
+
}
|
|
32662
|
+
constructor(view, state, handlers) {
|
|
32663
|
+
super(view);
|
|
32664
|
+
this.state = state;
|
|
32665
|
+
this.handlers = handlers;
|
|
32666
|
+
}
|
|
32667
|
+
render() {
|
|
32668
|
+
return `<div class="jodit-form__group &__editSrc">
|
|
32669
|
+
<label>~Src~</label>
|
|
32515
32670
|
<div class="jodit-input_group">
|
|
32516
|
-
<input
|
|
32517
|
-
<div
|
|
32518
|
-
|
|
32519
|
-
|
|
32520
|
-
>
|
|
32521
|
-
<a
|
|
32522
|
-
data-ref="changeImage"
|
|
32523
|
-
class="jodit-button"
|
|
32524
|
-
>${gi('image')}</a>
|
|
32525
|
-
<a
|
|
32526
|
-
data-ref="editImage"
|
|
32527
|
-
class="jodit-button"
|
|
32528
|
-
style="${hasEditor ? '' : 'display: none'}"
|
|
32529
|
-
>${gi('crop')}</a>
|
|
32671
|
+
<input class="jodit-input &__imageSrc" type="text"/>
|
|
32672
|
+
<div class="jodit-input_group-buttons &__fixImage">
|
|
32673
|
+
<a class="jodit-button &__changeImage">*image*</a>
|
|
32674
|
+
<a class="jodit-button &__editImage">*crop*</a>
|
|
32530
32675
|
</div>
|
|
32531
32676
|
</div>
|
|
32532
32677
|
</div>
|
|
32533
|
-
<div
|
|
32534
|
-
<label
|
|
32535
|
-
<input
|
|
32678
|
+
<div class="jodit-form__group &__editTitle">
|
|
32679
|
+
<label>~Title~</label>
|
|
32680
|
+
<input type="text" class="jodit-input &__imageTitle"/>
|
|
32536
32681
|
</div>
|
|
32537
|
-
<div
|
|
32538
|
-
<label
|
|
32539
|
-
<input
|
|
32682
|
+
<div class="jodit-form__group &__editAlt">
|
|
32683
|
+
<label>~Alternative~</label>
|
|
32684
|
+
<input type="text" class="jodit-input &__imageAlt"/>
|
|
32540
32685
|
</div>
|
|
32541
|
-
<div
|
|
32542
|
-
<label
|
|
32543
|
-
<input
|
|
32686
|
+
<div class="jodit-form__group &__editLink">
|
|
32687
|
+
<label>~Link~</label>
|
|
32688
|
+
<input type="text" class="jodit-input &__imageLink"/>
|
|
32544
32689
|
</div>
|
|
32545
|
-
<div
|
|
32690
|
+
<div class="jodit-form__group &__editLinkTarget">
|
|
32546
32691
|
<label class="jodit_vertical_middle">
|
|
32547
|
-
<input
|
|
32548
|
-
<span
|
|
32692
|
+
<input type="checkbox" class="jodit-checkbox &__imageLinkOpenInNewTab"/>
|
|
32693
|
+
<span>~Open link in new tab~</span>
|
|
32549
32694
|
</label>
|
|
32550
|
-
</div
|
|
32551
|
-
}
|
|
32695
|
+
</div>`;
|
|
32696
|
+
}
|
|
32697
|
+
async onStateImageSrcChange() {
|
|
32698
|
+
const imageSrc = this.getElm('imageSrc');
|
|
32699
|
+
imageSrc.value = this.state.values.imageSrc;
|
|
32700
|
+
}
|
|
32701
|
+
onImageSrcChange() {
|
|
32702
|
+
this.state.values.imageSrc = this.getElm('imageSrc').value;
|
|
32703
|
+
}
|
|
32704
|
+
/**
|
|
32705
|
+
* Open image editor
|
|
32706
|
+
*/
|
|
32707
|
+
onEditImageClick(e) {
|
|
32708
|
+
this.handlers.openImageEditor();
|
|
32709
|
+
e.stopPropagation();
|
|
32710
|
+
}
|
|
32711
|
+
/**
|
|
32712
|
+
* Open popup with filebrowser/uploader buttons for image
|
|
32713
|
+
*/
|
|
32714
|
+
onChangeImageClick(e) {
|
|
32715
|
+
this.handlers.openImagePopup(this.getElm('changeImage'));
|
|
32716
|
+
e.stopPropagation();
|
|
32717
|
+
}
|
|
32718
|
+
onStateTitleChange() {
|
|
32719
|
+
const title = this.getElm('imageTitle');
|
|
32720
|
+
title.value = this.state.values.imageTitle;
|
|
32721
|
+
}
|
|
32722
|
+
onTitleChange() {
|
|
32723
|
+
this.state.values.imageTitle = this.getElm('imageTitle').value;
|
|
32724
|
+
}
|
|
32725
|
+
onStateAltChange() {
|
|
32726
|
+
const alt = this.getElm('imageAlt');
|
|
32727
|
+
alt.value = this.state.values.imageAlt;
|
|
32728
|
+
}
|
|
32729
|
+
onAltChange() {
|
|
32730
|
+
this.state.values.imageAlt = this.getElm('imageAlt').value;
|
|
32731
|
+
}
|
|
32732
|
+
onStateImageLinkChange() {
|
|
32733
|
+
const imageLink = this.getElm('imageLink');
|
|
32734
|
+
imageLink.value = this.state.values.imageLink;
|
|
32735
|
+
}
|
|
32736
|
+
onImageLinkChange() {
|
|
32737
|
+
this.state.values.imageLink = this.getElm('imageLink').value;
|
|
32738
|
+
}
|
|
32739
|
+
onStateImageLinkOpenInNewTabChange() {
|
|
32740
|
+
const imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab');
|
|
32741
|
+
imageLinkOpenInNewTab.checked = this.state.values.imageLinkOpenInNewTab;
|
|
32742
|
+
}
|
|
32743
|
+
onImageLinkOpenInNewTabChange() {
|
|
32744
|
+
this.state.values.imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab').checked;
|
|
32745
|
+
}
|
|
32746
|
+
hideFieldByOptions() {
|
|
32747
|
+
const o = this.j.o;
|
|
32748
|
+
const opt = o.image;
|
|
32749
|
+
[
|
|
32750
|
+
['editSrc', 'editSrc'],
|
|
32751
|
+
['editTitle', 'editTitle'],
|
|
32752
|
+
['editAlt', 'editAlt'],
|
|
32753
|
+
['editLink', 'editLink'],
|
|
32754
|
+
['editLink', 'editLinkTarget'],
|
|
32755
|
+
['useImageEditor', 'editImage']
|
|
32756
|
+
].forEach(([optKey, elmKey]) => {
|
|
32757
|
+
const elm = this.getElm(elmKey);
|
|
32758
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
32759
|
+
});
|
|
32760
|
+
const changeImage = this.getElm('changeImage');
|
|
32761
|
+
const needShowChangeImage = Boolean(o.filebrowser.ajax.url || o.uploader.url);
|
|
32762
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(changeImage, 'display', needShowChangeImage ? null : 'none');
|
|
32763
|
+
const editImage = this.getElm('editImage');
|
|
32764
|
+
const needShowEditImage = Boolean(o.filebrowser.ajax.url) && opt.useImageEditor;
|
|
32765
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(editImage, 'display', needShowEditImage ? null : 'none');
|
|
32766
|
+
const fixImage = this.getElm('fixImage');
|
|
32767
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(fixImage, 'display', needShowChangeImage || needShowEditImage ? null : 'none');
|
|
32768
|
+
}
|
|
32769
|
+
};
|
|
32770
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32771
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageSrc')
|
|
32772
|
+
], UIImageMainTab.prototype, "onStateImageSrcChange", null);
|
|
32773
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32774
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageSrc:change')
|
|
32775
|
+
], UIImageMainTab.prototype, "onImageSrcChange", null);
|
|
32776
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32777
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('editImage:click')
|
|
32778
|
+
], UIImageMainTab.prototype, "onEditImageClick", null);
|
|
32779
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32780
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('changeImage:click')
|
|
32781
|
+
], UIImageMainTab.prototype, "onChangeImageClick", null);
|
|
32782
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32783
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageTitle')
|
|
32784
|
+
], UIImageMainTab.prototype, "onStateTitleChange", null);
|
|
32785
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32786
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageTitle:change')
|
|
32787
|
+
], UIImageMainTab.prototype, "onTitleChange", null);
|
|
32788
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32789
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageAlt')
|
|
32790
|
+
], UIImageMainTab.prototype, "onStateAltChange", null);
|
|
32791
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32792
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageAlt:change')
|
|
32793
|
+
], UIImageMainTab.prototype, "onAltChange", null);
|
|
32794
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32795
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLink')
|
|
32796
|
+
], UIImageMainTab.prototype, "onStateImageLinkChange", null);
|
|
32797
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32798
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLink:change')
|
|
32799
|
+
], UIImageMainTab.prototype, "onImageLinkChange", null);
|
|
32800
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32801
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLinkOpenInNewTab')
|
|
32802
|
+
], UIImageMainTab.prototype, "onStateImageLinkOpenInNewTabChange", null);
|
|
32803
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32804
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLinkOpenInNewTab:change')
|
|
32805
|
+
], UIImageMainTab.prototype, "onImageLinkOpenInNewTabChange", null);
|
|
32806
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32807
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
|
|
32808
|
+
], UIImageMainTab.prototype, "hideFieldByOptions", null);
|
|
32809
|
+
UIImageMainTab = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
32810
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__/* .component */ .s
|
|
32811
|
+
], UIImageMainTab);
|
|
32812
|
+
|
|
32552
32813
|
|
|
32553
32814
|
|
|
32554
32815
|
/***/ }),
|
|
32555
32816
|
|
|
32556
|
-
/***/
|
|
32817
|
+
/***/ 26180:
|
|
32557
32818
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
32558
32819
|
|
|
32559
32820
|
"use strict";
|
|
32560
32821
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32561
|
-
/* harmony export */
|
|
32822
|
+
/* harmony export */ _: function() { return /* binding */ UIImagePositionTab; }
|
|
32562
32823
|
/* harmony export */ });
|
|
32563
|
-
/* harmony import */ var
|
|
32824
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
32825
|
+
/* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12222);
|
|
32826
|
+
/* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
|
|
32827
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
|
|
32828
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
|
|
32829
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26986);
|
|
32830
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97099);
|
|
32831
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65685);
|
|
32832
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80004);
|
|
32833
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10926);
|
|
32564
32834
|
/*!
|
|
32565
32835
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
32566
32836
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32567
32837
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32568
32838
|
*/
|
|
32569
32839
|
|
|
32570
|
-
|
|
32571
|
-
|
|
32572
|
-
|
|
32573
|
-
|
|
32574
|
-
|
|
32575
|
-
|
|
32576
|
-
|
|
32577
|
-
|
|
32578
|
-
|
|
32579
|
-
|
|
32580
|
-
|
|
32581
|
-
|
|
32582
|
-
|
|
32583
|
-
classInput.push('</select>');
|
|
32840
|
+
|
|
32841
|
+
|
|
32842
|
+
|
|
32843
|
+
|
|
32844
|
+
|
|
32845
|
+
|
|
32846
|
+
|
|
32847
|
+
|
|
32848
|
+
|
|
32849
|
+
/** @private */
|
|
32850
|
+
let UIImagePositionTab = class UIImagePositionTab extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__/* .UIElement */ .D {
|
|
32851
|
+
className() {
|
|
32852
|
+
return 'UIImagePositionTab';
|
|
32584
32853
|
}
|
|
32585
|
-
|
|
32586
|
-
|
|
32854
|
+
constructor(jodit, state, handlers) {
|
|
32855
|
+
super(jodit, {
|
|
32856
|
+
availableClasses: jodit.o.image.availableClasses
|
|
32857
|
+
});
|
|
32858
|
+
this.state = state;
|
|
32859
|
+
this.handlers = handlers;
|
|
32587
32860
|
}
|
|
32588
|
-
|
|
32589
|
-
|
|
32861
|
+
render({ availableClasses }) {
|
|
32862
|
+
return `<div class="jodit-form__group &__editMargins">
|
|
32863
|
+
<label>~Margins~</label>
|
|
32590
32864
|
<div class="jodit-grid jodit_vertical_middle">
|
|
32591
|
-
<input class="jodit_col-lg-1-5 jodit-input
|
|
32592
|
-
<a style="text-align: center;"
|
|
32593
|
-
<input disabled="
|
|
32594
|
-
<input disabled="
|
|
32595
|
-
<input disabled="
|
|
32865
|
+
<input class="jodit_col-lg-1-5 jodit-input &__marginTop" type="text" placeholder="~top~"/>
|
|
32866
|
+
<a style="text-align: center;" class="jodit-properties__lock jodit_col-lg-1-5 &__lockMargin">*lock*</a>
|
|
32867
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginRight" type="text" placeholder="~right~"/>
|
|
32868
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginBottom" type="text" placeholder="~bottom~"/>
|
|
32869
|
+
<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginLeft" type="text" placeholder="~left~"/>
|
|
32596
32870
|
</div>
|
|
32597
32871
|
</div>
|
|
32598
|
-
<div
|
|
32599
|
-
|
|
32600
|
-
class="jodit-
|
|
32601
|
-
|
|
32602
|
-
|
|
32603
|
-
|
|
32604
|
-
<option value=""
|
|
32605
|
-
<option value="left">${i18n('Left')}</option>
|
|
32606
|
-
<option value="center">${i18n('Center')}</option>
|
|
32607
|
-
<option value="right">${i18n('Right')}</option>
|
|
32872
|
+
<div class="jodit-form__group &__editAlign">
|
|
32873
|
+
<label>~Align~</label>
|
|
32874
|
+
<select class="jodit-select &__align">
|
|
32875
|
+
<option value="">~--Not Set--~</option>
|
|
32876
|
+
<option value="left">~Left~</option>
|
|
32877
|
+
<option value="center">~Center~</option>
|
|
32878
|
+
<option value="right">~Right~</option>
|
|
32608
32879
|
</select>
|
|
32609
32880
|
</div>
|
|
32610
|
-
<div
|
|
32611
|
-
<label
|
|
32612
|
-
<input
|
|
32881
|
+
<div class="jodit-form__group &__editStyle">
|
|
32882
|
+
<label>~Styles~</label>
|
|
32883
|
+
<input type="text" class="jodit-input &__style"/>
|
|
32613
32884
|
</div>
|
|
32614
|
-
<div
|
|
32615
|
-
<label
|
|
32616
|
-
${
|
|
32885
|
+
<div class="jodit-form__group &__editClass">
|
|
32886
|
+
<label>~Classes~</label>
|
|
32887
|
+
${(() => {
|
|
32888
|
+
const classInput = [];
|
|
32889
|
+
if (availableClasses && availableClasses.length > 0) {
|
|
32890
|
+
classInput.push('<select class="jodit-input jodit-select &__classes">');
|
|
32891
|
+
availableClasses.forEach(item => {
|
|
32892
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .K)(item)) {
|
|
32893
|
+
classInput.push(`<option value="${item}">${item}</option>`);
|
|
32894
|
+
}
|
|
32895
|
+
else {
|
|
32896
|
+
classInput.push(`<option value="${item[0]}">${item[1]}</option>`);
|
|
32897
|
+
}
|
|
32898
|
+
});
|
|
32899
|
+
classInput.push('</select>');
|
|
32900
|
+
}
|
|
32901
|
+
else {
|
|
32902
|
+
classInput.push('<input type="text" class="jodit-input &__classes"/>');
|
|
32903
|
+
}
|
|
32904
|
+
return classInput.join('');
|
|
32905
|
+
})()}
|
|
32617
32906
|
</div>
|
|
32618
|
-
<div
|
|
32907
|
+
<div class="jodit-form__group &__editId">
|
|
32619
32908
|
<label>Id</label>
|
|
32620
|
-
<input
|
|
32909
|
+
<input type="text" class="jodit-input &__id"/>
|
|
32621
32910
|
</div>
|
|
32622
32911
|
<div
|
|
32623
|
-
|
|
32624
|
-
class="jodit-form__group"
|
|
32912
|
+
class="jodit-form__group &__editBorderRadius"
|
|
32625
32913
|
>
|
|
32626
|
-
<label
|
|
32627
|
-
|
|
32628
|
-
</div
|
|
32914
|
+
<label>~Border radius~</label>
|
|
32915
|
+
<input type="number" class="jodit-input &__borderRadius"/>
|
|
32916
|
+
</div>`;
|
|
32917
|
+
}
|
|
32918
|
+
onStateAlignChange() {
|
|
32919
|
+
const align = this.getElm('align');
|
|
32920
|
+
align.value = this.state.values.align;
|
|
32921
|
+
}
|
|
32922
|
+
onChangeAlign() {
|
|
32923
|
+
const align = this.getElm('align');
|
|
32924
|
+
this.state.values.align = align.value;
|
|
32925
|
+
}
|
|
32926
|
+
onStateValuesBorderRadiusChange() {
|
|
32927
|
+
const borderRadius = this.getElm('borderRadius');
|
|
32928
|
+
borderRadius.value = this.state.values.borderRadius.toString();
|
|
32929
|
+
}
|
|
32930
|
+
onChangeBorderRadius() {
|
|
32931
|
+
const borderRadius = this.getElm('borderRadius');
|
|
32932
|
+
this.state.values.borderRadius = parseFloat(borderRadius.value);
|
|
32933
|
+
}
|
|
32934
|
+
onStateValuesIdChange() {
|
|
32935
|
+
const id = this.getElm('id');
|
|
32936
|
+
id.value = this.state.values.id;
|
|
32937
|
+
}
|
|
32938
|
+
onChangeId() {
|
|
32939
|
+
const id = this.getElm('id');
|
|
32940
|
+
this.state.values.id = id.value;
|
|
32941
|
+
}
|
|
32942
|
+
onStateValuesStyleChange() {
|
|
32943
|
+
const style = this.getElm('style');
|
|
32944
|
+
style.value = this.state.values.style;
|
|
32945
|
+
}
|
|
32946
|
+
onChangeStyle() {
|
|
32947
|
+
const style = this.getElm('style');
|
|
32948
|
+
this.state.values.style = style.value;
|
|
32949
|
+
}
|
|
32950
|
+
onStateValuesClassesChange() {
|
|
32951
|
+
const classes = this.getElm('classes');
|
|
32952
|
+
classes.value = this.state.values.classes;
|
|
32953
|
+
}
|
|
32954
|
+
onChangClasses() {
|
|
32955
|
+
const classes = this.getElm('classes');
|
|
32956
|
+
this.state.values.classes = classes.value;
|
|
32957
|
+
}
|
|
32958
|
+
onLockMarginClick(e) {
|
|
32959
|
+
this.state.marginIsLocked = !this.state.marginIsLocked;
|
|
32960
|
+
e.preventDefault();
|
|
32961
|
+
}
|
|
32962
|
+
onChangeMarginIsLocked() {
|
|
32963
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32964
|
+
const marginRight = this.getElm('marginRight');
|
|
32965
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32966
|
+
const lockMargin = this.getElm('lockMargin');
|
|
32967
|
+
[marginRight, marginBottom, marginLeft].forEach(elm => {
|
|
32968
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .C)(elm, 'disabled', this.state.marginIsLocked || null);
|
|
32969
|
+
});
|
|
32970
|
+
lockMargin.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.get(this.state.marginIsLocked ? 'lock' : 'unlock');
|
|
32971
|
+
if (this.state.marginIsLocked) {
|
|
32972
|
+
const marginTop = this.state.values.marginTop;
|
|
32973
|
+
this.state.values.marginRight = marginTop;
|
|
32974
|
+
this.state.values.marginBottom = marginTop;
|
|
32975
|
+
this.state.values.marginLeft = marginTop;
|
|
32976
|
+
}
|
|
32977
|
+
}
|
|
32978
|
+
onStateValuesMarginChange() {
|
|
32979
|
+
const marginTop = this.getElm('marginTop');
|
|
32980
|
+
const marginRight = this.getElm('marginRight');
|
|
32981
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32982
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32983
|
+
marginTop.value = this.state.values.marginTop.toString();
|
|
32984
|
+
marginRight.value = this.state.values.marginRight.toString();
|
|
32985
|
+
marginBottom.value = this.state.values.marginBottom.toString();
|
|
32986
|
+
marginLeft.value = this.state.values.marginLeft.toString();
|
|
32987
|
+
}
|
|
32988
|
+
onChangeMargin() {
|
|
32989
|
+
const marginTop = this.getElm('marginTop');
|
|
32990
|
+
const marginRight = this.getElm('marginRight');
|
|
32991
|
+
const marginBottom = this.getElm('marginBottom');
|
|
32992
|
+
const marginLeft = this.getElm('marginLeft');
|
|
32993
|
+
this.state.values.marginTop = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginTop.value);
|
|
32994
|
+
if (this.state.marginIsLocked) {
|
|
32995
|
+
this.state.values.marginRight = this.state.values.marginTop;
|
|
32996
|
+
this.state.values.marginBottom = this.state.values.marginTop;
|
|
32997
|
+
this.state.values.marginLeft = this.state.values.marginTop;
|
|
32998
|
+
}
|
|
32999
|
+
else {
|
|
33000
|
+
this.state.values.marginRight = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginRight.value);
|
|
33001
|
+
this.state.values.marginBottom = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginBottom.value);
|
|
33002
|
+
this.state.values.marginLeft = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginLeft.value);
|
|
33003
|
+
}
|
|
33004
|
+
}
|
|
33005
|
+
hideFieldByOptions() {
|
|
33006
|
+
const opt = this.j.o.image;
|
|
33007
|
+
[
|
|
33008
|
+
['editMargins', 'editMargins'],
|
|
33009
|
+
['editAlign', 'editAlign'],
|
|
33010
|
+
['editStyle', 'editStyle'],
|
|
33011
|
+
['editClass', 'editClass'],
|
|
33012
|
+
['editId', 'editId'],
|
|
33013
|
+
['editBorderRadius', 'editBorderRadius']
|
|
33014
|
+
].forEach(([optKey, elmKey]) => {
|
|
33015
|
+
const elm = this.getElm(elmKey);
|
|
33016
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
|
|
33017
|
+
});
|
|
33018
|
+
}
|
|
33019
|
+
};
|
|
33020
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33021
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33022
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.align')
|
|
33023
|
+
], UIImagePositionTab.prototype, "onStateAlignChange", null);
|
|
33024
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33025
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('align:change')
|
|
33026
|
+
], UIImagePositionTab.prototype, "onChangeAlign", null);
|
|
33027
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33028
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33029
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.borderRadius')
|
|
33030
|
+
], UIImagePositionTab.prototype, "onStateValuesBorderRadiusChange", null);
|
|
33031
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33032
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('borderRadius:change')
|
|
33033
|
+
], UIImagePositionTab.prototype, "onChangeBorderRadius", null);
|
|
33034
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33035
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33036
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.id')
|
|
33037
|
+
], UIImagePositionTab.prototype, "onStateValuesIdChange", null);
|
|
33038
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33039
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('id:change')
|
|
33040
|
+
], UIImagePositionTab.prototype, "onChangeId", null);
|
|
33041
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33042
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33043
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.style')
|
|
33044
|
+
], UIImagePositionTab.prototype, "onStateValuesStyleChange", null);
|
|
33045
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33046
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('style:change')
|
|
33047
|
+
], UIImagePositionTab.prototype, "onChangeStyle", null);
|
|
33048
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33049
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33050
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.classes')
|
|
33051
|
+
], UIImagePositionTab.prototype, "onStateValuesClassesChange", null);
|
|
33052
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33053
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('classes:change')
|
|
33054
|
+
], UIImagePositionTab.prototype, "onChangClasses", null);
|
|
33055
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33056
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('lockMargin:click')
|
|
33057
|
+
], UIImagePositionTab.prototype, "onLockMarginClick", null);
|
|
33058
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33059
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33060
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.marginIsLocked')
|
|
33061
|
+
], UIImagePositionTab.prototype, "onChangeMarginIsLocked", null);
|
|
33062
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33063
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
|
|
33064
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
|
|
33065
|
+
'state.values.marginTop',
|
|
33066
|
+
'state.values.marginRight',
|
|
33067
|
+
'state.values.marginBottom',
|
|
33068
|
+
'state.values.marginLeft'
|
|
33069
|
+
])
|
|
33070
|
+
], UIImagePositionTab.prototype, "onStateValuesMarginChange", null);
|
|
33071
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33072
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
|
|
33073
|
+
'marginTop:change',
|
|
33074
|
+
'marginRight:change',
|
|
33075
|
+
'marginBottom:change',
|
|
33076
|
+
'marginLeft:change'
|
|
33077
|
+
])
|
|
33078
|
+
], UIImagePositionTab.prototype, "onChangeMargin", null);
|
|
33079
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33080
|
+
(0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
|
|
33081
|
+
], UIImagePositionTab.prototype, "hideFieldByOptions", null);
|
|
33082
|
+
UIImagePositionTab = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
33083
|
+
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__/* .component */ .s
|
|
33084
|
+
], UIImagePositionTab);
|
|
33085
|
+
|
|
33086
|
+
|
|
33087
|
+
|
|
33088
|
+
/***/ }),
|
|
33089
|
+
|
|
33090
|
+
/***/ 77137:
|
|
33091
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33092
|
+
|
|
33093
|
+
"use strict";
|
|
33094
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33095
|
+
/* harmony export */ v: function() { return /* binding */ openImageEditorDialog; }
|
|
33096
|
+
/* harmony export */ });
|
|
33097
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26986);
|
|
33098
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
33099
|
+
/* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60485);
|
|
33100
|
+
/*!
|
|
33101
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33102
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33103
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33104
|
+
*/
|
|
33105
|
+
|
|
33106
|
+
|
|
33107
|
+
|
|
33108
|
+
/**
|
|
33109
|
+
* Open image editor dialog
|
|
33110
|
+
* @private
|
|
33111
|
+
*/
|
|
33112
|
+
function openImageEditorDialog(j, state) {
|
|
33113
|
+
const url = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(state.image, 'src') || '', a = j.c.element('a'), loadExternal = () => {
|
|
33114
|
+
if (a.host !== location.host) {
|
|
33115
|
+
j.confirm('You can only edit your own images. Download this image on the host?', yes => {
|
|
33116
|
+
if (yes && j.uploader) {
|
|
33117
|
+
j.uploader.uploadRemoteImage(a.href.toString(), resp => {
|
|
33118
|
+
j.alert('The image has been successfully uploaded to the host!', () => {
|
|
33119
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .K)(resp.newfilename)) {
|
|
33120
|
+
state.values.imageSrc =
|
|
33121
|
+
resp.baseurl +
|
|
33122
|
+
resp.newfilename;
|
|
33123
|
+
}
|
|
33124
|
+
});
|
|
33125
|
+
}, error => {
|
|
33126
|
+
j.alert('There was an error loading %s', error.message);
|
|
33127
|
+
});
|
|
33128
|
+
}
|
|
33129
|
+
});
|
|
33130
|
+
return;
|
|
33131
|
+
}
|
|
33132
|
+
};
|
|
33133
|
+
a.href = url;
|
|
33134
|
+
j.filebrowser.dataProvider
|
|
33135
|
+
.getPathByUrl(a.href.toString())
|
|
33136
|
+
.then(resp => {
|
|
33137
|
+
jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__/* .openImageEditor */ .B.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, () => {
|
|
33138
|
+
const timestamp = new Date().getTime();
|
|
33139
|
+
state.values.imageSrc =
|
|
33140
|
+
url +
|
|
33141
|
+
(url.indexOf('?') !== -1 ? '' : '?') +
|
|
33142
|
+
'&_tmp=' +
|
|
33143
|
+
timestamp.toString();
|
|
33144
|
+
}, error => {
|
|
33145
|
+
j.alert(error.message);
|
|
33146
|
+
});
|
|
33147
|
+
})
|
|
33148
|
+
.catch(error => {
|
|
33149
|
+
j.alert(error.message, loadExternal);
|
|
33150
|
+
});
|
|
33151
|
+
}
|
|
33152
|
+
|
|
33153
|
+
|
|
33154
|
+
/***/ }),
|
|
33155
|
+
|
|
33156
|
+
/***/ 91852:
|
|
33157
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33158
|
+
|
|
33159
|
+
"use strict";
|
|
33160
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33161
|
+
/* harmony export */ q: function() { return /* binding */ openImagePopup; }
|
|
33162
|
+
/* harmony export */ });
|
|
33163
|
+
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55010);
|
|
33164
|
+
/* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43977);
|
|
33165
|
+
/* harmony import */ var jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34138);
|
|
33166
|
+
/* harmony import */ var jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31784);
|
|
33167
|
+
/*!
|
|
33168
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33169
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33170
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33171
|
+
*/
|
|
33172
|
+
|
|
33173
|
+
|
|
33174
|
+
|
|
33175
|
+
|
|
33176
|
+
/** @private */
|
|
33177
|
+
function openImagePopup(j, dialog, state, button) {
|
|
33178
|
+
const popup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__/* .Popup */ .z(dialog);
|
|
33179
|
+
const closePopup = () => {
|
|
33180
|
+
popup.close();
|
|
33181
|
+
popup.destruct();
|
|
33182
|
+
};
|
|
33183
|
+
popup
|
|
33184
|
+
.setContent((0,jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__/* .FileSelectorWidget */ .k)(j, {
|
|
33185
|
+
upload: (data) => {
|
|
33186
|
+
if (data.files && data.files.length) {
|
|
33187
|
+
state.values.imageSrc =
|
|
33188
|
+
data.baseurl + data.files[0];
|
|
33189
|
+
}
|
|
33190
|
+
closePopup();
|
|
33191
|
+
},
|
|
33192
|
+
filebrowser: async (data) => {
|
|
33193
|
+
if (data && (0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_2__/* .isArray */ .c)(data.files) && data.files.length) {
|
|
33194
|
+
state.values.imageSrc = data.files[0];
|
|
33195
|
+
closePopup();
|
|
33196
|
+
}
|
|
33197
|
+
}
|
|
33198
|
+
}, state.image, closePopup))
|
|
33199
|
+
.open(() => (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_3__/* .position */ .G)(button));
|
|
33200
|
+
}
|
|
33201
|
+
|
|
33202
|
+
|
|
33203
|
+
/***/ }),
|
|
33204
|
+
|
|
33205
|
+
/***/ 10926:
|
|
33206
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33207
|
+
|
|
33208
|
+
"use strict";
|
|
33209
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33210
|
+
/* harmony export */ G: function() { return /* binding */ normalSizeFromString; },
|
|
33211
|
+
/* harmony export */ n: function() { return /* binding */ normalSizeToString; }
|
|
33212
|
+
/* harmony export */ });
|
|
33213
|
+
/* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72558);
|
|
33214
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22718);
|
|
33215
|
+
/*!
|
|
33216
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33217
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33218
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33219
|
+
*/
|
|
33220
|
+
|
|
33221
|
+
|
|
33222
|
+
/** @private */
|
|
33223
|
+
const normalSizeFromString = (value) => {
|
|
33224
|
+
return /^[-+]?[0-9.]+(px)?$/.test(value.toString())
|
|
33225
|
+
? parseFloat(value.toString())
|
|
33226
|
+
: value;
|
|
33227
|
+
};
|
|
33228
|
+
/** @private */
|
|
33229
|
+
const normalSizeToString = (value) => {
|
|
33230
|
+
if ((0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__/* .isNumber */ .E)(value)) {
|
|
33231
|
+
return value ? value + 'px' : value.toString();
|
|
33232
|
+
}
|
|
33233
|
+
value = (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(value);
|
|
33234
|
+
return /^[0-9]+$/.test(value) ? value + 'px' : value;
|
|
33235
|
+
};
|
|
33236
|
+
|
|
33237
|
+
|
|
33238
|
+
/***/ }),
|
|
33239
|
+
|
|
33240
|
+
/***/ 48570:
|
|
33241
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33242
|
+
|
|
33243
|
+
"use strict";
|
|
33244
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33245
|
+
/* harmony export */ j: function() { return /* binding */ applyValuesToImage; }
|
|
33246
|
+
/* harmony export */ });
|
|
33247
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
33248
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71122);
|
|
33249
|
+
/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9144);
|
|
33250
|
+
/* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82714);
|
|
33251
|
+
/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26277);
|
|
33252
|
+
/*!
|
|
33253
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33254
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33255
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33256
|
+
*/
|
|
33257
|
+
|
|
33258
|
+
|
|
33259
|
+
|
|
33260
|
+
|
|
33261
|
+
|
|
33262
|
+
/**
|
|
33263
|
+
* Apply form's values to image
|
|
33264
|
+
* @private
|
|
33265
|
+
*/
|
|
33266
|
+
function applyValuesToImage(j, state, image) {
|
|
33267
|
+
const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
|
|
33268
|
+
const opt = j.o;
|
|
33269
|
+
// styles
|
|
33270
|
+
if (opt.image.editStyle) {
|
|
33271
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style', style || null);
|
|
33272
|
+
}
|
|
33273
|
+
// Src
|
|
33274
|
+
if (imageSrc) {
|
|
33275
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
|
|
33276
|
+
}
|
|
33277
|
+
else {
|
|
33278
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(image);
|
|
33279
|
+
return;
|
|
33280
|
+
}
|
|
33281
|
+
// Border radius
|
|
33282
|
+
image.style.borderRadius = borderRadius ? borderRadius + 'px' : '';
|
|
33283
|
+
// Title
|
|
33284
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title', imageTitle || null);
|
|
33285
|
+
// Alt
|
|
33286
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
|
|
33287
|
+
// Link
|
|
33288
|
+
(0,_link__WEBPACK_IMPORTED_MODULE_2__/* .applyLink */ .j)(j, image, imageLink, imageLinkOpenInNewTab);
|
|
33289
|
+
// Size
|
|
33290
|
+
(0,_size__WEBPACK_IMPORTED_MODULE_4__/* .applySize */ .q)(image, imageWidth, imageHeight, state.sizeIsLocked);
|
|
33291
|
+
// Margin
|
|
33292
|
+
if (j.o.image.editMargins) {
|
|
33293
|
+
(0,_margin__WEBPACK_IMPORTED_MODULE_3__/* .applyMargin */ .N)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
|
|
33294
|
+
}
|
|
33295
|
+
if (opt.image.editClass) {
|
|
33296
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
|
|
33297
|
+
}
|
|
33298
|
+
if (opt.image.editId) {
|
|
33299
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
|
|
33300
|
+
}
|
|
33301
|
+
if (opt.image.editAlign) {
|
|
33302
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
|
|
33303
|
+
}
|
|
33304
|
+
}
|
|
33305
|
+
|
|
33306
|
+
|
|
33307
|
+
/***/ }),
|
|
33308
|
+
|
|
33309
|
+
/***/ 9144:
|
|
33310
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33311
|
+
|
|
33312
|
+
"use strict";
|
|
33313
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33314
|
+
/* harmony export */ j: function() { return /* binding */ applyLink; }
|
|
33315
|
+
/* harmony export */ });
|
|
33316
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
|
|
33317
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
|
|
33318
|
+
/*!
|
|
33319
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33320
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33321
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33322
|
+
*/
|
|
33323
|
+
|
|
33324
|
+
|
|
33325
|
+
/** @private */
|
|
33326
|
+
function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
|
|
33327
|
+
// Link
|
|
33328
|
+
let link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(image, 'a', j.editor);
|
|
33329
|
+
if (imageLink) {
|
|
33330
|
+
if (!link) {
|
|
33331
|
+
link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(image, 'a', j.createInside);
|
|
33332
|
+
}
|
|
33333
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'href', imageLink);
|
|
33334
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
|
|
33335
|
+
}
|
|
33336
|
+
else {
|
|
33337
|
+
if (link && link.parentNode) {
|
|
33338
|
+
link.parentNode.replaceChild(image, link);
|
|
33339
|
+
}
|
|
33340
|
+
}
|
|
33341
|
+
}
|
|
33342
|
+
|
|
33343
|
+
|
|
33344
|
+
/***/ }),
|
|
33345
|
+
|
|
33346
|
+
/***/ 82714:
|
|
33347
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33348
|
+
|
|
33349
|
+
"use strict";
|
|
33350
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33351
|
+
/* harmony export */ N: function() { return /* binding */ applyMargin; }
|
|
33352
|
+
/* harmony export */ });
|
|
33353
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4401);
|
|
33354
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10926);
|
|
33355
|
+
/*!
|
|
33356
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33357
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33358
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33359
|
+
*/
|
|
33360
|
+
|
|
33361
|
+
|
|
33362
|
+
/** @private */
|
|
33363
|
+
function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image, marginIsLocked) {
|
|
33364
|
+
const margins = [marginTop, marginRight, marginBottom, marginLeft];
|
|
33365
|
+
const applyMargin = (key, value) => {
|
|
33366
|
+
const oldValue = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key);
|
|
33367
|
+
const v = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_0__/* .normalSizeToString */ .n)(value);
|
|
33368
|
+
if (oldValue.toString() !== v.toString()) {
|
|
33369
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key, v);
|
|
33370
|
+
}
|
|
33371
|
+
};
|
|
33372
|
+
if (!marginIsLocked) {
|
|
33373
|
+
const sides = [
|
|
33374
|
+
'margin-top',
|
|
33375
|
+
'margin-right',
|
|
33376
|
+
'margin-bottom',
|
|
33377
|
+
'margin-left'
|
|
33378
|
+
];
|
|
33379
|
+
margins.forEach((margin, index) => {
|
|
33380
|
+
const side = sides[index];
|
|
33381
|
+
applyMargin(side, margin);
|
|
33382
|
+
});
|
|
33383
|
+
}
|
|
33384
|
+
else {
|
|
33385
|
+
applyMargin('margin', marginTop);
|
|
33386
|
+
}
|
|
33387
|
+
}
|
|
33388
|
+
|
|
33389
|
+
|
|
33390
|
+
/***/ }),
|
|
33391
|
+
|
|
33392
|
+
/***/ 26277:
|
|
33393
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33394
|
+
|
|
33395
|
+
"use strict";
|
|
33396
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33397
|
+
/* harmony export */ q: function() { return /* binding */ applySize; }
|
|
33398
|
+
/* harmony export */ });
|
|
33399
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
|
|
33400
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4401);
|
|
33401
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
|
|
33402
|
+
/*!
|
|
33403
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33404
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
33405
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
33406
|
+
*/
|
|
33407
|
+
|
|
33408
|
+
|
|
33409
|
+
|
|
33410
|
+
/** @private */
|
|
33411
|
+
function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
|
|
33412
|
+
// Size
|
|
33413
|
+
if (imageWidth !== image.offsetWidth ||
|
|
33414
|
+
imageHeight !== image.offsetHeight) {
|
|
33415
|
+
const updatedWidth = imageWidth ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageWidth) : null;
|
|
33416
|
+
let updatedHeight = imageHeight
|
|
33417
|
+
? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageHeight)
|
|
33418
|
+
: null;
|
|
33419
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, {
|
|
33420
|
+
width: updatedWidth,
|
|
33421
|
+
height: updatedWidth && sizeIsLocked ? null : updatedHeight
|
|
33422
|
+
});
|
|
33423
|
+
(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);
|
|
33424
|
+
if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || sizeIsLocked) {
|
|
33425
|
+
updatedHeight = null;
|
|
33426
|
+
}
|
|
33427
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height', updatedHeight);
|
|
33428
|
+
}
|
|
32629
33429
|
}
|
|
32630
33430
|
|
|
32631
33431
|
|
|
@@ -39003,7 +39803,8 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('selec
|
|
|
39003
39803
|
*/
|
|
39004
39804
|
|
|
39005
39805
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.select = {
|
|
39006
|
-
normalizeSelectionBeforeCutAndCopy: false
|
|
39806
|
+
normalizeSelectionBeforeCutAndCopy: false,
|
|
39807
|
+
normalizeTripleClick: true
|
|
39007
39808
|
};
|
|
39008
39809
|
|
|
39009
39810
|
|
|
@@ -39079,7 +39880,7 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
39079
39880
|
}
|
|
39080
39881
|
}
|
|
39081
39882
|
/**
|
|
39082
|
-
* @event outsideClick(e) - when user clicked
|
|
39883
|
+
* @event outsideClick(e) - when user clicked on the outside of editor
|
|
39083
39884
|
*/
|
|
39084
39885
|
onOutsideClick(e) {
|
|
39085
39886
|
const node = e.target;
|
|
@@ -39091,7 +39892,7 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
39091
39892
|
this.j.e.fire('outsideClick', e);
|
|
39092
39893
|
}
|
|
39093
39894
|
}
|
|
39094
|
-
beforeCommandCut(
|
|
39895
|
+
beforeCommandCut() {
|
|
39095
39896
|
const { s } = this.j;
|
|
39096
39897
|
if (!s.isCollapsed()) {
|
|
39097
39898
|
const current = s.current();
|
|
@@ -39100,13 +39901,27 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
39100
39901
|
}
|
|
39101
39902
|
}
|
|
39102
39903
|
}
|
|
39103
|
-
|
|
39904
|
+
beforeCommandSelectAll() {
|
|
39104
39905
|
const { s } = this.j;
|
|
39105
39906
|
s.focus();
|
|
39106
39907
|
s.select(this.j.editor, true);
|
|
39107
39908
|
s.expandSelection();
|
|
39108
39909
|
return false;
|
|
39109
39910
|
}
|
|
39911
|
+
/**
|
|
39912
|
+
* Normalize selection after triple click
|
|
39913
|
+
*/
|
|
39914
|
+
onTripleClickNormalizeSelection(e) {
|
|
39915
|
+
if (e.detail !== 3 || !this.j.o.select.normalizeTripleClick) {
|
|
39916
|
+
return;
|
|
39917
|
+
}
|
|
39918
|
+
const { s } = this.j;
|
|
39919
|
+
const { startContainer, startOffset } = s.range;
|
|
39920
|
+
if (startOffset === 0 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(startContainer)) {
|
|
39921
|
+
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) ||
|
|
39922
|
+
startContainer, true);
|
|
39923
|
+
}
|
|
39924
|
+
}
|
|
39110
39925
|
onCopyNormalizeSelectionBound(e) {
|
|
39111
39926
|
const { s, editor, o } = this.j;
|
|
39112
39927
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -39132,7 +39947,10 @@ class select extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */
|
|
|
39132
39947
|
], select.prototype, "beforeCommandCut", null);
|
|
39133
39948
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39134
39949
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':beforeCommandSelectall'])
|
|
39135
|
-
], select.prototype, "
|
|
39950
|
+
], select.prototype, "beforeCommandSelectAll", null);
|
|
39951
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39952
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':click'])
|
|
39953
|
+
], select.prototype, "onTripleClickNormalizeSelection", null);
|
|
39136
39954
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
39137
39955
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':copy', ':cut'])
|
|
39138
39956
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|