Cartoon drawing of a man with a grey beard and glasses.

coofdy.com

Martin Kenny's blog

text

Implementing Structured Text

I’ve started to implement my structured text ideas as PHP code. Currently it handles levels of indenting Python-style, and uses them to determine nesting of lists and heading levels. This allows me to do things like: Have individual list items. Some of which can contain sub-paragraphs like this one. As well as nested lists, like this. This section includes some gratuitous code: for (int i = 0; i < 10; i++) { sprintf("i: %d", i); } Some final closing remarks would go just about here.

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.