- หลังจาก sign in แล้วให้คลิ๊กเลือก Design บนแถบควบคุม จากนั้นเลือก Edit HTML
- ที่แถบ Edit Template ให้ copy โค้ดด้านล่างนี้ไปวางไว้ก่อนหน้าแทก </head>
<link href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"
rel="stylesheet" type="text/css"/>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"
type="text/javascript"/>
- สุดท้ายให้เพิ่มโค้ดเข้าไปที่ body จะได้ว่า
<body onload='prettyPrint()'>
- ถึงจุดนี้เราก็จะสามารถแสดง source code โดยใช้ pre แทกซึ่งเรียกใช้ผ่านคลาส prettyprint ดังตัวอย่างตามโค้ดด้านล่าง
<pre class="prettyprint">
source code
</pre>
No comments:
Post a Comment