https://github.com/hacktoolkit/xterm.js
A drop-in JavaScript module to colorize Xterm output on your webpages. Absolutely no external dependencies required!
https://github.com/hacktoolkit/xterm.js
Last synced: 4 months ago
JSON representation
A drop-in JavaScript module to colorize Xterm output on your webpages. Absolutely no external dependencies required!
- Host: GitHub
- URL: https://github.com/hacktoolkit/xterm.js
- Owner: hacktoolkit
- License: mit
- Created: 2019-08-01T01:29:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T08:00:29.000Z (almost 5 years ago)
- Last Synced: 2025-08-23T18:07:21.178Z (6 months ago)
- Language: HTML
- Homepage: https://l33t-xyz.github.io/xterm.js/
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# xterm.js
A drop-in JavaScript module to colorize Xterm output (both ANSI 16 + 256 colors) on your webpages. Absolutely no external dependencies required!
# Live Demo
A demo is worth a thousand words.
- **Basic Demo**: [See a live demo](https://l33t-xyz.github.io/xterm.js/demo.html) ([source](https://github.com/l33t-xyz/xterm.js/blob/master/demo.html)).
- **[Visual regression test with ANSI 16 + 256 colors](https://l33t-xyz.github.io/xterm.js/test.html)** ([source](https://github.com/l33t-xyz/xterm.js/blob/master/test.html)).
# How It Works
Like magic, it turns simple HTML markup using the `` tag with the `xterm` class:
@g[1] Your flame @G<@W*><-:-><*@G> @YSLAUGHTERS @G<@W*><-:-><*@G>@w @gan antlion! @R[358]
@RAn antlion screams as the flames engulf it!!
@wYou receive @G68+7+@R7@w experience points.
@wYou receive @G82@w bonus experience points from your daily blessing.
@wYou have @Y71@w daily blessing bonus experience kills remaining.
@wYou get @Y6,790@w gold coins from the charred corpse of an antlion.
@MYou are taxed @Y67@M gold coins by your clan.
@wYou get an @ra@wn@rt@wl@ri@wo@rn @Y{@whusk@Y}@w from the charred corpse of an antlion.
@cThe Fallen Soldier gives you @Y62@c gold coins for the charred corpse of an antlion.
... into l33t output you can share with your MUD and RL friends:

# Get Started in under 30 seconds
**It's as easy as 1, 2, 3!**
1. Wrap all Xterm output you would like to format as colorized with:
`...`.
2. Include this line before the closing `