C# Class ICSharpCode.AvalonEdit.Highlighting.HtmlClipboard

Allows copying HTML text to the clipboard.
Afficher le fichier Open project: kjk/kjkpub Class Usage Examples

Méthodes publiques

Méthode Description
CreateHtmlFragment ( TextDocument document, DocumentHighlighter highlighter, ISegment segment, HtmlOptions options ) : string

Creates a HTML fragment from a part of a document.

SetHtml ( System.Windows.DataObject dataObject, string htmlFragment ) : void

Sets the TextDataFormat.Html on the data object to the specified html fragment. This helper methods takes care of creating the necessary CF_HTML header.

Private Methods

Méthode Description
BuildHeader ( int startHTML, int endHTML, int startFragment, int endFragment ) : string

Builds a header for the CF_HTML clipboard format.

EscapeHtml ( StringBuilder b, string text, HtmlOptions options ) : void

Escapes text and writes the result to the StringBuilder.

Method Details

CreateHtmlFragment() public static méthode

Creates a HTML fragment from a part of a document.
public static CreateHtmlFragment ( TextDocument document, DocumentHighlighter highlighter, ISegment segment, HtmlOptions options ) : string
document ICSharpCode.AvalonEdit.Document.TextDocument The document to create HTML from.
highlighter DocumentHighlighter The highlighter used to highlight the document.
segment ISegment The part of the document to create HTML for. You can pass null to create HTML for the whole document.
options HtmlOptions The options for the HTML creation.
Résultat string

SetHtml() public static méthode

Sets the TextDataFormat.Html on the data object to the specified html fragment. This helper methods takes care of creating the necessary CF_HTML header.
public static SetHtml ( System.Windows.DataObject dataObject, string htmlFragment ) : void
dataObject System.Windows.DataObject
htmlFragment string
Résultat void