Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

xterm-quick-use

tya341.0.0TypeScript support: included

this is based on xtermjs, expanded some functions

xterm.js, webTerminal, terminal, xterm

readme

Install

npm install xterm-quick-use

Usage

// 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.