Adding short codes to WYSIWYG editor?

How do I do it? The end user is never going to remember all of the short codes and will end up going back to the documentation each time.

I would like to add the short codes to the WYSIWYG editor so the user doesn’t have to touch any code.

Any help would be awesome! :smiley:

How do I do it? The end user is never going to remember all of the short codes and will end up going back to the documentation each time.

I would like to add the short codes to the WYSIWYG editor so the user doesn’t have to touch any code.

Any help would be awesome! :smiley:

http://codex.wordpress.org/TinyMCE

So I have to use a plugin?

Try adding this in your functions.php file:

function tmce_new(){
	echo '';

}
add_action(‘admin_head’, ‘tmce_new’);

Try adding this in your functions.php file:

function tmce_new(){
	echo '';

}
add_action(‘admin_head’, ‘tmce_new’);

That seems to be the right thing but is there a way to get it to appear in the visual editor?

Rich Text Editor Filters
These filters modify the configuration of the rich text editor.

mce_spellchecker_languages 
applied to the language selection available in the spell checker.
mce_buttons, mce_buttons_2, mce_buttons_3, mce_buttons_4 
applied to the rows of buttons for the rich editor toolbar (each is an array of button names).
mce_css 
applied to the CSS file URL for the rich text editor.
mce_external_plugins 
applied to the array of external plugins to be loaded by the rich text editor.
mce_external_languages 
applied to the array of language files loaded by external plugins, allowing them to use the standard translation method (see tinymce/langs/wp-langs.php for reference).
tiny_mce_before_init 
applied to the whole init array for the editor.

http://codex.wordpress.org/Plugin_API/Filter_Reference#Rich_Text_Editor_Filters

found a better tut http://brettterpstra.com/adding-a-tinymce-button/

I think you are looking for

mce_buttons

Just check out the WordPress codex :wink:

Edit:

Okay OrganicBeeMedia was faster :slight_smile:

@OrganicBeeMedia - That’s just what I finished following and managed to get it working and customise it. Thank you for all the help but that tutorial took a bit of searching but it’s what I needed in the end. :smiley: