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.
npm install
npm run dev
On your Chrome browser, navigate to chrome://flags
Search for Prompt API for Gemini Nano
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 />
npm run build
index
js file from the assets
sub-directory in the generated dist
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>