lib/knj/web.rb in knjrbfw-0.0.66 vs lib/knj/web.rb in knjrbfw-0.0.67

- old
+ new

@@ -387,14 +387,20 @@ html << "<textarea#{self.style_html(css)} class=\"input_textarea\" name=\"#{args[:name].html}\" id=\"#{args[:id].html}\">#{value}</textarea>" elsif args[:type] == :fckeditor args[:height] = 400 if !args[:height] - require "/usr/share/fckeditor/fckeditor.rb" + require "/usr/share/fckeditor/fckeditor.rb" if !Kernel.const_defined?(:FCKeditor) fck = FCKeditor.new(args[:name]) fck.Height = args[:height].to_i fck.Value = value html << fck.CreateHtml + elsif args[:type] == :ckeditor + args[:height] = 400 if !args[:height] + require "ckeditor4ruby" if !Kernel.const_defined?(:CKEditor) + ck = CKEditor.new + ck.return_output = true + html << ck.editor(args[:name], value) elsif args[:type] == :select attr["multiple"] = "multiple" if args[:multiple] attr["size"] = args["size"] if args[:size] html << "<select#{self.attr_html(attr)}>" \ No newline at end of file