Unit
PlusToFormat
Declaration (partial)
type
TPlusToFormattedText = class(TComponent);
TPlusToRTF = class(TPlusToFormattedText);
Description
TPlusToHtml is a non-visual component to export the content of a TPlusMemo in html format, with static and dynamic formatting reproduction. The output can be sent to a file, to the clipboard, or simply collected as a string. The output can encompass the complete content, or just the selected text. Component TPlusToRtf works similarly but results in rtf code being produced instead of html.
To use TPlusToHtml, place one instance on your form, set its PlusMemo property to the TPlusMemo you want to obtain the text from, and call one of the code generation methods from your application.
Key properties
Run-time only
| BaseFont | A Boolean property that controls if a basefont tag is generated. | |
| BodyTag | A Boolean property that controls if a body tag is generated. | |
| DocType | A string property that holds the value for doctype tag. | |
| DynFormat | A Boolean property to control if dynamic formatting is reproduced in the output code generated. | |
| HeadTag | A Boolean property that controls if a head tag is generated. | |
| PlusMemo | The TPlusMemo instance we want to produce htmlcode from. | |
| |
Selection | Returns a string representing the html code corresponding to currently selected text. |
| Title | A string property that contains the value for a title tag. | |
| UrlsAsATags | ||
| |
Text | Returns a string representing the html code corresponding to the content of PlusMemo. |
Key methods
| CopyToClipboard | Call this to put the html code corresponding to selected text on the clipboard. | |
| SaveToFile | Saves the html code corresponding to all the content of PlusMemo in a file. | |
| SaveToStream | Same as above, but writes to a stream instead of a file. |
Key events
| OnProgress | Occurs periodically while doing SaveToFile or SaveToStream. |