Create a link and open a new window


My community is inside my app, I will make a post with an link, but its necessary that the link open in a new window outside the app. There’s a way to do it?


1 Like

Go to preferences > interface > Open all external links in a new tab


Didnt work =(

Still open inside the app

Which app are you talking about “Discourse Hub” on Android?

Nope. We put our community inside the app of our company.

i use for all link :roll_eyes:

<script type="text/discourse-plugin" version="0.8">
  api.onPageChange((url, title) => {
        // Automatically open external links in new tab or window
        var links = document.links;
        for (var i = 0, linksLength = links.length; i < linksLength; i++) {
            if (links[i].hostname != window.location.hostname) {
                links[i].target = '_blank';

Yes… this works in browsing, not in the app =(