在MT4中加入syntaxhighlighter显示文章中的代码

| | Comments (0) | TrackBacks (0)

    前几天看到章鱼的一篇文章是说升级的syntaxhighlighter,我想了想我的文章里也有代码,原来也是用syntaxhighlighter显示代码,不过这次把blog程序换成MT之后,一直没设置syntaxhighlighter,文章中的代码显示的都是很难看的textarea....

    今天有点时间,决定加上这个东东.

首先在header的模板中加入syntaxhighlighter的css和核心的js,另外一些需要代码语言的js

最后在footer的模板中加入一段javscript,以显示代码

好啦,这回可以了,可以看看效果喽~

0 TrackBacks

Listed below are links to blogs that reference this entry: 在MT4中加入syntaxhighlighter显示文章中的代码.

TrackBack URL for this entry: http://www.yigebuliu.com/cgi-bin/mt/mt-tb.cgi/6

Leave a comment

About this Entry

This page contains a single entry by UPDATE published on February 11, 2008 9:35 PM.

祝大家新春快乐,鼠年大吉! was the previous entry in this blog.

逛了逛地坛庙会 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01a