Back to Devexpress

RichEditBuilder.Open(String) Method

aspnetcore-devexpress-dot-aspnetcore-dot-richedit-dot-richeditbuilder-dot-open-x28-system-dot-string-x29.md

latest1.8 KB
Original Source

RichEditBuilder.Open(String) Method

Opens a document by the specified path.

Namespace : DevExpress.AspNetCore.RichEdit

Assembly : DevExpress.AspNetCore.RichEdit.v25.2.dll

NuGet Package : DevExpress.AspNetCore.RichEdit

Declaration

csharp
public RichEditBuilder Open(
    string filePath
)

Parameters

NameTypeDescription
filePathString

A string value specifying the path to the document to open.

|

Returns

TypeDescription
RichEditBuilder

A RichEditBuilder that can be used to further configure the Rich Text Editor.

|

Remarks

Note

This overload determines a document’s format automatically, but this process reduces the method’s performance. You can accelerate the method’s performance by specifying a document’s format manually using the overload with the DocumentFormat parameter.

cshtml
@(Html.DevExpress().RichEdit("richEdit")
   .Height(600)
   .ConfirmOnLosingChanges(c => c.Enabled(false))
   .Open("Documents/Example.docx")
)

Run Demo: Rich Text Editor - Overview

See Also

RichEditBuilder Class

RichEditBuilder Members

DevExpress.AspNetCore.RichEdit Namespace