$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
RichTextBox Control for WinForms
Edit rich text content with text formatting options, mail-merge, table, and floating objects, etc.
Home > WinForms UI Controls > User Manual > RichTextBox HTML Support in C#

HTML Capability of RichTextBox WinForms Control

KetticRichTextBox WinForms control is capable of editing rich text for HTML. The HtmlFormatProvider allows the users to import and export content of KetticRichTextBox to or from HTML, whereas, there are some limitations to support the HTML completely for the complex HTML standards. The HtmlFormatProvider cannot handle some heavily mistakes of parsing in HTML tags and cannot parse the HTML content correctly absolutely. However, if we import valid XHTML content, we can get the best results when handling the content of KetticRichTextBox.

Import from HTML document to KetticRichTextBox

KetticRichTextBox WinForms control provide the HtmlFormatProvider to import an HTML document and parse the text content, and then convert the HTML to KetticDocument. The HtmlFormatProvider mainly import content and styling from the HTML document.

Supported HTML elements in Content

KetticRichTextBox control divides the HTML content to a few elements of KetticDocument, including paragraphs, spans and tables. The supported paragraphs tags include
  • <p>
  • <h1>, <h2> , <h3> , <h4> , <h5> , <h6>
  • <ul>, <ol>, <li>
  • <tr>
  • The supported tags for spans include <span> and <font>

Supported Styles of Classes and Inline

KetticRichTextBox control supports the styling via the CSS styles of classes or inline and a variety of HTML tags. It also supports the <font> tag, whose valid attributes including, face, size, and color, for styling. The following are the supported tags used to format the content.
  • <b>, <strong>, these two tags are able to turn on the text to be bold
  • <i>, <em>, these two tags are able to turn on the text to be on italic
  • <u>, this tag is used to add underline to the text
  • <h1> through <h6>, these tags are able to apply heading
  • <sub>, this tag is able to add subscript to the content
  • <sup>, this tag is used to add superscript to the content
Apart from the HTML formatting tags, the KetticRichTextBox control also support a variety of CSS properties, including,
  • text-align
  • margin-left, and margin-right
  • color, and background-color
  • font-family, font-size, font-style, and font-weight
  • text-decoration (underline, line-through)
  • vertical-align (sub, super)

Export to HTML document to KetticRichTextBox

The HtmlFormatProvider export content to HTML through the KetticDpcument tree and create HTML nodes. This format provider creates valid XHTML document to preserve the formatting as much as possible. The styles are also exported and the HTML document resembles the entire styles of paragraphs and spans in the KetticDocument as much as possible.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls