Proposal: Pasting link to tw.com should make it pretty / preview

Here in Talk, it would be much more accessible if pasting, say, this unreadable link here:

https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fui%2FControlPanel%2FSettings%2Fcodemirror%2FcursorBlinkRate

…would instead display as:

$:/core/ui/ControlPanel/Settings/codemirror/cursorBlinkRate

…perhaps even as a preview like we get when pasting links to e.g to twitter posts. (BTW, it is very good that links appear merely as links when pasted “inline” but as full previews when pasted with a preceding line break - i.e so we can choose how it is to be displayed.)

3 Likes

It would be possible to copy a “markdown prettylink” to the clipboard if we eg: press the CTRL button when tm-permaview or tm-permalink is clicked. I did have look at the code. It should be straight forward.

May be

CTRL click … Create a TW prettylink to the clipboard
ALT click … Copy a MD prettyllink to the clipboard

1 Like

We’ve had prior conversations about this. I thiink it was determined there would need to be a discourse plugin written for handling references to TW (there are built-in plugins for Twitter). A different approach would be to add the required headers to the static version of tiddlywiki, so one could reference them in a post.

2 Likes

That makes sense but is there anyone both capable and willing to create that? Otherwise, the chances are probably better with a TW solution.

@pmario - Thanks for looking at this. As implied in the gh thread replies, would there be a way to make a TW solution that is more general than a only for discourse? Considering how TW’s are very often stored locally or on non-conventional servers (with URL’s that are less appealing), it might make sense with something that generally prettifies anythingugly/mytiddler into mytiddler?

Alternatively (and again referring to the complaint in the gh thread) maybe it doesn’t have to be implemented in the core but could be a plugin that tiddlywiki.com has installed. Because that is of course where the majority of links link to here on Talk.

You can use TW to give you a clean URL, but to give the nice box that you see for github or twitter requires a back-end server (or a static html file with headers) that follows the OneBox api that everyone seems to use. That is, you can’t use a javascript-based solution (like tiddlywiki.com) because Discourse/Discord/Github/Twitter won’t fetch, render and parse the JS.

Edit: I’ll walk that back a bit. Maybe we could have a type of link that presents an informational overview of a tiddler. Then that link could be called in an iframe on discourse (don’t know if other services allow iframe). So you could get the effect of OneBox without OneBox.

IMO, the full “preview” is nice but not necessary. I’d be happy with just a pretty URL.