问题
The section Read and Write Rich Text Format Documents
of this online article of UWP edition of ComponentOne
reads: you can use it to convert RTF to HTML and vice versa.
I went through their API document and did not find any code example of such functionality and could not figure out which method from their APIs to use.
Question: Could you please provide (or link to an online sample) for converting RTF to HTML from RichTextBox control of ComponentOne's UWP Edition? I'm using C#
but VB
code also be fine.
回答1:
ComponentOne
you can use it to convert RTF to HTML and vice versa.
You could convert between HTML and RTF using the RtfFilter library. And you could also get the code sample with this link.
rtfBox.Text = new RtfFilter().ConvertFromDocument(richTextBox.Document);
来源:https://stackoverflow.com/questions/55201990/convert-rtf-to-html-from-componentone-richtextbox