将CKEditor与Rails 3.2集成

编程入门 行业动态 更新时间:2024-10-26 12:21:30
本文介绍了将CKEditor与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: docs.cksource/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集成

本文发布于:2023-11-01 12:13:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549301.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:CKEditor   Rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!