Alex Hira
Alex Hira

Reputation: 41

How do I print out text in subscript/superscript in JQuery Terminal?

I've been trying to find a way to print out text in subscript/superscript within terminal.echo(), but I haven't found one.

I know that you can add color and make text bold using the following

 return "[[gb;teal;black]" + message + "]";

...but is there a similar way to make it subscript/superscript (e.g., xsuperscript or xsubscript)?

Upvotes: 1

Views: 160

Answers (1)

jcubic
jcubic

Reputation: 66478

The only way is to use raw HTML

term.echo('x<sup>Superscript</sup> or x<sub>Subscript</sub>', { raw: true });

Upvotes: 1

Related Questions