Hash :
91fdd0b1
Author :
Date :
2020-06-28T01:58:55
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="assets/favicon.png" />
<title>File Highlight ▲ Prism plugins</title>
<base href="../.." />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<script src="assets/prefixfree.min.js"></script>
<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>
<header data-plugin-header="file-highlight"></header>
<section class="language-markup">
<h1>How to use</h1>
<p>Use the <code>data-src</code> attribute on empty <code><pre></code> elements, like so:</p>
<pre><code><pre data-src="myfile.js"></pre></code></pre>
<p>You don’t need to specify the language, it’s automatically determined by the file extension.
If, however, the language cannot be determined from the file extension or the file extension is incorrect, you may specify a language as well (with the usual class name way).</p>
<p>Please note that the files are fetched with XMLHttpRequest. This means that if the file is on a different origin, fetching it will fail, unless CORS is enabled on that website.</p>
</section>
<section>
<h1>Examples</h1>
<p>The plugin’s JS code:</p>
<pre data-src="plugins/file-highlight/prism-file-highlight.js"></pre>
<p>This page:</p>
<pre data-src="plugins/file-highlight/index.html"></pre>
<p>File that doesn’t exist:</p>
<pre data-src="foobar.js"></pre>
<p>For more examples, browse around the Prism website. Most large code samples are actually files fetched with this plugin.</p>
</section>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>
<script src="prism.js"></script>
<!-- The File Highlight plugin is already included into Prism.js build -->
<script src="assets/utopia.js"></script>
<script src="components.js"></script>
<script src="assets/code.js"></script>
</body>
</html>