Are you ready for some CODE inside you slides?!
That you can edit?!
This Code is in a Text Area!
// codemirror demo party!
var greeter = function(name) {
return "Why hello there " + name;
}
console.log(greeter("Joe"));
You can edit it and run it again! Try it!
That code was created with a text area that had the following attributes:
- class - "code"
- mode - "javascript"
- runnable - "true"
The rest just Happens
Code blocks aren't runnable by default. Because you might
want to put crazy non runnable code in there. Like,
html.
You can specify a codemirror theme as long as you include
htmlthe stylesheet for it by setting the theme attribute.