Doctacosa

markdown

Bold. Italics. And many more.

We know what to call these visual effects, but how do you type them?

Some platforms, such as here on Patreon, display a toolbar where you can click icons (or use keyboard shortcuts) when writing posts. It's not as obvious if you want to write something in its raw form to include somewhere else. In that situation, you need a way to define a set format. After considering many options, I settled on Markdown and I've been working to integrate it everywhere whenever possible.

Markdown is a format that you might already be familiar with from platforms such as Reddit, Discord or GitHub. It's meant to be simple to type and remain readable even in raw text. For example, to write something in bold, you surround it with two **asterisks** on each side. Even if the text conversion isn't available, you can easily tell that the focus on that element is important.

Over time, I successfully integrated this as the default syntax on the Interordi Forums, the news system, the Creeperpedia, and even for my personal note taking. Having a single, standardized form means that text can be copied from one location and then pasted in another without losing any information of formatting, making work all that more efficient.

I ended up developing two tools related to this. The first is Markdown Syntax, which is both a guide to the full syntax and a near real-time preview, so people can try it without risking any live data: reload the page, and any changes are reset! The second is the creatively named Markdown Viewer, which allows multiple pages of raw Markdown to be browsed as if they were full web pages, similar to how a wiki would present its information. I use that one to take project notes in Markdown, then share them easily with others without requiring any manual conversions.

Some alternatives that I considered but tossed aside include the following:

  • HTML (bold sample). It's ubiquitous, but it's also blocked in many places due to the potential visual and security risks. It's possible to try to strip out unwanted elements, such as images and rogue Javascript code, but why risk it when better alternatives exist?
  • BBCode ([b]bold sample[/b]). IOBoard, the software in use for the Interordi Forums, supports a form of BBCode. It's a facsimile of HTML, using square brackets. While functional, it also needs more characters to write out any element, causing the raw text to become harder to read.
  • MediaWiki ('''bold sample'''). This is the syntax used by Wikipedia and its sister sites. While used by millions for the encyclopedia project, it's also one not available on many other platforms. This would mean adopting a different syntax elsewhere, forcing users to learn different variations, and I wanted to avoid that at all costs.

The end result is that as many tools as possible across Interordi share one common syntax. One syntax to rule them all!


This post might be a bit more focused on a single issue than most, but it's something that I've put a lot of thought into for the past two years or so, so hopefully you still found it interesting!

#projects #markdown

– Doctacosa