added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
49
EnlighterJS/Resources/ExampleData/Example2-jsinit.phtml
Normal file
49
EnlighterJS/Resources/ExampleData/Example2-jsinit.phtml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!-- Initialize EnlighterJS using the Helper Utility -->
|
||||
<script type="text/javascript">
|
||||
window.addEvent('domready', function(){
|
||||
// Global EnlighterJS initialization for block code (selector: pre) and inline code (selector: code.special) with some options
|
||||
// EnlighterJS.Util.Init(blockSelector:String, inlineSelector:String, options:Object)
|
||||
EnlighterJS.Util.Init('pre', 'code.special', {
|
||||
// reindent code -> replace tab with 2 spaces
|
||||
indent: 2,
|
||||
|
||||
// show all buttons
|
||||
infoButton: true,
|
||||
windowButton: true,
|
||||
rawButton: true,
|
||||
|
||||
// special hover class
|
||||
hover: 'myHoverClass',
|
||||
|
||||
// default language
|
||||
language: 'php',
|
||||
|
||||
// default theme
|
||||
theme: 'classic',
|
||||
|
||||
// toolbar labels
|
||||
toolbar: {
|
||||
rawTitle: 'RAW Code',
|
||||
windowTitle: 'New Window',
|
||||
infoTitle: 'EnlighterJS'
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="alert alert-success" role="alert">Level: <strong>Beginner</strong></div>
|
||||
|
||||
<h3>Some Examples</h3>
|
||||
<h4>jQuery Code (Javascript) - highlighted by EnlighterJS</h4>
|
||||
<pre data-enlighter-language="jquery" data-enlighter-highlight="5">
|
||||
$('#loading-example-btn').click(function () {
|
||||
var btn = $(this)
|
||||
btn.button('loading')
|
||||
$.ajax(...).always(function () {
|
||||
btn.button('reset')
|
||||
});
|
||||
});
|
||||
</pre>
|
||||
<h4>Inline Code</h4>
|
||||
<p>EnlighterJS also supports <code class="special" >$content = print_r(array(1,2,3), true);</code> (since version 2.0).</p>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue