template::data::transform::richtext (public)

 template::data::transform::richtext element_ref

Defined in packages/acs-templating/tcl/richtext-procs.tcl

Transform the previously-validated submitted data into a two-element list as defined by the richtext datatype.

Parameters:
element_ref (required)
Reference variable to the form element
Returns:
Two-element list defined by the richtext datatype

Partial Call Graph (max 5 caller/called nodes):
%3 template::data::transform::spellcheck template::data::transform::spellcheck (public) template::data::transform::richtext template::data::transform::richtext template::data::transform::spellcheck->template::data::transform::richtext

Testcases:
No testcase defined.
Source code:

    upvar $element_ref element
    set element_id $element(id)

    set contents [ns_queryget $element_id]
    set format [ns_queryget $element_id.format]

    if { $contents eq "" } {
        # We need to return the empty list in order for form builder to think of it
        # as a non-value in case of a required element.
        return [list]
    } else {
        return [list [list $contents $format]]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: