This is a simple text formatter that makes your social media posts look pretty by enabling bold and italics texts. It uses a Unicode Substituion
technique to workaround the rendering limitations of such texts on social media platforms.
Tip
The app also uses an EdgeAI (Gemini-nano on Chrome) for a feature that allows you to detect the overall perceived sentiment of your post content. To use this feature you'll need to enable the experimental
gemini nano prompting flag in your Chrome browser settings.
- Steps to Run Locally
- Steps to Enable Gemini-nano On-device Model on Chrome
- Standalone Usage
- Architecture (HLD)
- Clone the repository
- Change into the repository's root directory
- Run
npm install
- Run
npm run dev
-
On your Chrome browser, navigate to
chrome://flags
-
Enable the flag and restart your browser
Since the build exports a native webcomponent, you can use it in any HTML file by importing the script and using the tag <social-text-formatter />
- Build the project by running
npm run build
- Copy the built
index
js file from theassets
sub-directory in the generateddist
directory to your project
<!DOCTYPE html>
<html lang="en">
<head>
<script type="module" src="<path_to_the_built_js_file>.js"></script>
</head>
<body>
<social-text-formatter />
</body>
</html>