Skip to content

Instantly share code, notes, and snippets.

@yesoreyeram
Created February 2, 2018 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yesoreyeram/c3d192faf400d1a6927b5dee39e8b060 to your computer and use it in GitHub Desktop.
Save yesoreyeram/c3d192faf400d1a6927b5dee39e8b060 to your computer and use it in GitHub Desktop.
D3 Require markdown example
<html>
<head>
<title>D3 require example</title>
</head>
<body>
<script src="https://unpkg.com/d3-require@0"></script>
<script>
let myText = "Hello\n====="
d3.require("marked@0.3.9/marked.min.js").then(function (marked) {
var e = document.createElement("div");
e.innerHTML = marked(myText);
document.body.appendChild(e);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment