xtermjs / xterm.js

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

generic URI scheme support in xterm-addon-web-links #3722

Open r10r opened 2 years ago

r10r commented 2 years ago

Hi devs,

The xterm-addon-web-links currently only supports the http and https schemes. What do you think about generic URI support where the user can set/extend the schemes to support? E.g I would be happy to have support for clickable mailto: links.

Running this in the browser console works:

location.href = 'mailto:bob@example.com?subject=Hello%20World&body=Hello%20Bob!'
LabhanshAgrawal commented 2 years ago

Do checkout https://github.com/LabhanshAgrawal/xterm-link-provider You can give it a regex for your desired pattern and create links

r10r commented 2 years ago

@LabhanshAgrawal I will definitely take a look into your link provider. Thanks for the pointer!