xterm-link-provider
v1.3.1
Published
Create a link provider for xterm.js using regex
Downloads
6,100
Maintainers
Readme
xterm-link-provider
Create a Link Provider for xterm.js using regex (based on xterm-addon-web-links' WebLinkProvider class)
Install
$ npm install --save xterm-link-provider
Usage
import {LinkProvider} from 'xterm-link-provider';
// print clicked emojis to console
const emojiRegex = /(\p{Emoji_Presentation}+)/gu
terminal.registerLinkProvider(
new LinkProvider(
terminal,
emojiRegex,
(e, text) => {
console.log(text)
}
)
)