Recent searches


No recent searches

hide widget when printing



Posted May 03, 2024

I'm trying to apply “noprint” css class so widget doesn't get printed out… anyone have any idea how we can achieve this?

 

TIA!


0

1

1 comment

Hey there,

The simplest approach off the top of my head would be to use the web widget Hide API together with the beforeprint event, e.g for messaging:

window.addEventListener("beforeprint", () => {
 zE('messenger', 'hide');
});

Then, just use the afterprint event to make the web widget visible again:

window.addEventListener("afterprint", () => {
  zE('messenger', 'show');
});

Hope this helps!

Tipene

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post