1.0.0 • Published 2 years ago

txtiful-js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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);