Merge pull request #32937 from maheini/develop

fix: Add proper html skeleton to preview iframe
This commit is contained in:
Ejaaz Khan 2025-07-31 11:46:09 +05:30 committed by GitHub
commit e8a0a16677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,6 +50,19 @@ frappe.ui.form.PrintView = class {
`
);
const htmlSkeleton = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
</body>
</html>
`;
document.querySelector("iframe.print-format-container").srcdoc = htmlSkeleton;
this.print_settings = frappe.model.get_doc(":Print Settings", "Print Settings");
this.setup_menu();
this.setup_toolbar();