printing a box or html component content

i want to print a box content or html component content is it possible to do that with wix ??
i tried to use the window.print() function inside the html component but it didnt work i shows a message in console “The document is sandboxed”


Try to put the following lines into your html component. It’s working for us, and prints the scope of the html component.

Iam using windows system - chrome browser
i tried your way but it didnt work

i get this error - Ignored call to ‘print()’. The document is sandboxed, and the ‘allow-modals’ keyword is not set.

Try this example in a HTML component.

Hi, did you figure out how to set the allow-modals keyword?

Hi Roi Bendet

We appreciate the link but as you know we are not coder, we humbly asking you to give us short and good starting point on how we can print wix webpage.

I have read the HMTL onMessage/ Postmessage but I cant figure it our how to start.
I think sending message (text connected to dataset) to HMTL could achieve printing the webpage with Window.print.

please advice and we appreciate it much.