Skip to content

0xWaleed/txtiful-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

txtiful

A standalone library to apply colors to part of your text using a simple syntax.

input: normal [red](red-text) normal [blue] rest of text are blue.
output html:

normal <span style="color:red;">red-text</span> normal <span style="color:blue;"> rest of text are blue.</span>

output: normal red-text normal rest of text are blue.

Installation

NPM

npm i txtiful-js

<script src="https://unpkg.com/txtiful-js"></script>

Code Example:

const {txtiful} = require("txtiful-js");
const html = txtiful("normal [red](red-text) normal [blue] rest of text are blue.");
element.write(html);

About

A simple and convenient way to colorize some parts of your text.

Resources

License

Stars

Watchers

Forks