a typescript library to converter message between unity rich text and html standard rich text.
- install it
npm install unity-richtext-converter
- usage
import Converter from "unity-richtext-converter";
const converter = new Converter();
// convert HTML to unity rich text
const unitytext = converter.html2unity(text);
// convert unity rich text to HTML
const htmltext = converter.unity2html(text);
- install env, please make sure node.js installed
npm install
- build
npm run build
- run test
npm run test
(adapted from the official documentation)
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
MIT © awatercolorpen