js-highlighter

💡 A library for highlighting HTML elements, which allows an infinite level of depth. 💡


Keywords
highlighter, highlight, highlighting, highlighting-elements, highlighting-html-elements, highlighting-html, comments, comment, commenting, commenting-elements, commenting-html-elements, commenting-html, js, javascript, typescript, ts, html, dom
License
MIT
Install
npm install js-highlighter@0.1.0

Documentation

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

Option Type Description
id string The id of the element to highlight.
highlightClass string The 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.