Skip to content

VT100 - RS323 - Websocket - Beginner questions #4883

Closed Answered by jerch
JohannesNeu asked this question in Q&A
Discussion options

You must be logged in to vote

I think the most basic document setup would look like this (untested):

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>terminal test</title>
    <link rel="stylesheet" href="node_modules/xterm/css/xterm.css">
    <script src="node_modules/xterm/lib/xterm.js"></script>
    <script src="node_modules/xterm-addon-attach/lib/xterm-addon-attach.js"></script>
  </head>
  <body> 
    <div id="terminal"></div>
    <script>
      const term = new Terminal(yourConfigOptions);
      const attachAddon = new AttachAddon.AttachAddon(yourWebSocket);
      term.loadAddon(attachAddon);
      term.open(document.getElementById('terminal'));
    </script>
  </body>
</html>

so the needed …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by JohannesNeu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jerch
Comment options

@jerch
Comment options

@JohannesNeu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants