citizenos / ep_embedded_hyperlinks2

Etherpad plugin to embed hyperlinks within a pad
5 stars 8 forks source link

Feature Request: Simplify linking to another pad #17

Closed mmccarn closed 3 years ago

mmccarn commented 3 years ago

I used to make heavy use of ep_linkify, which I can not find online to add back to my system.

If the code for the default protocol in ep_embedded_hyperlinks2 is modified slightly, users could create links to another pad simply by typing the filename portion of the pad's URL (that is, the pad name with illegal characters converted to underscores).

Proposed change:

56  - url = "http://" + url;
56  + url = window.location.origin + "/p/" + url;

Now if I want to link to another pad on my server, I simply paste the pad name into the 'URL' field (and replace spaces etc with underscores)

seballot commented 3 years ago

Hi ! yes it will work for your specific case, but this plugin is to add any link on a pad, so if I put duckduckgo.com I don't expect to create a link like http://pad.my-server.fr/p/duckduckgo.com ...