Category Archives: Worpress

WordPress add custom code highlighting tag button to visual toolbar

On my previous post to this i wanted to add some vb and tsql code, and have it appear like T-SQL or VB with similar syntax highlighting

So if you run wordpress here is how you do it
download the “WordPress:CodeHighlighingPlugin” from ideathinking

Follow their install instructions

And here is where my tip comes in

to add custom tag button so they appear in your Visual editing toolbar as your posting, locate the following js file

within the dev js file add the tag buttons of your choice, i personally added tsql and vb like so

Starting at line ~123
#Important note: replace the <_pre and <_/pre with the correct syntax (ie remove the _), i merely used it here in order the site would render the text rather than run through the highlighting engine

now you need to put it all on one line and copy paste into a similar location in the quicktags.js