Features

BlogText provide an easy syntax to write your blog posts and pages. The following document structure elements are supported by BlogText:

  • Basic text formatting such as bold, italics, underlining, and strike-through
  • Lists
  • Tables
  • Internal and external links
  • Headings
  • Table of contents
  • Preformatted text and code blocks with syntax highlighting.

Editor Integration

That’s greate by itself, but BlogText goes one step further. It integrates with the WordPress editor. So you can use the buttons provided by the WordPress HTML editor and they will produce BlogText markup. For example, if you want a certain section of text to be printed in bold face, simply select the text section and click the bold button.

BlogText editor buttons
BlogText provides its own set of editor buttons
Media Insert Button
BlogText works great with the "Insert into post" button

BlogText also integrates in the images/media/files form that you use to upload your files to your blog. This means that you can upload your images/media/files like you’ve always done. And when you click on the “Insert into post” button, BlogText markup will be inserted into your editor (instead of HTML code).

This integration sets BlogText apart from other WordPress plugins that just provide a nice syntax.

Automatic Thumbnail Generation

BlogText will automatically generate (and manage) thumbnails for your images – with any size you like.

For example, take the image reflections_for_the_day.jpg (by Dene’ (Seattle) Miles). It’s 1024 pixels wide and therefor too wide for our theme which only allows up to 610 pixels. Now, let’s insert the image here. We do this with the following code (in BlogText syntax):

[[image:reflections_for_the_day.jpg]]

This code will be display as:

Attachment “reflections_for_the_day.jpg” not found

BlogText has automatically reduced the image’s width to fit the theme.

Note that our theme — as probably most other themes as well – has set the CSS style max-width for images. Without BlogText the image would be displayed with the same width. However, the image would be scaled down by the browser which in turn requires the browser to download the original full-size image. So in order to display the image without BlogText, the user would have to download 239 KB (the size of the original image), whereas with BlogText the user only needs to download 25 KB (the size of the thumbnail generated by BlogText). This is only a tenth of the size of the original image’s size. For blogs with a lot of image this considerably decreases the time need to load the page. This may also have a significant impact on users visiting your blog from a smartphone.

Note: If your theme doesn’t provide WordPress with its content width, you can set it manually in the BlogText settings.

You can also use any arbitrary width for your images – as long as its not wider than the theme allows it. For example, if you want to insert the same image with 300 pixel width (and centered), simply write:

[[image:reflections_for_the_day.jpg|center|300px]]

This code will be display as:

Attachment “reflections_for_the_day.jpg” not found

Note: If a certain thumbnail isn’t used any more in any of your posts, it’s automatically deleted from your server to free up some space.

Stable Linking to Posts, Pages, and Files

Linking to posts, pages or files (eg. images) in your blog isn’t that easy – or at least not very stable. Usually those links will be absolute links, ie. links containg the full address of your blog. This is especially true for images inserted with WordPress’ media browser.

For example including an image as thumbnail into a post would produce the following HTML code:

<a href="http://www.mydomain.com/wp-content/uploads/2011/03/mayalogo.jpg">
<img src="http://www.mydomain.com/wp-content/uploads/2011/03/mayalogo-150x150.jpg" alt="" title="mayalogo" width="150" height="150" class="size-thumbnail wp-image-7" /></a>

The blog’s address here is: http://www.mydomain.com/

Now consider you want to expand you website a little more and move your blog to http://blog.mydomain.com. Without BlogText you would need to replace each reference to http://www.mydomain.com/ with http://blog.mydomain.com in every post you’ve written so far.

The same is true for links to other posts. You probably just copied the post’s URL and created a link in your new post. Moving you blog to another URL would break these links as well.

With BlogText this is no longer a problem (at least not for post written in BlogText syntax). To display an image, you simply write:

[[image:my-image.jpg]]

To link to another post, simply write:

[[post-name]]

No more absolute URLs. No more broken links.

Source Code Snippets & Syntax Highlighting

If you’re a programmer or web designer and have your own blog, you may want to share some code examples with the rest of the world. However, WordPress makes this quite a hassle. The only way to insert a code snippet into your post is to switch to the HTML editor an add a <pre> block containing your code snippet.

However, WordPress may still screw up your code snippet, especially:

  • if you switch back to the visual editor, as editing HTML is very uncomfortable and tedious.
  • if your code contains angle brackets (ie. )

BlogText prevents this from happening. BlogText code blocks will always display correctly like this:

function lock() {
    $file = fopen('file.txt', 'r+');
    retry:
    if (!flock($file, LOCK_EX)) {
        goto retry;
    }
    fwrite($file, 'Success!');
    fclose($file);
    return 0;
}

Furthermore can colorize (aka syntax highlighting) your source code snippets. This makes code snippets better readable. This same code snippet with syntax highlighting enable, will display as this:

function lock() {
    $file = fopen('file.txt', 'r+');
    retry:
    if (!flock($file, LOCK_EX)) {
        goto retry;
    }
    fwrite($file, 'Success!');
    fclose($file);
    return 0;
}

BlogText comes bundled with a few ready-to-use syntax highlighting styles (some bright and some dark). These can easily be chosen from BlogText’s settings page.

BlogText won’t break existing posts

We’ve designed BlogText so that it can be installed on any existing blog without breaking any existing posts.

This is achieved by disabling BlogText for existing posts and pages by default. BlogText will only be enabled for new posts and pages by default. You can change this behavior in the “BlogText” meta box while editing a post or page. I the “BlogText” meta box isn’t visible, you can enable it in the “Screen Options” pull down menu in the upper right corner.

the BlogText meta box
BlogText’s meta box while editing a post or page

Besides this the BlogText syntax is designed to be as conflict free as possible. “Conflict free” means that the BlogText syntax won’t collide with any other syntax elements — especially HTML and WordPress shortcodes — you may use or have used in your post.