jodit-pro 4.11.2 → 4.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +3 -2
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.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 +53 -31
- package/es2015/plugins/export-docs/export-docs.min.js +2 -2
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +2 -2
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +4 -4
- package/es2021/jodit.js +3 -2
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.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 +49 -29
- package/es2021/plugins/export-docs/export-docs.min.js +3 -3
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +4 -4
- package/es2021.en/jodit.js +3 -2
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.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 +49 -29
- package/es2021.en/plugins/export-docs/export-docs.min.js +3 -3
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +3 -2
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.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 +113 -59
- package/es5/plugins/export-docs/export-docs.min.js +2 -2
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +3 -0
- package/esm/plugins/export-docs/config.d.ts +3 -0
- package/esm/plugins/export-docs/config.js +1 -1
- package/esm/plugins/export-docs/export-docs.d.ts +1 -0
- package/esm/plugins/export-docs/export-docs.js +2 -2
- package/esm/plugins/license/helpers/helpers.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +3 -0
- package/types/plugins/export-docs/config.d.ts +3 -0
- package/types/plugins/export-docs/export-docs.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -50,6 +50,9 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.exportDocs = {
|
|
|
50
50
|
format: 'A4',
|
|
51
51
|
page_orientation: 'portrait'
|
|
52
52
|
}
|
|
53
|
+
},
|
|
54
|
+
docx: {
|
|
55
|
+
allow: false
|
|
53
56
|
}
|
|
54
57
|
};
|
|
55
58
|
jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.exportDocs = {
|
|
@@ -59,9 +62,14 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.exportDo
|
|
|
59
62
|
},
|
|
60
63
|
icon: (_assets_export_svg__WEBPACK_IMPORTED_MODULE_0___default()),
|
|
61
64
|
list: {
|
|
62
|
-
|
|
65
|
+
exportToPDF: 'Export to PDF'
|
|
63
66
|
},
|
|
64
|
-
|
|
67
|
+
childExec: function childExec(editor, _, param) {
|
|
68
|
+
var control = param.control;
|
|
69
|
+
var _control_name;
|
|
70
|
+
var name = (_control_name = control.name) !== null && _control_name !== void 0 ? _control_name : 'exportToPDF';
|
|
71
|
+
editor.execCommand(name);
|
|
72
|
+
}
|
|
65
73
|
};
|
|
66
74
|
|
|
67
75
|
|
|
@@ -138,74 +146,42 @@ var ExportDocs = /*#__PURE__*/ function(Plugin) {
|
|
|
138
146
|
var _this = this;
|
|
139
147
|
jodit.registerCommand('exportToPDF', function() {
|
|
140
148
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
141
|
-
var _jodit_o_exportDocs_ajax, ajax, resp, buffer, link, filename, e;
|
|
142
149
|
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_10__._)(this, function(_state) {
|
|
143
150
|
switch(_state.label){
|
|
144
151
|
case 0:
|
|
145
|
-
ajax = new jodit_esm_core_request_ajax__WEBPACK_IMPORTED_MODULE_16__.Ajax((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_7__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_6__._)({}, (_jodit_o_exportDocs_ajax = jodit.o.exportDocs.ajax) !== null && _jodit_o_exportDocs_ajax !== void 0 ? _jodit_o_exportDocs_ajax : jodit.o.filebrowser.ajax), {
|
|
146
|
-
method: 'POST',
|
|
147
|
-
responseType: 'blob',
|
|
148
|
-
onProgress: function onProgress(percent) {
|
|
149
|
-
jodit.progressbar.show().progress(percent);
|
|
150
|
-
},
|
|
151
|
-
data: {
|
|
152
|
-
action: 'generatePdf',
|
|
153
|
-
html: ExportDocs.getValue(jodit),
|
|
154
|
-
options: (0,jodit_esm_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_13__.ConfigDeepFlatten)(jodit.o.exportDocs.pdf).options
|
|
155
|
-
}
|
|
156
|
-
}));
|
|
157
|
-
jodit.e.on('beforeDestruct', ajax.destruct);
|
|
158
|
-
_state.label = 1;
|
|
159
|
-
case 1:
|
|
160
|
-
_state.trys.push([
|
|
161
|
-
1,
|
|
162
|
-
4,
|
|
163
|
-
5,
|
|
164
|
-
7
|
|
165
|
-
]);
|
|
166
|
-
return [
|
|
167
|
-
4,
|
|
168
|
-
ajax.send()
|
|
169
|
-
];
|
|
170
|
-
case 2:
|
|
171
|
-
resp = _state.sent();
|
|
172
152
|
return [
|
|
173
153
|
4,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
link.download = filename;
|
|
182
|
-
link.click();
|
|
183
|
-
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_12__.Dom.safeRemove(link);
|
|
184
|
-
URL.revokeObjectURL(link.href);
|
|
185
|
-
return [
|
|
186
|
-
3,
|
|
187
|
-
7
|
|
154
|
+
this.sendExportRequest(jodit, {
|
|
155
|
+
action: 'generatePdf',
|
|
156
|
+
filename: 'document.pdf',
|
|
157
|
+
data: {
|
|
158
|
+
options: (0,jodit_esm_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_13__.ConfigDeepFlatten)(jodit.o.exportDocs.pdf).options
|
|
159
|
+
}
|
|
160
|
+
})
|
|
188
161
|
];
|
|
189
|
-
case
|
|
190
|
-
|
|
191
|
-
e.message && jodit.alert(e.message);
|
|
162
|
+
case 1:
|
|
163
|
+
_state.sent();
|
|
192
164
|
return [
|
|
193
|
-
|
|
194
|
-
7
|
|
165
|
+
2
|
|
195
166
|
];
|
|
196
|
-
|
|
197
|
-
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}).call(_this);
|
|
170
|
+
});
|
|
171
|
+
jodit.registerCommand('exportToDOCX', function() {
|
|
172
|
+
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
173
|
+
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_10__._)(this, function(_state) {
|
|
174
|
+
switch(_state.label){
|
|
175
|
+
case 0:
|
|
198
176
|
return [
|
|
199
177
|
4,
|
|
200
|
-
|
|
178
|
+
this.sendExportRequest(jodit, {
|
|
179
|
+
action: 'generateDocx',
|
|
180
|
+
filename: 'document.docx'
|
|
181
|
+
})
|
|
201
182
|
];
|
|
202
|
-
case
|
|
183
|
+
case 1:
|
|
203
184
|
_state.sent();
|
|
204
|
-
jodit.progressbar.hide();
|
|
205
|
-
return [
|
|
206
|
-
7
|
|
207
|
-
];
|
|
208
|
-
case 7:
|
|
209
185
|
return [
|
|
210
186
|
2
|
|
211
187
|
];
|
|
@@ -215,6 +191,84 @@ var ExportDocs = /*#__PURE__*/ function(Plugin) {
|
|
|
215
191
|
});
|
|
216
192
|
}
|
|
217
193
|
},
|
|
194
|
+
{
|
|
195
|
+
key: "sendExportRequest",
|
|
196
|
+
value: function sendExportRequest(jodit, options) {
|
|
197
|
+
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
|
|
198
|
+
var _jodit_o_exportDocs_ajax, ajax, resp, buffer, link, e;
|
|
199
|
+
return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_10__._)(this, function(_state) {
|
|
200
|
+
switch(_state.label){
|
|
201
|
+
case 0:
|
|
202
|
+
ajax = new jodit_esm_core_request_ajax__WEBPACK_IMPORTED_MODULE_16__.Ajax((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_7__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_6__._)({}, (_jodit_o_exportDocs_ajax = jodit.o.exportDocs.ajax) !== null && _jodit_o_exportDocs_ajax !== void 0 ? _jodit_o_exportDocs_ajax : jodit.o.filebrowser.ajax), {
|
|
203
|
+
method: 'POST',
|
|
204
|
+
responseType: 'blob',
|
|
205
|
+
onProgress: function onProgress(percent) {
|
|
206
|
+
jodit.progressbar.show().progress(percent);
|
|
207
|
+
},
|
|
208
|
+
data: (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_6__._)({
|
|
209
|
+
action: options.action,
|
|
210
|
+
html: ExportDocs.getValue(jodit)
|
|
211
|
+
}, options.data)
|
|
212
|
+
}));
|
|
213
|
+
jodit.e.on('beforeDestruct', ajax.destruct);
|
|
214
|
+
_state.label = 1;
|
|
215
|
+
case 1:
|
|
216
|
+
_state.trys.push([
|
|
217
|
+
1,
|
|
218
|
+
4,
|
|
219
|
+
5,
|
|
220
|
+
7
|
|
221
|
+
]);
|
|
222
|
+
return [
|
|
223
|
+
4,
|
|
224
|
+
ajax.send()
|
|
225
|
+
];
|
|
226
|
+
case 2:
|
|
227
|
+
resp = _state.sent();
|
|
228
|
+
return [
|
|
229
|
+
4,
|
|
230
|
+
resp.blob()
|
|
231
|
+
];
|
|
232
|
+
case 3:
|
|
233
|
+
buffer = _state.sent();
|
|
234
|
+
link = this.j.create.a();
|
|
235
|
+
link.href = URL.createObjectURL(buffer);
|
|
236
|
+
link.download = options.filename;
|
|
237
|
+
link.click();
|
|
238
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_12__.Dom.safeRemove(link);
|
|
239
|
+
URL.revokeObjectURL(link.href);
|
|
240
|
+
return [
|
|
241
|
+
3,
|
|
242
|
+
7
|
|
243
|
+
];
|
|
244
|
+
case 4:
|
|
245
|
+
e = _state.sent();
|
|
246
|
+
e.message && jodit.alert(e.message);
|
|
247
|
+
return [
|
|
248
|
+
3,
|
|
249
|
+
7
|
|
250
|
+
];
|
|
251
|
+
case 5:
|
|
252
|
+
jodit.progressbar.progress(100);
|
|
253
|
+
return [
|
|
254
|
+
4,
|
|
255
|
+
jodit.async.delay(200)
|
|
256
|
+
];
|
|
257
|
+
case 6:
|
|
258
|
+
_state.sent();
|
|
259
|
+
jodit.progressbar.hide();
|
|
260
|
+
return [
|
|
261
|
+
7
|
|
262
|
+
];
|
|
263
|
+
case 7:
|
|
264
|
+
return [
|
|
265
|
+
2
|
|
266
|
+
];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}).call(this);
|
|
270
|
+
}
|
|
271
|
+
},
|
|
218
272
|
{
|
|
219
273
|
key: "beforeDestruct",
|
|
220
274
|
value: function beforeDestruct() {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var
|
|
8
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[210],{53121:function(e){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19,21H5a2,2,0,0,1-2-2V17a1,1,0,0,1,2,0v2H19V17a1,1,0,0,1,2,0v2A2,2,0,0,1,19,21Z"/> <path d="M18,5H6A1,1,0,0,1,6,3H18a1,1,0,0,1,0,2Z"/> <path d="M15.71,10.29l-3-3a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-3,3a1,1,0,0,0-.21,1.09A1,1,0,0,0,9,12h2v3a1,1,0,0,0,2,0V12h2a1,1,0,0,0,.92-.62A1,1,0,0,0,15.71,10.29Z"/> </svg>'},90832:function(e,t,r){"use strict";var o=r(53121),n=r.n(o),s=r(6441),c=r(2748);s.Config.prototype.exportDocs={css:"",pdf:{externalFonts:[],allow:!0,options:{defaultFont:"courier",format:"A4",page_orientation:"portrait"}},docx:{allow:!1}},s.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:function(e){return c.Dom.isEmptyContent(e.editor)},icon:n(),list:{exportToPDF:"Export to PDF"},childExec:function(e,t,r){var o,n=null!=(o=r.control.name)?o:"exportToPDF";e.execCommand(n)}}},90882:function(e,t,r){"use strict";r.r(t),r.d(t,{ExportDocs:function(){return D}});var o=r(77688),n=r(80294),s=r(20616),c=r(67709),a=r(82749),i=r(18766),u=r(56075),p=r(11886),l=r(43284),f=r(23078),d=r(62361);r(90832);var h=r(22732),x=r(68934),b=r(11628),g=r(50911),y=r(54079),m=r(14625),v=r(2692),D=function(e){function t(){var e;return(0,s._)(this,t),e=(0,n._)(this,t,arguments),(0,a._)(e,"buttons",[{name:"exportDocs",group:"media"}]),e}return(0,i._)(t,e),(0,c._)(t,[{key:"afterInit",value:function(e){var t=this;e.registerCommand("exportToPDF",function(){return(0,o._)(function(){return(0,d._)(this,function(t){switch(t.label){case 0:return[4,this.sendExportRequest(e,{action:"generatePdf",filename:"document.pdf",data:{options:(0,x.ConfigDeepFlatten)(e.o.exportDocs.pdf).options}})];case 1:return t.sent(),[2]}})}).call(t)}),e.registerCommand("exportToDOCX",function(){return(0,o._)(function(){return(0,d._)(this,function(t){switch(t.label){case 0:return[4,this.sendExportRequest(e,{action:"generateDocx",filename:"document.docx"})];case 1:return t.sent(),[2]}})}).call(t)})}},{key:"sendExportRequest",value:function(e,r){return(0,o._)(function(){var o,n,s,c,a;return(0,d._)(this,function(i){switch(i.label){case 0:n=new y.Ajax((0,p._)((0,u._)({},null!=(o=e.o.exportDocs.ajax)?o:e.o.filebrowser.ajax),{method:"POST",responseType:"blob",onProgress:function(t){e.progressbar.show().progress(t)},data:(0,u._)({action:r.action,html:t.getValue(e)},r.data)})),e.e.on("beforeDestruct",n.destruct),i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.send()];case 2:return[4,i.sent().blob()];case 3:return s=i.sent(),(c=this.j.create.a()).href=URL.createObjectURL(s),c.download=r.filename,c.click(),h.Dom.safeRemove(c),URL.revokeObjectURL(c.href),[3,7];case 4:return(a=i.sent()).message&&e.alert(a.message),[3,7];case 5:return e.progressbar.progress(100),[4,e.async.delay(200)];case 6:return i.sent(),e.progressbar.hide(),[7];case 7:return[2]}})}).call(this)}},{key:"beforeDestruct",value:function(){}}],[{key:"getValue",value:function(e){var t=(0,l._)((0,b.previewBox)(e),1)[0],r=[];return e.o.exportDocs.pdf.externalFonts.forEach(function(e){/^</.test(e)?r.push(e):r.push('<link rel="stylesheet" href="'.concat(e,'">'))}),r.push("<style>".concat((0,m.generateCriticalCSS)(e),"</style>")),r.push("<style>".concat(e.o.exportDocs.css,"</style>")),r.push(t.innerHTML),r.join("\n")}}]),t}((0,f._)(g.Plugin));(0,a._)(D,"requires",["license"]),v.JoditPro.plugins.add("exportDocs",D)},11886:function(e,t,r){"use strict";function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r.d(t,{_:function(){return o}})}},function(e){return e(e.s=90882)}])});
|