vercel/hyper

Add a way for plugins to add xterm addons

Open

#2,903 opened on Apr 22, 2018

View on GitHub
聽(1 comment)聽(5 reactions)聽(0 assignees)TypeScript聽(44,582 stars)聽(3,558 forks)batch import
help wanted馃洜 Type: Feature Request

Description

xtermjs offers a way to enhance its API: https://xtermjs.org/docs/guides/using-addons/

We need to find a way to let plugins add some addons.

Proposal:

// Plugin side
import * as zmodem from 'xterm/lib/addons/zmodem/zmodem';

exports.getXtermAddons() {
  return zmodem // [zmodem] will work too
}

On Hyper side, we need to execute this method for all plugins (each time they've changed) to get all these addons and apply them with:

  Terminal.applyAddon(pluginAddon);

Contributor guide

Add a way for plugins to add xterm addons 路 vercel/hyper#2903 | Good First Issue