void New() { HtmlEditControl.SetDocumentText("<p></p>", @"C:\", true); //DocumentTextHashCode = DocumentText.GetHashCode(); //The code above does not work. //At this stage the document is not finalized and DocumentText does not have //yet it's final value ("empty text"), which is in HTML format is "\r\n<P></P>" DocumentTextHashCode = "\r\n<P></P>".GetHashCode(); }
void LoadFile(string file) { string text = File.ReadAllText(file); HtmlEditControl.SetDocumentText(text, Path.GetDirectoryName(file), true); DocumentTextHashCode = DocumentText.GetHashCode(); DocumentFile = file; Text = "ZetaPad - " + DocumentFile; AddToHistory(file); }
private void TestForm_Shown(object sender, EventArgs e) { var configuration = new HtmlEditControlConfiguration { AllowEmbeddedImages = true, AllowFontChange = true, AllowPrint = true }; HtmlEditControl.Configure(configuration); New(); }
private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e) { HtmlEditControl.ExecutePrintPreview(); }