MCPcopy
hub / github.com/mailvelope/mailvelope / openEditor

Method openEditor

src/controller/editor.controller.js:296–308  ·  view source on GitHub ↗

* Open editor popup, called by other controllers. * @param {Boolean} options.signMsg - sign message option is active * @param {String} options.predefinedText - text that will be added to the editor * @param {String} quotedMail - mail that should be quoted * @param {boolean} quotedMailInd

({userInfo, ...options})

Source from the content-addressed store, hash-verified

294 * @param {Object} recipients - recipient email addresses, in the form {to: [{email}], cc: [{email}]}
295 */
296 async openEditor({userInfo, ...options}) {
297 this.setState({userInfo});
298 this.options = options;
299 this.options.privKeys = true; // send private keys for signing key selection to editor
300 let height = 680;
301 if (this.options.integration) {
302 this.setState({integration: this.options.integration});
303 height = 740;
304 }
305 this.popup = await mvelo.windows.openPopup(`components/editor/editor.html?id=${this.id}${this.state.integration ? `&quota=${gmail.MAIL_QUOTA}` : ''}`, {width: 820, height});
306 this.popup.addRemoveListener(() => this.onEditorClose({cancel: true}));
307 this.setState({popupId: this.popup.id, popupOpenerTabId: this.popup.tabId});
308 }
309
310 /**
311 * A encrypted message will be decrypted and shown in the editor

Callers

nothing calls this directly

Calls 4

onEditorCloseMethod · 0.95
openPopupMethod · 0.80
addRemoveListenerMethod · 0.80
setStateMethod · 0.45

Tested by

no test coverage detected