You mean a wysiwyg editor that runs inside your browser?
I wouldn't have a clue how to actually make one, but there's a great free one called FCKEditor that you can use.
I would definitely suggest FCKEditor. Its free, so you dont have to pay. It's opensource, so you can edit it. Theres no need to create your own, but if you really want to, you could just study the source.