fckeditor http://rubyforge.org/frs/?group_id=2038&release_id=23116 最新版本 0.5.1
复制到plugins下面 执行 rake fckeditor:install
执行成功后重启web server
<%= javascript_include_tag :fckeditor %>
出现 undefined method `relative_url_root ' for ActionController::CgiRequest
是因为rails2.2已经没有 relative_url_root 这个方法了
所以要改2个地方
app/controllers/fckeditor_controller.rb
找到
uploaded = request.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"
改成
uploaded =
ActionController::Base.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"
找到
js_path = "#{request.relative_url_root}/javascripts"
改成
js_path = "#{ActionController::Base.relative_url_root}/javascripts"
重启web server
ok
上传图片
出现js错误
app/controllers/fckeditor_controller.rb
upload_file方法最后返回JS改成
render :text => %Q'<script>window.parent.OnUploadCompleted(#{@errorNumber},\"#{UPLOADED}/#{params[:Type]}/#{Time.now.year}/#{Time.now.month}/#{@new_file.original_filename}\",\"#{@new_file.original_filename}\",\"\");</script>'
修改上传文件夹
def date_directory_path
base_dir = "#{UPLOADED_ROOT}/#{params[:Type]}/#{Time.now.year}/#{Time.now.month}"
FileUtils.mkdir_p base_dir
"#{base_dir}"
end
分享到:
相关推荐
FCKeditor-2.2.gz FCKeditor - JSP Integration Pack ver 2.2
这是经过修改的FCKEditor,很不错的!不下可惜了!!
FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可使用。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合...
FCKeditor-2.2.gz.tar编辑器
FCKeditor.Net_2.6.3.zip和FCKeditor-v2.6.3
FreeTextBox 3.2.1与FCKeditor 2.2,参考我的博客使用!
FCKeditor 2.2 + Asp.Net 设置 自己整理的包括常用的网址,希望对大家有用
php的html编辑器,用来编辑Php中关于文件中标签的编辑
FCKeditor为一开源多功能在线Web编辑器。官方网站:http://www.fckeditor.net/。相关安全文件参看:《在.net中使用Fckeditor》 http://cliffever.cnblogs.com/archive/2006/05/09/395134.aspx《FCKeditor 實戰技巧...
包含可成功运行的项目源码文件,支持Asp.net2.0 基于:FCKeditor.Net_2.2、FCKeditor_2.3.2 希望对大家有所帮助
Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤
fckeditor_with_Ajax File_Image_Manager
目前做网站的最好软件
NULL 博文链接:https://wangchao-17915566.iteye.com/blog/408517
2.解压缩到你的站点根文件夹中名为FCKEDITOR的文件夹中(名称必须为FCKEDITOR,因为配置文件中已经使用此名称来标示出FCKEDITOR的位置) 3.现在,编辑器就可以使用了,如果想要查看演示,可以按下面方法访问: ...
兼容目前的浏览器 里面包含FCKeditor编辑器和控件 一、集成方法 FCKeditor应用在ASP.NET上,需要两组文件,一组是FCKeditor本身,另一个是用于ASP.NET的FCKeditor控件(分为1.1和2.0两个版本,这里使用2.0版本)。 ...
1 FCKeditor的下载及介绍 4 1.1 下载地址 4 1.2 FCKeditor下载包的介绍 4 2 FCKeditor的目录和文件精简 4 3 在页面创建FCKeditor 4 3.1 Js创建FCKeditor实例: 4 3.1.1 方法一:内嵌方法(推荐) 4 3.1.2 方法二:替换...
fckeditor 源码 demo fckeditor 源码 demo fckeditor 源码 demo fckeditor 源码 demo
FCKeditor开发jar包及fckeditor文件夹
fckEditor,fckEditor,fckEditor