The following sample shows an example of adding a custom button in C# code and configuring the image, tooltip, etc. in JavaScript
http://richtexteditor.com/demo/custom_buttons.aspx
Is there a way to do it all in C#?