Class ::xowiki::formfield::code_listing

::xowiki::formfield::code_listing[i] create ... \
           [ -cols (default "80") ] \
           [ -rows (default "20") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::textarea[i]
::xotcl::Class create ::xowiki::formfield::code_listing \
     -superclass ::xowiki::formfield::textarea

Methods (to be applied on instances)

  • cols (setter)

  • pretty_value (scripted)

    ${:object} do_substitutions 0
    if {[info commands ::apidoc::tclcode_to_html] ne ""} {
      set html [::apidoc::tclcode_to_html [:value]]
      regsub -all -- "\n?\r</FONT></EM>" $html </FONT></EM> html
      return "<pre class='code'>$html</pre>"
    } else {
      return "<pre class='code'>[string map [list & {&amp;} < {&lt;} > {&gt;}]  [:value]]</pre>"
    }
  • rows (setter)