root index legacy

Markdown Inline Formatter

A program that formats markdown code straight inside the text editor itself. Discussing how it works and how you can try it for yourself! 2021-05-06

Try It!GitHub

An Overview

Markdown Inine Formatter is a program that formats markdown code right in the editor itself.

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files.

Wikipedia

Every post in this very website is programmed in markdown. It allows for very human-readable source code, which then gets compiled and styled for the end user. It is very similar to Google Docs or Microsoft Word, but all the formatting is done in plain text instead of with the program's user interface. If you wish to see what markdown looks like, you can click here to see this post's source code!

However, Markdown Inine Formatter is different to other editors because it formats the code in the editor itself as opposed to using a second intervace to do so. You can click here to try it out for yourself! For anyone interested, here is a screenshot of some inline-formatted markdown code that I used to get a general overview of a school assignment: formatted markdown code for school assignment

How it Works

This program is fairly simple. In order to allow the user to edit the formatted markdown code directly, it saves and restores the carret position while highlighting and formatting the source code using Prism.js. Once formatted, the CSS code then styles all the HTML elements generated previously. Here are a few of its defining features (along with a slight bit of humor):

  • Inline formatting for markdown synatx
  • Awesome-looking scrollbar on dark theme
  • Half of the code yeeted from the internet
  • No save or save as option
  • Very crappy undo and redo shortcuts
  • Extremely buggy user interface

— From the project's readme

Moving Forward

I have literally no idea what this project could be used for. However, for the time being, I use it to plan out various assignments for school, such as essays or scientific research. It is very convenient to be able to format text straight in the editor as oppsed to needing to use the user interface on Google Docs, for instance. Even though this project is a bodge of a bunch of code copied from the internet, It's awesome that it actually works!