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 -N -r1.19.2.3 -r1.19.2.4 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 10 Nov 2005 22:21:20 -0000 1.19.2.3 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 11 Nov 2005 21:25:29 -0000 1.19.2.4 @@ -264,23 +264,73 @@ ad_proc -public template::widget::richtext { element_reference tag_attributes } { Implements the richtext widget, which offers rich text editing options. - This version supports the rte editor. + This version supports the rte and xinha editor. - - If the acs-templating.UseHtmlAreaForRichtextP parameter is set to true (1), this will use the htmlArea WYSIWYG editor widget. - Otherwise, it will use a normal textarea, with a drop-down to select a format. The available formats are: + If the acs-templating.UseHtmlAreaForRichtextP parameter is set to true (1), + this will use the htmlArea WYSIWYG editor widget. + Otherwise, it will use a normal textarea, with a drop-down to select a format. + The available formats are:
+ The default editor in wysigwig mode is rte. In oder to use xinha, one + has to use 'editor xinha' in the options of the form field. The following + options for xinha may be specified: +
+ GetHtml CharacterMap ContextMenu FullScreen + ListType TableOperations EditTag LangMarks Abbreviation ++
+ These options are used by the OacsFs plugin +
+ text:richtext(richtext),nospell,optional + {label #xowiki.content#} + {options {editor xinha plugins OacsFs height 350px file_types %pdf%}} + {html {rows 15 cols 50 style {width: 100%}}} +- Derived from the htmlarea richtext widget for htmlarea by lars@pinds.com - - modified for RTE http://www.kevinroth.com/ by davis@xarg.net - suff for xinha by gustaf.neumann@wu-wien.ac.at + Caveat: the three adp-files needed for the OpenACS file selector + (insert-image, insert-ilink and file-selector) + are currently part of the xowiki package, since acs-templating + is per default not mounted. This is hopefully only a temporal situation + and we find a better place. +
+ Derived from the htmlarea richtext widget for htmlarea by lars@pinds.com
+ modified for RTE http://www.kevinroth.com/ by davis@xarg.net
+ xinha support by gustaf.neumann@wu-wien.ac.at
} {
upvar $element_reference element
@@ -300,8 +350,10 @@
set format {}
}
- set richtextEditor xinha
- set richtextEditor rte
+ array set options [expr {[info exists element(options)] ?
+ $element(options) : ""}]
+ set richtextEditor [expr {[info exists options(editor)] ?
+ $options(editor) : "rte"}]
if { $element(mode) eq "edit" } {
set attributes(id) "richtext__$element(form_id)__$element(id)"
@@ -321,8 +373,9 @@
if { $htmlarea_p } {
# Tell the blank-master to include the special stuff
# for the richtext widget in the page header
- set ::acs_blank_master__$richtextEditor 1
+ set ::acs_blank_master($richtextEditor) 1
+
if {$richtextEditor eq "rte"} {
lappend ::acs_blank_master__htmlareas $element(form_id)
# quote contents for javascript.
@@ -336,6 +389,27 @@
set output ""
} elseif {$richtextEditor eq "xinha"} {
+
+ # we have a xinha richtext widget, specified by "options {editor xinha}"
+ # The following options are supported:
+ # editor plugins width height folder_id fs_package_id
+ #
+ set plugins {GetHtml CharacterMap ContextMenu FullScreen
+ ListType TableOperations EditTag LangMarks Abbreviation}
+ if {[info exists options(plugins)]} {
+ set plugins $options(plugins)
+ }
+ set quoted [list]
+ foreach e $plugins {lappend quoted '$e'}
+ set ::acs_blank_master(xinha.plugins) [join $quoted ", "]
+
+ set xinha_options ""
+ foreach e {width height folder_id fs_package_id file_types} {
+ if {[info exists options($e)]} {
+ append xinha_options "xinha_config.$e = '[ad_urlencode $options($e)]';\n"
+ }
+ }
+ set ::acs_blank_master(xinha.options) $xinha_options
lappend ::acs_blank_master__htmlareas $attributes(id)
append output ""
}
Index: openacs-4/www/blank-master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.adp,v
diff -u -N -r1.18.2.3 -r1.18.2.4
--- openacs-4/www/blank-master.adp 2 Nov 2005 03:45:55 -0000 1.18.2.3
+++ openacs-4/www/blank-master.adp 11 Nov 2005 21:25:30 -0000 1.18.2.4
@@ -10,17 +10,17 @@
-