mycurelabs / vue-html-to-paper

Vue mixin for paper printing html elements.
MIT License
298 stars 101 forks source link

how can used without windows.open????? #48

Closed Omarillo closed 4 years ago

jofftiquez commented 4 years ago

Hello @Omarillo you can't at the moment. But this can be a nice feature, to let the user choose whether to show in on the same page or show it in a new tab. Let me know your thoughts.

Omarillo commented 4 years ago

is there a way to do changing the code for my self

jofftiquez commented 4 years ago

Yes, you can do a pull request to this repository. Just add a new option called openInNewWindow and use that to do a conditional statement on this line https://github.com/mycurelabs/vue-html-to-paper/blob/2f7278d94aefdc947e6c23a3deb831fe9f26bf13/src/index.js#L44.

jofftiquez commented 4 years ago

@Omarillo actually, my bad. You just gotta set the name option as _self. Like so:

{
  "name": "_self",
  //  ...other options
}
jofftiquez commented 4 years ago

Any updates? Will close this now. Thanks.