xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.33k stars 1.61k forks source link

make xterm self controlled/controlled #4971

Closed deflexable closed 6 months ago

deflexable commented 6 months ago

how to make xterm self controlled instead of manually writing with write(string). I want it to exhibit the behavior of an <input /> in HTML

jerch commented 6 months ago

You could wrap xterm.js into a web component exposing mandatory settings as attributes, schematically something like this:

<terminal connection="wss://some/websocket/path" cols="120" rows="35" some_other_needed_setting="xyz" />