0

I have an ionic 3 chat application. In the chat messages users would like to place links (urls) to external resources.

Is there any opportunitiy to make this urls clickable (for chat message receivers) for opening that external resources?

Example:

enter image description here

Thanks in advance

Georg Kastenhofer
  • 1,387
  • 12
  • 32

1 Answers1

0

Install InAppBrowserPlugin -- link

$ ionic cordova plugin add cordova-plugin-inappbrowser
$ npm install --save @ionic-native/in-app-browser

then on url call make your logic ... eg:

import { InAppBrowser } from '@ionic-native/in-app-browser';

constructor(private iab: InAppBrowser) { }

...

const browser = this.iab.create('https://ionicframework.com/');
 browser.show();
 // browser.close()
Kevin Dias
  • 1,043
  • 10
  • 28
  • I know this plugin, but the challenge lies in the rich text content with the dynamic links. How I can grap, pharse and rewrite (window.open) this links? Or any other idea? – Georg Kastenhofer Sep 14 '18 at 06:26
  • i think this may help --> https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links – Kevin Dias Sep 14 '18 at 09:01