aspnetmvc-devexpress-dot-web-dot-mvc-835dd0d1.md
Provides methods to process a document in the Controller in a custom manner.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v25.2.dll
NuGet Package : DevExpress.Web.Mvc5
public class RichEditCustomDocumentProcessor
Public Class RichEditCustomDocumentProcessor
The following members return RichEditCustomDocumentProcessor objects:
Show 12 links
The RichEditCustomDocumentProcessor class implements methods that allow you to process a document in a custom manner while operating at the Controller level.
Note
Use the RichEditDocumentServer component to modify a document without user interaction. The RichEditDocumentServer is a non-visual .NET library providing all the word processing functionality.
The binding methods (RichEditCustomDocumentProcessor.Bind, RichEditCustomDocumentProcessor.BindToXML) which are implemented by the RichEditCustomDocumentProcessor are so called Controller-based additions to the View-based binding methods of the RichEditExtension.
You should bind RichEdit to its data source in both PartialView and Controller, if the following two conditions are met in your application:
The following code sample demonstrates how this can be done.
@Html.DevExpress().RichEdit(settings => {
settings.Name = "RichEditNameHere";
settings.CallbackRouteValues = new { Controller = ..., Action = "ActionMethodThatHandlesRichEditCallbacks" };
...
}).Open(...).BindToXML(Server.MapPath("~/App_Data/Documents/MyData.xml")).GetHtml()
public ActionResult ActionMethodThatHandlesRichEditCallbacks() {
return RichEditExtension.GetCallbackResult("RichEditNameHere", p => {
p.Saving(e => {
byte[] docBytes = RichEditExtension.SaveCopy("RichEditNameHere", DocumentFormat.Rtf);
//saving "docBytes" to db
e.Handled = true;
});
p.BindToXML(Server.MapPath("~/App_Data/Documents/MyData.xml"));
});
}
Object RichEditCustomDocumentProcessor
See Also