By blog-editor i mean text-editors that are used to write blogs online. Example would be the one by eblogger or wordpress. Or the one I’m using on stack-overflow to write this question.
Rather than writing whole code from scratch, it would be more efficient to use open source blog-editors, if we have any.
You could try http://www.tinymce.com/ – it’s what WordPress uses I think and is open source.
Another option is http://ckeditor.com/