Search code examples
jqueryjquery-terminal

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


Solution

  • The only way is to use raw HTML

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