chris >  blog >  Kenny Bloggins

Kenny Bloggins

February 11th, 2024

Man oh man, am I stoked. Blog posts now have a rich text editor, which lets you do all sorts of fun stuff:


Here's a big header.

And here's some more normal text.


Now my text is center-aligned...


Now it's right-aligned...


... And now it's back to the initial state.


Here's a medium header, or sub-header.


And here's some more formatted text, including some bold text and some italic text. In addition, let's just go ahead and drop a center-aligned chill doggie pic in this post:


A chill doggie catching some sun


After this site was rebuilt in October 2021, one of the first features on my wishlist was blog posts, specifically so I could port all my old critical-hit.org posts onto this platform. I had a little music blog at critical-hit.org for over a decade. It ran on WordPress, but I was new to WordPress, and I failed to keep the software up-to-date. As a result, the entire site was obliterated by a hack, but I still had a SQL backup of the posts which I wanted to get back online.


I finally got text-only blogposts live about a month ago, but to fully recreate the Critical Hit content, I would need a rich text editor. Enter Summernote, a super simple WYSIWYG editor, built on jQuery.


I experimented with a bunch of open source rich text editors, but they were all janky or difficult to integrate. Right out of the box, Summernote had everything I was looking for (including great documentation), and after a few hours of tweaking it was running like a dream:




It's packed with features and easy to customize. Summernote team, if you're reading this, thank you for your fantastic work!


Another interesting (to me) note is that now the blogposts are stored in the database using the native LONGBLOB MySQL data type. They get encoded via Base64 before being stored. I had never used any of the blob data types before, and they're cool. Not to be confused with the term 'blog', the BLOB type is an acronym for "Binary Large Object."


MySQL supports the following types of BLOBs:


• TINYBLOB: Maximum length of 255 bytes.

• BLOB: Maximum length of 65,535 bytes.

• MEDIUMBLOB: Maximum length of 16,777,215 bytes.

• LONGBLOB: Maximum length of 4,294,967,295 bytes.


Many of the old Critical Hit blogposts feature images. I wasn't certain if MEDIUMBLOB (~16 MB) would be enough, and I didn't want to get a MySQL error when trying to save if the content exceeded 16 MB. The LONGBLOB has a ~4 GB capacity(!), so unless you're embedding a 1080p rip of Shrek 2 into a single blog post, you should be g2g.


There are still some things I need to address:


• You can't delete a blog post yet. This should only take about an hour to implement, but until then, your blogposts will persist on the internet for the next hundred billion years.

• The 'code' and 'quote' text formatting still need CSS styling.

• Mobile QA – Haven't checked this badboy on my phone, we'll see how it translates.

• Pagination – I'd like to limit the number of posts that appear on your profile to the 5 most recent. After that, /blog will give you a classic WordPress-style printout of ~5 posts per page, and /blog/list will return maybe ~20 or so post titles / links per page. This will include "Next" and "Previous" links at the end of blog posts, so you can navigate around without needing to return to the index.

• Some additional color / layout tweaks.


I'm "watching" the Super Bowl right now, so I'll wrap this up right here. A handful of thank-you shout-outs:


• Corey White: One of the few true friends I made while living in NYC, he's the only other active Roqbox user besides me. My man, I really can't express how grateful I am that you've been using the site. It has inspired me to keep working on it, and your support and feedback has been invaluable. Corey and I played music together in Anti-DiFranco and Casino Pascal, and he's got a sick new indie / post-punk / power pop project called Felt with fellow Casino alum Nathaniel Meek.


• Cullen Gallagher: Cullen also played in Casino Pascal, and we play together in Demoted. He's also been super supportive of Roqbox, and I'm eagerly awaiting some tracks added to the Steve Carface page.


• Tim Jones: Tim left a comment on the first blog ever posted on this site, which no doubt gave me a good chuckle. He was one of the first people I met after moving to Fort Worth, and his friendship and sense of humor have helped make Texas feel like home.


• Jeff Notjeff: Jeff and I recently started a new hardcore band which I'm extremely excited about. As a bonus, he's one of the most natural Dungeons & Dragons DMs I've ever met, and his recent campaign has been a good time. I'm playing a half-orc barbarian named Gormok, because I wanted to cause havoc and annoy the DM (Jeff). Ironically I have been out-chaos'ed by the halfling Philburt.


I was originally going to discuss some of the new features I have planned for Roqbox, but this post has already gone on long enough, so I wish you a fantastic February and rest of 2024, and as always thank you for visitin' the site and readin' this post.



Comment as
post