Added template previewing with non-functional GQL editor BOD-126
This commit is contained in:
@@ -55,3 +55,19 @@ export const displayTemplateInWindow = (html) => {
|
||||
console.log("Unable to write to new window.", error);
|
||||
}
|
||||
};
|
||||
|
||||
export const displayTemplateInWindowNoprint = (html) => {
|
||||
try {
|
||||
var newWin = window.open("", "_blank", "toolbar=0,location=0,menubar=0");
|
||||
newWin.document.write(html);
|
||||
|
||||
setTimeout(function () {
|
||||
newWin.document.close();
|
||||
newWin.focus();
|
||||
//newWin.print();
|
||||
//newWin.close();
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
console.log("Unable to write to new window.", error);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user