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.66.2.14 -r1.66.2.15 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 7 May 2024 06:59:10 -0000 1.66.2.14 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 21 Jun 2024 14:17:26 -0000 1.66.2.15 @@ -234,18 +234,26 @@ # Here, we check and eventually return such conf, which will be # applied to the loading formfield. # + # When no preset was specified, we will try to look for the + # "standard" preset. This provides a hook for site-wide + # customization via a tcl proc, which enables to inject + # e.g. information coming from the connection context or other tcl + # commands, not possible via parameter alone. + # # The purpose of this feature is to have a set of logical # configurations that do not depend on the specific editor and # can be extended downstream. # if {[dict exists $options preset]} { set preset [dict get $options preset] - if {[info commands ::richtext::${editor}::preset::${preset}] ne ""} { - set options [dict merge \ - [::richtext::${editor}::preset::${preset}] \ - $options] - } + } else { + set preset "standard" } + if {[info commands ::richtext::${editor}::preset::${preset}] ne ""} { + set options [dict merge \ + [::richtext::${editor}::preset::${preset}] \ + $options] + } set result {success 1} lappend result {*}[::richtext::${editor}::initialize_widget \ Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.254 -r1.284.2.255 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Jun 2024 11:25:05 -0000 1.284.2.254 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Jun 2024 14:17:26 -0000 1.284.2.255 @@ -3434,7 +3434,7 @@ width height {wiki false} - preset + {preset "standard"} } richtext instproc editor {args} { @@ -3499,6 +3499,12 @@ # Here, we check and eventually return such conf, which will be # applied to the loading formfield. # + # The default for the :preset variable is set to "standard", but + # may be overridden by subclasses. This provides a hook for + # site-wide customization via a tcl proc, which enables to inject + # e.g. information coming from the connection context or other tcl + # commands, not possible via parameter alone. + # # The purpose of this feature is to have a set of logical # configurations that do not depend on the specific editor and can # be extended downstream.