I'm looking to create my own rich textarea script. I know everyone will throw in their two cents that I can use many opensource products that already do this (see http://tinymce.moxiecode.com/), but I want to look into creating my own for some customization purposes.

Is there a basic tutorial out there that explains how to create one that does something simple like just bold so I can get some ideas and then go from there? Or if you know of a very basic one that just does a few things that I can see how it works then go from there. Obviously TinyMCE does everything under the sun so I would prefer to find something simple to look at to decide in which direction I would like to go.