Rachel Has Problems

Hindsight is a wonderful thing

They often say hindsight is a wonderful thing, and damn is that true!

Before you get all worried, this isn't anything about me, or something significant for that matter. Nope, it's instead a realisation, a learning point to share in the hopes that it saves someone else a headache.

As you may be aware by now, this blogging system is something I developed from scratch by myself with the very occasional update over the past year or two. The bulk of the system was written during the UK COVID-19 lockdowns of 2020 (remember those?), and what you don't get to see is how posts are composed as that is a protected page. The editor, like the rest of the system, was coded from scratch. Initially I was looking into implementing a HTML editor, but then decided that could be problematic when loading back into the post editor should it be needed in the future. I wanted something that was WYSIWYG, but couldn't find anything that was openly and freely available that met my needs. In the end I planned out, and developed my own custom solution that uses "elements," similar to online site builders like Wix and Weebly.

This was a mistake.

A screenshot of the blogging system editor as of December 2024
A screenshot of the blogging system editor as of December 2024

The Problems

I have a few gripes with the way my current editor works. The first is how you re-arrange elements on the page. Say I wrote an article, then wanted to put in some headers after I had written the post, I would need to add a header element then click on a "move element up" button that appears when I hover over that header element. I would need to do this as many times as required to get the header in the right place. There's no drag and drop re-arrange functionality which OK sure I could add, but I think there's a better way.

The other pain that comes to mind is that drafting anything on a device that isn't a desktop or a laptop is a chore. There's no ability to paste in some formatted (or non-formatted text for that matter) unless you split your Apple Notes draft say into sections of text between headers. It's hard to explain I admit, but the crux of all of this is that the editor could be so much better.

A screenshot showing the tools that appear when you hover over an element and the move element up/down buttons
A screenshot showing the tools that appear when you hover over an element and the move element up/down buttons

Cross-platform

Let's face it, if for whatever reason this blog system just doesn't work out and I install Wordpress, exporting posts and importing them into a different blogging system would be an important thing for me. I wouldn't want to loose posts just because I move to a different blogging platform. I'm not planning for this to happen, but I think it's important as a feature if I was to release this system for public use. The current editor is a propriety nightmare that doesn't follow any kind of formatting standard because I made it up as I was going along.

The potential solution

Ultimately the editor needs to follow some form of recognised formatting standard to make it easier to use, and to easily utilise the raw post data for whatever delivery stream it is used in (displaying on web, publishing to RSS, etc). I still don't think the answer is HTML, I think that's more complex than it needs to be. The best option I believe is Markdown. Markdown is widely adopted on the web and allows for the easy formatting of raw text through the use of a very simple syntax. This syntax can then be adapted as required for the previously mentioned delivery streams.

Re-developing the editor

To implement this is going to be a total pain in the backside, I wouldn't want to loose any posts up to now, so I'd have to maintain the "legacy" page renderer. My concern is that this will just add to the code base and make the code harder to read and understand. I think the way forward to implement this is to set up a separate environment for this system, develop as required the change towards utilising Markdown, and then create a conversion script to convert all the legacy posts to Markdown formatted raw text. It's a plan, but as I said at the start of this post, hindsight is a wonderful thing and I wish I'd implemented Markdown from day one.

Rachel x

Apologies if this post doesn't make sense or flow very well. I wrote it later in the evening when I was half asleep.

This post has been tagged with the follwing tags: