ngx-markjs
TypeScript icon, indicating that this package has built-in type declarations

14.0.0 • Public • Published

In development

ngx-markjs

It is Angular 8 wrapper for very cool text highlighting lib Mark.js

How to use

Install

npm i mark.js
npm i ngx-markjs

Import module

...
import {NgxMarkjsModule} from 'ngx-markjs';

@NgModule({
...
  imports: [
...
    NgxMarkjsModule
  ],
...
})
export class AppModule { }

Use directive

<div class="content_wrapper" 
     [markjsHighlight]="searchText"
     [markjsConfig]="config"
     [scrollToFirstMarked]="true"
>

If you want to use it from source code

Incase of some compilation issues you can try to import ngxMarkjsModule directly in your application from .tx file

import {NgxMarkjsModule} from 'ngx-markjs/src/public-api'; 

Start demo project

Clone this repo and do install

npm install

ng serve

demo app

Additional mark.js config params can be found on its officail site

Did you Like this lib? Follow me on Twitter for more Angular and RxJS staff!

Need a mentorship for Angular and RxJS? Find me on codementor.io

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 14.0.0
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 14.0.0
    17
  • 0.1.2
    221
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i ngx-markjs

Weekly Downloads

238

Version

14.0.0

License

none

Unpacked Size

42.2 kB

Total Files

14

Last publish

Collaborators

  • kievsash