Export to HTML with external CSS

General TRichView support forum. Please post your questions here
Post Reply
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Export to HTML with external CSS

Post by Marsianin »

Is there a way to export RVE into HTML but with external CSS file?
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I am sorry, I overlooked this question.
If you want to save CSS outside HTML, then:
1) Save it using RVStyle.SaveCSS
2) When calling SaveHTMLEx, specify this file in ExternalCSS parameter.
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Ok, but if I have several different files can I aggregate all styles from these files into one RVStyle and then use one CSS file for all these files?
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

First, call DeleteUnusedStyles(True, True, True).
Then load document one by one, but not using LoadRVF/LoadRVFFromStream, but by

Code: Select all

Clear;
InsertRVFFromStream(Stream, 0).
Unlike the loading methods, InsertRVFFromStream merges styles.
After loading, you can save HTML.
Finally, after saving the last document, you can save CSS in a file, because TRVStyle accumulated all necessary styles.
Post Reply