Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: gh-pages
Fetching contributors…

Cannot retrieve contributors at this time

125 lines (104 sloc) 2.383 kb
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<link rel="shortcut icon" href="favicon.png" />
<title>Test drive ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="prism.css" data-noprefix />
#theme {
margin-right: -9em;
textarea {
width: 100%;
height: 10em;
padding: 1em;
box-sizing: border-box;
margin: .5em 0;
background: #f5f2f0;
color: black;
text-shadow: 0 1px white;
tab-size: 4;
font: 100% Consolas, Monaco, monospace;
white-space: pre;
word-wrap: normal;
#language label {
display: inline-block;
padding: .5em;
#language input {
margin-right: .3em;
<script src="prefixfree.min.js"></script>
<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="" async></script>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<h2>Test drive</h2>
<p>Take Prism for a spin!</p>
<textarea>&lt;p class="hey">Type some code here&lt;/p></textarea>
<p id="language">Language:
<input type="checkbox" name="async" value="1" />
<footer data-src="templates/footer.html" data-type="text/html"></footer>
<script src="prism.js"></script>
<script src="utopia.js"></script>
<script src="code.js"></script>
(function() {
var form = $('form'), code = $('code', form),
languages = components.languages;
for (var id in languages) {
if (id == 'meta') {
var name = languages[id];
$u.element.create('label', {
contents: [
tag: 'input',
properties: {
type: 'radio',
name: 'language',
value: id,
onclick: function () {
code.className = 'language-' + this.value;
Prism.highlightElement(code, form.elements.async.checked);
}, name
inside: '#language'
var radios = $$('input[name=language]');
radios[0].checked = true;
var textarea = $('textarea', form);
(textarea.oninput = function() {
code.textContent = this.value || '';
Prism.highlightElement(code, form.elements.async.checked);
Jump to Line
Something went wrong with that request. Please try again.