All pastes #172975 Raw Edit

tinyMCE-additions

public php v1 · immutable
·published 2006-09-16 13:02 UTC
rendered paste body
<?php/*Plugin Name: Cori's Advanced WYSIWYG EditorPlugin URI: http://kinrowan.netDescription: Adds more styling options to the WYSIWYG post editor.  Essentially the same as the Advanced WYSIWYG Editor by <a href="http://www.labnotes.org/">Assaf Arkin</a> but with a few different selections.  Important to note - this plugin will work with WordPress MU as long as it's in the user-configurable plugins directory.  When it's in mu-plugins, TinyMCE isn't able to resolve the {$pluginurl} tag, so while the additional buttons will appear, they will do so without images.  I'd like to figure this out, so if you have ideas please contact me (http://kinrowan.net/contact).  I'd also like to add an admin menu to allow selecting these values without editing the code.  We'll see.Version: 0.1Author: Cori SchlegelAuthor URI: http://kinrowan.netLicense: Creative Commons Attribution-ShareAlikeTags: wordpress tinymce wordpress-mu*/if (isset($wp_version)) {    add_filter("mce_plugins", "extended_editor_mce_plugins", 0);    add_filter("mce_buttons", "extended_editor_mce_buttons", 0);    add_filter("mce_buttons_2", "extended_editor_mce_buttons_2", 0);    add_filter("mce_buttons_3", "extended_editor_mce_buttons_3", 0);    add_filter("mce_valid_elements", "add_valid_elements", 0);}function extended_editor_mce_plugins($plugins) {    array_push($plugins, "emotions", "iespell", "preview", "advimage");    return $plugins;}function extended_editor_mce_buttons($buttons) {return array(        "formatselect", "bold", "italic", "underline", "strikethrough", "separator",        "bullist", "numlist", "indent", "outdent", "separator",        "justifyleft", "justifycenter", "justifyright", "justifyfull", "styleselect");}function extended_editor_mce_buttons_2($buttons) {    // Add buttons on the third toolbar line    array_push($buttons, "link", "unlink", "anchor", "image", "hr", "separator",        "cut", "copy", "paste", "undo", "redo", "separator",        "sub", "sup", "forecolor", "backcolor", "charmap", "separator",        "code", "wordpress", "wphelp");    return $buttons;}function extended_editor_mce_buttons_3($buttons) {    // Add buttons on the second toolbar line    array_push($buttons, "iespell", "preview", "emotions");	 return $buttons;}function add_valid_elements($elements) {	$elements = $elements."[class]";	return $elements;}?>