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.28 -r1.29 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 26 Feb 2007 10:07:51 -0000 1.28 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 14 May 2007 20:30:27 -0000 1.29 @@ -51,12 +51,11 @@ ad_proc -public template::util::richtext::format_options {} { Returns a formatting option list } { - return { - {"Enhanced Text" text/enhanced} - {"Plain Text" text/plain} - {"Fixed-width Text" text/fixed-width} - {"HTML" text/html} - } + return [list \ + [list [_ acs-templating.Enhanced_Text] text/enhanced] \ + [list [_ acs-templating.Plain_Text] text/plain] \ + [list [_ acs-templating.Fixed_width_Text] text/fixed-width] \ + [list [_ acs-templating.HTML] text/html]] } ad_proc -public template::data::validate::richtext { @@ -275,15 +274,15 @@ append output [textarea_internal "$element(id)" attributes $contents] if { $htmlarea_p } { - append output "" + append output "" } else { - append output "
Format: [menu $element(id).format [template::util::richtext::format_options] $format attributes]" + append output "
[_ acs-templating.Format]: [menu $element(id).format [template::util::richtext::format_options] $format attributes]" } # Spell-checker array set spellcheck [template::util::spellcheck::spellcheck_properties -element_ref element] if { $spellcheck(render_p) } { - append output " Spellcheck: [menu "$element(id).spellcheck" [nsv_get spellchecker lang_options] $spellcheck(selected_option) attributes]" + append output " [_ acs-templating.Spellcheck]: [menu "$element(id).spellcheck" [nsv_get spellchecker lang_options] $spellcheck(selected_option) attributes]" } } else { # Display mode @@ -445,12 +444,12 @@ # which the richtext widget won't work but which do have js enabled # should output since we need the format widget (this for Safari among # some others) - append output "\n" + set noscript_output "$output
[_ acs-templating.Format]: $format_menu\n" - set output "" + set output "" } elseif {$richtextEditor eq "xinha"} { - append output "\n" - append output "\n" + append output "\n" + append output "\n" # we have a xinha richtext widget, specified by "options {editor xinha}" # The following options are supported: @@ -493,20 +492,28 @@ } } else { - append output "
Format: $format_menu" + # Display mode + if { $element(mode) eq "display" && [info exists element(value)] } { + append output [template::util::richtext::get_property html_value $element(value)] + append output "" + append output "" + } else { + append output "" + } + append output "
[_ acs-templating.Format]: $format_menu" } # Spell-checker array set spellcheck [template::util::spellcheck::spellcheck_properties \ -element_ref element] if { $spellcheck(render_p) } { - append output " Spellcheck: " \ + append output " [_ acs-templating.Spellcheck]: " \ [menu "$element(id).spellcheck" [nsv_get spellchecker lang_options] \ $spellcheck(selected_option) attributes] } } else { # Display mode - if { $element(mode) eq "display" && [info exists element(value)] } { + if { $element(mode) eq "display" && [info exists element(value)] } { append output [template::util::richtext::get_property html_value $element(value)] append output "" append output ""