You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
690 B
690 B
Markdown-based Code Playground
This is a simple Markdown-based code playground.
It combines HTML, CSS, and JavaScript like CodePen, but rather than getting it from, separate panes, it takes it from Markdown code blocks.
It uses mdast-util-from-markdown
to extract the code blocks, combines them into an HTML
string, and places it as a srcdoc in an iframe
at the bottom of the page.
<div class="hello">
Hello, <span id="name">name</span>.
</div>
.hello {
background-color: #aaf;
border-radius: 5px;
padding: 3px 5px;
}
document.getElementById('name').innerText = 'World';