I have been working on a solution to displaying properly formatted and colorized code in the wiki. I am using a javascript and css from
http://notebar.com/CodeColor.html
So far it I have modified the tags in whitelist.plist so that it accepts the 'lang' attribute on the <pre> tag. I have edited the css so that the codecolor.css is included in the theme I am using. I have modified the javascript so that there is an event that fires when the page loads in the wiki to add the formatting and color codes to the dom of the wiki text, and the code is displayed exactly as I want it.....
That is, until I try to edit the page containing the code. What happens then is that the editor opens with the contents of the DOM, after formatting, rather than the raw wiki text that was stored and saved. Then the code becomes an absolute mess because the event that formats the code is fired a second time and makes an absolute mess of the html and the original wiki text with the embedded code.
Is there anyway to have the editor load the saved wiki content rather than the unsaved DOM representation?
John Davidson