Forum > General

TSynExporterHTML

(1/1)

Sora-Kun:
Hello,
I need to know what does TSynExporterHTML do, and how can use it.
Thanks  :-*

Leledumbo:

--- Quote ---I need to know what does TSynExporterHTML do
--- End quote ---
Exports the code in SynEdit to HTML?

--- Quote ---how can use it
--- End quote ---
Drop a TSynEdit, TSynXXXSyn (one of the available highlighters), and TSynExporterHTML. Set Both TSynEdit and TSynExporterHTML's highlighter to TSynXXSyn. Then on an event (or through shortcut, mouse clicks, whatever you want) do this:

--- Code: ---procedure TForm1.SynEdit1Change(Sender: TObject);
begin
  SynExporterHTML1.ExportAll(SynEdit1.Lines);
  SynExporterHTML1.SaveToFile('test.html');
end;

--- End code ---
You should have test.html containing the highlighted code in HTML.

Sora-Kun:
Thanks man, That work great xD !!!!  O:-)

Navigation

[0] Message Index

Go to full version