private void InsertPagebreak()
{
{
IHTMLDocument2 htmldocument = editorWebBrowser.Document.DomDocument as IHTMLDocument2;
IHTMLSelectionObject currentSelection = htmldocument.selection;
if (currentSelection != null)
{
IHTMLTxtRange range = currentSelection.createRange() as IHTMLTxtRange;
if (range != null)
{
string newhtml = "
";
";
newhtml += range.htmlText;
newhtml += " ";
range.pasteHTML(newhtml);
}
}
}
}
this is the code for add page break... now i want to delete page break...
what ll be coding for delete page break ???
Posted Jan 28, 2015, 3:35 AM
Antoine LOIZEAUPosted Jan 26, 2015, 8:38 AM
You can use the Replace method of string object like this sample:
string newhtml = "
";
range.htmlText.Replace(newhtml, "");
Gook luck,
Antoine