Accessing editor's properties like contentWindow, XPCOM C++

Mojo <[email protected]>
Newsgroups gmane.comp.mozilla.license
Organization http://groups.google.com
Message-ID <[email protected]>
I have gecko-sdk1.8.0.4 in my system. I am working on a XULRunner
application.
I am trying to write an HTML editor as XPCOM component in C++. I could
create the element and add it to the DOM using the following code.

nsCOMPtr<nsIDOMElement> spElementEditor;
nsres = pDOMDocument->CreateElement(NS_LITERAL_STRING("editor"),
getter_AddRefs(spElementEditor));
if (NS_FAILED(nsres))
	return NS_ERROR_FAILURE;

nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("editortype"),
NS_LITERAL_STRING("html"));
nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("src"),
NS_LITERAL_STRING("http://www.google.com"));
nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("flex"),
NS_LITERAL_STRING("1"));

nsCOMPtr<nsIDOMNode> spNode2;
nsres = spElementClientArea->AppendChild(spElementEditor,
getter_AddRefs(spNode2));
if (NS_FAILED(nsres))
	eturn NS_ERROR_FAILURE;

But how can I access editor's properties like commandManager,
contentDocument, contentWindow, docShell, editingSession, editortype,
webBrowserFind, webNavigation and its methods?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.