-1

i want somehow in echo function to display html contents in terminal

just simple hello to be bold in following example

    $("#tm").terminal(function (command, term) {
              term.echo('<b>Hello</b> '+command);
           }

I really don;t know how it is feasible, but there should be some option to assign it html contents in string.

  • Could you please rephrase this question as it's not clear what you're trying to do? Are you referring to the console? – Joe Czucha Dec 20 '15 at 17:19
  • Yes, I just want to display result as HTML doc like table , URL links on console . Let's say I can use same echo function with option html contents, so whatever html tags in string will be interpreted and display html on console. – Yusuf Jiruwala Dec 21 '15 at 07:11

1 Answers1

0

You can echo html if you specify option raw:

term.echo('<b>Hello</b> ' + command, {raw: true});

or if you only want to bold the text use terminal formatting:

term.echo('[[b;;]Hello] ' + command);
jcubic
  • 61,973
  • 54
  • 229
  • 402