Index: openacs-4/packages/acs-templating/tcl/richtext-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/richtext-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 13 Mar 2003 20:25:06 -0000 1.4 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 28 Jun 2003 09:24:42 -0000 1.5 @@ -1,5 +1,5 @@ ad_library { - Rich text input widget and datatype for OpenACS templating system. + Rich text input widgetand datatype for OpenACS templating system. @author Lars Pind (lars@pinds.com) @creation-date 2003-01-27 @@ -137,6 +137,14 @@ array set attributes $tag_attributes + if { [info exists element(value)] } { + set contents [template::util::richtext::get_property contents $element(value)] + set format [template::util::richtext::get_property format $element(value)] + } else { + set contents {} + set format {} + } + set output {} if { [string equal $element(mode) "edit"] } { @@ -172,21 +180,16 @@ } - if { [info exists element(value)] } { - set contents [template::util::richtext::get_property contents $element(value)] - set format [template::util::richtext::get_property format $element(value)] - } else { - set contents {} - set format {} - } - append output [textarea_internal "$element(id)" attributes $contents] append output "
Format: [menu "$element(id).format" [template::util::richtext::format_options] $format {}]" } else { # Display mode if { [info exists element(value)] } { - append output [template::util::richtext::get_property html_value $element(value)] $element(mode)] + + append output [template::util::richtext::get_property html_value $element(value)] + append output "" + append output "" } }