Mango Blog Plugin Update: Code Coloring
I've been using Mango Blog for some time [and loving it] but have failed in successfully using the <code> wrappings for displaying my code. While my changes might not suite everyone, I much prefer the new usage and wanted to share.
The biggest change I've made is to the implimentation. While you can still use the true <code> html representative, I was very unhappy with how it effected my editing view. I've added the ability to use <code> wrappings; in other words you can just type the code blocks in the WIZYWIG editor and the colorizor will parse them out. I've also gutted several pieces of functionality that caused the colorizer to format my code in ways I didn't think it should be. Basically write the code as you want it to be displayed!
This did leave one challenge and that was writing this post with all these <code></code> references. So I've also added in the translation of code wrapped in ^^ instead of <> to be converted and not used as display stylings. If you want to gut this little add on, it's one line in the Colorer.cfc (150).
For a code display example, here is my CSS I used to format what you see. The below CSS will keep code from wrapping and display a scroll bar when needed.#content code {
display: block;
width: 568px;
overflow-x: auto;
padding: 5px;
background-color: #dfedfa;
white-space: nowrap;
border: 1px solid #666666;
}
Since you most likly have this installed and in use already, to flush the cache, disable and re-enable the plugin once the new code has been uploaded.
Download The Latest Version of Mango Code Color by EGPS Here