WordPress has a button in the editor for adding blockquotes to a post. But what if an author wants to add a citation? Unfortunately, it’s not possible without a little HTML knowledge.
This is a problem I’ve thought about a bit when designing DevPress themes (what markup should I be styling for?), but it’s also come up on a few client projects recently. Citations are a pretty common use-case, and it would be great if they were easier to add.
My solution was to build a plugin that replaces the existing TinyMCE button for blockquotes with an enhanced one.
I wrote this as a standalone plugin, but also as proof-of-concept for a core patch. If text is selected, it works exactly the same as the current blockquote button in the WordPress editor. However, if no text is selected, a pop-up modal is displayed with additional fields. These include: quote, citation, and citation link.
Everyone loves blockquotes with citations!
Right now the Better Blockquotes plugin is on GitHub. I’d love for other developers to review it and give me feedback. If no bugs turn up, I’ll submit it to the WordPress repository shortly.
I’m also curious if this is a feature people would even like to see in WordPress core? I’m not familiar enough with TinyMCE yet to understand how this sort of patch could be written, but get in touch if you’re interested! Or, tell me why it’s a bad idea.
Want the Better Blockquotes plugin right now? Download the latest version