public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (context != null && context.Instance != null && provider != null)
     {
         IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (edSvc != null)
         {
             EditContents       ec  = value as EditContents;
             DialogHtmlContents dlg = new DialogHtmlContents();
             dlg.LoadData(ec);
             if (edSvc.ShowDialog(dlg) == System.Windows.Forms.DialogResult.OK)
             {
                 ec.HtmlContents = dlg.BodyHtml;
             }
         }
     }
     return(value);
 }
 public void LoadData(EditContents html)
 {
     editor1.BodyHtml       = html.HtmlContents;
     editor1.BackColor      = html.BackColor;
     editor1.ToolbarVisible = true;
 }