Install
npm install xterm-quick-useUsage
// import xterm css
import "../node_modules/@xterm/xterm/css/xterm.css";
// import xterm-quick-use
import { XTermQuickUse } from "./terminal";
// create Instance,need a container element
const quickUse = new XTermQuickUse(container, options?);
// get xterm instance
const xterm = quickUse.xterm;Extended features
| Features | API | Description |
|---|---|---|
Clipboard |
copy/paste | Automatically read, write, and cut from/to the clipboard in Browser. It also listening browser copy/paste event, see details in EventListener. |
EventListener |
quickInstance.on(EventType, callback) | xtermjs does not provide a read/write lifecycle API, in this case you can not Inject some hooks for unified processing before writing. EventTypes : copy、paste、beforeWrite Perhaps there will be more in the future |
autoResize |
/ | Based on @xterm/fitAddon, auto add a container resizeObserver for triggering fit. |