• One of our clients has a blog that features many more external links that internal links within their posts. When they are adding new posts, they would like links to be added with ‘open in new tab’ enabled by default in the Gutenberg editor, with the option to turn this off manually if required.

    If possible, they don’t want a JS solution that automatically add a target attribute to the ‘a’ tag, but would prefer the actual button in the editor interface to show ‘open in a new tab’ by default.

    Does anyone know if this is possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m pretty sure that you can write code to change the editor’s default. But it is unlikely for this to be added to the editor itself since opening in a new tab is considered user unfriendly, especially for accessibility reasons. It is usually better for the user if they choose where the new page will be shown.

    Thread Starter Worcester Web Studio

    (@raymondgillespie)

    Hi Joy,

    Thanks for getting back to me. Could you clarify what you mean by “change the editor’s default”? If this can’t be added to the editor itself, where would this change show?

    Your request was for the default to be “open in new tab”, or at least to be able to change the default to that. Since there is a default, I will assert that the default could be changed. I don’t know what the code would be, but I’m pretty certain that it would have to be a plugin since the editor team will not put something that is accessibility unfriendly into the their product intentionally.

    Thread Starter Worcester Web Studio

    (@raymondgillespie)

    Thanks for the update, I think I see what you mean now, though I’m not sure I agree about them not putting “accessibility unfriendly” updates in considering how Gutenberg works!

    I should have emphasized the word “intentionally” more. The accessibility audit has been done, and now there are mounds of issues in GitHub for all the problems found.
    https://wpcampus.org/2019/05/gutenberg-audit-results/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set Gutenberg to enable ‘open in new tab’ on links by default’ is closed to new replies.