|
-
April 30th, 2008, 07:41 PM
#1
Question: Text to HTML?
Basically I am looking for ideas. I created a text file editor, but I am looking to be able to convert all of the text in the RTF text box to an HTML file. What would be way to go about this? I've tried looking for some examples, but haven't had any luck.
Thanks.
-
May 1st, 2008, 12:22 AM
#2
Re: Question: Text to HTML?
Just the text? That isn't too hard, but a rtb can hold a lot more than text
-
May 1st, 2008, 07:28 AM
#3
Re: Question: Text to HTML?
Google has a lot to say about RTF to HTML. There is even a CodeGuru article about this. Granted, it is in VC++, but it wouldn't be hard to port it over.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 1st, 2008, 08:51 AM
#4
Re: Question: Text to HTML?
Actually Google doesn't have a lot to say. Most of those links are selling programs that do it and are pretty outdated. I've downloaded about 5 trial versions. One of the programs sells for well over $200.00!
To answer dglienna, what I did was create the RichTextBox control that I can open regular text files to that contain ANSI color codes and such, as well as RTF files. Opening and saving plain text is quite simple. It's the Rich Text format that isn't so easy. Trying to convert all of the ANSI color codes, and other color formats and so on to HTML is where I am a little lost.
I was wondering how you would do regex matching in this case or use the Find method to search through all of the text and replace all instances of color codes and so on? How you add <br> to each line and so on.
I'm no guru by any means. I've just started to learn VB.NET. The book I read on Visual Basic did not cover any of this stuff, so I am figuring it out at present.
Thanks.
-
May 1st, 2008, 09:09 AM
#5
Re: Question: Text to HTML?
 Originally Posted by Adamaran
Actually Google doesn't have a lot to say. Most of those links are selling programs that do it and are pretty outdated. I've downloaded about 5 trial versions. One of the programs sells for well over $200.00!
You know, if you add the word free to the search...you will probably find something that is free! 
Most of it is going to be simple text/character replacing. You can take a look at the characters for RTF here.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|