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 \