Skip to content

Instantly share code, notes, and snippets.

@benvinegar
Created July 19, 2012 03:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benvinegar/3140509 to your computer and use it in GitHub Desktop.
Save benvinegar/3140509 to your computer and use it in GitHub Desktop.
Make all your slides' <code> samples editable
// no document ready check - put this at the end of <body>
;(function() {
var pre = Array.prototype.slice.call(document.getElementsByTagName('code'));
pre.forEach(function (p) {
p.setAttribute('contenteditable', 'true');
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment