RichEditBuilder.Open(Func<Byte[]>, DocumentFormat, String) Method
Opens a document specified by an array of bytes.
Namespace: DevExpress.AspNetCore.RichEdit
Assembly: DevExpress.AspNetCore.RichEdit.v24.2.dll
NuGet Package: DevExpress.AspNetCore.RichEdit
#Declaration
public RichEditBuilder Open(
Func<byte[]> contentAccessorByBytes,
DocumentFormat format,
string documentName = null
)
#Parameters
Name | Type | Description |
---|---|---|
content |
Func<Byte[]> | A method delegate that gets a byte array from which to open the document. |
format | Document |
An object that specifies the document format. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
document |
String | null | The name of the file to open. Also serves as an exported file name. |
#Returns
Type | Description |
---|---|
Rich |
A Rich |
#Remarks
<script>
function SaveRichDocument(data) {
richEdit.save();
}
</script>
<button type="button" class="btn btn-primary" onclick="SaveRichDocument()">Save</button>
@(Html.DevExpress().RichEdit("richEdit")
.Width("100%")
.Height(800)
.Ribbon(ribbon => ribbon
.ActiveTabIndex(0)
)
.ExportUrl(Url.Action("SaveAction"))
.Open(() => { return Model.ContentAccessorByBytes; }, DevExpress.AspNetCore.RichEdit.DocumentFormat.OpenXml)
)