Turning media URLs into simple HTML previews of the resource
A feature that I would like to see here is that of turning media URLs into simple HTML previews of the resource. Something like the onebox feature of Discourse.org
Onebox as a library is even free to use and can be implemented in other systems too https://github.com/discourse/onebox
Another one is oEmbed https://oembed.com
- 2 replies
- KajMagnus @KajMagnus2018-11-30 07:42:49.278Z
Hi Olti, nice hearing from you again :- )
I think this is a good idea. In fact there is some basic support for oneboxes already, in Talkyard, but only for a few different things: YouTube videos, Giphy gifs, and images. If I paste a video link in a paragraph of its own:
then, the viedo gets embedded:
Thanks for the link to Discourse's Onebox plugin :- ) That plugin is written in Ruby, but Talkyard in Scala, so I cannot use it. I did have a look long ago, at how Discourse implements oneboxes (including looking at that plugin I think), and got some ideas from that.
I didn't know about oEmbed. Apparently Discourse uses oEmbed tags. Jeff Atwood says: (https://meta.discourse.org/t/quickly-explain-what-onebox-is/28114/16)
Yes, onebox leverages OpenGraph and oEmbed tags, if present on the target site
meaning, Talkyard should most likely do that too. So, at some later point in time, I'll look into oEmbed then :- ) Changing this topic to an Idea, status Planned.
It'd be great to add more types of oneboxes :- ) For example, it should be possible to preview other Talkyard topics, and Discourse topics, and Wikipedia, ... Maybe Flarum? Reddit, HackerNews, WordPress, Ghost, Medium blogs. And ... maybe the way to make that happen, is ... If I make it simpler for other people to open-source contribute to Talkyard, so others can submit Git pull requests with oneboxes of their choice. I've noticed it takes too long for me to do "everything" myself :- P
- @KajMagnus marked this topic as Planned 2018-11-30 07:45:13.955Z.