|
@using Syncfusion.Blazor.DocumentEditor
@inherits DocumentViewComponentBase;
<SfDocumentEditorContainer @ref="container" Height="700px" EnableToolbar=true RestrictEditing=true>
<DocumentEditorContainerEvents Created="OnCreated"></DocumentEditorContainerEvents>
</SfDocumentEditorContainer>
@code {
protected void OnCreated(object args)
{
base.OpenDocument();
}
} |
|
public class DocumentViewComponentBase : ComponentBase
{
protected string DocxString;
protected SfDocumentEditorContainer container;
public DocumentViewComponentBase()
{
}
public void OpenDocument()
{
// Get Document Editor instance now.
DocumentEditorModule editor = container.GetDocumentEditor();
// Handle file opening here.
//editor.Open(sfdt);
}
private async Task GetDocumentDetails(string filename)
{
// Get a reference to a blob
}
} |