Here’s another simple WordPress plugin I came up with. I was trying to figure out an easy way to create a text box for some song lyrics which, once clicked, selected everything inside so anyone could easily copy and past the contents. Well, once I figured out how to make it I figured I would make it easier for others who want to do the same thing. Hence, Simple Select All Text box was born.
Basically with a simple shortcode in a post or a page you can have your very own one click, select all text box. Here’s how it works:
- To create a text box in a post or a page use this shortcode: [textbox rows="3"]Contents of text box[/textbox] You can obviously change the amount of rows to your liking. If rows aren’t specified it will default to 5 rows.
- To create a text box in the sidebar, header, footer, etc. use this template tag:
<?php simple_select_textbox('# OF ROWS','WIDTH IN PX','BOX CONTENT') ?>
Installation:
- Upload the whole simple-select-all-textbox folder to the /wp-content/plugins/ directory.
- Activate the plugin through the Plugins menu in WordPress.
- Go to the options page to adjust the width of all text boxes made using this shortcode.
Screenshots:

Changelog:
Version 1: It Begins
Version 2 (3/8/11): Fixed bug which wouldn’t allow multiple instances of the textbox on one page.
Version 2.1 (3/9/11): Fixed bug which showed default HTML markup in the textbox. Expressly writing HTML in the visual editor will still show in the textbox however.
Version 2.2 (7/22/11): Added support for nested shortcodes and added class to textboxes for styling. Also renamed some variables to more unique names to avoid conflicts with other plugins.

thanks dude! I just looking for this plugin, thanks
This is great!
I’m having one small problem with this. I’m trying to create a snippet of BBcode in one of the boxes, but instead of blank lines, I’m getting and codes added (not valid BBcode).
You can see this in action on this page: http://socalhiker.net/2010/04/hiking-the-roller-coast-ridge/
The html tags are not in my editor, but when I save the page, WordPress is adding them. Any suggestions?
I was able to workaround the problem by removing all line breaks and adding the [br][br] BBcode instead. Not really a solution, just a workaround.
Cool man, I just noticed you hike around San Clemente. I’m actually from there.
Hi.. thx for the sharingg..
i will use it for sure
-chandra ekajaya
I have problems with this plug-in
it will display wrong (“)
so if you would like to post
“http://pinoyfestival.com/”
it will show
”http://pinoyfestival.com/”
and codes you display won’t work like this
you could see ” slanted not straight on text editor.
my site is http://www.pinoyfestival.com
hm, this isn’t actually working. i even installed some code in my theme’s functions.php, but that also compromised it, replacing the quotes with the " replacement…
anyone figure this out, as I’m trying to use this to enable folks to grab code but not workin’ out so well because of these fancy quotes.
(I *am* inputting non-fancy quotes in the post-edit box)
nevermind, got it, thanks to this!
http://www.lonewolfdesigns.co.uk/removing-smart-quotes-wordpress-posts/
Great plugin. Works great.
Thank you for your plugin. However, have you seen my posting here yet?
http://wordpress.org/support/topic/plugin-simple-select-all-text-box-not-displaying-correctly-when-used-with-grunion-contact-form
Hi Cliff, sorry for the late reply I was on a bit of a break from web stuff. I’m back now have goals to fix issues with this plugin soon. Thanks very much for the post, I’ll look into it.
-Garrett
1) The newest version hasn’t fixed this incompatibility issue, which I added to the forum: http://wordpress.org/support/topic/plugin-simple-select-all-text-box-not-displaying-correctly-when-used-with-grunion-contact-form#post-2026616
2) This may be a bit more advanced, but is there a way to add a parameter to convert shortcodes before displaying the select text?
Examples:
A) Current action – the shortcode is the text exactly as entered
[textbox rows="1" shorcodes="0"][field "video_embed_code"][/textbox]
B) Desired – let the shortcode(s) “execute” (or “render” or whatever it’s called), then the textbox text would contain the actual embed code –
[textbox rows="1" shorcodes="1"][field "video_embed_code"][/textbox]
Look forward to hearing back. Thanks!
I figured out #2…
Put something like this
<textarea rows="2" cols="25" class="video-embed-code" onclick="this.focus();this.select()">[field "my_video_embed_code_custom_field"]</textarea>in a shortcode container plugin (e.g. http://wordpress.org/extend/plugins/post-snippets/)
And then just call that plugin’s shortcode name where you want it:
[my_shortcode_1]Then the Simple Select All plugin is no longer needed.
For the sake of this plugin, though, check this out: http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes
Hi Cliff,
I’m releasing a new version today which will parse nested shortcodes and shouldn’t have any compatibility issues with Grunion Contact Form.
Is it possible to use multiple times on one page. I am trying to put a lot of seperate code on one page and it gives me an error code if I put in more than one box. Tips? Thanks for the plugin!
Hi Natalie,
Hmm, ok yea I think I know what the problem is. As I said above, I was on a little hiatus from web stuff but I’m back now so hopefully I can get this plugin in tip top shape very shortly. Thanks for your message and patience!
-Garrett
This should be fixed now Natalie, go ahead and update to the new version.
Hi,
Very nice plugin. Perfect for what I need.
I have a form that generates HTML for users. This HTML page needs a nice text box like yours where users may click quickly and copy the code. I am trying to place it in the page template so that the HTML displays inside your textbox.
I need this somehow to be in the ‘CONTENT’
1))); ?>
How would I do that?
Thanks for your help.
The code I think didn’t show up in the last comment:
1))); ?>
Matt, sorry your code doesn’t seem to be showing up. Be sure to wrap it in code tags.
http://codex.wordpress.org/Writing_Code_in_Your_Posts
-Garrett
Hey, I really love this plugin but its not allowing me to post more than one box on a single page… I have read that this was an issue before but I have the latest version of this plugin and its still not working for me… maybe I’m missing something. Any tips would be great!
Thanks,
Ashley