mattmilburn / strapi-plugin-preview-button

A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view.
MIT License
104 stars 38 forks source link

Open preview page in new tab, instead of replacing already opened tab #60

Closed Krak86 closed 1 year ago

Krak86 commented 2 years ago

Is it possible to add possibility to open 'preview' page always in new tab (not just replace the opened tab)?

I think we can remove (or make optional) the target prop (PREVIEW_WINDOW_NAME) in window.open( url, PREVIEW_WINDOW_NAME );

Code: https://github.com/mattmilburn/strapi-plugin-preview-button/blob/staging/admin/src/components/PreviewButton/index.js#L19

mattmilburn commented 1 year ago

Hi @Krak86 This option seems reasonable. I will include this in an upcoming release 👍🏻

mattmilburn commented 1 year ago

@Krak86 There is a new release for v1.0.1 which includes a new openTarget config option that should help you out 👍🏻 You should set it to _blank. Here it is described in the README.

Krak86 commented 1 year ago

@Krak86 There is a new release for v1.0.1 which includes a new openTarget config option that should help you out 👍🏻 You should set it to _blank. Here it is described in the README.

Awesome, man! Many thanks 👍