Embeddable document viewer for Discourse


#1

Idea Overview

It would be neat if there was the ability to view a Stencila document inside of a Discourse forum. As you can see elsewhere on the forum embedding content and rendering it in view is really simple. For example, if you add a Twitter URL, it renders it to look like a tweet.

It would be great if someone could either paste a link to a Stencila document or drag a document onto a Discourse discussion (which would upload it) and then render the document inside of a discussion, kind of like this:

Importantly, this view would then need to be interactive (probably in a read only way), so people could browse the document (kind of like an embedded IFRAME) and explore the content and change it, but changes would not necessarily be saved.

Audience

General Stencila users.
Stencila community

Benefits

  • This would be a great way for people to share documents and showcase their work.
  • It would offer huge value on this forum for community members to collaborate around their work.
  • Helpful also for support - people can show a document and an issue with it and people can provide answers to their questions.
  • Sharing content makes it more likely people will see it, thus opening up the Stencila userbase.

#2

Thanks @jonobacon, this is a great idea!

We’re currently busy working on a hosting service for Stencila documents - so that authors and readers can open them up and interact with them regardless of where the document content resides. So there are two options to integrate with Discourse posts. Both of these might be made more user friendly by writing a custom Discourse plugin.

  1. A “Launch in Stencila” button which would grab the Markdown content of the post from the Discourse API and render it, including dynamic code cells, in the browser. This will be dependant upon whether Discourse will support our Markdown extensions for code cells. Post authors would have to put a link like this into their post: [Launch in Stencila](http://via.stenci.la/discourse://community.stenci.la/t/embeddable-document-viewer-for-discourse/21)

  2. Embedded documents within posts (as you suggest). I think this is probably a better option because, as you say, it allows the Discourse post to be about the document (e.g showcasing, support, howtos) rather than being the document itself. This certainly looks possible:


#3

I agree, I think this would be the easier option. This then also means people could potentially share documents elsewhere such as embedding them on their website pages, sharing on social media, in GitHub/GitLab .md files and elsewhere. :slight_smile: