Ejemplo n.º 1
0
        public HtmlEditor()
        {
            InitializeComponent();
            IDocumentImportManagerService service = richEditControl.GetService <IDocumentImportManagerService>();

            if (service != null)
            {
                service.UnregisterImporter(service.GetImporter(DocumentFormat.PlainText));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.Rtf));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.Mht));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.OpenXml));
            }
        }
Ejemplo n.º 2
0
        public LoadSaveHtml()
        {
            InitializeComponent();
            IDocumentImportManagerService service = richEdit.GetService <IDocumentImportManagerService>();

            if (service != null)
            {
                service.UnregisterImporter(service.GetImporter(DocumentFormat.PlainText));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.Rtf));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.Mht));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.OpenXml));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.WordML));
                service.UnregisterImporter(service.GetImporter(DocumentFormat.OpenDocument));
            }


            HtmlLoadHelper.Load("html_sample.htm", richEdit);
        }