After a month and a half I’ve now released an updated version of the Wiki Text plugin. This release adds Named Links, Horizontal Rules and Line Breaks.
The following new features have been added to this version of Wiki Text:
- Named Links – as well as recognising web and email addresses you can now add named links by enclosing the link and the name in square brackets – “[https://www.kajabity.com Kajabity]” will appear as Kajabity. It can also be used to introduce relative links.
- Horizontal Rules – a line of four or more dashes becomes an HTML <hr/> tag.
- Line Breaks – lines can be forcibly split by adding [[BR]] into the text which introduces a HTML <br/> into the output.
I’ve fixed the following defects in this version of Wiki Text:
- safeText null pointer error – although unlikely to happen when used by the wikiText plugin, it is accessible directly where it could cause problems (which is how I found it).
- URLs with escapes are now handled correctly in IE.
I have added a simple test page to the ZIP file similar to the Wiki Test page. As well as providing a useful example of how the plugin can be used, it comes in handy for converting text to HTML (I’ve used it for some Thistle Society news items already).
I extracted the syntax definitions to a text file using the Wiki Text formatting – I have now used this to provide both the Syntax page content and to fill in the Wiki Test page (which now has a clear button).
I decided to introduce JsDoc code documentation (I’ll write a post about that later) and added the output to the site – I hope you find it useful.
Finally, I’ve made some small corrections and tidied up the code a little. This included making a couple more functions and some useful regular expressions publicly available. Have a look at the JsDoc for details of these.
I hope you like it.