Menu

Tree [6f4e94] master v2.0.2 /
 History

HTTPS access


File Date Author Commit
 modules 2018-01-14 Jakub Vrana Jakub Vrana [b1801c] Use HTTPS
 changes.txt 2013-07-22 Jakub Vrana Jakub Vrana [06a7c7] Add highlighted textarea
 compile.php 2013-12-19 Jakub Vrana Jakub Vrana [6185c4] Modularize languages
 composer.json 2018-03-01 Bernhard Rusch Bernhard Rusch [6f4e94] added composer.json
 demo.html 2013-07-06 Jakub Vrana Jakub Vrana [85b6e1] Support SimpleDB
 demo.js 2013-07-06 Jakub Vrana Jakub Vrana [85b6e1] Support SimpleDB
 jquery.jush.js 2011-03-08 Jakub Vrana Jakub Vrana [b58c68] Fix jQuery plugin (thanks to Daniel Kouba)
 json.php 2013-07-02 Jakub Vrana Jakub Vrana [865891] Highlight keys in JavaScript objects
 jush-api.js 2010-05-13 Jakub Vrana Jakub Vrana [717a7b] Merge from head
 jush-help.wsf 2013-04-05 Jakub Vrana Jakub Vrana [e19e1f] Help cursor for documentation links
 jush.css 2013-07-22 Jakub Vrana Jakub Vrana [06a7c7] Add highlighted textarea
 jush.js 2018-02-08 Jakub Vrana Jakub Vrana [275c9c] Update compiled version
 readme.html 2013-12-23 Jakub Vrana Jakub Vrana [69442c] Fix a typo in class name
 sql.html 2010-08-06 Jakub Vrana Jakub Vrana [4b1295] Utilize hash
 tests.html 2010-03-26 jakubvrana jakubvrana [2c96c4] Tests
 tests.js 2014-11-20 Jakub Vrana Jakub Vrana [16ecef] Fix tests
 textarea.html 2014-01-07 Jakub Vrana Jakub Vrana [f94e9b] Modularize textarea

Read Me

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JUSH - JavaScript Syntax Highlighter</title>
<body>

<h1>JUSH - JavaScript Syntax Highlighter</h1>
<p>Highlights the full stack of PHP application starting with HTML, PHP, SQL and JavaScript code and ending with HTTP headers, <code>php.ini</code> settings or database variables.</p>
<ul>
<li><a href="demo.html">Demo</a></li>
<li><a href="sql.html">SQL highlighter for various databases</a></li>
<li><a href="tests.html">Tests</a></li>
<li><a href="http://jush.sourceforge.net/">Homepage</a></li>
</ul>

<h3>Features</h3>
<ul>
<li>Highlights and links documentation in spaghetti code like nothing else: <code class="jush">&lt;span style="font: small;"&gt;&lt;?php mysql_query("SELECT 1"); ?&gt;&lt;/span&gt;</code>.</li>
<li>Supported languages: everything related to PHP: HTML5, JS, CSS 3, SQL including variables (multiple dialects), <code>php.ini</code> directives, HTTP and e-mail headers, Apache config. Anything could be embedded into each other, e.g. <code class="language-php">header("Content-Type: text/html")</code> or <code class="language-css_pro">color: expression(parentNode.style.color)</code>.</li>
<li>Allows using HTML tags in source code (could be used for pointing out important parts): <code class="language-php">echo "This part is <b>important</b>."</code>. Produces overlapping HTML tags in this case though.</li>
<li>Performance is a priority.</li>
<li><code class="language-htm">&lt;textarea&gt;</code> <a href="textarea.html">syntax highlight</a>.</li>
</ul>

<h3>Installation instructions</h3>
<ol>
<li>Copy <a href="jush.css">jush.css</a> and <a href="jush.js">jush.js</a> into your directory.</li>
<li>Add following snippet before the <code class="jush">&lt;/body&gt;</code> tag in HTML file:
<pre><code class="jush">&lt;script type="text/javascript" src="jush.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
jush.style('jush.css');
jush.highlight_tag('code');
&lt;/script&gt;
</code></pre>
All <code class="jush">&lt;code class="jush"&gt;</code> tags will be highlighted. Language is determined by the class name beginning with "jush-" (e.g. <code class="jush">&lt;code class="jush-js"&gt;</code>). Default language is <code>htm</code>. It is also possible to use <code class="jush">&lt;code class="language-*"&gt;</code>.
</li>
</ol>
<p>Alternativelly call <code class="jush-js">jush.highlight(language, text)</code> to syntax highlight single text.</p>

<h3>Command-line help reference</h3>
<p>It is also possible to use JUSH for opening the appropriate documentation in a browser. On Windows, it is possible to run:</p>
<pre>Syntax: WScript jush-help.wsf filename line column [tabsize] [word]
Example: WScript jush-help.wsf readme.html 2 2
</pre>
<p>The example should open a browser with documentation of the <code class="jush">&lt;html&gt;</code> tag which is at position 2:2 of this file.</p>

<script type="text/javascript" src="jush.js"></script>
<script type="text/javascript">
jush.style('jush.css');
jush.highlight_tag('code');
</script>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.