Created
February 2, 2018 17:21
-
-
Save yesoreyeram/c3d192faf400d1a6927b5dee39e8b060 to your computer and use it in GitHub Desktop.
D3 Require markdown example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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