Click here to show or hide the menubar.

Code nodetypes display as outlines


Now you can expand your way through a code nodetype. This is good because the old form of display, inside an HTML <pre> element, didn't handle wrapping well. So the code was virtually impossible to follow.
Here's an example of what some code looks like now.
This is also good because we now have working code that renders an expandable outline for another nodetype. So it can be re-used in other places. Where I need it next is in tabs.
I also changed the default template for code to style the outline elements. There's a lot you can do to change the way they look. I added more divs and spans to the outline text to make it look better. For example, you can now style comments any way you want.
Look for breakage in rendering outlines elsewhere. Here's my states outline with a blog post under Flint Michigan. It seems to work as before.
I posted a note on the Frontier-User and World-Outline mail lists, thought the old-timers would like to see what a script listing looks like these days.
worldOutlineSuite.viewCodeCallback
worldOutlineSuite.viewOutline

Posted on Sunday, January 22, 2012 at 3:13 PM by Dave Winer.