将CKEditor与Rails 3.2集成 [英] Integrating CKEditor with Rails 3.2
问题描述
类似于
< script type =text / javascript>
var CKEDITOR_BASEPATH ='/ assets / ckeditor /';
< / script>
<%= javascript_include_tagapplication%>
您不需要设置config.assets.precompile任何东西。
Similar to Integrating CKEditor with Rails 3.1 Asset Pipline
I am trying to integrate ckeditor
with my rails 3.2
application.
I have all ckeditor files copied under /app/assets/javascripts/ckeditor/*
.
I have the following lines in my application.js
and application.js
is included in my layout file:
//= require jquery
//= require jquery_ujs
//= require ckeditor/ckeditor
//= require_self
Taken it from the answer to Integrating CKEditor with Rails 3.1 Asset Pipline
I can understand that I need to add something like:
config.assets.precompile += your_files
to my development.rb
file so that all the ckeditor files are precompiled when the application is loaded.
Although I tried a couple of paths, non worked and I keep getting the following error:
Can someone please tell me the right regular expresion to include all files for precompile, please?
I encountered the same problem and found a solution.Go to the following Link: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Specifying_the_Editor_Path
<script type="text/javascript">
var CKEDITOR_BASEPATH = '/assets/ckeditor/';
</script>
<%= javascript_include_tag "application" %>
you don't need to set config.assets.precompile anything.
这篇关于将CKEditor与Rails 3.2集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!