trichview.com

trichview.support




Re: TRichView and HTML specifications


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/15/2003 21:52:03


1) About XHTML - the most probably, it will be implemented to the Spring of

2004.


2) About saving URLs:


Each TRichView item (including hypertext links) can have additional string

value called "tag" (this term has no relation to HTML tags). You can store

any string (without line breaks) in it, including URL, javascript code and

your own additional information.

When TRichView exports hyperlinks to HTML or RTF, an event OnURLNeeded

occurs (in the newer version, this event will be superseded by new more

flexible event OnWriteHyperlink). In this event you provide a string that

will be saved in HTML/RTF as a hyperlink target. In this simplest case, tags

contain only hyperlink targets, so you just need to return the tag value of

the clicked hyperlink.

When user clicks a hyperlink in TRichView, OnJump event occurs where you can

do all what you want (for example, launch a browser or load another

document).


3) About pasting from Internet Explorer.


IE copies data in several alternative formats including text, RTF, HTML.

By default, TRichViewEdit pastes RTF.

But you can use OnPaste event and TRVHtmlImporter component to paste as HTML

(HTML copied by IE usually has higher qualiy than RTF; besides, if the

selection contains too complex nested tables, IE copies empty RTF)


RichViewActions (http://www.trichview.com/resources/actions/) - a set of

actions for building user interface for TRichViewEdit - supports HTML

pasting.

You can test it in the compiled demo

http://www.trichview.com/resources/actions/actiontest.zip, Edit | Paste

Special command, where you can select a format to paste.

(in this demo, the standard paste command still pastes RTF by default (if it

is not empty)).






Powered by ABC Amber Outlook Express Converter