0.1.0 ā€¢ Published 1 year ago

js-highlighter v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

js-highlighter

šŸ’” A library for highlighting HTML elements, which allows an infinite level of depth. šŸ’”

Installation

npm install js-highlighter

Usage

import { highlight } from "js-highlighter";

highlight({ id: "my-id", highlightClass: "my-highlight-class" });

Options

OptionTypeDescription
idstringThe id of the element to highlight.
highlightClassstringThe class to add to the highlighted element.

Roadmap

  • Add highlight with infinite depth
  • Add utils for getting elements
  • Add tests
  • Add documentation
  • Add examples with CodeSandbox
  • Add support for React
    • Handle focus, click, blur, key events

Open for suggestions !

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.