Permalink
Browse files

All SQL variants highlighter

git-svn-id: https://jush.svn.sourceforge.net/svnroot/jush/trunk@201 9d3eea12-fc29-0410-b379-a5151d7be1fb
  • Loading branch information...
1 parent 98e0a49 commit adcfe9577df3a8ebfda8d2784a5798bd462b9955 jakubvrana committed Apr 30, 2010
Showing with 36 additions and 0 deletions.
  1. +36 −0 sql.html
View
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+<head>
+<title>JUSH - SQL</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+
+<body>
+
+<script type="text/javascript" src="jush.js"></script>
+<script type="text/javascript">
+jush.style('jush.css');
+function highlight(source) {
+ var langs = { sql: 'MySQL', sqlite: 'SQLite', pgsql: 'PgSQL', mssql: 'MS SQL' };
+ for (var lang in langs) {
+ document.getElementById(lang).innerHTML = '<code class="jush-' + lang + '">' + jush.highlight(lang, source) + '</code>';
+ }
+}
+</script>
+
+<form action="">
+<p>
+<input name="source" />
+<input type="submit" value="Highlight" onclick="highlight(this.form['source'].value); return false;" />
+</p>
+</form>
+
+<table cellspacing="0">
+<tr><th>MySQL</th><td id="sql"></td></tr>
+<tr><th>SQLite</th><td id="sqlite"></td></tr>
+<tr><th>PostgreSQL</th><td id="pgsql"></td></tr>
+<tr><th>MS SQL </th><td id="mssql"></td></tr>
+</table>
+
+</body>
+</html>

0 comments on commit adcfe95

Please sign in to comment.