To load a Nevron rich text document synchronously from a local file call the LoadFromLocalFile method of the rich text view. This method doesn't work on sandboxed platforms like Blazor WebAssembly.
Load a Nevron binary text document file synchronously |
Copy Code
|
---|---|
richTextView.LoadFromLocalFile(@"D:\Documents\MyTextDocument.ntb");
|
To load a Nevron rich text document asynchronously call the LoadFromFileAsync method of the rich text view. Calling this method shows a loader over the rich text view until the loading completes. The method returns a promise, which can be used to get notified when the loading completes.
Load a Nevron binary text document file asynchronously |
Copy Code
|
---|---|
richTextView.LoadFromFileAsync(@"D:\Documents\MyTextDocument.ntb").Then( delegate (bool success) { }, delegate (Exception ex) { } ); |
To load a rich text document from a stream call the LoadFromStream method of the rich text view and pass the text format to load:
Load from a Nevron binary text document stream |
Copy Code
|
---|---|
richTextView.LoadFromStream(stream, NTextFormat.NevronBinary); |