Create a plugin for TinyMCE | TinyMCE Documentation
A short introduction to creating plugins for TinyMCE along with an example plugin.