Index: openacs-4/packages/richtext-tinymce/tcl/richtext-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/richtext-tinymce/tcl/richtext-procs.tcl,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/richtext-tinymce/tcl/richtext-procs.tcl 29 Apr 2024 15:38:13 -0000 1.4.2.2 +++ openacs-4/packages/richtext-tinymce/tcl/richtext-procs.tcl 30 Apr 2024 15:08:59 -0000 1.4.2.3 @@ -188,7 +188,7 @@ file rename $resourceDir/$version/langs $langs_path } - ad_proc -private serialize_options {options} { + ad_proc serialize_options {options} { Converts an options dict into a JSON value suitable to configure TinyMCE. } { @@ -204,7 +204,10 @@ # enough. # foreach {key value} $options { - if {[string is boolean -strict $value] || [string is double -strict $value]} { + if {[string is boolean -strict $value] || + [string is double -strict $value] || + [regexp {^\{.*\}$} $value] + } { lappend pairslist "${key}:${value}" } else { lappend pairslist "${key}:\"${value}\"" @@ -281,6 +284,7 @@ {-order 10} -reset_config:boolean {-config ""} + {-init:boolean true} } { Add the necessary JavaScript and other files to the current page. The naming is modeled after "add_script", "add_css", @@ -319,6 +323,13 @@ security::csp::require img-src $cdn_host } + if {!$init_p} { + # + # We just want the header stuff. + # + return + } + set default_config [expr {$reset_config_p ? "" : [::richtext::tinymce::default_config]}] set config [dict merge \