// allow the user to view the html contents // the complete Html markup is presented public void HtmlContentsView() { using (EditHtmlForm dialog = new EditHtmlForm()) { dialog.HTML = this.DocumentHtml; dialog.ReadOnly = true; dialog.SetCaption(HTML_TITLE_VIEW); DefineDialogProperties(dialog); dialog.ShowDialog(this.ParentForm); } }
// insert the given Text into the selected range public void InsertTextPrompt() { // display the dialog to obtain the Html to enter using (EditHtmlForm dialog = new EditHtmlForm()) { dialog.HTML = ""; dialog.ReadOnly = false; dialog.SetCaption(PASTE_TITLE_TEXT); DefineDialogProperties(dialog); if (dialog.ShowDialog(this.ParentForm) == DialogResult.OK) { this.SelectedText = dialog.HTML; } } }
// allow the user to edit the raw HTML // dialog presented and the body contents set public void HtmlContentsEdit() { using (EditHtmlForm dialog = new EditHtmlForm()) { dialog.HTML = this.InnerHtml; dialog.ReadOnly = false; dialog.SetCaption(HTML_TITLE_EDIT); DefineDialogProperties(dialog); if (dialog.ShowDialog(this.ParentForm) == DialogResult.OK) { this.InnerHtml = dialog.HTML; } } }