I have html5 video links of videos I host on another server and domain which I want them to open in the same tab, not in another tab like it is doing now. So that when they close the video, they will land back on the forum discussion from where they clicked the video link on, and not in some empty tab. I have decided not to embed the videos in my discussions as my videos are portrait and are just increasing the scrolling and loading time. And also clicking on the mp4 links is directly playing the videos fullscreen height in desktops also which is what I want, so it it is much better than embedding. Please how can I disable this _blank target for all links? Please help. I think I can't force a self target with bbcode links also right? I don't know how to do this.
I am an advocate of always keeping all links internal or external to open in the same tab. If they want to open a link in another tab they can always hold it and tap on open in new tab. Imho this is what is called giving the visitors the choice and not forcing them to toggle between tabs just because we think it is the right thing to do for external links. Even if an external link opens in the same tab, they can always use the back button in the browser to come back to the forum page. In fact, they can't use the back button to come back if it opens in another tab which is actually more frustrating.
They are many articles online which say the same thing. Don't force on the visitors what you think is the best and they will be more comfortable to visit again. And new tabs opening even with external links is certainly going to annoy many visitors. If they like the discussions, they will surely tap the back button to come back and participate even if they go to an external link in the same tab. We always find our way back to things which interest us. No one has to force us to do that. And if they don't like the discussions, then even if the external link opens in another tab they won't come back to the discussion. If they feel it will be too hard to come back to the post position in the discussion they are on, then they could always tap and hold on the link and open it in a new tab. This is what I feel.
$ grep -n _blank ./vendor/flarum/core/src/Formatter/Formatter.php
135: $a->setAttribute('target', '_blank');