Aisha Srivastava

Aisha Srivastava

  • NA
  • 230
  • 27.4k

indent selected paragraph where cursor is present

Mar 12 2015 7:33 AM
hi,
I am using web browser control in winform to make htmleditor and want to indent paragraph where my cursor is and leaving other paragraph as same as it is , I am using htmldocument and want to do it like below as in code below but could not style it margin-indent:50px.
Got stuck ....
  
HtmlDocument doc = webBrowser.Document;
HtmlElementCollection para= doc.GetElementsByTagName("p");
 HtmlElement element in para
{
string cls = element.GetAttribute("<p class="current">");
cls.style=margin-indent:50px;

}
could not  succeed  please let me know if any change needed .....in above