Tags

Posts tagged with: textile

ajax analysis api apple atom automator backpack browsers camping cheatsheets code console editors ergonomics gems google helipad hpricot internationalisation javascript lies mac optimisation patterns performance personal php plugins productivity programming prototype rails rapidrails rsi rss ruby server snippets standards sysadmin terminal testing textile textmate theory tips tools vim workshops writing xslt

Textile JavaScript class

Posted on Sun 6 Aug, 2006

This JavaScript class requires Prototype. It displays help on Textile next to elements with a particular class, and parses the help from a Hash that you can define in the constructor.

I’ve been using it to add help next to textareas that accept textile. All I have to do is create textareas with the class “show-textile-help”, and they get a little div full of useful information. The help text is hidden until the user clicks on the link:

AFTER A CLICK BY THE INTRIGUED USER:

Style it a little bit like this:

’ + element1 + ’’
})
textile_help += ’’
})
...

Continue reading → | Tagstextile, javascript, programming

Processing Textile text with XSLT

Posted on Thu 7 Oct, 2004

Textile provides a simple way of writing human-friendly text that can easily be translated to XHTML. HTML tags are simplified into a set of phrase and block modifiers; even tables and attributes can be created.

I was looking at the PHP code for this and wondering if I could create an XSL file that could translate similar text into XHTML. I created some XML to contain my text:

And then used the following recursive algorithm to process it in XSLT:

...
Continue reading → | Tagsxslt, programming, snippets, tips, textile