A special site for exploring the outliner built into Radio UserLand.
How to write an HTML page in the outliner
Posted by Dave Winer, 4/23/02 at 11:46:56 AM.Rob McNair-Huff, editor of MacNet Journal, asks if it's possible for Radio to automatically create an HTML page from an outline.
How to
1. Bring the Radio app to the front. (On Windows right click on the tray icon; on Mac OS X, choose the app in the dock.)
2. Choose the New command from the File menu to create a new outline.
3. Enter some text, a few levels deep. Screen shot.
4. Save the document in your www folder, but not in the Gems folder.
5. Wait a few seconds for an upstream to happen, then visit the Events page. You should see an HTML file at the top of the list. Click on the link. Screen shot. That's an HTML rendering of your outline.
Rendering and rules
Here's my example outline as Radio rendered it. Note that all the text is wrapped together. That's because it was rendered through the default renderer, which passes the text through unchanged, unless you provide rules to alter the rendering. You may want to render without rules to use the outliner as an HTML editor. Sometimes you want automatic formatting, that's what rules are for, an example screen shot is below:
Here's the resulting HTML document.
Rules are explained in more detail on this page.
Setting the title of the page
Include a #title directive at the top of your outline to set the title:
When the page is rendered, the title at the top of the page will change to what you've included in quotes.
Using a different renderer
To invoke a different renderer, add a #renderOutlineWith directive at the top of the outline, as indicated in this screen shot:
I chose the twoLevelOutline renderer, and here's the resulting HTML document.
Other built-in renderers include cadillac, justText, newCulture, siteOutliner, tableOutliner. Try experimenting with different ones to see what they do.
If you want to write your own renderer, it's not that hard to do. The source code for the pre-installed renderers is in user.html.renderers.
Pointers
Jeremy Bowers wrote a graphic rules generator.
© Copyright 2000-2008 UserLand Software, Inc. Radio UserLand and Radio are trademarks of UserLand Software.
Last update: Tuesday, April 23, 2002 at 3:02:22 PM.
Email: webmaster@userland.com
![]()
![]()