postheadericon Textile Plugin 2.6 released

[announce] Note: A newer version is available. Please see the category page for the latest.

Another release of Textile by Dean Allen in his blogging tool TextPattern 4.0 has prompted me to make another release of my pluing based on his work. This release is so much better than the last couple, that I really want to just call it Textile 3. I won’t though, because that would confuse everyone, including me.

At any rate, this release improves block handling, and the ‘notextile’ tag (or double equals) actually works as advertised ( *check out* this "textile":1 code that was _not_ converted! ). Actually, that example brings us to another new feature: You can move the URLs out of your code, (even for images) and refer to them by number.

This release is also a lot better about not screwing up when you insert html into your posts, so this, for instance was done with a pair of <b> tags instead of textile markup. That means that comments don’t get messed up, and there should be any problem, for instance, with the adwords plugin.

There are two versions: Textile 2.6 and Textile 2.6 for beautifiers ... the “for beautifiers” version is what I’m using, it removes Textile’s clean-up of <code> sections, so that I can use GeshiSyntaxColorer

Just for a cool example of the neat stuff:

The following textile code:

"Check out this page":1 for a nice place to test your Textile skills.

The image below shows a photo from "my flickr page":2

!4!:3

[1]http://textism.com/tools/textile/index.html
[2]http://flickr.com/photos/jaykul/l
[3]http://flickr.com/photos/jaykul/48483236/
[4]http://static.flickr.com/28/48483236_f9d5d11b99_m.jpg

Would reproduce like this:

Check out this page for a nice place to test your Textile skills.

The image below shows a photo from my flickr page

53 Responses to “Textile Plugin 2.6 released”

  • g:

    Man! I love you!!! Textules!!!!!

    sorty, meant to say Textile Rules!!!!!!!!

  • [...] First an upgrade to Textile 2.6 was in order, followed by sticking stupid double equals signs around everything. But then, because Textile thinks double equals is a tag for no textile, the double equals in the code gets stripped out. [...]

  • You can use xhtml while using textile, but you need to take into account that you are using textile. Which is to say: if you leave a blank line, textile is going to start a new paragraph for you…

    For those who aren’t familiar with authoring WordPress plugins, you can easily alter the main textile() function [which WordPress calls for rendering text into textile output] so that it will not take action unless the post being displayed has a custom field value specifying to do so.

    Simply replace the textile() function inside textileWrapperForWordPress.php with the following code block. Then, for the posts you want to be rendered with textile, you’ll need a custom field named “mime_type” that has the value of “textile” and viola, you’ve got textile output for that post only and your other posts aren’t affected.

    function textile( $string=’‘ ) {
    global $post;
    $mime = get_post_meta($post->ID, ‘mime_type’, true);

    if (isset($mime) && $mime == ‘textile’) :
    $textile = new Textile;
    return $textile->TextileThis($string, false, false, false, false);
    else :
    return $string;
    endif;
    }

Archives