I worked on a plugin this weekend for storing HTML demos in WordPress. This is still a work in progress, but I think it’s pretty cool so I wanted to post a video showing what I’ve got so far.
When you write a new demo, you get fields for HTML, CSS, and Javascript. There’s also an option to select from a few libraries that are already including in WordPress to load on the page. On the post page, the HTML, CSS, and Javascript are inserted where the_content()
is called.
The syntax highlighter used here is CodeMirror. You can find the code for HTML Examples on Github.
Looks like an awesome idea. As you start to build out the ability to choose a JavaScript library, it’d be cool if there was a way to allow us to select multiple items (for instance, if we’re doing a demo that requires jquery-ui-accordion and jquery-ui-dialog, or something like that). Keep up the good work; I love the concept.