Textile · 13 December 2002

For years I’ve been trying to imagine a bulletproof web-based plaintext-to-HTML system, one that respects typographic standards and the correct presentation of non-standard characters, as well as structured markup, without the writer having to think (or having to have learned) very much about it. Ideally such a system would mimic the functions in the web writing Applescripts available from this site, which were created with the same ideal in mind; those scripts make writing text for the web a snap, but only for those working on the Mac platform, and, as the scripts require a standalone application to run, they impose what feels like an unnecessary third step in between writing and publishing. Ideally, one should be able to write, hit send, and be done.

Of course many current content management systems allow you to do just that – write, format and publish in one place – but none offer a complete and unfussy way to ensure the typographic and structural standards mentioned above, nor do any all offer easy methods to produce textual niceties (such as, say, numbered and bulleted lists or block-quoted paragraphs) available in word processors to those who don’t want (or don’t know how) to type out a lot of HTML tags. [Revised: I was ignorant of and , both of which integrate with specific CMSs]

So I’ve come up with Textile, a humane web text generator.
You can try it out with some preloaded sample text, or type in whatever you like to see how it works. Go ahead, format some text. Go on. Let me know where it lets you down.

What it’s supposed to do:

  1. Convert non-standard characters to HTML entities, ensuring proper display on different browsers and operating systems (ôîûÖÏÜ).
  2. Offer (for now a fairly short list) of automatic conversions from plain text conventions left over from the manual typewriter to their typographic equivalents (two hyphens become an em dash, one hyphen surrounded by spaces becomes an en dash, etc.).
  3. Ensure that problematic characters such as the ampersand are converted to an entity where necessary.
  4. Convert straight single and double quote marks to their typographic ‘curled’ equivalents in readable text, while leaving quote marks required by HTML untouched. (The witheringly talented has written a in Perl that does this sort of quote ‘education’; Textile is written in PHP and it uses a different text-scouring method, but it owes a lot to the example of John’s excellent script.)
  5. Offer quick ways to delineate text structure, without typing out tags. Headers, list, and blockquote tags are wrapped automatically simply by typing two or three characters at the beginning of a paragraph. Paragraph tags and linebreaks are handled automatically.
  6. Offer shortcuts to style text (bold, italic) that may save minutes over the course of a lifetime.
  7. For the raised pinky set: automatic application of a CSS style called ‘caps’ to strings of three or more UPPERCASE letters.

It’s part of Textpattern. Which will be ready some day.

*   *   *