public
Description: FCKEditor for the Radiant CMS
Homepage:
Clone URL: git://github.com/djcp/radiant-fckeditor.git
radiant-fckeditor / fckeditor_extension.rb
100644 28 lines (23 sloc) 1.066 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_controller'
 
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