Rich Text Converter
A JavaScript library to convert normal text into rich text with support for hashtags, mentions, bold, and underline.
Installation
Using npm
You can install this package via npm:
npm install rich-text-converter
CDN Integration
You can also use the library directly from a CDN:
<!-- Include RichTextConvertor.js from jsDelivr -->
<script src="https://cdn.jsdelivr.net/gh/SH20RAJ/RichTextConvertor/RichTextConvertor.min.js"></script>
Usage
Browser
// Create a new instance of RichTextConverter
const converter = new RichTextConverter();
// Example usage
const inputText = "Check out #trending topics and mention @user in this **cool** __text__!";
const richText = converter.convert(inputText);
console.log(richText);
Node.js
You can also use the library in Node.js:
const RichTextConverter = require('rich-text-converter');
// Create a new instance of RichTextConverter
const converter = new RichTextConverter();
// Example usage
const
…