TextBufferExtensions

public static class TextBufferExtensions
Extensions for ITextBuffer

Methods

GetRtf

#Example
public static string GetRtf(this ITextBuffer buffer)
Gets the content of the specified buffer as an RTF formatted string. Note that some platforms don't support RTF (e.g. Gtk).
buffer (ITextBuffer)Buffer to get the content from.
The content of the buffer in RTF format.

SetRtf

#Example
public static void SetRtf(this ITextBuffer buffer, string rtf)
Sets the content of the buffer to the specified rtf string. Note that some platforms don't support RTF (e.g. Gtk).
Remarks: The CaretIndex and Selection will be set to the end of the string after set.
buffer (ITextBuffer)Buffer to set the content for
rtf (string)RTF formatted string to set the buffer