txtiful-js
v1.0.0
Published
A simple way to colorize part of your text
Downloads
1
Readme
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);