public
Description: FCKEditor for the Radiant CMS
Homepage:
Clone URL: git://github.com/djcp/radiant-fckeditor.git
djcp (author)
Tue Apr 21 06:42:27 -0700 2009
commit  764a8fde2d744ce81469af15a0e89c6f964af27f
tree    40a87d7f53d82dd71717d117967340004ee52e01
parent  1b4f8fa9f918ead8bd3829d1d074ce5e33833721
radiant-fckeditor / fckeditor_extension.rb
100644 28 lines (23 sloc) 1.055 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Uncomment this if you reference any of your controllers in activate
require_dependency 'application'
 
class FckeditorExtension < Radiant::Extension
  version "0.5"
  description "Adds the FCKEditor editor - with file uploads and spell checking."
  url "http://github.com/djcp/radiant-fckeditor/tree/master"
  # ActionView::Base.send(:include, Fckeditor::Helper)
  define_routes do |map|
    map.connect 'fckeditor/:action', :controller => '/fckeditor'
    map.connect 'fckeditor/check_spelling', :controller => '/fckeditor', :action => 'check_spelling'
    map.connect 'fckeditor/command', :controller => '/fckeditor', :action => 'command'
    map.connect 'fckeditor/upload', :controller => '/fckeditor', :action => 'upload'
  end
 
  def activate
    # admin.tabs.add "Fckeditor", "/admin/fckeditor", :after => "Layouts", :visibility => [:all]
    FckeditorFilter
    Admin::PagesController.send :include, FckeditorInterface
    admin.page.edit.add :part_controls, "editor_control"
  end
 
  def deactivate
    # admin.tabs.remove "Fckeditor"
  end
 
end