MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / openEditor

Method openEditor

src/controller/gmail.controller.js:49–66  ·  view source on GitHub ↗

* Opens a new editor control and gets the recipients to encrypt plaintext * input to their public keys. * @param {String} options.text The plaintext input to encrypt

(options)

Source from the content-addressed store, hash-verified

47 * @param {String} options.text The plaintext input to encrypt
48 */
49 openEditor(options) {
50 this.setState({userInfo: options.userInfo, threadId: options.threadId});
51 this.peers.editorController.openEditor({
52 integration: true,
53 predefinedText: options.text,
54 quotedMail: options.quotedMail,
55 quotedMailIndent: options.quotedMailIndent === undefined ? true : options.quotedMailIndent,
56 quotedMailHeader: options.quotedMailHeader,
57 subject: options.subject,
58 recipients: {
59 to: options.recipientsTo.map(email => ({email})),
60 cc: options.recipientsCc.map(email => ({email}))
61 },
62 userInfo: options.userInfo,
63 attachments: options.attachments,
64 keepAttachments: options.keepAttachments
65 });
66 }
67
68 async encryptedMessage({armored, encFiles, subject, to, cc}) {
69 // send email via GMAIL api

Callers 2

onOpenEditorMethod · 0.95

Calls 1

setStateMethod · 0.45

Tested by

no test coverage detected