trichview.com

trichview.support




Re: Controling CSS export


Return to index


Author

Message

Sergey Tkachenko

Posted: 12/01/2003 15:54:59


I am afraid that it would be really simpler for you to male your own

HTML-export procedure.


There is an event OnSaveItemToFile, but it only allows:

- for non-text items (except for list markers): to change saving completely

- for text: to change text, may be enclose it in additional HTML tags; you

cannot modify text tags which RichView saves itself.


Adding OnHTMLProcess would be not trivial. Some items are saved using

multiple

tags, some without tags at all (text of default character attributes). Some

tags do not directly belong to items (paragraph attributes, for example)



> Hi Sergey,

> TRichView will be a part of a WYSIWYG HTML Editor which will be used to

> edit texts. What I need is to be able to format the HTML output

> correctly (add indentation...) for each element. I also need to be able

> to specify the HTML ID, and CSS Class name I want for those elements too.

> The only way of having this kind of control I see so far, would be to

> iterate through all TRichView's items and generate my own HTML code for

> them is that right ?

> What would be really great I think, is to add an event in the TRichView

> which will work like this:

>

> - Program calls of a method like RichView.ProcessHTML

> - An event like this would be generated for each element :

> OnHTMLProcess(HTMLTag: string; Properties: TStringList;

> PropertiesValues: TStringList; CSSLines: TStringList);

>

>

>

> Sergey Tkachenko wrote:

>

> > Do you want to include TRichView's HTML in another HTML?

> >

> > You can save:

> > 1) RichView CSS table as RichView.Style.SaveCSS (or SaveCSSToStream)

> > 2) RichView HTML document without opening and closing HTML tags, using

> > RichView.SaveHTMLEx(...., [...,rvsoMiddleOnly])

> >

> > Then you can insert this CSS table and this HTML part in your final

HTML,

> > together with your own data.

> >

> > There is also an option to embed CSS codes directly in HTML tags without

> > building CSS table, but I do not recommend to use it because such HTML

will

> > be of much larger size.

> >

> >

> >>Is there any ways I could control the CSS and HTML export without

> >>modifying the TRichView's source code when exporting HTML with CSS ?

> >>What I need is to be able to specify the HTML element ID and CSS name

> >>for those elements and I want to be able to put the generated CSS in

> >>another CSS file which already contains other CSS informations as the

> >>TRichView will be a part of an HTML generating application.

> >>Can you point me to the right direction in order to achieve this ?

> >>Please note that I'm evaluating the trial version (1.8) and therefore I

> >>don't have access to the component's source code.

> >>

> >>Best regards, John.

> >>

>






Powered by ABC Amber Outlook Express Converter