Please show me how to use doc.execCommand (full)!!!!!!
I am trying to write HTML Editor program for my company, I use mshtml.HTMLDocumentClassObject to fire doc.execCommand method.This is my code:
private void toolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
{
mshtml.HTMLDocumentClass doc;
doc = (mshtml.HTMLDocumentClass)this.axWebBrowser1.Document; //doc Object
object empty = null;
switch (e.Button.ImageIndex) {
case 0: //bold
doc.execCommand("Bold",false,empty);
break;
case 1: //italic
doc.execCommand("Italic", false, empty);
break;
case 2: //underline
doc.execCommand("Underline", false, empty);
break;
case 3: //left align
doc.execCommand("TextAlign", false, TextAlign.Left); //set text to Left
break;
case 4: //clear formating
doc.execCommand("ClearFormating", false, null); //clear formating
break;
}
}
But it not understand TextAlign,ClearFormating (Error: Invalid Argument).I using C#.net,Please show me these argument and others (insert picture,insert bulleted,insert numbered,Insert tab,insert shift tab.....),and can you give me some URL to reference about it? Thank you very much!!!!!!!!!!!!

