TiddlyWiki / TiddlyWikiClassic

TiddlyWiki Classic (not to be confused with TiddlyWiki5: https://github.com/Jermolene/TiddlyWiki5)
https://classic.tiddlywiki.com/
492 stars 114 forks source link

Enable "open in new tab" for prettyLinks #230

Closed YakovL closed 5 years ago

YakovL commented 5 years ago

This set of changes introduces a helper for getting permalink/permaview url (Story.prototype.getPermaViewHash) and adds href attribute to prettyLinks so that right click works with them like with usual links and one can select "open in new tab" action

YakovL commented 5 years ago

Although one may also expect ctrl+click to work as "open in a new tab", I'll postpone introducing such behavior due to the following complications:

I also don't expect one would need to disable adding href, but if that's the case, getTiddlerLinkHref can be overwritten (in the simplest case with getTiddlerLinkHref = () => 'javascript:;'