Add functionality to post editor

I have found an url which explains it all, just adding some javascript, php and css to TinyMCE by some hooks and you got it up and running.
http://codex.wordpress.org/Plugin_API/Filter_Reference/mce_external_plugins