Embed Runkit widget in Discourse

Technically this is possible with a theme component that decorates posts, you would then define a [wrap] section for the embed and on post decoration load up the library and do the embedding stuff.

I would recommend quite a bit of caution here:

  1. You don’t want to invalidate your CSP, so you would have to consider this
  2. You do not want to slow down Discourse due to loading some big dynamic JS payload
  3. You are placing a lot of trust with runkit by allowing them to run JavaScript on your Discourse.

I would estimate building something here would take 1-2 days of work. If you have budget perhaps open a topic on marketplace ? Theme components can be installed fine on our business plan setups.

5 Likes