Reputation:
I'm trying to convert a rich text on a TRichEdit component to HTML tags.I have a function for that, but it doesn't work because the text in the component is always sent on PlainText. The option PlainText on the component is set as false.
Example: *Text in RichEdit: The house is blue. When I invoke the function is sent without the bold format in the text: RTFtoHTML(RichEdit.Lines.Text).
How can I do on the component or in other side to read this text like RTF?
I have read other questions and it didn't solve my problem. Thanks for your help.
Upvotes: 3
Views: 1677
Reputation: 15538
There are a few 3rd party commercial components that do this quite well such as WPTools or TRichView. Both will attempt to optimize the generated HTML using CSS styles where applicable. Both support Delphi 2010, as well as the latest version of the compiler (Delphi Seattle as of this answer).
Upvotes: 0