jcadima
5/2/2017 - 4:44 AM

Syntax Highlighter - PRISM

Syntax Highlighter - PRISM


http://prismjs.com/download.html

http://prismjs.com/plugins/line-numbers/

http://prismjs.com/plugins/line-highlight/

https://scotch.io/tutorials/get-beautiful-syntax-highlighting-for-your-website-code



<!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" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Hello SyntaxHighlighter</title>
	<link type="text/css" rel="stylesheet" href="prism.css"/>
</head>

<body>


<pre class="line-numbers"><code class="language-php">look at my html stuff here &lt;strong&gt;BOLD TEXT&lt;/strong&gt;


&lt;table style="width:100%"&gt;
  &lt;tr&gt;
    &lt;th&gt;Firstname&lt;/th&gt;
    &lt;th&gt;Lastname&lt;/th&gt; 
    &lt;th&gt;Age&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;?php echo $name ?&gt; &lt;/td&gt;
    &lt;td&gt;Smith&lt;/td&gt; 
    &lt;td&gt;50&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Eve&lt;/td&gt;
    &lt;td&gt;Jackson&lt;/td&gt; 
    &lt;td&gt;94&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;


&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;


&lt;?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Photo extends Model
{
	// used as a shortcut so that we dont prepend images with /images/ every time
	// we reference an image in the views
	protected $uploads = '/images/' ;
    protected $fillable = ['file'] ;


    public function getFileAttribute($photo) {
    	return $this-&gt;uploads . $photo ;
    }

}


</code>
</pre>


<pre class="line-numbers"><code class="language-markup">


&lt;table style="width:100%"&gt;
  &lt;tr&gt;
    &lt;th&gt;Firstname&lt;/th&gt;
    &lt;th&gt;Lastname&lt;/th&gt; 
    &lt;th&gt;Age&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Jill&lt;/td&gt;
    &lt;td&gt;Smith&lt;/td&gt; 
    &lt;td&gt;50&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Eve&lt;/td&gt;
    &lt;td&gt;Jackson&lt;/td&gt; 
    &lt;td&gt;94&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;


&lt;?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Photo extends Model
{
	// used as a shortcut so that we dont prepend images with /images/ every time
	// we reference an image in the views
	protected $uploads = '/images/' ;
    protected $fillable = ['file'] ;


    public function getFileAttribute($photo) {
    	return $this-&gt;uploads . $photo ;
    }

}


</code>
</pre>


    <!--[if lt IE 9]>
      <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
 <script src="prism.js"></script>


</html>