Lädt...

🔧 Introducing Trace.js – A Lightweight jQuery based Text Highlighter Plugin


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

🌟 What is Trace.js?

Trace.js is a lightweight jQuery plugin for highlighting words or phrases inside HTML elements.

Trace.js Logo

🚀 Features:

  • ✅ Supports case-sensitive and case-insensitive searches.
  • ✅ Highlights full or partial matches.
  • ✅ Works with dynamic content.
  • Zero dependencies! Just jQuery required.

⚡ Why I Built Trace.js

Recently, one of my junior developers needed to highlight a word inside a list of paragraphs dynamically. This gave me an idea what should I build next.

📦 How to Install Trace.js

Method 1️⃣ Install via NPM

npm i trace-text-highlighter

Method 2️⃣ Use CDN

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/connectamitsahoo/trace.js@latest/dist/trace.min.js"></script>

🛠 How to use Trace.js

$("#content").trace({
                match: "highlight",     // Word to highlight
                color: "yellow",        // Highlight color (default: yellow)
                traceType: "full",      // Only highlights full words (default: partial)
                caseSensitive: true     // Enables case-sensitive matching. (default: false) 
            });

🏆 Real-World Use Cases

🔹 Search Result Highlighting – Highlight user search queries dynamically.
🔹 Content Emphasis – Highlight key terms in articles or documentation.
🔹 Live Text Filtering – Visually emphasize matching text in real-time.

💡 Feedback & Contributions Welcome!

Trace.js is open-source under the MIT License. Check out the repo and feel free to contribute or report issues!
🔗 GitHub Repo
🔗 NPM Package

Let me know what you think! Drop a comment below. 🚀

...

🔧 Introducing Trace.js – A Lightweight jQuery based Text Highlighter Plugin


📈 85.03 Punkte
🔧 Programmierung

🕵️ SAP Solution Manager 7.20 Trace Analysis Trace File Log privileges management


📈 28.67 Punkte
🕵️ Sicherheitslücken

🕵️ IBM Spectrum Protect 7.1/8.1 Client Trace Trace File Credentials information disclosure


📈 28.67 Punkte
🕵️ Sicherheitslücken

🕵️ Wireshark bis 2.0.5 IPMI Trace Dissector packet-ipmi-trace.c Denial of Service


📈 28.67 Punkte
🕵️ Sicherheitslücken

🕵️ Wireshark bis 2.0.5 IPMI Trace Dissector packet-ipmi-trace.c Denial of Service


📈 28.67 Punkte
🕵️ Sicherheitslücken

🔧 SimpleTimepickerRB: A Lightweight and Customizable Timepicker Plugin for jQuery


📈 28.17 Punkte
🔧 Programmierung

🕵️ crayon-syntax-highlighter Plugin up to 2.8.3 on WordPress Ajax Request cross site scripting


📈 27.4 Punkte
🕵️ Sicherheitslücken

🕵️ [20130407] - XSS vulnerability in highlighter plugin


📈 27.4 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery bis 1.8.3 auf Node.js jQuery(strInput) Cross Site Scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ Low CVE-2012-6708: Jquery Jquery


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ Low CVE-2015-9251: Jquery Jquery


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ Medium CVE-2016-10707: Jquery Jquery


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery bis 1.8.x jQuery(strInput) String Cross Site Scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🔧 Why jQuery 4 is a good reminder to stop using jQuery


📈 25.92 Punkte
🔧 Programmierung

🕵️ Medium CVE-2020-28488: Jquery Jquery ui


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ Low CVE-2020-7656: Jquery Jquery


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery up to 1.8.3 on Node.js jQuery(strInput) cross site scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery up to 1.11.3/2.2.4 on Node.js jQuery.globalEval Datatype cross site scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery up to 1.8.1 jQuery(strInput) String cross site scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🕵️ jQuery bis 1.11.3/2.2.4 auf Node.js jQuery.globalEval Datatype Cross Site Scripting


📈 25.92 Punkte
🕵️ Sicherheitslücken

🔧 ⏰ Introducing TickWatch: A Versatile jQuery Plugin for Realistic Time and Number Displays


📈 24.53 Punkte
🔧 Programmierung

🔧 gli.js - lightweight jQuery Alternative


📈 24.51 Punkte
🔧 Programmierung

🪟 How to add a cursor highlighter on Windows 10


📈 23.74 Punkte
🪟 Windows Tipps

📰 How to add a cursor highlighter on Windows 10


📈 23.74 Punkte
🖥️ Betriebssysteme

🐧 A bash syntax highlighter that encourages (and can fix) proper quoting of variables


📈 23.74 Punkte
🐧 Linux Tipps

🕵️ Vuln: TYPO3 Code Highlighter Extension Multiple Security Vulnerabilities


📈 23.74 Punkte
🕵️ Sicherheitslücken

🕵️ Vuln: TYPO3 Code Highlighter Extension Multiple Security Vulnerabilities


📈 23.74 Punkte
🕵️ Sicherheitslücken