Since I started using Atlassian's Confluence in a few projects, I find myself wanting to type in wiki markup everywhere. I especially like being able to create links like this:
[Title of url|url of link]
Using this markup, you can type something like this:
[John's Blog and Stuff|http://www.gobowen.com]
...and get this:
John's Blog and Stuff
I think that's a really easy system to remember and use. So, I took my first stab at writing a custom module for Drupal, a filter that can be used in the Input Formats to produce this kind of link. Rather than start completely fresh, I copied a good deal of the concept from the amazon filter for Drupal and just adapted it to my own purposes.
It works, but it needs work. The Regular Expression validation and matching is very weak. If you're reading this and want to improve on things, have a go at it and let me know how it turns out.
The code is attached. I recommend assigning it as a filter before the default url handler filter in Drupal...otherwise, you may get unexpected behavior.
| Attachment | Size |
|---|---|
| wiki_linkify_filter.tar.gz | 6.94 KB |
Comments
Post new comment