TextExporterFactory Class
Provides access to the built-in ITextExporter instances,
that export text to other formats such as HTML or RTF markup.
public class TextExporterFactory
- Inheritance:
- object object
Constructors
TextExporterFactory()
Initializes a new instance of the TextExporterFactory class.
public TextExporterFactory()
TextExporterFactory(IHighlightingStyleRegistry)
Initializes a new instance of the TextExporterFactory class.
public TextExporterFactory(IHighlightingStyleRegistry registry)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The custom IHighlightingStyleRegistry that should be used. |
Methods
CreateHtmlClassBased()
Returns an IHtmlTextExporter that can export text to HTML, using CSS classes for syntax highlighting.
public IHtmlTextExporter CreateHtmlClassBased()
Returns
- IHtmlTextExporter:
An IHtmlTextExporter that can export text to
HTML.
Remarks
CSS class references will be used for highlighting.
This type adds a STYLE tag block to the exported HTML where CSS classes are defined.
The text in the code block references these CSS classes, therefore allowing color settings to easily
be altered for each highlighting style (i.e. keywords, comments, etc.).
Root HTML, BODY and other tags will be added to the output.
CreateHtmlClipboard()
Returns an IHtmlTextExporter that can export text to HTML, in a format that is compatible with the Windows clipboard HTML data format.
public IHtmlTextExporter CreateHtmlClipboard()
Returns
- IHtmlTextExporter:
An IHtmlTextExporter that can export text to
HTML.
Remarks
The output of this exporter is the same as CreateHtmlInlineFragment(), except that some additional information is added to make the exported text compatible with the Windows clipboard HTML data format.
CreateHtmlInline()
Returns an IHtmlTextExporter that can export text to HTML, using inline CSS for syntax highlighting.
public IHtmlTextExporter CreateHtmlInline()
Returns
- IHtmlTextExporter:
An IHtmlTextExporter that can export text to
HTML.
Remarks
Inline CSS styles will be used for highlighting.
This type allows for the code block to be directly copied out of the exported document and pasted into another.
Root HTML, BODY and other tags will be added to the output.
CreateHtmlInlineFragment()
Returns an IHtmlTextExporter that can export text to HTML, using inline CSS for syntax highlighting and no root HTML or BODY tags.
public IHtmlTextExporter CreateHtmlInlineFragment()
Returns
- IHtmlTextExporter:
An IHtmlTextExporter that can export text to
HTML.
Remarks
Inline CSS styles will be used for highlighting.
This type allows for the code block to be directly copied out of the exported document and pasted into another.
Root HTML, BODY and other tags will not be added to the output.
CreateRtf()
Returns an IRtfTextExporter that can export text to RTF.
public IRtfTextExporter CreateRtf()
Returns
- IRtfTextExporter:
An IRtfTextExporter that can export text to
RTF.