Hi, I would appreciate your help to get started using TRichView.
In my database I have several blobs that contain HTML formatted text.
I need to convert the HTML in each blob to Native TRichView Format in order to use TRichView as primary editor and preview control.
Or perhaps there are other better ways to do this...?
Suggestions on steps to perform and possibly demos that shows this?
Best regards
Petter Topp
Getting started with TRichView
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Unfortunately, TDBRichViewEdit does not understand HTML. It can work with RVF (native format), RTF or a plain text.
However, you can use OnLoadCustomFormat to load HTML from DB to editor, and OnSaveCustomFormat to save HTML to DB.
For HTML loading, you need either rvHtmlImporter or rvHTMLViewImporter (better) components. The both are free, can be found in http://www.trichview.com/resources/
Sample code is:
http://www.trichview.com/forums/viewtopic.php?t=3197
However, you can use OnLoadCustomFormat to load HTML from DB to editor, and OnSaveCustomFormat to save HTML to DB.
For HTML loading, you need either rvHtmlImporter or rvHTMLViewImporter (better) components. The both are free, can be found in http://www.trichview.com/resources/
Sample code is:
http://www.trichview.com/forums/viewtopic.php?t=3197
Hi Sergey.
Just to be sure:
1. TRichView can't be used to convert HTML to RVF format?
2. And if using the rvHTMLImporter, I can only save the content of the editor back to HTML?
3. If I use the rvHtmlImporter to get the HTML content, can this content be edited using the RichView editor (wysiwyg)?
4. Do you have any other suggestion on how to convert the html content to rvf?
Petter
Just to be sure:
1. TRichView can't be used to convert HTML to RVF format?
2. And if using the rvHTMLImporter, I can only save the content of the editor back to HTML?
3. If I use the rvHtmlImporter to get the HTML content, can this content be edited using the RichView editor (wysiwyg)?
4. Do you have any other suggestion on how to convert the html content to rvf?
Petter
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1. It can be used, but together with additional (free with source code) components. If HTML is simple, TrvHtmlImporter is enough. If this HTML uses CSS, you need to use TrvHtmlViewImporter (+ free THTMLViewer).
2. For saving to HTML, additional components are not required, TRichView has SaveHTMLEx method.
3. Yes. But it's important to understand, that the original HTML structure will not be kept. After loading and saving HTML, HTML code will be completely different (while visually the document should be the same, if it does not contain HTML features unsupported by TRichView)
4. rvHtmlViewImporter is currently the best solution.
2. For saving to HTML, additional components are not required, TRichView has SaveHTMLEx method.
3. Yes. But it's important to understand, that the original HTML structure will not be kept. After loading and saving HTML, HTML code will be completely different (while visually the document should be the same, if it does not contain HTML features unsupported by TRichView)
4. rvHtmlViewImporter is currently the best solution.
Automate conversion from HTML to RVF
I have tested the rvHTMLImport component, and it works just fine.
Now I'm about to make a utility that converts the html content in my database into RVF format as an automated one-time process.
How should I approach this without actually displaying the html content in RichView?
Br
Petter
Now I'm about to make a utility that converts the html content in my database into RVF format as an automated one-time process.
How should I approach this without actually displaying the html content in RichView?
Br
Petter