Need help in Document Editor for blazor

Hello Syncfusion Team,
We need your help in implementing the Blazor Document editor.
1) Want to show RTF document in readonly mode.
2) Want to capture the mouse event, in case user click inside the document editor.

Note:- Your Control select box not showing the "Document Editor" option for Blazor, so i have selected "Rich Text Editor". Do not get confuse with that, this request is for Blazor Document editor only.
Please find the attached files for more details about current implementations.  Please revert back with suggestion on how to implement the above mentioned points.

Attachment: blazor_document_editor_a62a9eb2.zip

1 Reply 1 reply marked as answer

HC Harini Chellappa Syncfusion Team October 14, 2020 03:15 AM UTC

Hi Tim, 

Syncfusion Greetings! 

Please find the details of your query from below table. 

Want to show RTF document in readonly mode. 
Yes, Document editor provides support to open the RTF documents. 

Sample Code Snippet 

string filePath = "wwwroot/data/GiantPanda.rtf"; 
using (FileStream fileStream = new FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read)) 
            { 
                WordDocument document = WordDocument.Load(fileStream, ImportFormatType.Rtf); 
                string json = JsonConvert.SerializeObject(document); 
                document.Dispose(); 
                DocumentEditorModule editor = EditorContainer.GetDocumentEditor(); 
                editor.Open(json); 
           

In the provided source code, you have tried converting xml to RTF and then opened the stream in Load API. Can you please confirm whether you are facing issues when loading that rtf document? If so, kindly share the rtf document along with what issues you are facing with that document. So that we can check on it and update you the details. 
Wants to capture mouse event inside a document editor 
Document editor doesn’t provide any events to capture mouse events. Since it’s not form element. 

Can you please share your use case scenario on this in detail? so that we can check on it and provide solution at the earliest. 


Regards, 

Harini C 


Marked as answer
Loader.
Up arrow icon