fix: Update preview_email function to return only HTML
This commit is contained in:
parent
53923264b3
commit
e09a0d61d2
1 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
frappe.preview_email = function(template, args, header) {
|
||||
frappe
|
||||
frappe.preview_email = function(template, args, header, only_html=false) {
|
||||
return frappe
|
||||
.call({
|
||||
method: 'frappe.email.email_body.get_email_html',
|
||||
args: {
|
||||
|
|
@ -12,6 +12,9 @@ frappe.preview_email = function(template, args, header) {
|
|||
.then(r => {
|
||||
var html = r.message;
|
||||
html = html.replace(/embed=/, 'src=');
|
||||
if (only_html) {
|
||||
return html;
|
||||
}
|
||||
var d = frappe.msgprint({
|
||||
message:
|
||||
'<iframe width="100%" height="600px" style="border: none;"></iframe>',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue