std:ui:control:document-text

This template renders a rich text document editor as a form element.

You may wish to consider using a document-text element within a form.

View

key name

The name of the control. The edited document will be submitted in a request parameter with this name.

key value

(optional) The initial value of the control, as a XML rich text document.

Example

With a view like

{
  item: {
    name: "item",
    value: "<doc><p>Example</p></doc>"
  }
}

a control can be rendered in a form with:

<form method="POST"> std:form:token()
  within(item) { template:std:ui:control:document-text() }
  <p> <input type="submit" value="Save"> </p>
</form>