With BugMonkey 2 combining the css and js into one textbox, I realize that it isn't going to be as useful for the css portion, but having that textbox syntax highlighted for javascript would be a HUGE improvement. You can do it for Kiln, and it's done on this site (for non-editable things), so why not in FogBugz!
|
4
|
|||||||
|
|
9
|
You are in luck! While doing a bit of Kiln-related research, I came across the totally awesome CodeMirror project. As a test, I decided to try it out by BugMonkey-ing our BugMonkey editor. It worked better than I expected. The only little gotcha is that it has to load the edit area twice, since BugMonkey is pretty AJAXy. This would be fixed by including this in the BugMonkey plugin (which we have a case open for). You also might need to reload the page once or twice after activating it before it fully loads (I'm still looking into why that happens). The BugMonkey script is below:
As you're reading through the code, you might notice that I'm pulling in some scripts from an appspot address (my poorman's CDN). This is just a copy of the CodeMirror code, which you can get from their site and host elsewhere if you wish. You can also read up on their documentation if you would like to better understand and possibly tweak the initial settings, which are passed to the DisclaimerI have not tested this on a wide range of browsers, so it very well may break on IE or Opera or Lynx. Use at your own risk. We have had some instances where we lost work while working on particularly large BugMonkey scripts. For these, by far the best way to edit them is to use the |
|||||
|