John-Philip
John-Philip

Reputation: 3520

How to include jsfiddle (or equivalent) in github markdown?

I'm looking for a way to embed some html in my .md markdown files.
Actually, I would like to embed jsfiddle resource in my markdown.

Is there a way to accomplish this ?

It looks like current markdown specs does not provide a way to embed external html, even in github flavored markdown.

I have found the following project, from 2012, which is all about this, but I think it's only a kind of improvement proposal.

Extending Markdown/MarkdownSharp for jsFiddle embedding

Note that the previous article references similar discussions but targeting SO instead of GitHub ( Custom jsFiddle for Stack Overflow, Auto-embed jsFiddle into questions )

I checked the following references from GitHub without finding what I'm looking for ( Mastering Markdown, Writing on GitHub )

Is the feature voluntarily not supported in GitHub markdown, would it be in a near future ?

Upvotes: 5

Views: 1484

Answers (2)

user13096898
user13096898

Reputation:

Simple answer: you can't. I tried using the <iframe> and the <script> tag in Markdown and it simply doesn't work.

Upvotes: 0

Chris
Chris

Reputation: 137228

JSFiddle fiddles can be embedded using an <iframe>, and Markdown has always supported embedded HTML.

However for security reasons it is common for only a subset of HTML to be permitted. GitHub's whitelist doesn't include the <iframe> tag. I'm not aware of any way to do what you want that is compatible with GitHub's tag whitelist.

Upvotes: 3

Related Questions