highlighter-pen
v1.0.4
Published
Marker-like text selection overlay (live) using JavaScript + CSS injection
Downloads
429
Maintainers
Readme
A simple JavaScript library that replaces the native text selection with a marker-like highlight effect.
It behaves like a real highlighter: drag your mouse over text and see a custom overlay instead of the default selection.
✨ Features
- Marker-style highlight effect
- Works across multiple lines
- Keeps native selection inside inputs and textareas
- No dependencies
- Plug & play (1 script)
🚀 Demo
You can access this demo and try it yourself
📦 Installation
CDN (recommended)
<script src="https://cdn.jsdelivr.net/gh/mimoklef/[email protected]/dist/highlighter-pen.js"></script>
<script>
HighlighterPen().init();
</script>NPM
npm install highlighter-penAnd import it with
const HighlighterPen = require("highlighter-pen");
HighlighterPen().init();🙋🏻♂️ Author
Made with ❤️ by Morgan Bouyakhlef
