Thoughts on Structured Text
What do I really want from structured text for a CMS?
My wish list, in a rough order of importance:
-
The ability to just type normal text and get paragraphs and probably line breaks (not that I use them often).
-
Lists — I tend to organize my thoughts in lists — often nested. So ideally lists should be nestable. It would be great if list items could contain whole multiple paragraphs too.
-
Some inline formatting, like emphasis.
-
The ability to mix in HTML without having to do any extra escaping dance.
-
Do What I Mean — have it just work, for most cases, without having to do too much second-guessing.
-
The ability to quote blocks of code (pre).
-
Extensible shortcuts — little sequences that it replaces with other sequences. Perhaps parameterized, like a google search for a word, for example.
-
Be fairly easy to parse, and automatically change format, if I change my mind later on.
Given my predisposition towards nested lists, perhaps the best overall way to drive the formating from text would be indent-driven. In the same way that python derives block-structure from indenting, so could my structured text. It's not exactly original, but it's the way that seems to sit best with my requirements.
Update: 2004-03-15 — I've finally released the code for my PHP Structured Text.
- ← Previous
Spammers Start Using Wildcard DNS - Next →
Implementing Structured Text