Easy text editing with Textpattern
One of the Textpattern features I like best is its built-in text formatting engine called “Textile”.
Textile parses everything I write and converts certain combinations of signs into typographically correct ones. E.g. it replaces
- double hyphens (––) with an em-dash (—)
- single hyphens surrounded by spaces with an en-dash (–) entity
- triplets of periods (...) with an ellipsis (…) entity
- ( TM ), ( R ), and ( C ) to ™, ®, and ©
to name but a few.
This may not seem a great achievement. But Textile does more. It offers a set of handy quicktags that allow for easy and fast typing while at the same time offering extensive control of the resulting XHTML.
To insert a paragraph, I only need to finish off a block of text with a double line break. That’s nothing new, Wordpress does the same. To insert a paragraph with a class attribute, however, all I need to type is: p(myclass). This is my paragraphtext. In the same manner I can apply an ID to a paragraph (or a header element, for that matter):
p(#myID). This is my paragraph with ID.h1(#anotherID). This is my headline with ID
But Textile doesn’t stop here. Links are just as simple:
“This is my linktext”:http://www.urlofmylink.com
As are unordered lists:
* listitem 1* listitem 2
* listitem 3
There are many more quicktags. A double asterisk wrapped around a piece of text will result in bold print. Double underscores turn into italics .
The full set of quicktags is explained and available for testing on the Textile homepage.
Quicktags in general are common to many blog tools and CMS. For me, however, the Textile way of writing is the best I have encountered so far. After a short period of getting used to it, I don’t have to think about the quicktags at all and writing XHTML is as easy and fluent as writing ordinary text—because that’s exactly what I’m doing. No brackets—angled, squared or whatever—no hyperlinks and the like: just ordinary signs that are easily accessible on the keyboard.
The Textile parsing engine makes Textpattern an unbeatable tool if you don’t want the editing process to trip up your flow of thoughts.
However: I am worried myself, as the next upgrade will render much of my modifications useless, I guess. A highly personalised version has disadvanteges, after all.
If your only modified file is the index.php, then an upgrade should be possible. I changed a lot a things in the functions (a.s.o.), which would force me to relearn and recustomise a lot.
Using the Textile plugin, however, does strange things to existing entries: they seem to get parsed by it as well although they were not written according to its rules, obviously. That makes them look very funny. For the moment, I think I will have to live without this plugin.