Searching for a WordPress plugin for HTML snippets

I love WordPress, there is no question. It provides so much power to website and with little work can make any mediocre online presence shine due to the established framework. But since I started using WordPress over two years ago there are a couple of items I am still searching to find and one of them is an easy way to re-use pieces of HTML code that I find myself typing time and time again.

My problem of repeating HTML

Here is the issue I am having. I organize all of my images very precisely and name them in such a way. Many website owners don’t realize the value in giving an image a name that properly reflects what is in the image. You can get a 10-20% increase in stumble upon traffic through Google’s image search just by taking the time to give your graphics thoughtful labels.

I take this a step further and upload them to specific directories. Hence, I don’t use the media manager in WordPress for uploading images. Because I manually upload the images I have to manually type out the link to the image when including it in the post. Just the way I do things, and I believe it adds to my traffic and saves my memory, as I can better remember when I file an image under ‘Pac-man’, then the default structure that WordPress uses which is the month and year of when you uploaded an image to the media library.

This is what the plugin could do

Therefore, I would like to have a plugin that will allow me to re-use pieces of code that I use in almost every post. I would preferably like to have a few custom buttons (quicktag) that I can to the wysiwyg editor (TinyMCE). Heck, I would like to be able to choose which buttons are included and which ones are not. All of this needs to be in the HTML side of the editor, not the Visual side.

I am also using the requirement that there can’t be any custom short codes with brackets [] like [img artwork], etc. I want to use code that always means the same thing, standardization, not having to go back one day and try to remember what this specific short code meant. Plus, if I would be relying on the author to always update the plugin and potentially have legacy issues if that plugin no longer worked. No reason for short codes at all in my opinion.

Even if I had some sort of plugin to install a window pane that displayed re-used HTML snippets that I could quickly copy and paste that would be great. It would be nice not have to have to travel with a specific document that served the same purpose that I had to open each and every time.

Current WordPress plugins for inserting custom HTML

Since I don’t possess the skillset to write my own plugins for WordPress, I have to rely on the tremendous third party network of developers. I could probably find a hack version to modify the core of WordPress, but I don’t want to have to migrate custom code between upgrades either. These are some of the plugins I’ve found and how they worked for me.

Snips

Meant for reducing the work of inserting video, this might work. But this plugin is one of many that utilizes short codes. Great for video insertion though, it would save a ton of time for that usage.

David’s Ultra Quicktags

The description for the David’s Ultra Quicktags plugin says “Adds new buttons to the Editor window (Amazon Links, Amazon Search, etc.)” After install I figured out that it allows you to customize a span and div button, but doesn’t allow you to add additional buttons. So, while this works exactly how I would like, by not having the ability to add multiple buttons it really won’t work in the long run.

Hana Code Insert

The description for this plugin reads “Easily insert any complicated HTML and JAVASCRIPT code or even custom PHP output in your WordPress article. Useful for adding AdSense and Paypal donation code in the middle of the WP article.”

Based on the description, I thought this might work, but this plugin is using short codes again so pass.

TinyMCE Advanced

A great plugin for editing and fully customizing the buttons for the editor in the visual side for the edit post dialog box in WordPress. But I didn’t see a way to edit the HTML tab buttons.

Koumpounophobia

The Koumpounophobia plugin might just be what I needed, or it’s the best solution I’ve found so far. The abstract name of this plugin made it a little hard to find but it does allow a user to add custom buttons to the HTML tab in the WordPress post editor. I can define the snippet of HTML output for the press of a button and add as many buttons as I like.

However, I don’t know that my needs are the original intent of this plugin. It seems as though it really only wants to allow to let the user add base HTML quicktags to the WYSIWYG. I need to add snippets that include path references and calls the classes, which means I am inserting values into the attributes. As a result I have to use single quotes because the plugin needs to escape all double quotes.

Plus, once I save my buttons and come back to edit them, although a button press will output the right code, the editor for the button strips my paths and anything with quotes. If you need to change something, you have to completely redo the custom button. Add in the fact that the resulting auto quicktag closer no longer works but adds a second instance of the same code and now I am only saving a little bit of time. I also noticed this plugin adds additional features to the img and anchor tag quicktags, but it doesn’t allow me to remove current quicktags. Not a deal breaker, but again, this would be nice.

Other Options

I have read about a myriad of other plugins but most of them use those bracketed short codes, which I had said before I have no interest in using. As another completely different option, there is a text replacement software called Texter available through Lifehacker. I had used this software over a year ago on a Windows XP 64bit system and for text replacement it worked like a champ. But I generally remember having software conflict issues. Now that I am using Vista, I tried it out again but I was having the same problem. My power user keys in Photoshop don’t act appropriately when Texter is active.

There might be another text replacement tool out there, today I am going to test out Phrase Express and see if that can serve my text replacement needs..

What are you using?

Saving time by easily inserting repeated HTML code is what I am after. I am interested to hear of any other WordPress plugins, even if they slightly vary from the above specs, if they can get the job done. I am also interested to hear about workflows if that is another option. How do you build a post that has custom HTML in it? How do you easily repeat it? Do you use the media library in WordPress? What might I not be considering by not using it?

Anything anyone can offer to help me solve this issue would be a great help.

Other WordPress Needs

Another day I’ll have to write about my other two issues, which are directly related to this HTML insertion need. I haven’t met too many hardcode WordPress users here in Indianapolis. Douglas Karr is an expert of most things technology, but even he didn’t have any software suggestions to solve these problems. But I’ll just mention them here in case you have an idea.

  1. I would like a piece of Windows software that works much like Dreamweaver in that it has some much needed WYSIWYG features but can connect to WordPress. A workflow that allows me to develop my post offline, use easy image insertion and then I just publish out to the database.
  2. A plugin that will allow me to access my image folders on the server to more easily and error free link to images directly, much like Dreamweaver operates.
  3. A plugin that uses AJAX or some other method to easily search for a post ID within the post dialogue, without having to have another window open. The RB Internal Links almost works, but with so many categories, it is a lot of work to find the right item. It would nice to be able to define a default category of posts that comes up first and then have the ability to navigate to other categories if necessary.
Here are some similar arcade posts

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments
User Gravatar

So you’re looking for a plugin which will add a button to the post-editing window and allow you to insert a chunk of HTML?

That’s fairly simple. If you’d like, I can modify my quicktags plugin to do what you want.

Let me know if I’m understanding you correctly.

User Gravatar

Thanks for dropping by and leaving a comment.

I am looking for a plugin that will allow me to add as many buttons as needed to insert chunks of html. King of like how Koumpounophobia works.

So far (one day of use) I have found that Phrase Express works well for text replacement / quick insertion of code. It works for now as a substitute, but then I have to rely on my memory which sometimes fails me.

Up to you. If you think that feature would add value to your plugin, great. If it is something that works for me I’d definitely do another blog post about it,

User Gravatar

Adding as many buttons as needed isn’t going to be a problem for the plain-text HTML editor, because I can label those buttons numerically (or allow you to enter a title). The issue is with the TinyMCE WYSIWYG editor, because that uses images for the buttons, and you’d have no way to tell them apart. I’ll have to think about that one (unless you don’t care about the WYSIWYG editor).

User Gravatar

I understand what you are saying. I personally don’t need the wysiwyg editor at all since this is inserted the snippet of HTML itself, not the visual results of that insert.

But I suppose maybe those that want to insert a snippet and know HTML might also want the option to just use the wysiwyg editor….

Is it possible to have a field to say something like ‘label text’ for what should show in the wysiwyg editor, and do some backgrounds so that it looked like an image button but actually was real text?

Leave a comment

Your email address is never displayed and cannot be spammed. If your comments are excessively self-promotional you will be banned from commenting. Read our comment privacy policy.

(required)

(required)


Pingbacks / Trackbacks