To save synchronously to a Nevron Binary Text Document local file call the SaveToLocalFile method of the rich text view. This method doesn't work on sandboxed platforms like Blazor WebAssembly.
Save to a Nevron Binary Rich Text file synchronously |
Copy Code
|
---|---|
richTextView.SaveToLocalFile(@"D:\Documents\MyTextDocument.ntb");
|
To save a rich text document to a file asynchronously call the SaveToFileAsync method of the rich text view. Calling this method shows a loader over the rich text view until the saving completes. The method returns a promise, which you can use to get notified when the saving completes.
Save to a Nevron Binary Rich Text file asynchronously |
Copy Code
|
---|---|
richTextView.SaveToFileAsync(@"D:\Documents\MyTextDocument.ntb").Then( delegate (bool success) { }, delegate (Exception ex) { } ); |
To save a rich text document to a stream call the SaveToStream method of the rich text view and pass the text format to save to:
Save to Nevron Binary Text Document stream |
Copy Code
|
---|---|
richTextView.SaveToStream(stream, NTextFormat.NevronBinary); |