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.178 -r1.179 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 30 Jun 2010 12:38:58 -0000 1.178 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 30 Jun 2010 18:22:00 -0000 1.179 @@ -1152,6 +1152,46 @@ ########################################################### # + # ::xowiki::formfield::richtext::ckeditor + # + ########################################################### + Class richtext::ckeditor -superclass richtext -parameter { + {editor ckeditor} + {mode wysiwyg} + {CSSclass ckeditor} + } + richtext::ckeditor set editor_mixin 1 + richtext::ckeditor instproc initialize {} { + next + my set widget_type richtext + } + richtext::ckeditor instproc render_input {} { + set disabled [expr {[my exists disabled] && [my disabled] ne "false"}] + if {![my istype ::xowiki::formfield::richtext] || $disabled } { + my render_richtext_as_div + } else { + ::xo::Page requireJS "/resources/xowiki/ckeditor/ckeditor.js" + #::xo::Page requireJS "/resources/xowiki/ckeditor/adapters/jquery.js" + + set name [my name] + set mode [my mode] + +# ::xo::Page requireJS { +# $( 'textarea.ckeditor' ).ckeditor(); +# } + ::xo::Page requireJS [subst -nocommands -nobackslash { + YAHOO.util.Event.onDOMReady(function () { + CKEDITOR.replace( '$name' ); + CKEDITOR.instances.$name.setMode( '$mode' ); + }); + }] + + next + } + } + + ########################################################### + # # ::xowiki::formfield::richtext::wym # ########################################################### @@ -1223,6 +1263,7 @@ next } } + ########################################################### # # ::xowiki::formfield::richtext::xinha