I *think* I remember someone mentioning a plugin for something like this…. I just had a VERY long day, so really haven’t the energy to look tonight, but I will bookmark this and see if I can find the thread tomorrow, okay?
Moderator
James Huff
(@macmanx)
Volunteer Moderator
You should be able to use Owen’s “buttonsnap class” to do this, just don’t ask me how to use it. You can find a download link and more information here: http://asymptomatic.net/2005/12/19/2171/whats-not-gonna-work-in-wordpress-20/
The “buttonsnap class” appears to be a solution for plugin developers to add a button into the editor connected to their plugin. It doesn’t appear to be a “quicktags” type of solution where us mere mortals can make the alteration. 😉 Here’s hoping someone comes up with a quicktags-type of hack. 😉
Well, I’ve been completely unable to dig up the post I was thinking I remembered. Hopefully someone else will remember it as well and come up with it…. Sorry!
On a similar note, is it possible to turn off/minimize the upload portion of the Write Post form?
What do you need your QuickTags to do? If you just want a button to insert, say, your name, the following example plugin should demonstrate how to do that with buttonsnap:
<?php
/*
Plugin Name: Button Example
Plugin URI: http://www.skippy.net/blog/
Description: Demonstrates how to use buttonsnap
Version: 1.0
Author: Scott Merrill
Author URI: http://www.skippy.net/
*/
// use Owen's excellent ButtonSnap library
include('buttonsnap.php');
/**
Register our button in the QuickTags bar
*/
function my_button_init() {
$url = get_settings('siteurl') . '/wp-content/my_button.png';
buttonsnap_textbutton($url, 'ME', 'skippy');
}
add_action('init', 'my_button_init');
?>
Create the image “my_button.png”, and store it in your /wp-content/ directory. The $url is the path to your button image. So the call to buttonsnap_textbutton
has these parameters:
* the path to the image to use for the visual editor
* the text for the button in editor (or the hovertext in the visual editor)
* the text to insert when the button is clicked
It should be trivial to extend that example to do all sorts of fun stuff.
I’m not adept enough to get where, in your example, “My Name” is being entered when the button is selected.
I usually use quicktags for things like inserting a div around a text block to format it correctly according to a CSS class, or for quick entry of special characters. Am I on the right track with buttonsnap?
Thanks.
is there any way to enable the quote button in TinyMCE ?