Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

External links opening in the same window IOS

$
0
0

There are many such questions already and some have posted working solutions. My issue is slightly different.

I have an Ionic App, which has an admin view (Another webapp), which is also an angular app.
Admins of the mobile app can add html contents in the admin-view. For this purpose I have used text-angular (rich text editor). https://github.com/fraywing/textAngular

In the Ionic app, the data for the article is pulled using $http which works fine. The problem is that if there are external links inside the data then on IOS it is opening within the app (webview) and breaking everything as there is no way for the user to come back to the app.

Possible solutions to this are:
1. Using the cordova-plugin-inappbrowser (Which I am using)
and then:
2. Change links to javascript - window.open( 'URL', '_system') OR window.open('URL','_blank') // not sure which one works

However, I am unable to change the links as the contents when get shown on the page are going through a sanitizer. (Same like ng-bind-html), but a bit different as 'ta-bind' is used for this purpose (TextAngular).
I can change the html to have a directive in the html like this : <a browse-to='URL'> LINK </a> but then, I will have to recompile which I am trying to avoid.

What is the best solution?

Since it is user entered HTML, shouldn't it work if I just use the following:

LINK`

Lastly, everything is working just fine on Android.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>