ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Server side

'Document readers' are classes used for document's content reading to import it into the editing document. The documents import is available via the toolbar's button. The class names of these readers can be used in the DocumentReaders property of the Obout.Ajax.UI.HTMLEditor.Popups.ImportDocumentPopup class.

'Document readers' classes should implement Obout.Ajax.UI.HTMLEditor.IDocumentReader interface.
This interface describes one method only:

/// <summary>
///
Read the document's content
/// </summary>
///
<param name="path">Path of the file to be read</param>
///
<param name="alertMessage">Message to be alerted on document import (usually to indicate an error)</param>
///
<returns>HTML content of the document to be imported</returns>
string GetHtml(string path, out string alertMessage);

The Obout.Ajax.UI.dll contains the following predefined classes that implement this interface:
  • Obout.Ajax.UI.HTMLEditor.TxtReader - reads content of usual text files (txt).
  • Obout.Ajax.UI.HTMLEditor.HtmlReader - reads content of HTML files (html).

The default value of the DocumentReaders property in the Obout.Ajax.UI.HTMLEditor.Popups.ImportDocumentPopup class is:
"txt:Obout.Ajax.UI.HTMLEditor.Popups.TxtReader;html:Obout.Ajax.UI.HTMLEditor.Popups.HtmlReader".

In the App_Code/HTMLEditor/MsWordDocumentReader.cs file of the downloaded Suite you can find custom class for MS Word documents reading.
Following this example, you can easily create a class to import other documents (e.g. MS Excel).

"We really love your control suite -- its relatively light-weight, flexible, and pretty damned feature-rich; keep up the good work~!"

Stephen A. Bohlen
Microdesk, Inc

Random testimonial   All testimonials