Code Monkey home page Code Monkey logo

mmounirf / ngx-text-highlighter Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 3.55 MB

Angular 5+ module for displaying editable textarea where you can highlight text selections and filter your previous selection based on highlighting color. Check out live demo and play around with the options

Home Page: https://mmounirf.github.io/ngx-text-highlighter/

License: MIT License

JavaScript 7.66% TypeScript 70.32% CSS 13.16% HTML 8.86%
angular2 angular5 angular6 text-highlighter text-marker marker textarea highlight selection

ngx-text-highlighter's Introduction

npm version GitHub release Build Status GitHub issues

Text Highlighter

Angular 5+ module for displaying editable textarea where you can highlight text selections and filter your previous selection based on highlighting color. Check it out live demo and play around with the options here

Table of Contents

Installation

npm install ngx-text-highlighter --save

Usage

In your module add the following:

import { NgxTextHighlighterModule } from 'ngx-text-highlighter';

@NgModule({
  imports: [
    NgxTextHighlighterModule
  ]
})

In your component add the following:

<th-container></th-container>

Options

Key Description Type Default
[colors] Set of marker colors Array<string> ['#f44336', '#ffeb3b', '#4caf50']
[markerStyle] Marker Style, changes marker appearance string 'fixed'

Example

<th-container [colors]="['#e22525', '#25b2e2', '#3ee225','#e225d']" [markerStyle]="'float'"></th-container>

ngx-text-highlighter's People

Contributors

dependabot[bot] avatar mmounirf avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ngx-text-highlighter's Issues

Change previously highlighted text's highlight color

Describe the bug
When you highlight text it's being stored in highlighted items, if you selected the same context and change the highlight color, it's being saved again, same value with two colors

To Reproduce
Steps to reproduce the behavior:

  1. Select text to highlight
  2. Click on marker color
  3. Check that it is now existing in stored highlights
  4. Select the same text you selected in step 1
  5. Click on marker color (choose different color)
  6. Text is being saved twice with different values

Expected behavior
The value stored should be replaced with new color

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.1 LTS
  • Browser Version 69.0.3497.100 (Official Build) (64-bit)
  • Version 0.0.4

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.