There is no version of rails (can be set up, mainly to upload their own functions to achieve), but there is a plugin to achieve this feature,
Have upload files, spell-checking function.
1. First of all, to http://rubyforge.org/frs/?group_id=2038, download 0.51 version, unzip the folder to rename
fckeditor, and on your application / vender / plugins below, file structure like this:
- rblog
- vender
- plugins
- fckeditor
- app
- lib
- public
...
2. In the application root directory and then under the command: rake fckeditor: install install and settings. After the installation is complete you can use the
, The default will create a new public the following uploads directory used to store the file for uploading.
3. Usage: The readme own wrong item, the following is the correct approach. First of all, the page you want to introduce a js file (of course, can also be
Introduced in the layout)
<%= javascript_include_tag :fckeditor %>
(1) non-AJAX way: very simple, first of all you need from your action from an object, if not you will have received a
nil error. Assumed to be @ artical = Artical.new, artical have a content field is used to store the contents of the article
And then call the page:
<%= fckeditor_textarea("artical", "content", :toolbarSet => 'Simple', :width => '100%',
:height => '200px' )%> In this way, @ artical.content will appear in the edit box fckeditor, we have here is empty
(2) AJAX way call:
<%= form_remote_tag :url => @options.merge(:controller => @scaffold_controller),
:before => fckeditor_before_js('note', 'text') %>
<%= fckeditor_textarea( "artical", "content", :ajax => true ) %>
<%= end_form_tag %> (3) If only part of fckeditor functions in public / javascripts / fckcustom.js China and Canada:
FCKConfig.ToolbarSets["Wap"] = [
['Source','Image']
] ; 






