Forum OpenACS Development: Low effort generic integration for htmlareas

Hello everyone,

I had some thinking after problem faced in http://www.openacs.org/forums/message-view?message_id=4776897 and I have a proposal:

right now, plain OpenACS have explicit support for Xinha and tinyMCE. In source for template::widget::richtext, we track a certain html form element as a richtext element through instruction

lappend ::acs_blank_master__htmlareas $attributes(id)

Currently, for richtext widget, this is what happens:

if { $htmlarea_p } {
if {$richtextEditor eq "xinha"} {
...
lappend ::acs_blank_master__htmlareas $attributes(id)
...
} elseif {$richtextEditor eq "tinymce"} {
...
lappend ::acs_blank_master__htmlareas $attributes(id)
...
}
}

so we collect hmlarea ids only for the two editors supported.

What if we do something like:

if { $htmlarea_p } {

lappend ::acs_blank_master__htmlareas $attributes(id)

if {$richtextEditor eq "xinha"} {
...
} elseif {$richtextEditor eq "tinymce"} {
...
}
}

so we can have integrated support if one choses one of the two editors, while if someone wants to treat htmlareas another way we still can know their ids and use them in our custom template? This would be just a small change in code and would do no harm.

http://www.openacs.org/api-doc/proc-view?proc=template%3a%3awidget%3a%3arichtext&source_p=1