C# Класс ICSharpCode.AvalonEdit.Highlighting.HtmlClipboard

Allows copying HTML text to the clipboard.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

CreateHtmlFragment() публичный статический Метод

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.
Результат string

SetHtml() публичный статический Метод

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
Результат void