The highlighting is done client-side. There's some code inside of Demobrowser.js that appears to do this. Specifically, I think it's happening within a function called __BeautyHtml().
I put together a modified DemoBrowser.js file that includes an additional tab called "Editable Html". Here's a screenshot of it: http://sandbox.tartansolutions.com/misc/demobrowser/demobrowser_screenshot.JPG The source file for this is located here: http://sandbox.tartansolutions.com/misc/demobrowser/DemoBrowser.js To use this, replace your DemoBrowser.js file located here: yourQooxdooInstallation\frontend\application\demobrowser\source\class\demobrowser\DemoBrowser.js with mine. This tab places the javascript for each demo into a TextArea field, so that it can be copied out easily, even in Internet Explorer. Unfortunately, this doesn't allow you to actually use the text area as way to change the demo & render the updated code. That would be quite a bit more involved, and would probably require some server-side work...a project for another day:) I tested in FF and IE7. I'm running from an up-to-date version of the 0.7.x svn. Hugh Gibson wrote: > >> I think the idea of making the code editable is good. It probably >> should be implemented as a separate tab, because the current "Source >> Code" tab should probably stay as-is to keep syntax highlighting. > > So the highlighting is done in the server? > >> Tinkering now with addition of editable additional tab for editable >> box. > > Can't wait to see it :-) > > Hugh > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://www.nabble.com/Source-code-Javascript-in-online-demos---allow-edit--tp16780558p16801046.html Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
