html_body placeholder implemented
This commit is contained in:
parent
2c5e893da4
commit
04005b42bf
2 changed files with 8 additions and 1 deletions
|
|
@ -55,6 +55,9 @@ switch (message.command) {
|
|||
case "getTextOnly":
|
||||
return Promise.resolve(window.document.body.innerText);
|
||||
|
||||
case "getFullHtml":
|
||||
return Promise.resolve(window.document.body.innerHTML);
|
||||
|
||||
case 'promptTooLong':
|
||||
alert(browser.i18n.getMessage('msg_prompt_too_long'));
|
||||
return Promise.resolve(true);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ export class mzta_Menus {
|
|||
//const tabs = await browser.tabs.query({ active: true, currentWindow: true });
|
||||
return {tabId: tabs[0].id,
|
||||
selection: await browser.tabs.sendMessage(tabs[0].id, { command: "getSelectedText" }),
|
||||
text: await browser.tabs.sendMessage(tabs[0].id, { command: "getTextOnly" })
|
||||
text: await browser.tabs.sendMessage(tabs[0].id, { command: "getTextOnly" }),
|
||||
html: await browser.tabs.sendMessage(tabs[0].id, { command: "getFullHtml" }),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -130,6 +131,9 @@ export class mzta_Menus {
|
|||
case 'mail_body':
|
||||
finalSubs['mail_body'] = body_text;
|
||||
break;
|
||||
case 'html_body': console.log(">>>>>>>>>> html_body: " + msg_text.html);
|
||||
finalSubs['html_body'] = msg_text.html;
|
||||
break;
|
||||
case 'mail_subject':
|
||||
finalSubs['mail_subject'] = mail_subject;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue