我想用我的配置CKEditor的在我的RoR應用程序使用CKEDITOR,在ROR
我已經下載了我的CKEditor從
http://ckeditor.com/download (.tar.gz)
,然後通過編輯ckeditor.pack其配置(僅添加那些插件,我需要) 然後使用命令編譯它:
java -jar ckpackager.jar ckeditor.pack
然後我檢查了運行我的CKEditor和它完美的罰款。
然後在這個帖子給出:
http://ferric.net/articles/2009/09/07/ckeditor-3-0-and-rails/
我複製我的CKEditor目錄RAILS_ROOT /公/ JavaScript和編輯我的RAILS_ROOT /應用/視圖/佈局/ application.html.erb文件:
<!DOCTYPE html>
<html>
<head>
<title>Reader</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag 'ckeditor/ckeditor.js' %>
<%= csrf_meta_tags %>
<script type="text/javascript">
$(function() {
if ($('textarea').length > 0)
{
var data = $('textarea');
$.each(data, function(i)
{
CKEDITOR.replace(data[i].id);
}
);
}
});
</script>
</head>
<body>
<%= yield %>
</body>
</html>
但是,當我試圖運行我的看法,那就是:
<h2> Write your article</h2>
<p>
<textarea >Test Text</textarea>
</p>
我得到一個簡單的文本區域,而不是C keditor。
當我試圖找出它說的原因:
Request URL:http://localhost:3000/assets/ckeditor/ckeditor.js
Request Method:GET
Status Code:404 Not Found
是什麼,是我做錯了,我怎麼可以用我在ROR CKEditor的?
我手工安裝它,因爲我已經配置它按我使用的工作,我一直在我的CKEditor目錄中的文件夾入資產,但我仍然得到404。任何幫助? – d34th4ck3r
你能上傳你的ckeditor文件夾嗎?稍後我可以自己看看... –