4.0.0 • Published 2 years ago

ngx-linky v4.0.0

Weekly downloads
6,188
License
MIT
Repository
github
Last release
2 years ago

ngx-linky

Build Status npm version

Angular pipe to find links in text input and turn them into html links. It was called the same "linky" in ngSanitize module of AngularJs (first). Since Angular does not have such pipe built in therefore this repo was created.

This is just a wrapper for Autolinker.js so all issues and feature requests related to autolinker should go to their issues!

Installation

npm install --save ngx-linky

Import LinkyModule or manually declare LinkyPipe in your app module.

import { LinkyModule } from 'ngx-linky';

@NgModule({
  imports: [
    LinkyModule
  ]
})
class YourAppModule {}

Usage

Use linky pipe with innerHTML (or outerHTML, depends on you) binding to get HTML correctly rendered:

<span [innerHTML]="yourText | linky"></span>

You can pass any autolinker option as a second pipe argument. For ex.:

<span [innerHTML]="myText | linky:{newWindow: false}"></span>

License

MIT

4.0.0

2 years ago

3.0.0

3 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago