On 12/14/05, Owen Winkler <[EMAIL PROTECTED]> wrote:
> "editor_image_classes"? Are you thinking to limit the dropdown to
> applying classes to only images or would there be an additional filter
> to supply classes for paragraphs or new spans or whatever else might be
> selected?
The existing UI I referenced was in the image popup, nowhere else.
Adding classes within the editor itself is not existing functionality
and this coder isn't even thinking about doing it. I want it to be
possible to do what you suggest from a plugin. Strictly speaking, one
should even be able to add a plugin to TinyMCE without dropping
anything in the tinymce/plugins folder.
How? Well, I just thought of a way. We already have filters to modify
the tinymce plugin list and three rows of icons. We're already
processing the JS through a WP instance in tiny_mce_gzip.php. A few
new hooks here and there would enable a plugin OR theme coder to
include their own tinymce plugin JS. Something like this:
add_action('post_tinymce', 'my_plugin_js');
function my_plugin_js() { ?>
// javascript goes here
// strings wrapped in <?php _e('...') ?> for translation
<?php }
What fun! I'll see about a patch to make this possible. And because JS
functions can be redeclared, if I just put the action hook below all
of the stock js you'll have total control over your RTE from a plugin
or theme. Be very careful! :-)
> I foresee a future in which theme authors ask each other, "Which
> functions.php are you using?"
Now THAT is cool. "I took the CSS parser and the dropdown plugin from
redalt and used the admin page generator from somewhere else and..."
Andy
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers