Skip to content

Html Box

The HtmlBox widget allows users to input and edit HTML content or long text within a form.

XML Fields

  • XPath identifies the element that receives the edited HTML text. The widget reads its initial value from this element and writes the edited value back to it.
  • RichEditor enables the rich-text editing surface. Set it to false when the field must be edited as plain long text.
  • ShowToolbar controls the formatting toolbar and is relevant when RichEditor is enabled.
  • Size selects the editor height. RequiredForGroup associates required validation with a validation group, while PlaceHolder provides the empty-editor prompt.
  • Hints provides contextual guidance; Rules holds the rules that can control validation, visibility, or other supported form behavior.

The example includes every HtmlBox-specific and common text-input field. Leave optional content empty when the form does not need it.

Rich Text Editor

A rich text editor is enabled by default, providing features for formatting and styling text. This rich text editing functionality can be disabled by setting the RichEditor property to false.

HTML Sanitization

When rich editing is used, the client sanitizes the stored value before it is shown in or refreshed from the editor. Do not treat this as an authorization or trust boundary: only allow trusted users to edit HTML, and apply the necessary output-safety controls wherever the stored value is rendered.

Toolbar

A toolbar is provided (when RichEditor is true) offering common text editing functions such as bold, italic, underline, etc. The toolbar can be hidden by setting the ShowToolbar property to false.

Example

1
2
3
4
5
<HtmlBox XPath="Html" RichEditor="True" ShowToolbar="True" Size="Small" RequiredForGroup="Save">
    <PlaceHolder><![CDATA[]]></PlaceHolder>
    <Hints><![CDATA[]]></Hints>
    <Rules />
</HtmlBox>