-
I need to print command results which I already have as HTML code. Using term.write("< table >..< /table >") prints the HTML code instead of interpreting it and showing the table instead. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thats not possible in a direct fashion. The terminal works the other way around - it gives you text/cursor mechanics to be shown by a HTML/JS engine. But to get there, it uses very different render methods depending on the selected renderer (canvas, webgl or DOM), thus it is almost impossible to hook predefined HTML snippets directly into the generated output. The best you can do here is to parse the content back into a text string as generated by term.write(yourTableParse('<table>...</table>')); |
Beta Was this translation helpful? Give feedback.
Thats not possible in a direct fashion. The terminal works the other way around - it gives you text/cursor mechanics to be shown by a HTML/JS engine. But to get there, it uses very different render methods depending on the selected renderer (canvas, webgl or DOM), thus it is almost impossible to hook predefined HTML snippets directly into the generated output.
The best you can do here is to parse the content back into a text string as generated by
ls
and then feed it to the terminal, e.g.