First of all, it's a really bad thing to use ActiveX object in JavaScript, virtually in all cases. This won't ever be supported by all browsers and platforms, and, more importantly, is utterly unsafe. If any experienced user will see that you are doing such things, such person will never use your products or products of your company, as it would suggest that such company does not consider very basic security practices.
And you really never need it for your purpose. As to the creation of the text editors, they can be pure JavaScrip tools working on all platforms. For example, look at this HTML (not just text) WYSIWYG editor:
http://en.wikipedia.org/wiki/TinyMCE[
^],
http://www.tinymce.com/[
^].
You can look at the source code and get the basic ideas.
—SA