/// <summary> /// Produces HTML code for the line, with <span class="colorName"> tags. /// </summary> public string ToHtml(HtmlOptions options = null) { StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) { WriteTo(htmlWriter); } return(stringWriter.ToString()); }
/// <summary> /// Produces HTML code for a section of the line, with <span class="colorName"> tags. /// </summary> public string ToHtml(int startOffset, int endOffset, HtmlOptions options = null) { StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) { WriteTo(htmlWriter, startOffset, endOffset); } return(stringWriter.ToString()); }
/// <summary> /// Produces HTML code for a section of the line, with <span style="..."> tags. /// </summary> public string ToHtml(int offset, int length, HtmlOptions options = null) { StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); using (var htmlWriter = new HtmlRichTextWriter(stringWriter, options)) { htmlWriter.Write(this, offset, length); } return(stringWriter.ToString()); }